diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-08-30 08:40:03 (GMT) |
---|---|---|
committer | Casper van Donderen <casper.vandonderen@nokia.com> | 2011-08-30 08:40:03 (GMT) |
commit | 7f27ebb0383414f15f391151655e5b09952f8ccd (patch) | |
tree | 8af7b866af6115924a13896013f5b6f5da686de6 | |
parent | 3dccb66b3b81627fb70c7eeccdf32b96d8add8b7 (diff) | |
parent | 78c5825cfb7702350636b7624bf79311dbd0dbd5 (diff) | |
download | Qt-7f27ebb0383414f15f391151655e5b09952f8ccd.zip Qt-7f27ebb0383414f15f391151655e5b09952f8ccd.tar.gz Qt-7f27ebb0383414f15f391151655e5b09952f8ccd.tar.bz2 |
Merge remote branch 'mainline/4.8'
747 files changed, 31265 insertions, 9564 deletions
diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp index df208e3..0cc3777 100644 --- a/config.tests/mac/xcodeversion.cpp +++ b/config.tests/mac/xcodeversion.cpp @@ -73,7 +73,7 @@ int main(int argc, const char **argv) const char * ok3 ="3.0"; // ptr = fail1; // printf ("string: %s\n", ptr); - + int length = strlen(ptr); if (length < 3) // expect "x.y" at least return internal_error; @@ -94,6 +94,6 @@ int main(int argc, const char **argv) if (ptr[4] < '1') return fail; - + return success; -}
\ No newline at end of file +} @@ -3269,6 +3269,10 @@ if [ "$QT_CROSS_COMPILE" = "yes" ]; then fi fi +if [ ! -n "$PKG_CONFIG" ]; then + QT_CONFIG="$QT_CONFIG no-pkg-config" +fi + # process CFG_MAC_ARCHS if [ "$PLATFORM_MAC" = "yes" ]; then # check -arch arguments for validity. diff --git a/demos/embedded/lightmaps/lightmaps.h b/demos/embedded/lightmaps/lightmaps.h index 45b5c18..0e458ea 100644 --- a/demos/embedded/lightmaps/lightmaps.h +++ b/demos/embedded/lightmaps/lightmaps.h @@ -85,4 +85,4 @@ private: bool invert; }; -#endif
\ No newline at end of file +#endif diff --git a/demos/embedded/lightmaps/mapzoom.h b/demos/embedded/lightmaps/mapzoom.h index ac70a23..935660c 100644 --- a/demos/embedded/lightmaps/mapzoom.h +++ b/demos/embedded/lightmaps/mapzoom.h @@ -66,4 +66,4 @@ private: QNetworkSession *networkSession; }; -#endif
\ No newline at end of file +#endif diff --git a/demos/embedded/lightmaps/slippymap.h b/demos/embedded/lightmaps/slippymap.h index 64ba5c3..480dc81 100644 --- a/demos/embedded/lightmaps/slippymap.h +++ b/demos/embedded/lightmaps/slippymap.h @@ -84,4 +84,4 @@ private: QUrl m_url; }; -#endif
\ No newline at end of file +#endif diff --git a/demos/mobile/guitartuner/src/guitartuner.rc b/demos/mobile/guitartuner/src/guitartuner.rc index 85cee0b..b4f7a11 100644 --- a/demos/mobile/guitartuner/src/guitartuner.rc +++ b/demos/mobile/guitartuner/src/guitartuner.rc @@ -20,4 +20,4 @@ BEGIN BEGIN VALUE "Translation", 0x409, 1252 END -END
\ No newline at end of file +END diff --git a/dist/changes-4.7.4 b/dist/changes-4.7.4 index a37e66a..9a08d15 100644 --- a/dist/changes-4.7.4 +++ b/dist/changes-4.7.4 @@ -19,13 +19,317 @@ Merge Request: http://qt.gitorious.org * Library * **************************************************************************** +QtGui +----- + + - [QTBUG-20214] QRentBook: LSK and RSK of booking page will change + somethimes + - [QTBUG-19656] Spectrum: the Mode menu disappears after the device is + changed from portrait to landscape. + - [QTBUG-19260] Cursor cannot be placed between letters f and i - "fi" + is interpreted as one character + - [QTBUG-19157] Crash in QGLContextPrivate::bindTexture() when using + QPainter::fillRect() with a brush having a size > max_texture_size + - [QTBUG-19089] TextInput positionToRectangle doesn't return correct + coordinates for the cursor in pre-edit mode + - [QTBUG-19067] Font glyphs get clipped on the top + - [QTBUG-18500] QTextBlock crash + - [QTBUG-18303] Arabic multiline text is clipped on the right + - [QTBUG-18185] QStaticText: Wrong kerning and baselines when rotating a + QGraphicsView + - [QTBUG-17443] Feedreadercrash: when opening feed with unicode characters + - [QTBUG-17244] QGraphicsLayout Layouting should be done in one go. Ugly + layouting visible otherwise + - [QTBUG-17209] Bug-231 introduces an off-by-one error + - [QTBUG-17117] Arabic reordering problem when 2 fonts are used + - [QTBUG-11131] QAbstractScrollArea::setViewport() causes crash when used + from within event handler method + - [QTBUG-16422] Big coordinate values cause segfault on ARM when calling + QGraphicsEllipseItem::contains + - [QTBUG-18017] Regression: Text selection with shift-click stopped working + - [QTBUG-18192] Crash when invoking blockBoundingRect over a QTextDocument + documentLayout + - [QTBUG-17505] Inflexible focus handling in QGraphicsScene + - [QTBUG-17020] QPainter::drawText() fails to draw correct text in some + circumstances. Related to QTBUG-12950 + - [QTBUG-16401] QGraphicsScene returns focus incorrectly when QGraphicsView + is focused + - [QTBUG-17812] regression: qsortfilterproxymodel::reset doesn't invalidate + the model (Windows) + - [QTBUG-17230] QPlainTextEdit corruption/crash after scrolling + - [QTBUG-17536] qguistatemachine::cloneEvent doesn't clone + GraphicsSceneWheel Events correctly + - [QTBUG-17254] XPM files crash QImage (write) + - [QTBUG-16292] QTreeView crash in indexRowSizeHint/itemHeight + - [QTBUG-17390] Child widgets don't inherit their parent's input contexts + - [QTBUG-15910] setstylesheet on a QComboBox causes a segmentation fault + - [QTBUG-16652] Compilation of "4.7" branch fails: + private/qdrawhelper_arm_simd_p.h: No such file or directory + +QtNetwork +--------- + + - [QTBUG-17464] SIGBUS in fetchAndAddOrdered from + QlcdEngine::connectionStateSignalsSlot + - [QTBUG-16022] QHttpNetworkConnectionChannel::expand discards data if + gzip-stream has missing end-of-stream marker + - [QTBUG-17199] ICD Bearer management: Causes the main thread to hang + when ran on a different thread. + +QtCore +------ + + - [QTBUG-15421] QDirIterator returns hidden directories when it should only + return files and returns hidden files when it should only return + directories + +QtScript +-------- + + - [QTBUG-17815] Missing APIShims in obsoleted QScriptValue constructor + - [QTBUG-17788] Crash when calling collectGarbage() after requesting + arguments object of native context + +QtDBus +------ + + - [QTBUG-14228] Ensure Qt 4.7 doesn't crash when a D-Bus message with file + descriptors is received + +QtSql +----- + + - [QTBUG-14831] Dynamic sorting of a QSortFilterProxyModel on a + QSqlTableModel with OnManualSubmit is broken (4.7 regression) + +Declarative +----------- + + - [QTBUG-20159] No effect of setting color on a QStaticText or a + QML element + - [QTBUG-18428] Colored and underlined styled text are not underlined or + completely coloured on device + - [QTBUG-18362] wigglytext.qml does not behave correctly in qmlscene + - [QTBUG-18266] More than one XmlListModel - Lists randomly show data from + wrong model + - [QTBUG-15983] Cannot pass enum value as signal parameter from C++ to QML + - [QTBUG-14974] ListView and GridView + contentY performance + - [QTBUG-18412] Crash in sendPostedEvents() - QObject::isWidgetType() + (issue with QDeclarativePixmapReply) + - [QTBUG-15356] PathView doesn't update if preferredHighlightBegin and + preferredHighlightEnd changed + - [QTBUG-17562] TextInput text in echo mode PasswordEchoOnEdit revealed + on refocus + - [QTBUG-17775] Crash when using FolderListModel with a repeater + - [QTBUG-17361] Nested pressDelays crashes application + - [QTBUG-15705] QDeclarativeTextInput::mousePressEvent() doesn't call + QInputContext::mouseHandler() + - [QTBUG-17501] Focus: Tap any of the Rounded-cornered rectangle, the + context menu doesn't disappear. + - [QTBUG-17008] ListView + XmlListModel freeze application when change + language key combination + - [QTBUG-17324] incorrect 'version is not installed' error when importing + QML module + - [QTBUG-16999] QML TextInput doesn't scroll if writing preedit at the end + of the line + - [QTBUG-13451] Support property versioning in QML + - [QTBUG-16959] Crash when using Grid.TopToBottom flow with Repeater + inside Grid + - [QTBUG-16522] QML ListView Should Support Dynamic Headers and Footers + - [QTBUG-17114] QtQuick 1.1 alignment regression + - [QTBUG-16283] TextEdit and TextInput need text selection modes + - [QTBUG-16284] Disable drag and drop in TextEdit and TextInput + +OpenVG +------ + - [QTBUG-18682] QImage convertToFormat does not work with certain image + formats when default (OpenVG) rendering engine used. + +OpenGL +------ + - [QTBUG-14217] Unresolved symbol QGLWindowSurface::staticMetaObject when + building for Windows Mobile 5.0 with OpenGL ES 1.1 support + - [QTBUG-18184] mingw gcc 4 static build failed in tools/qml because of the + symbol export in libQtOpenGL + - [QTBUG-17256] Change QGLPixmapData load functions to use the + 'convertInPlace' versions of QImage to save memory + +3rdParty +-------- + + - Image formats + * [QTBUG-20425] Update bundled libpng to 1.5.4 (security) + **************************************************************************** * Platform Specific Changes * **************************************************************************** +Qt for Linux/X11 +---------------- + + - Declarative + * [QTBUG-19914] Segfault in QDeclarativeBinding::createBinding triggered + by QMultimediaKit + - gui + * [QTBUG-16175] REG: Qt 4.7/Linux Qt Designer / Qt Creator show multiple + warnings: "Application asked to unregister timer 0x17000002 which is + not registered in this thread. Fix application." + +Qt for Windows +-------------- + + - gui + * [QTBUG-19878] QImage constructor crash when opening some tiff images + - corelib + * [QTBUG-17014] Qt event delivery is unreliable on windows platforms + - declarative + * [QTBUG-19198] ListView lose items + * [QTBUG-18587] Roles are not removed in listmodel + - qmake + * [QTBUG-18537] Compiling Qt on Windows XP x64 using MinGW-w64 fails + +Qt for Mac OS X +--------------- + + - gui + * [QTBUG-20496] Qt does not compile under OSX Lion or llvm-gcc + * [QTBUG-18547] Buffer overrun in QMacPixmapData::macCreatePixels + (QPixmap_mac.cpp) + * [QTBUG-15474] Mac: Qt:Sheet dialog permanently loses focus after + moving the parent window + * [QTBUG-15897] QMainWindow crash in destructor when having a + QDockWidget of type Qt::Drawer containing a QTreeWidget + - corelib + * [QTBUG-11481] Floating Dock Widget behavior on Mac [REGRESSION] + - network + * [QTBUG-14520] SSL Isn't working with osx 10.5 + * [QTBUG-5645] SSL Memory leaks on Mac. + +Qt for Symbian +-------------- + + - general + * [QTBUG-20216] Update QtOpenGL section in Symbian platform notes + - examples + * [QTBUG-15176] Default heap/stack size might not be enough for symbian + - qmake & mkspecs + * [QTBUG-20669] Symbian: DEBUGGABLE_UDEBONLY keyword needed in + generated mmp files + * [QTBUG-20192] Qt sis can't be created on symbian^1 5.0 and + symbian^3 PS2 environments + * [QTBUG-18207] QMAKE_CLEAN items with wildcards in symbian-abld + builds will halt the build without obvious reason. + * [QTBUG-17927] Simplified Chinese language is not supported + in Qt 4.7.2 + - openvg + * [QTBUG-20339] when camera application is opened and closed, the qml + application in the background is getting closed + * [QTBUG-18027] Lazy conversion in fromSymbianCFbsBitmap for openVG + - opengl + * [QTBUG-19183] Enable multisampling if there's hw support for it + on Symbian + * [QTBUG-19180] Simplify texture pooling in GL graphics system + * [QTBUG-18850] Fix orientation change. Current behaviour results to + black screen + * [QTBUG-15254] Implement QPixmap::fromSymbianRSgImage() in the + OpenGL graphics system + * [QTBUG-18209] Native image handle provider support in QGLPixmapData + * [QTBUG-18270] Use destroyed swap behaviour in GL graphics system + on Symbian + * [QTBUG-15252] Implement CFbsBitmap backend for QPixmap in OpenGL + graphics system on Symbian + * [QTBUG-17850] Implement GL graphics system releaseCachedResources() + * [QTBUG-15253] Verify that applications using the OpenGL graphics + system on Symbian consume zero graphics memory when they are + not visible + * [QTBUG-16977] Symbian: Implement QPixmap::fromSymbianCFbsBitmap() in + the OpenGL graphics system + * [QTBUG-16949] Symbian: Recreate EGL surface on native window resize + - gui + * [QTBUG-20255] Regression: Some QMenus are shown completely transparent + in Symbian + * [QTBUG-20240] Regression: QS60Style - All standardIcons are drawn as + "small icons" + * [QTBUG-20813] Disabled splitscreen translation still moves screen + * [QTBUG-20034] Splitview - Auto-translation should translate as + little as possible to ensure visibility of the cursor + * [QTBUG-20007] Symbian: Do not add linked fonts to the QFontDatabase + * [QTBUG-19911] Orientation change causes unnecessary resizes to top + level window on Symbian + * [QTBUG-19880] Drawing a QPixmap to QImage causes a deep copy on + Symbian + * [QTBUG-19864] Predicted word is duplicated when doing an orientation + switch + * [QTBUG-19856] Doing an orientation change while in splitview mode + and closing VKB causes QGraphicsView to be incorrectly resized + * [QTBUG-19782] UI of the QWidget based applications those uses + QGroupBoxs are mess up in latest Symbian RND release + * [QTBUG-19734] KERN-EXEC 3 panic in + QCoeFepInputContext::translateInputWidget() method + * [QTBUG-19689] Textinput: last word inputted was duplicated after + press "Password" button + * [QTBUG-19578] Fix BCM2727 detection function on Symbian + * [QTBUG-19528] Opening symbol menu while typing with prediction on + causes issues + * [QTBUG-19471] Using QFileDialog crashes in Symbian + * [QTBUG-19104] while setting a softkey action in a qt application + on symbian, the icon specified only is shown partially + * [QTBUG-19043] Fullscreen main window with softkeys initially layouts + using full screen dimensions instead of client area dimensions + * [QTBUG-18863] QS60Style: compiling simulated style crashes due to + missing placeHolderTexture implementation + * [QTBUG-18493] Qt reserves graphics resources when launching application + directly to background + * [QTBUG-18486] Control pane (RSK Cancel) of the test note is covered by + "Options, Exit" when re-launching the application from Open applications + list + * [QTBUG-18409] If fullscreen application without softkeys opens a + fullscreen child dialog with softkeys, once the child dialog closes, + softkeys remain visible on applicaiton main screen. + * [QTBUG-17874] autotest failure between Qt 4.6.3 and Qt 4.7.2 in + QLinearGradient::setStops method on Symbian^3 platform + * [QTBUG-17844] Different point size for the font created using QFont + class and returned by QFontDialog + * [QTBUG-16857] Black corners around popup menu in Symbian^3 + * [QTBUG-16785] QML app: After layout switch the focused text input field + is not visible on Split view + * [QTBUG-15031] Predictive text is not committed when writing in a QLineEdit + * [QTBUG-14058] Wrong availableGeometry detected in Symbian + * [QTBUG-17576] GraphicsViews: Focused widget is not visible after + orientation change + * [QTBUG-17930] Regression: Theme background in style is incorrect + * [QTBUG-18024] Don't use EGL surfaces for translucency with 32MB GPU chip + * [QTBUG-17984] QML application: focused text input field is not visible + when split view is opened + - declarative + * [QTBUG-20218] Symbian 5.3: QML text edit components are sending + software input panel requests + * [QTBUG-19821] Flickr: There is gridding on picture + * [QTBUG-19669] All events that QDeclarativeDebugTrace shows on + Symbian are of duration '0' + * [QTBUG-18869] Compilation breakage for Symbian (qmltooling) + * [QTBUG-18549] Animation timer seems to take too long time to expire + during scrolling a qml list in Symbian device. + * [QTBUG-17592] qml.pri causes havoc on Symbian 3.2 and 5.0 + - network + * [QTBUG-18795] QNetworkConfigurationManager::allConfigurations + (QNetworkConfiguration::Active) not returning any active configuration + when instantiated and called from Secondary thread + * [QTBUG-18722] QDesktopServices::openUrl() doesn't handle URL encodings + correctly + * [QTBUG-18572] Crash with KERN-EXEC 0 when + QNetworkConfigurationManagerPrivate fails to connect + - corelib + * [QTBUG-17776] Qmlviewer: qmlviewer will crash after closing the + application "flickr demo" + **************************************************************************** * Tools * **************************************************************************** + - [QTBUG-18595] Enable remote debugging for qmlviewer + - [QTBUG-18063] qdoc3 depends on private header files from QML + - [QTBUG-16462] qdoc3 segfaults due to a uninitialized member variable + when using the WebXML output. diff --git a/doc/doc.pri b/doc/doc.pri index 253e1b4..9d67386 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -14,6 +14,8 @@ win32:!win32-g++* { } COPYWEBKITGUIDE = $$QT_SOURCE_TREE/examples/webkit/webkit-guide +COPYWEBKITTARGA = $$QT_BUILD_TREE/doc-build/html-qt +COPYWEBKITTARGB = $$QT_BUILD_TREE/doc/html $$unixstyle { QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/bin/qdoc3 $$DOCS_GENERATION_DEFINES @@ -21,12 +23,14 @@ $$unixstyle { QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/bin/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") COPYWEBKITGUIDE = $$replace(COPYWEBKITGUIDE, "/", "\\") + COPYWEBKITTARGA = $$replace(COPYWEBKITTARGA, "/", "\\") + COPYWEBKITTARGB = $$replace(COPYWEBKITTARGB, "/", "\\") } ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \ (cd $$QT_BUILD_TREE && \ - $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc-build/html-qt && \ + $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$COPYWEBKITTARGA && \ $$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \ $$GENERATOR doc-build/html-assistant/assistant.qhp -o doc/qch/assistant.qch && \ $$GENERATOR doc-build/html-designer/designer.qhp -o doc/qch/designer.qch && \ @@ -52,7 +56,7 @@ win32-g++*:isEmpty(QMAKE_SH) { } # Build rules: -adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$QT_BUILD_TREE/doc/html) +adp_docs.commands = ($$QDOC $$ADP_DOCS_QDOCCONF_FILE && $$QMAKE_COPY_DIR $$COPYWEBKITGUIDE $$COPYWEBKITTARGB) adp_docs.depends += sub-qdoc3 # qdoc3 qch_docs.commands = $$QT_DOCUMENTATION qch_docs.depends += sub-qdoc3 diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index cecccf6..d89ca53 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -46,7 +46,7 @@ Qt applications. \section1 Getting Started \list -\o \l{Introduction to Qt Quick} +\o \l{Intro to Qt Quick}{Introduction to Qt Quick} \o \l{QML for Qt Programmers}{QML Programming for Qt Programmers} \o \l{Getting Started Programming with QML} diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 80d83a4..efca620 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -407,7 +407,7 @@ In case you have to create a qmltypes file manually or need to adjust an existing one, this is the file format: \qml -import QtQuick.tooling 1.0 +import QtQuick.tooling 1.1 // There always is a single Module object that contains all // Component objects. @@ -454,6 +454,8 @@ Module { isPointer: true // defaults to false: whether the type actually is a QDeclarativeListProperty<type> isList: true + // defaults to 0: the minor version that introduced this property + revision: 1 } Property { name: "loops"; type: "int" } Property { name: "name"; type: "string" } @@ -471,7 +473,7 @@ Module { // declarations also support the isReadonly, isPointer and isList // attributes which mean the same as for Property Method { name: "restart" } - Signal { name: "started" } + Signal { name: "started"; revision: 2 } Signal { name: "runningChanged" Parameter { type: "bool" } diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index cb83542..0ebf8ae 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -134,10 +134,9 @@ One of the URL schemes built into Qt is the "qrc" scheme. This allows content to the executable using \l{The Qt Resource System}. Using this, an executable can reference QML content that is compiled into the executable: -\code - QDeclarativeView *canvas = new QDeclarativeView; - canvas->setUrl(QUrl("qrc:/dial.qml")); -\endcode +\quotefromfile snippets/declarative/qtbinding/resources/main.cpp +\skipto view +\printuntil setSource The content itself can then use relative URLs, and so be transparently unaware that the content is compiled into the executable. diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index 55f38c3..9857894 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -133,4 +133,26 @@ The \l {declarative/animation/states}{States and Transitions example} demonstrates how to declare a basic set of states and apply animated transitions between them. +\l{Using QML Behaviors with States} explains a common problem when using Behaviors +to animate state changes. + +\section1 State Fast Forwarding + +In order for Transition to correctly animate state changes, it is sometimes necessary +for the engine to fast forward and rewind a state (that is, internally set and unset the state) +before it is finally applied. The process is as follows: + +\list 1 +\o The state is fast forwarded to determine the complete set of end values. +\o The state is rewound. +\o The state is fully applied, with transitions. +\endlist + +In some cases this may cause unintended behavior. For example, a state that changes +a view's \i model or a Loader's \i sourceComponent will set these properties +multiple times (to apply, rewind, and then reapply), which can be relatively expensive. + +State fast forwarding should be considered an implementation detail, +and may change in later versions. + */ diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 0d99287..e342728 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -511,12 +511,16 @@ the \l {Extending QML Functionalities using C++} reference documentation for more information. -\section2 Using Enumeration Values as Signal Parameters +\section2 Using Enumeration Values as Signal and Method Parameters C++ signals may pass enumeration values as signal parameters to QML, providing that the enumeration and the signal are declared within the same class, or that the enumeration value is one of those declared in the \l {Qt}{Qt Namespace}. +Likewise, invokable C++ methods parameters may be enumeration values providing that the enumeration and +the method are declared within the same class, or that the enumeration value is one of those declared in the +\l {Qt}{Qt Namespace}. + Additionally, if a C++ signal with an enum parameter should be connectable to a QML function using the \l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}{connect()} function, the enum type must be registered using qRegisterMetaType(). diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc index 4cd5db3..bdad2c3 100644 --- a/doc/src/declarative/qtquick-intro.qdoc +++ b/doc/src/declarative/qtquick-intro.qdoc @@ -27,7 +27,7 @@ /*! \page qml-intro.html -\title Introduction to Qt Quick +\title Intro to Qt Quick Qt Quick is a collection of technologies that are designed to help developers create the kind of intuitive, modern, and fluid user interfaces that are diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index 184a881..329bac5 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -3116,6 +3116,23 @@ platform application shell. In addition it will make the application to be launched in background. + From S60 version 5.4 onwards, you can specify \c graphics_memory value using \c RSS_RULES + to specify the graphics memory quota for the application. The value is in kilobytes and + defaults to 24576 (i.e. 24MB) for applications that link against QtGui. The default for all + other applications is zero. + + The graphics memory quota tells the operating system how much graphics memory the + application is likely to need so that it can free up enough graphics memory prior to + application launch. If the value is too small, it can cause random slowdowns later when + the memory is freed on on-demand basis. On the other hand, too large values can delay + the application launch unnecessarily. + + For example: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 159 + + This example sets the graphics memory quota to 12MB. + For detailed list of possible \c APP_REGISTRATION_INFO statements, please refer to the Symbian platform help. diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index af418e0..2490374 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -38,7 +38,9 @@ \list \o \l{Qt Features Overview} \o \l{How to Learn Qt} - \o \l{Introduction to Qt Quick} + \o \l{Introduction to Qt Quick}{Qt Quick} + \o \l{Qt Whitepaper}{Qt C++ Framework} + \o \l{Intro to Qt Quick}{Qt Quick} \o \l{external: Qt Mobility Manual}{Qt Mobility} \o \l{Qt WebKit} \endlist diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index ba59c37..9d47695 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -334,8 +334,8 @@ \section2 Advanced Text Layout Engine - Qt for Windows CE supports TrueType and raster fonts. Qt also has - extended Unicode support and right-to-left languages. Qt's rich text + Qt for Windows CE supports TrueType and raster fonts. Qt also has + extended Unicode support and right-to-left languages. Qts rich text engine adds capabilities for complex text layouts including tables, path tracing and text which flows around shapes. @@ -373,7 +373,7 @@ by embedded Linux. You can use Qt to create highly memory efficient devices and applications that have completely unique user experiences. - Qt runs anywhere Linux runs. Qt's intuitive API means fewer lines of + Qt runs anywhere Linux runs. Qts intuitive API means fewer lines of code and higher level functionality in less time. Use the code from one single code-base and rebuild for all \l{Supported Platforms} {supported platforms}. @@ -410,7 +410,7 @@ frame buffer} that will match the physical device display, pixel for pixel. This gives the developer a realistic testing infrastructure testing on the desktop where the frame buffer simulates the physical - device display's width, height and color depth. + device displays width, height and color depth. \section2 Inter-Process Communication (IPC) @@ -421,7 +421,7 @@ \section2 Extended Font Format Qt supports a wide range of font formats on embedded Linux including: - TrueType, Postscript Type1 and Qt pre-rendered fonts. Qt has + TrueType, Postscript Type1 and Qt pre-rendered fonts. Qt has extended Unicode support including automatic data extraction at build time and automatic update at runtime. @@ -681,7 +681,7 @@ \group platform-details Qt is a cross-platform application and UI framework. Using Qt, - you can write GUI applications once and deploy them + you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code. diff --git a/doc/src/qt-features.qdoc b/doc/src/qt-features.qdoc deleted file mode 100644 index 0ae00b0..0000000 --- a/doc/src/qt-features.qdoc +++ /dev/null @@ -1,204 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** GNU Free Documentation License -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms -** and conditions contained in a signed written agreement between you -** and Nokia. -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \page qt-overview.html - \title Qt Features Overview - - This document provides a summary of the most important features of Qt, - providing links to other pages in the documentation that cover these - features in more detail. It is not intended to be a comprehensive - guide to Qt's features. - - \section1 Fundamental Technologies in Qt - - Qt is built upon a set of core technologies, provided by the \l QtCore - and \l QtGui modules. These include the following: - - \list - \o \l{The Tulip Container Classes}, a set of template container classes. - \o \l{The Arthur Paint System}, the Qt 4 painting framework. - \o \l{The Interview Framework}, a model/view architecture for item views - and the \l{QtSQL Module}, which also uses this architecture. - \o \l{The Scribe Classes}, a framework for creating text documents, - performing low-level text layout and writing OpenDocument files. - \o A collection of \l{Qt Widget Gallery}{common desktop widgets}, styled - to fit in on each supported platform. - \o \l{The Qt 4 Main Window Classes}, a main window, toolbar, menu, and - docking architecture. - \o The \l{Graphics View} framework provides a canvas for producing - interactive graphics. - \o The \l{QtNetwork Module} provides support for TCP, UDP and local - sockets that are integrated with Qt's event model, including support - for Secure Socket Layer (SSL) communications, - \l{QNetworkProxy}{network proxy} servers and - \l{Bearer Management}{network bearer management}. - \o Enhanced \l{qt4-threads.html}{thread support} allows - \l{Signals & Slots}{signal-slot} connections across threads and - per-thread event loops. - Additionally, \l{Thread Support in Qt}{a framework for concurrent programming} - using Qt paradigms makes common threading tasks easier. - \o A \l{resource system} for embedding images and other resource files - into executable files makes it easier to deploy applications. - \o A \l{QTestLib Manual}{unit testing framework} for Qt applications and - libraries. - \endlist - - The mature classes provided by these technologies have been used to build - robust, cross-platform desktop applications. They are augmented by a number - of additional technologies and improvements that have appeared over the - lifetime of Qt 4. - - \section1 Graphical User Interfaces - - \div{class="float-right"} - \inlineimage gtk-tabwidget.png - \enddiv - \div{class="float-right"} - \inlineimage gtk-progressbar.png - \br - \inlineimage gtk-checkbox.png - \br - \inlineimage plastique-combobox.png - \br - \inlineimage plastique-radiobutton.png - \enddiv - - Alongside the support for traditional desktop user interfaces, Qt includes - support for declarative UI development with \l{Qt Quick}, a set of - technologies for creating fluid, dynamic user interfaces. A starting point - for exploring this approach can be found in the \l{Introduction to Qt Quick} - guide. - - Qt provides a range of standard user interface elements, called widgets, - for each supported platform. Widgets can be used as containers for other - widgets, as windows, and as regular controls that the user interacts with. - Where the platform supports it, widgets can be made to appear partially - transparent, and may be styled with \l{Qt Style Sheets}. - - Support for \l{QTouchEvent}{touch input} and \l{Gestures Programming}{gestures} - enable widgets to be used to create intuitive user interfaces for - touch-enabled devices. - - User interfaces can also be created dynamically at run-time with the - features provided by the \l{QtUiTools} module. - - A selection of available widgets are shown in the \l{Qt Widget Gallery}. - An introduction to the concepts behind widgets can be found in the - \l{Widgets Tutorial}. - - \clearfloat - \section1 Painting, Printing and Rendering - - \div{class="float-left"} - \inlineimage qpainter-affinetransformations.png - \enddiv - - Widgets are just one of many kinds of paint device that Qt can render onto. - This support for unified painting makes it possible for applications to use - the same painting code for different tasks, as well as allowing Qt to be - extended to support additional file formats. - - Qt provides support for common bitmap image formats, - \l{QtSvg Module}{Scalable Vector Graphics} (SVG) drawings and animations, - Postscript and Portable Document Format (PDF) files. Postscript and PDF are - integrated with \l{Printing with Qt}{Qt's printing system}, which also - allows printed output to be previewed. - - Interactive graphics can be created with the - \l{The Animation Framework}{animation framework}, allowing animations to be - used with both widgets and graphics items. Animations can be used with the - \l{The State Machine Framework}{state machine framework}, which provides a - way to express application logic and integrate it with the user interface. - Animations can be enhanced with a collection of - \l{QGraphicsEffect}{graphics effects} that operate on graphics items and - can be applied individually or combined to create more complex effects. - - Qt supports integration with \l{QtOpenGL}{OpenGL} on a number of levels, - providing convenience functions for handling textures and colors, as well - as providing support for pixel and sample buffers. Future support for - higher level 3D integration is provided by Qt3D enablers which include - \l{QMatrix4x4}{matrix multiplication}, \l{QQuaternion}{quaternions}, and an - API for \l{QGLShader}{vertex and fragment shaders}. - - Two APIs are provided for multimedia. The - \l{Phonon Overview}{Phonon Multimedia Framework} has traditionally been - used on desktop platforms. A set of - \l{QtMultimedia Module}{multimedia services} provides low-level access to - the system's audio system and is often used on mobile devices. - - \clearfloat - \section1 Infrastructure - - \div{class="float-right"} - \inlineimage qtscript-context2d.png - \enddiv - - Facilities for Inter-Process Communication (IPC) and Remote Procedure - Calling (RPC) mechanisms are available on platforms that support the - \l{intro-to-dbus.html}{D-Bus} message bus system. - - An \l{Undo Framework}{Undo framework} based on the - \l{Books about GUI Design#Design Patterns}{Command pattern} is designed to - enable a consistent approach to handling data in editing applications. - - The \l{QtScript} and \l{QtScriptTools} modules provide support for - application scripting and debugging using the ECMAScript language. - - The \l{QtHelp Module} provides the foundations of an interactive help - system that can be used in conjunction with Qt Creator or integrated into - applications directly. - - XML handling is supported in a number of places in Qt. The \l QtCore module - provides classes for reading and writing XML streams. The \l QtXmlPatterns - module includes XQuery, XPath and XSLT support, providing facilities for - XML processing beyond that supported by the QtXml module, which contains - SAX and DOM parsers. XML schema validation in the QtXmlPatterns module - covers large parts of version 1.0 of the specification. - - \clearfloat - \section1 Web Client Integration - - Integration between \l{Webkit in Qt}{Qt and WebKit} makes it possible for - developers to use a fully-featured Web browser engine to display documents - and access online services. Developers can access the browser's environment - to create documents and run scripts within one or more browser widgets. - - A \l{QWebElement}{DOM access API} for QtWebKit provides a cleaner and safer - way to access elements and structures of Web pages without the use of - JavaScript. - - \section1 Further Reading - - Many of the technologies mentioned here, as well as other, more specific - features, are listed in the \l{What's New in Qt 4} document. A complete - list of Qt's modules can be found on the \l{All Modules} page, which - also includes more domain-specific technologies. - - The tools that are supplied with Qt are covered by the listing in the - \l{Qt's Tools} document. -*/ diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 01103a8..17dc1af 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -138,7 +138,7 @@ In Qt 4.4: \list - \o \l{WebKit in Qt}{Qt WebKit integration}, making it possible for developers + \o \l{Webkit in QT}{Qt WebKit integration}, making it possible for developers to use a fully-featured Web browser to display documents and access online services. \o A multimedia API provided by the \l{Phonon Overview}{Phonon Multimedia Framework}. @@ -707,6 +707,7 @@ introduced in Qt 4.7. \sincelist 4.7 + */ /*! diff --git a/doc/src/snippets/code/doc_src_qmake-manual.pro b/doc/src/snippets/code/doc_src_qmake-manual.pro index ee35b77..042ca0e 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.pro +++ b/doc/src/snippets/code/doc_src_qmake-manual.pro @@ -1023,3 +1023,7 @@ packagesExist(sqlite3 QtNetwork QtDeclarative) { // Use the fancy UI, as we have extra packages available #endif #! [158] + +#! [159] +RSS_RULES += "graphics_memory=12288;" +#! [159] diff --git a/doc/src/snippets/qcolumnview/main.cpp b/doc/src/snippets/qcolumnview/main.cpp index c39a4bb..fecff12 100644 --- a/doc/src/snippets/qcolumnview/main.cpp +++ b/doc/src/snippets/qcolumnview/main.cpp @@ -76,4 +76,4 @@ int main(int argc, char *argv[]) columnView.show(); return app.exec(); -}
\ No newline at end of file +} diff --git a/doc/src/snippets/textdocument-imagedrop/main.cpp b/doc/src/snippets/textdocument-imagedrop/main.cpp index 24cd2de..0cdf3a1 100644 --- a/doc/src/snippets/textdocument-imagedrop/main.cpp +++ b/doc/src/snippets/textdocument-imagedrop/main.cpp @@ -49,4 +49,4 @@ int main(int argc, char * argv[]) textEdit->show(); return app.exec(); -}
\ No newline at end of file +} diff --git a/doc/src/snippets/textdocument-imagedrop/textedit.h b/doc/src/snippets/textdocument-imagedrop/textedit.h index 9e0492b..9db9f17 100644 --- a/doc/src/snippets/textdocument-imagedrop/textedit.h +++ b/doc/src/snippets/textdocument-imagedrop/textedit.h @@ -46,11 +46,11 @@ class TextEdit : public QTextEdit { Q_OBJECT - -public: + +public: TextEdit(QWidget *parent=0); bool canInsertFromMimeData( const QMimeData *source ) const; void insertFromMimeData( const QMimeData *source ); }; -#endif
\ No newline at end of file +#endif diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp index fde24d9..3b02c63 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp @@ -51,4 +51,4 @@ void DialogPlugin::registerTypes(const char *uri) } //FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs -Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin);
\ No newline at end of file +Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp index c675fc9..52bdfc7 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/directory.cpp @@ -221,4 +221,4 @@ void Directory::refresh() } m_fileList.append(file); } -}
\ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp index 44b0915..17740f2 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/file.cpp @@ -54,4 +54,4 @@ void File::setName(const QString &str){ m_name = str; emit nameChanged(); } -}
\ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h b/examples/tutorials/gettingStarted/gsQml/filedialog/file.h index 21e8ebb..6aa6a6a 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/file.h +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/file.h @@ -64,4 +64,4 @@ class File : public QObject{ QString m_name; }; -#endif
\ No newline at end of file +#endif diff --git a/examples/tutorials/modelview/4_headers/main.cpp b/examples/tutorials/modelview/4_headers/main.cpp index c89829a..8a4ab8f 100755 --- a/examples/tutorials/modelview/4_headers/main.cpp +++ b/examples/tutorials/modelview/4_headers/main.cpp @@ -50,4 +50,4 @@ int main(int argc, char *argv[]) tableView.setModel( &myModel ); tableView.show(); return a.exec(); -}
\ No newline at end of file +} diff --git a/examples/tutorials/threads/clock/clockthread.h b/examples/tutorials/threads/clock/clockthread.h index 966dbea..d77a52b 100644 --- a/examples/tutorials/threads/clock/clockthread.h +++ b/examples/tutorials/threads/clock/clockthread.h @@ -61,4 +61,4 @@ private slots: }; //! [1] -#endif // CLOCKTHREAD_H
\ No newline at end of file +#endif // CLOCKTHREAD_H diff --git a/examples/webkit/fancybrowser/fancybrowser.pro b/examples/webkit/fancybrowser/fancybrowser.pro index 1ed212e..9d3d27e 100644 --- a/examples/webkit/fancybrowser/fancybrowser.pro +++ b/examples/webkit/fancybrowser/fancybrowser.pro @@ -12,8 +12,8 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6C - TARGET.EPOCHEAPSIZE = 0020000 04000000 - TARGET.CAPABILITY += NetworkServices + TARGET.EPOCHEAPSIZE = 0x1000 0x8000000 + TARGET.CAPABILITY += Location NetworkServices include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro index 374d9e3..1cee772 100644 --- a/examples/xml/dombookmarks/dombookmarks.pro +++ b/examples/xml/dombookmarks/dombookmarks.pro @@ -11,11 +11,9 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dombookmarks.pro *.xbel sources.path = $$[QT_INSTALL_EXAMPLES]/xml/dombookmarks INSTALLS += target sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - symbian: { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - addFiles.sources = frank.xbel jennifer.xbel + addFiles.files = frank.xbel jennifer.xbel addFiles.path = files DEPLOYMENT += addFiles } diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro index 0f2d55d..822a1ca 100644 --- a/examples/xml/streambookmarks/streambookmarks.pro +++ b/examples/xml/streambookmarks/streambookmarks.pro @@ -15,7 +15,7 @@ INSTALLS += target sources symbian: { include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) - addFiles.sources = frank.xbel jennifer.xbel + addFiles.files = frank.xbel jennifer.xbel addFiles.path = /data/qt/streambookmarks DEPLOYMENT += addFiles } diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 4025c54..b19eece 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -84,7 +84,11 @@ QMAKE_LIBS_OPENGL_ES2_QT = $$QMAKE_LIBS_OPENGL_ES2 $$QMAKE_LIBS_CFBSBITMAP -lcon QMAKE_LIBS_OPENVG = $$QMAKE_LIBS_CFBSBITMAP -llibOpenVG QMAKE_LIBS_THREAD = -llibpthread QMAKE_LIBS_COMPAT = -QMAKE_LIBS_S60 = -lavkon -leikcoctl -lgfxtrans +QMAKE_LIBS_S60 = -lavkon -leikcoctl + +exists($${EPOCROOT}epoc32/include/platform/mw/akntranseffect.h) { + QMAKE_LIBS_S60 += -lgfxtrans +} exists($${EPOCROOT}epoc32/include/platform/sgresource/sgimage.h) { QMAKE_LIBS_OPENVG += -lsgresource diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf index 470372e..c8fd33b 100644 --- a/mkspecs/features/symbian/default_post.prf +++ b/mkspecs/features/symbian/default_post.prf @@ -19,7 +19,19 @@ contains(TEMPLATE, ".*app") { default_bin_deployment.path += /sys/bin load(application_icon.prf) + + # Specify default graphics memory quota for applications unless explicitly set by developer. + !contains(S60_VERSION, 5.0):!contains(S60_VERSION, 5.1):!contains(S60_VERSION, 5.2):!contains(S60_VERSION, 5.3) { + !contains(RSS_RULES, .*graphics_memory.*) { + contains(QT, gui) { + RSS_RULES += "graphics_memory=24576;" + } else { + RSS_RULES += "graphics_memory=0;" + } + } + } } + contains(TEMPLATE, lib): { contains(CONFIG, staticlib)|contains(CONFIG, static): { # Static libs should not have LIBRARY statements in S60 diff --git a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf b/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf index d69f58d..faec47d 100644 --- a/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf +++ b/mkspecs/qpa/macx-iphonedevice-g++/qmake.conf @@ -43,10 +43,10 @@ QMAKE_CXX = /Developer/Platforms/iPhoneOS.platform/Developer/usr/b QMAKE_LINK = $$QMAKE_CXX QMAKE_LINK_SHLIB = $$QMAKE_CXX -QMAKE_CFLAGS += -arch armv7 -marm -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 +QMAKE_CFLAGS += -arch armv7 -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden -QMAKE_OBJECTIVE_CFLAGS += -arch armv7 -marm -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 -QMAKE_LFLAGS += -arch armv7 -marm -miphoneos-version-min=4.2 -Wl,-syslibroot,$$QMAKE_IOS_SDK +QMAKE_OBJECTIVE_CFLAGS += -arch armv7 -isysroot $$QMAKE_IOS_SDK -fmessage-length=0 -fexceptions -miphoneos-version-min=4.2 +QMAKE_LFLAGS += -arch armv7 -miphoneos-version-min=4.2 -Wl,-syslibroot,$$QMAKE_IOS_SDK QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz QMAKE_INCDIR_OPENGL = diff --git a/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf b/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf index de4c8b4..df8d4e8 100644 --- a/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf +++ b/mkspecs/qpa/macx-iphonesimulator-g++/qmake.conf @@ -23,7 +23,7 @@ DEFINES += QT_NO_AUDIO_BACKEND # You may need to change this to point to the iOS SDK you want to use. QMAKE_IOS_DEV_PATH = /Developer/Platforms/iPhoneSimulator.platform/Developer -QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneSimulator4.2.sdk +QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/iPhoneSimulator4.3.sdk # Set up deployment targets QMAKE_IPHONEOS_DEPLOYMENT_TARGET = 4.0 diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf index 17b1c5f..b252a9c 100644 --- a/mkspecs/symbian-gcce/qmake.conf +++ b/mkspecs/symbian-gcce/qmake.conf @@ -56,7 +56,7 @@ QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup QMAKE_LFLAGS_SHLIB += -shared --default-symver --entry=_E32Dll -u _E32Dll QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script +gcceExtraFlags = --include=$${EPOCROOT}epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float QMAKE_CFLAGS += $${gcceExtraFlags} QMAKE_CXXFLAGS += $${gcceExtraFlags} -x c++ -fexceptions -fno-unit-at-a-time -fvisibility-inlines-hidden -Os #If we are not going to link to Qt or qtmain.lib, we need to include this at least once. diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index a0a8eea..d4db4b9 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -993,7 +993,12 @@ bool SymbianCommonGenerator::parseTsContent(const QString &tsFilename, SymbianLo if (xml.name() == sourceElement) { source = xml.readElementText(); } else if (xml.name() == translationElement) { - translation = xml.readElementText(); + // Technically translation element can have child elements + // i.e. numerusform and lengthvariant. We don't support + // these for actual caption/pkgname translations, but since + // they may be present on other unrelated message elements, + // we need to explicitly skip them to avoid parsing errors. + translation = xml.readElementText(QXmlStreamReader::SkipChildElements); } else { xml.skipCurrentElement(); } diff --git a/src/3rdparty/libpng/ANNOUNCE b/src/3rdparty/libpng/ANNOUNCE index 4a3b018..2a9fb65 100644 --- a/src/3rdparty/libpng/ANNOUNCE +++ b/src/3rdparty/libpng/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.1 - February 3, 2011 +Libpng 1.5.4 - July 7, 2011 This is a public release of libpng, intended for use in production codes. @@ -8,85 +8,184 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - libpng-1.5.1.tar.xz (LZMA-compressed, recommended) - libpng-1.5.1.tar.gz - libpng-1.5.1.tar.bz2 + libpng-1.5.4.tar.xz (LZMA-compressed, recommended) + libpng-1.5.4.tar.gz + libpng-1.5.4.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lpng151.7z (LZMA-compressed, recommended) - lpng151.zip + lpng154.7z (LZMA-compressed, recommended) + lpng154.zip Other information: - libpng-1.5.1-README.txt - libpng-1.5.1-LICENSE.txt + libpng-1.5.4-README.txt + libpng-1.5.4-LICENSE.txt -Changes since the last public release (1.5.0): +Changes since the last public release (1.5.2): - Added description of png_set_crc_action() to the manual. - Added a note in the manual that the type of the iCCP profile was changed - from png_charpp to png_bytepp in png_get_iCCP(). Similarly, - it was changed from png_charpp to png_const_bytepp in png_set_iCCP(). - Ensure that png_rgb_to_gray ignores palette mapped images, if libpng - internally happens to call it with one. - Fixed the failure to handle palette mapped images correctly. - Fixed a bug in handling of interlaced images (bero at arklinux.org). - Updated CMakeLists.txt (Clifford Yapp) - Fixed typecasting of some png_debug() statements (Cosmin) - Updated documentation of png_set|get_tRNS() (Thomas Klausner). - Mentioned in the documentation that applications must #include "zlib.h" - if they need access to anything in zlib.h, and that a number of - macros such as png_memset() are no longer accessible by applications. - Corrected pngvalid gamma test "sample" function to access all of the color - samples of each pixel, instead of sampling the red channel three times. - Changed variable names index, div, exp, and gamma to char_index, divisor, - exp_b10, and gamma_val, respectively, to avoid "shadow" warnings. - Prevent png_push_crc_skip() from hanging while reading an unknown chunk - or an over-large compressed zTXt chunk with the progressive reader. - Eliminated more GCC "shadow" warnings. - Revised png_fixed() in png.c to avoid compiler warning about reaching the - end without returning anything. - In the manual, describe the png_get_IHDR() arguments in the correct order. - Added const_png_structp and const_png_infop types, and used them in - prototypes for most png_get_*() functions. - Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name() - Added synopses for the IO_STATE functions and other missing synopses - to the manual. Removed the synopses from libpngpf.3 because they - were out of date and no longer useful. Better information can be - obtained by reading the prototypes and comments in pngpriv.h - Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build - Added a make macro DFNCPP that is a CPP that will accept the tokens in - a .dfn file and adds configure stuff to test for such a CPP. ./configure - should fail if one is not available. - Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace. - Added png_get_current_row_number and png_get_current_pass_number for the - benefit of the user transform callback. - Added png_process_data_pause and png_process_data_skip for the benefit of - progressive readers that need to stop data processing or want to optimize - skipping of unread data (e.g. if the reader marks a chunk to be skipped.) - Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error. - pngvalid contains tests of transforms, which tests are currently disabled - because they are incompletely tested. gray_to_rgb was failing to expand - the bit depth for smaller bit depth images; this seems to be a long - standing error and resulted, apparently, in invalid output. The - documentation did not accurately describe what libpng really does when - converting RGB to gray. - Fixed incorrect examples of callback prototypes in the manual, that were - introduced in libpng-1.0.0. - In addition the order of the png_get_uint macros with respect to the - relevant function definitions has been reversed. This helps the - preprocessing of the symbol files be more robust. Furthermore, the - symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when - the library may actually be built with PNG_USE_READ_MACROS; this stops - the read macros interfering with the symbol file format. - Made the manual, synopses, and function prototypes use the function - argument names file_gamma, int_file_gamma, and srgb_intent consistently. - Changed PNG_UNUSED from "param=param;" to "(void)param;". - Added transform tests to pngvalid and simplified the arguments. - Added a request in the manual that applications do not use "png_" or - "PNG_" to begin any of their own symbols. + Re-initialize the zlib compressor before compressing non-IDAT chunks. + Added API functions to set parameters for zlib compression of non-IDAT + chunks. + Updated scripts/symbols.def with new API functions. + Only compile the new zlib re-initializing code when text or iCCP is + supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro. + Improved the optimization of the zlib CMF byte (see libpng-1.2.6). + Optimize the zlib CMF byte in non-IDAT compressed chunks + Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have + snprintf, and the "__STRICT_ANSI__" detects that condition more reliably + than __STDC__ (John Bowler). + Removed the PNG_PTR_NORETURN attribute because it too dangerous. It tells + the compiler that a user supplied callback (the error handler) does not + return, yet there is no guarantee in practice that the application code + will correctly implement the error handler because the compiler only + issues a warning if there is a mistake (John Bowler). + Removed the no-longer-used PNG_DEPSTRUCT macro. + Updated the zlib version to 1.2.5 in the VStudio project. + Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in + pngwutil.c (John Bowler). + Fixed bug with stripping the filler or alpha channel when writing, that + was introduced in libpng-1.5.2 (bug report by Andrew Church). + Updated pngtest.png with the new zlib CMF optimization. + Cleaned up conditional compilation code and of background/gamma handling + Internal changes only except a new option to avoid compiling the + png_build_grayscale_palette API (which is not used at all internally.) + The main change is to move the transform tests (READ_TRANSFORMS, + WRITE_TRANSFORMS) up one level to the caller of the APIs. This avoids + calls to spurious functions if all transforms are disabled and slightly + simplifies those functions. Pngvalid modified to handle this. + A minor change is to stop the strip_16 and expand_16 interfaces from + disabling each other; this allows the future alpha premultiplication + code to use 16-bit intermediate values while still producing 8-bit output. + png_do_background and png_do_gamma have been simplified to take a single + pointer to the png_struct rather than pointers to every item required + from the png_struct. This makes no practical difference to the internal + code. + A serious bug in the pngvalid internal routine 'standard_display_init' has + been fixed - this failed to initialize the red channel and accidentally + initialized the alpha channel twice. + Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to + avoid a clash with the png_jmpbuf macro on some platforms. + Added appropriate feature test macros to ensure libpng sees the correct API + _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and pngvalid.c to ensure + that POSIX conformant systems disable non-POSIX APIs. _ISOC99_SOURCE is + defined in pngpriv.h to obtain the ISO C99 snprintf definition, when + available. + Removed png_snprintf and added formatted warning messages. This change adds + internal APIs to allow png_warning messages to have parameters without + requiring the host OS to implement snprintf. As a side effect the + dependency of the tIME-supporting RFC1132 code on stdio is removed and + PNG_NO_WARNINGS does actually work now. + Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte + optimization configureable. + Internal functions were added to claim/release the z_stream and, hopefully, + make the code more robust. Also deflateEnd checking is added - previously + libpng would ignore an error at the end of the stream. + Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt + Implemented premultiplied alpha support: png_set_alpha_mode API + Added expand_16 support to the high level interface. + Added named value and 'flag' gamma support to png_set_gamma. Made a minor + change from the previous (unreleased) ABI/API to hide the exact value used + for Macs - it's not a good idea to embed this in the ABI! + Moved macro definitions for PNG_HAVE_IHDR, PNG_HAVE_PLTE, and PNG_AFTER_IDAT + from pngpriv.h to png.h because they must be visible to applications + that call png_set_unknown_chunks(). + Check for up->location !PNG_AFTER_IDAT when writing unknown chunks + before IDAT. + Improved "pngvalid --speed" to exclude more of pngvalid from the time. + Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt + The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative + parameters are supplied by the caller), while in the absence of cHRM + sRGB/Rec 709 values are still used. + The bKGD chunk no longer overwrites the background value set by + png_set_background(), allowing the latter to be used before the file + header is read. It never performed any useful function to override + the default anyway. + Added memory overwrite and palette image checks to pngvalid.c + Previously palette image code was poorly checked. Since the transformation + code has a special palette path in most cases this was a severe weakness. + Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When + expanding an indexed image, always expand to RGBA if transparency is + present. + Reversed earlier 1.5.3 change of transformation order; move png_expand_16 + back where it was. The change doesn't work because it requires 16-bit + gamma tables when the code only generates 8-bit ones. This fails + silently; the libpng code just doesn't do any gamma correction. Moving + the tests back leaves the old, inaccurate, 8-bit gamma calculations, but + these are clearly better than none! + png_set_background() and png_expand_16() did not work together correctly. + This problem is present in 1.5.2; if png_set_background is called with + need_expand false and the matching 16 bit color libpng erroneously just + treats it as an 8-bit color because of where png_do_expand_16 is in the + transform list. This simple fix reduces the supplied colour to 8-bits, + so it gets smashed, but this is better than the current behavior. + Added tests for expand16, more fixes for palette image tests to pngvalid. + Corrects the code for palette image tests and disables attempts to + validate palette colors. + Fixed uninitialized memory read in png_format_buffer() (Bug report by + Frank Busse, related to CVE-2004-0421). + Fixed png_handle_sCAL which is broken in 1.5; added sCAL to pngtest.png + Revised documentation about png_set_user_limits() to say that it also affects + png writing. + Revised handling of png_set_user_limits() so that it can increase the + limit beyond the PNG_USER_WIDTH|HEIGHT_MAX; previously it could only + reduce it. + Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is + wrong (high by one) 25% of the time. Dividing by 257 with rounding is + wrong in 128 out of 65536 cases. Getting the right answer all the time + without division is easy. + Added "_SUPPORTED" to the PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION macro. + Added projects/owatcom, an IDE project for OpenWatcom to replace + scripts/makefile.watcom. This project works with OpenWatcom 1.9. The + IDE autogenerates appropriate makefiles (libpng.mk) for batch processing. + The project is configurable, unlike the Visual Studio project, so long + as the developer has an awk. + Changed png_set_gAMA to limit the gamma value range so that the inverse + of the stored value cannot overflow the fixed point representation, + and changed other things OpenWatcom warns about. + Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows + pngvalid to build when ALPHA_MODE is not supported, which is required if + it is to build on libpng 1.4. + Removed string/memory macros that are no longer used and are not + necessarily fully supportable, particularly png_strncpy and png_snprintf. + Added log option to pngvalid.c and attempted to improve gamma messages. + People found the presence of a beta release following an rc release + to be confusing; therefore we bump the version to libpng-1.5.4beta01 + and there will be no libpng-1.5.3 release. + Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE + outside of an unknown-chunk block in png.h because they are also + needed for other uses. + Added png_set_scale_16() API, to match inaccurate results from previous + libpng versions, configurable with PNG_READ_SCALE_16_TO_8_SUPPORTED. + Fixed a problem in png_do_expand_palette() exposed by optimization in + 1.5.3beta06 + Also removed a spurious and confusing "trans" member ("trans") from png_info. + The palette expand optimization prevented expansion to an intermediate RGBA + form if tRNS was present but alpha was marked to be stripped; this exposed + a check for tRNS in png_do_expand_palette() which is inconsistent with the + code elsewhere in libpng. + Added PNG_TRANSFORM_SCALE_16 to the high-level read transforms. + If PNG_READ_16_TO_8_ACCURATE_SCALE is not enabled, png_set_scale_16() + and png_do_scale_16_to_8() aren't built. + Revised contrib/visupng, gregbook, and pngminim to demonstrate scale_16_to_8 + Fixed pngvalid, simplified macros, added checking for 0 in sCAL. + The ACCURATE scale macro is no longer defined in libpng-1.5 - call the + png_scale_16_to_8 API. Made sure that PNG_READ_16_TO_8 is still defined + if the png_strip_16_to_8 API is present. png_check_fp_number now + maintains some state so that positive, negative and zero values are + identified. sCAL uses these to be strictly spec conformant. + Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400. + +Send comments/corrections/commendations to png-mng-implement at lists.sf.net +(subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe) +or to glennrp at users.sourceforge.net + +Glenn R-P +*/ } +#endif Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/src/3rdparty/libpng/CHANGES b/src/3rdparty/libpng/CHANGES index fa5f2aa..628d7f0 100644 --- a/src/3rdparty/libpng/CHANGES +++ b/src/3rdparty/libpng/CHANGES @@ -15,7 +15,7 @@ Version 0.3 fixed some bugs in writer interfaced with zlib 0.5 added K&R support - added check for 64 KB blocks for 16 bit machines + added check for 64 KB blocks for 16-bit machines Version 0.4 cleaned up code and commented code @@ -74,7 +74,7 @@ Version 0.82 [September, 1995] Version 0.85 [December, 1995] added more medium model code (almost everything's a far) added i/o, error, and memory callback functions - fixed some bugs (16 bit, 4 bit interlaced, etc.) + fixed some bugs (16-bit, 4-bit interlaced, etc.) added first run progressive reader (barely tested) Version 0.86 [January, 1996] @@ -2935,7 +2935,7 @@ Version 1.5.0beta36 [July 29, 2010] PNG_INTERLACE transform and to get the number of rows in the current pass. A new test program, pngvalid.c, validates the gamma code. - Errors in the 16 bit gamma correction (overflows) have been corrected. + Errors in the 16-bit gamma correction (overflows) have been corrected. cHRM chunk testing is done consistently (previously the floating point API bypassed it, because the test really didn't work on FP, now the test is performed on the actual values to be stored in the PNG file so it @@ -3208,9 +3208,9 @@ Version 1.5.1beta09 [January 24, 2011] pngvalid contains tests of transforms, which tests are currently disabled because they are incompletely tested. gray_to_rgb was failing to expand the bit depth for smaller bit depth images; this seems to be a long - standing error and resulted, apparently, in invalid output. The - documentation did not accurately describe what libpng really does when - converting RGB to gray. + standing error and resulted, apparently, in invalid output + (CVE-2011-0408, CERT VU#643140). The documentation did not accurately + describe what libpng really does when converting RGB to gray. Version 1.5.1beta10 [January 27, 2010] Fixed incorrect examples of callback prototypes in the manual, that were @@ -3227,7 +3227,7 @@ Version 1.5.1beta10 [January 27, 2010] Version 1.5.1beta11 [January 28, 2011] Changed PNG_UNUSED from "param=param;" to "{if(param){}}". Corrected local variable type in new API png_process_data_skip() - The type was self-evidently incorrect but only causes problems on 64 bit + The type was self-evidently incorrect but only causes problems on 64-bit architectures. Added transform tests to pngvalid and simplified the arguments. @@ -3242,6 +3242,272 @@ Version 1.5.1rc02 [January 31, 2011] Version 1.5.1 [February 3, 2011] No changes. +Version 1.5.2beta01 [February 13, 2011] + More -Wshadow fixes for older gcc compilers. Older gcc versions apparently + check formal parameters names in function declarations (as well as + definitions) to see if they match a name in the global namespace. + Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the + old VisualC++ preprocessor. + Turned on interlace handling in png_read_png(). + Fixed gcc pendantic warnings. + Handle longjmp in Cygwin. + Fixed png_get_current_row_number() in the interlaced case. + Cleaned up ALPHA flags and transformations. + Implemented expansion to 16 bits. + +Version 1.5.2beta02 [February 19, 2011] + Fixed mistake in the descriptions of user read_transform and write_transform + function prototypes in the manual. The row_info struct is png_row_infop. + Reverted png_get_current_row_number() to previous (1.5.2beta01) behavior. + Corrected png_get_current_row_number documentation + Fixed the read/write row callback documentation. + This documents the current behavior, where the callback is called after + every row with information pertaining to the next row. + +Version 1.5.2beta03 [March 3, 2011] + Fixed scripts/makefile.vcwin32 + Updated contrib/pngsuite/README to add the word "modify". + Define PNG_ALLOCATED to blank when _MSC_VER<1300. + +Version 1.5.2rc01 [March 19, 2011] + Define remaining attributes to blank when MSC_VER<1300. + ifdef out mask arrays in pngread.c when interlacing is not supported. + +Version 1.5.2rc02 [March 22, 2011] + Added a hint to try CPP=/bin/cpp if "cpp -E" fails in scripts/pnglibconf.mak + and in contrib/pngminim/*/makefile, eg., on SunOS 5.10, and removed "strip" + from the makefiles. + Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail + to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill) + +Version 1.5.2rc03 [March 24, 2011] + Don't include standard header files in png.h while building the symbol table, + to avoid cpp failure on SunOS (introduced PNG_BUILDING_SYMBOL_TABLE macro). + +Version 1.5.2 [March 31, 2011] + No changes. + +Version 1.5.3beta01 [April 1, 2011] + Re-initialize the zlib compressor before compressing non-IDAT chunks. + Added API functions to set parameters for zlib compression of non-IDAT + chunks. + +Version 1.5.3beta02 [April 3, 2011] + Updated scripts/symbols.def with new API functions. + Only compile the new zlib re-initializing code when text or iCCP is + supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro. + Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03). + Optimize the zlib CMF byte in non-IDAT compressed chunks + +Version 1.5.3beta03 [April 16, 2011] + Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have + snprintf, and the "__STRICT_ANSI__" detects that condition more reliably + than __STDC__ (John Bowler). + Removed the PNG_PTR_NORETURN attribute because it too dangerous. It tells + the compiler that a user supplied callback (the error handler) does not + return, yet there is no guarantee in practice that the application code + will correctly implement the error handler because the compiler only + issues a warning if there is a mistake (John Bowler). + Removed the no-longer-used PNG_DEPSTRUCT macro. + Updated the zlib version to 1.2.5 in the VStudio project. + Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in + pngwutil.c (John Bowler). + Fixed bug with stripping the filler or alpha channel when writing, that + was introduced in libpng-1.5.2beta01 (bug report by Andrew Church). + +Version 1.5.3beta04 [April 27, 2011] + Updated pngtest.png with the new zlib CMF optimization. + Cleaned up conditional compilation code and of background/gamma handling + Internal changes only except a new option to avoid compiling the + png_build_grayscale_palette API (which is not used at all internally.) + The main change is to move the transform tests (READ_TRANSFORMS, + WRITE_TRANSFORMS) up one level to the caller of the APIs. This avoids + calls to spurious functions if all transforms are disabled and slightly + simplifies those functions. Pngvalid modified to handle this. + A minor change is to stop the strip_16 and expand_16 interfaces from + disabling each other; this allows the future alpha premultiplication + code to use 16-bit intermediate values while still producing 8-bit output. + png_do_background and png_do_gamma have been simplified to take a single + pointer to the png_struct rather than pointers to every item required + from the png_struct. This makes no practical difference to the internal + code. + A serious bug in the pngvalid internal routine 'standard_display_init' has + been fixed - this failed to initialize the red channel and accidentally + initialized the alpha channel twice. + Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to + avoid a possible clash with the png_jmpbuf macro on some platforms. + +Version 1.5.3beta05 [May 6, 2011] + Added the "_POSIX_SOURCE" feature test macro to ensure libpng sees the + correct API. _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and + pngvalid.c to ensure that POSIX conformant systems disable non-POSIX APIs. + Removed png_snprintf and added formatted warning messages. This change adds + internal APIs to allow png_warning messages to have parameters without + requiring the host OS to implement snprintf. As a side effect the + dependency of the tIME-supporting RFC1132 code on stdio is removed and + PNG_NO_WARNINGS does actually work now. + Pass "" instead of '\0' to png_default_error() in png_err(). This mistake + was introduced in libpng-1.2.20beta01. + Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte + optimization configureable. + IDAT compression failed if preceded by a compressed text chunk (bug + introduced in libpng-1.5.3beta01-02). This was because the attempt to + reset the zlib stream in png_write_IDAT happened after the first IDAT + chunk had been deflated - much too late. In this change internal + functions were added to claim/release the z_stream and, hopefully, make + the code more robust. Also deflateEnd checking is added - previously + libpng would ignore an error at the end of the stream. + +Version 1.5.3beta06 [May 8, 2011] + Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt + Implemented premultiplied alpha support: png_set_alpha_mode API + +Version 1.5.3beta07 [May 11, 2011] + Added expand_16 support to the high level interface. + Added named value and 'flag' gamma support to png_set_gamma. Made a minor + change from the previous (unreleased) ABI/API to hide the exact value used + for Macs - it's not a good idea to embed this in the ABI! + Moved macro definitions for PNG_HAVE_IHDR, PNG_HAVE_PLTE, and PNG_AFTER_IDAT + from pngpriv.h to png.h because they must be visible to applications + that call png_set_unknown_chunks(). + Check for up->location !PNG_AFTER_IDAT when writing unknown chunks + before IDAT. + +Version 1.5.3beta08 [May 16, 2011] + Improved "pngvalid --speed" to exclude more of pngvalid from the time. + Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt + The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative + parameters are supplied by the caller), while in the absence of cHRM + sRGB/Rec 709 values are still used. + The bKGD chunk no longer overwrites the background value set by + png_set_background(), allowing the latter to be used before the file + header is read. It never performed any useful function to override + the default anyway. + Added memory overwrite and palette image checks to pngvalid.c + Previously palette image code was poorly checked. Since the transformation + code has a special palette path in most cases this was a severe weakness. + Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When + expanding an indexed image, always expand to RGBA if transparency is + present. + +Version 1.5.3beta09 [May 17, 2011] + Reversed earlier 1.5.3 change of transformation order; move png_expand_16 + back where it was. The change doesn't work because it requires 16-bit + gamma tables when the code only generates 8-bit ones. This fails + silently; the libpng code just doesn't do any gamma correction. Moving + the tests back leaves the old, inaccurate, 8-bit gamma calculations, but + these are clearly better than none! + +Version 1.5.3beta10 [May 20, 2011] + + png_set_background() and png_expand_16() did not work together correctly. + This problem is present in 1.5.2; if png_set_background is called with + need_expand false and the matching 16 bit color libpng erroneously just + treats it as an 8-bit color because of where png_do_expand_16 is in the + transform list. This simple fix reduces the supplied colour to 8-bits, + so it gets smashed, but this is better than the current behavior. + Added tests for expand16, more fixes for palette image tests to pngvalid. + Corrects the code for palette image tests and disables attempts to + validate palette colors. + +Version 1.5.3rc01 [June 3, 2011] + No changes. + +Version 1.5.3rc02 [June 8, 2011] + Fixed uninitialized memory read in png_format_buffer() (Bug report by + Frank Busse, CVE-2011-2501, related to CVE-2004-0421). + +Version 1.5.3beta11 [June 11, 2011] + Fixed png_handle_sCAL which is broken in 1.5; added sCAL to pngtest.png + Revised documentation about png_set_user_limits() to say that it also affects + png writing. + Revised handling of png_set_user_limits() so that it can increase the + limit beyond the PNG_USER_WIDTH|HEIGHT_MAX; previously it could only + reduce it. + Make the 16-to-8 scaling accurate. Dividing by 256 with no rounding is + wrong (high by one) 25% of the time. Dividing by 257 with rounding is + wrong in 128 out of 65536 cases. Getting the right answer all the time + without division is easy. + Added "_SUPPORTED" to the PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION macro. + Added projects/owatcom, an IDE project for OpenWatcom to replace + scripts/makefile.watcom. This project works with OpenWatcom 1.9. The + IDE autogenerates appropriate makefiles (libpng.mk) for batch processing. + The project is configurable, unlike the Visual Studio project, so long + as the developer has an awk. + Changed png_set_gAMA to limit the gamma value range so that the inverse + of the stored value cannot overflow the fixed point representation, + and changed other things OpenWatcom warns about. + Revised pngvalid.c to test PNG_ALPHA_MODE_SUPPORTED correctly. This allows + pngvalid to build when ALPHA_MODE is not supported, which is required if + it is to build on libpng 1.4. + Removed string/memory macros that are no longer used and are not + necessarily fully supportable, particularly png_strncpy and png_snprintf. + Added log option to pngvalid.c and attempted to improve gamma messages. + +Version 1.5.3 [omitted] + People found the presence of a beta release following an rc release + to be confusing; therefore we bump the version to libpng-1.5.4beta01 + and there will be no libpng-1.5.3 release. + +Version 1.5.4beta01 [June 14, 2011] + Made it possible to undefine PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED + to get the same (inaccurate) output as libpng-1.5.2 and earlier. + Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE + outside of an unknown-chunk block in png.h because they are also + needed for other uses. + +Version 1.5.4beta02 [June 14, 2011] + Fixed and clarified LEGACY 16-to-8 scaling code. + Added png_set_chop_16() API, to match inaccurate results from previous + libpng versions. + Removed the ACCURATE and LEGACY options (they are no longer useable) + Use the old scaling method for background if png_set_chop_16() was + called. + Made png_set_chop_16() API removeable by disabling PNG_CHOP_16_TO_8_SUPPORTED + +Version 1.5.4beta03 [June 15, 2011] + Fixed a problem in png_do_expand_palette() exposed by optimization in + 1.5.3beta06 + Also removed a spurious and confusing "trans" member ("trans") from png_info. + The palette expand optimization prevented expansion to an intermediate RGBA + form if tRNS was present but alpha was marked to be stripped; this exposed + a check for tRNS in png_do_expand_palette() which is inconsistent with the + code elsewhere in libpng. + Correction to the expand_16 code; removed extra instance of + png_set_scale_16_to_8 from pngpriv.h + +Version 1.5.4beta04 [June 16, 2011] + Added a missing "#ifdef PNG_READ_BACKGROUND_SUPPORTED/#endif" in pngrtran.c + Added PNG_TRANSFORM_CHOP_16 to the high-level read transforms. + Made PNG_READ_16_TO_8_ACCURATE_SCALE configurable again. If this is + not enabled, png_set_strip_16() and png_do_scale_16_to_8() aren't built. + Revised contrib/visupng, gregbook, and pngminim to demonstrate chop_16_to_8 + +Version 1.5.4beta05 [June 16, 2011] + Renamed png_set_strip_16() to png_set_scale_16() and renamed + png_set_chop_16() to png_set_strip(16) in an attempt to minimize the + behavior changes between libpng14 and libpng15. + +Version 1.5.4beta06 [June 18, 2011] + Fixed new bug that was causing both strip_16 and scale_16 to be applied. + +Version 1.5.4beta07 [June 19, 2011] + Fixed pngvalid, simplified macros, added checking for 0 in sCAL. + The ACCURATE scale macro is no longer defined in 1.5 - call the + png_scale_16_to_8 API. Made sure that PNG_READ_16_TO_8 is still defined + if the png_strip_16_to_8 API is present. png_check_fp_number now + maintains some state so that positive, negative and zero values are + identified. sCAL uses these to be strictly spec conformant. + +Version 1.5.4beta08 [June 23, 2011] + Fixed pngvalid if ACCURATE_SCALE is defined. + Updated scripts/pnglibconf.h.prebuilt. + +Version 1.5.4rc01 [June 30, 2011] + Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400. + +Version 1.5.4 [July 7, 2011] + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/src/3rdparty/libpng/CMakeLists.txt b/src/3rdparty/libpng/CMakeLists.txt index 2ee5bf3..cc15850 100644 --- a/src/3rdparty/libpng/CMakeLists.txt +++ b/src/3rdparty/libpng/CMakeLists.txt @@ -33,7 +33,7 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 5) -set(PNGLIB_RELEASE 1) +set(PNGLIB_RELEASE 4) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) @@ -147,10 +147,6 @@ set(pngtest_sources add_definitions(-DPNG_CONFIGURE_LIBPNG) -if(_AIX) - add_definitions(-D_ALL_SOURCE) -endif(_AIX) - if(MSVC) add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE) endif(MSVC) @@ -264,7 +260,7 @@ install(CODE ${PNG_CONFIG_INSTALL_CODE}) # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 15.${PNGLIB_RELEASE}.1.5.1 +# VERSION 15.${PNGLIB_RELEASE}.1.5.4 VERSION 15.${PNGLIB_RELEASE}.0 SOVERSION 15 CLEAN_DIRECT_OUTPUT 1) diff --git a/src/3rdparty/libpng/LICENSE b/src/3rdparty/libpng/LICENSE index b28f15c..89f5243 100644 --- a/src/3rdparty/libpng/LICENSE +++ b/src/3rdparty/libpng/LICENSE @@ -10,7 +10,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are +libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -February 3, 2011 +July 7, 2011 diff --git a/src/3rdparty/libpng/README b/src/3rdparty/libpng/README index 9dd6745..71396a8 100644 --- a/src/3rdparty/libpng/README +++ b/src/3rdparty/libpng/README @@ -1,4 +1,4 @@ -README for libpng version 1.5.1 - February 3, 2011 (shared library 15.0) +README for libpng version 1.5.4 - July 7, 2011 (shared library 15.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. @@ -114,19 +114,16 @@ given in previous versions of this document. He and Andreas will read mail addressed to the png-implement list, however. Please do not send general questions about PNG. Send them to -the (png-list at ccrc.wustl.edu, subscription required, write to -majordomo at ccrc.wustl.edu with "subscribe png-list" in your message). -On the other hand, -please do not send libpng questions to that address, send them to me -or to the png-implement list. I'll -get them in the end anyway. If you have a question about something +png-mng-misc at lists.sf.net (subscription required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-misc to +subscribe). If you have a question about something in the PNG specification that is related to using libpng, send it to me. Send me any questions that start with "I was using libpng, and ...". If in doubt, send questions to me. I'll bounce them to others, if necessary. Please do not send suggestions on how to change PNG. We have -been discussing PNG for nine years now, and it is official and +been discussing PNG for sixteen years now, and it is official and finished. If you have suggestions for libpng, however, I'll gladly listen. Even if your suggestion is not used immediately, it may be used later. diff --git a/src/3rdparty/libpng/configure.ac b/src/3rdparty/libpng/configure.ac index ff277a4..f2800f6 100644 --- a/src/3rdparty/libpng/configure.ac +++ b/src/3rdparty/libpng/configure.ac @@ -18,15 +18,15 @@ AC_PREREQ(2.59) dnl Version number stuff here: -AC_INIT([libpng], [1.5.1], [png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng], [1.5.4], [png-mng-implement@lists.sourceforge.net]) AM_INIT_AUTOMAKE dnl stop configure from automagically running automake AM_MAINTAINER_MODE -PNGLIB_VERSION=1.5.1 +PNGLIB_VERSION=1.5.4 PNGLIB_MAJOR=1 PNGLIB_MINOR=5 -PNGLIB_RELEASE=1 +PNGLIB_RELEASE=4 dnl End of version number stuff diff --git a/src/3rdparty/libpng/example.c b/src/3rdparty/libpng/example.c index cd3682f..c0d27f4 100644 --- a/src/3rdparty/libpng/example.c +++ b/src/3rdparty/libpng/example.c @@ -2,7 +2,7 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * This file has been placed in the public domain by the authors. * Maintained 1998-2011 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) @@ -22,6 +22,10 @@ * see also the programs in the contrib directory. */ +#define _POSIX_SOURCE 1 /* libpng and zlib are POSIX-compliant. You may + * change this if your application uses non-POSIX + * extensions. */ + #include "png.h" /* The png_jmpbuf() macro, used in error handling, became available in @@ -183,8 +187,15 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ * are mutually exclusive. */ - /* Tell libpng to strip 16 bit/color files down to 8 bits/color */ + /* Tell libpng to strip 16 bit/color files down to 8 bits/color. + * Use accurate scaling if it's available, otherwise just chop off the + * low byte. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_set_scale_16(png_ptr); +#else png_set_strip_16(png_ptr); +#endif /* Strip alpha bytes from the input data without combining with the * background (not recommended). diff --git a/src/3rdparty/libpng/libpng-manual.txt b/src/3rdparty/libpng/libpng-manual.txt index 77adf7a..c91b99c 100644 --- a/src/3rdparty/libpng/libpng-manual.txt +++ b/src/3rdparty/libpng/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.5.1 - February 3, 2011 + libpng version 1.5.4 - July 7, 2011 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011 + libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -198,9 +198,9 @@ reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing -the lines defining the supported features, paying very close attention to the -'option' information in scripts/pnglibconf.dfa that describes those features and -their requirements. This is easy to get wrong. +the lines defining the supported features, paying very close attention to +the 'option' information in scripts/pnglibconf.dfa that describes those +features and their requirements. This is easy to get wrong. B. Configuration using DFA_XTRA @@ -348,21 +348,12 @@ create the structure, so your application should check for that. return (ERROR); } - png_infop end_info = png_create_info_struct(png_ptr); - - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - If you want to use your own memory allocation routines, use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use png_create_read_struct_2() instead of png_create_read_struct(): png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, user_error_fn, user_warning_fn, (png_voidp) user_mem_ptr, user_malloc_fn, user_free_fn); @@ -374,7 +365,7 @@ handling and memory alloc/free functions. When libpng encounters an error, it expects to longjmp back to your routine. Therefore, you will need to call setjmp and pass your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the jmpbuf field every time you enter +routines, you will need to update the longjmp buffer every time you enter a new routine that will call a png_*() function. See your documentation of setjmp/longjmp for your compiler for more @@ -392,6 +383,9 @@ free any memory. return (ERROR); } +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. + If you would rather avoid the complexity of setjmp/longjmp issues, you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). @@ -513,6 +507,19 @@ To inform libpng about your function, use png_set_read_status_fn(png_ptr, read_row_callback); +When this function is called the row has already been completely processed and +the 'row' and 'pass' refer to the next row to be handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + Unknown-chunk handling Now you get to set the way the library processes unknown chunks in the @@ -590,7 +597,7 @@ large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. Since very few applications really need to process such large images, we have imposed an arbitrary 1-million limit on rows and columns. Larger images will be rejected immediately with a png_error() call. If -you wish to override this limit, you can use +you wish to change this limit, you can use png_set_user_limits(png_ptr, width_max, height_max); @@ -600,6 +607,10 @@ anyway because of potential buffer overflow conditions). You should put this statement after you create the PNG structure and before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr); @@ -630,6 +641,234 @@ and you can retrieve the limit with Any chunks that would cause either of these limits to be exceeded will be ignored. +Information about your system + +If you intend to display the PNG or to incorporate it in other image data you +need to tell libpng information about your display or drawing surface so that +libpng can convert the values in the image to match the display. + +From libpng-1.5.4 this information can be set before reading the PNG file +header. In earlier versions png_set_gamma() existed but behaved incorrectly if +called before the PNG file header had been read and png_set_alpha_mode() did not +exist. + +If you need to support versions prior to libpng-1.5.4 test the version number +and follow the procedures described in the appropriate manual page. + +You give libpng the encoding expected by your system expressed as a 'gamma' +value. You can also specify a default encoding for the PNG file in +case the required information is missing from the file. By default libpng +assumes that the PNG data matches your system, to keep this default call: + + png_set_gamma(png_ptr, screen_gamma, 1/screen_gamma/*file gamma*/); + +or you can use the fixed point equivalent: + + png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, PNG_FP_1/screen_gamma); + +If you don't know the gamma for you system it is probably 2.2 - a good +approximation to the IEC standard for display systems (sRGB). If images are +too contrasty or washed out you got the value wrong - check your system +documentation! + +Many systems permit the system gamma to be changed via a lookup table in the +display driver, a few systems, including older Macs, change the response by +default. As of 1.5.4 three special values are available to handle common +situations: + + PNG_DEFAULT_sRGB: Indicates that the system conforms to the IEC 61966-2-1 + standard. This matches almost all systems. + PNG_GAMMA_MAC_18: Indicates that the system is an older (pre Mac OS 10.6) + Apple Macintosh system with the default settings. + PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates that the + system expects data with no gamma encoding. + +You would use the linear (unencoded) value if you need to process the pixel +values further because this avoids the need to decode and reencode each +component value whenever arithmetic is performed. A lot of graphics software +uses linear values for this reason, often with higher precision component values +to preserve overall accuracy. + +The second thing you may need to tell libpng about is how your system handles +alpha channel information. Some, but not all, PNG files contain an alpha +channel. To display these files correctly you need to compose the data onto a +suitable background, as described in the PNG specification. + +Libpng only supports composing onto a single color (using png_set_background; +see below.) Otherwise you must do the composition yourself and, in this case, +you may need to call png_set_alpha_mode: + + png_set_alpha_mode(png_ptr, mode, screen_gamma); + +The screen_gamma value is the same as the argument to png_set_gamma, however how +it affects the output depends on the mode. png_set_alpha_mode() sets the file +gamma default to 1/screen_gamma, so normally you don't need to call +png_set_gamma. If you need different defaults call png_set_gamma() before +png_set_alpha_mode() - if you call it after it will override the settings made +by png_set_alpha_mode(). + +The mode is as follows: + + PNG_ALPHA_PNG: The data is encoded according to the PNG specification. Red, +green and blue, or gray, components are gamma encoded color +values and are not premultiplied by the alpha value. The +alpha value is a linear measure of the contribution of the +pixel to the corresponding final output pixel. + +You should normally use this format if you intend to perform +color correction on the color values; most, maybe all, color +correction software has no handling for the alpha channel and, +anyway, the math to handle pre-multiplied component values is +unnecessarily complex. + +Before you do any arithmetic on the component values you need +to remove the gamma encoding and multiply out the alpha +channel. See the PNG specification for more detail. It is +important to note that when an image with an alpha channel is +scaled, linear encoded, pre-multiplied component values must +be used! + +The remaining modes assume you don't need to do any further color correction or +that if you do your color correction software knows all about alpha (it +probably doesn't!) + + PNG_ALPHA_STANDARD: The data libpng produces is encoded in the standard way +assumed by most correctly written graphics software. +The gamma encoding will be removed by libpng and the +linear component values will be pre-multiplied by the +alpha channel. + +With this format the final image must be re-encoded to +match the display gamma before the image is displayed. +If your system doesn't do that, yet still seems to +perform arithmetic on the pixels without decoding them, +it is broken - check out the modes below. + +With PNG_ALPHA_STANDARD libpng always produces linear +component values, whatever screen_gamma you supply. The +screen_gamma value is, however, used as a default for +the file gamma if the PNG file has no gamma information. + +If you call png_set_gamma() after png_set_alpha_mode() you +will override the linear encoding. Instead the +pre-multiplied pixel values will be gamma encoded but +the alpha channel will still be linear. This may +actually match the requirements of some broken software, +but it is unlikely. + +While linear 8-bit data is often used it has +insufficient precision for any image with a reasonable +dynamic range. To avoid problems, and if your software +supports it, use png_set_expand_16() to force all +components to 16 bits. + + PNG_ALPHA_OPTIMIZED: This mode is the same as PNG_ALPHA_STANDARD except that +completely opaque pixels are gamma encoded according to +the screen_gamma value. Pixels with alpha less than 1.0 +will still have linear components. + +Use this format if you have control over your +compositing software and do don't do other arithmetic +(such as scaling) on the data you get from libpng. Your +compositing software can simply copy opaque pixels to +the output but still has linear values for the +non-opaque pixels. + +In normal compositing, where the alpha channel encodes +partial pixel coverage (as opposed to broad area +translucency), the inaccuracies of the 8-bit +representation of non-opaque pixels are irrelevant. + +You can also try this format if your software is broken; +it might look better. + + PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD however all component values, +including the alpha channel are gamma encoded. This is +an appropriate format to try if your software, or more +likely hardware, is totally broken: if it performs +linear arithmetic directly on gamma encoded values. + +In most cases of broken software or hardware the bug in the final display +manifests as a subtle halo around composited parts of the image. You may not +even perceive this as a halo; the composited part of the image may simply appear +separate from the background, as though it had been cut out of paper and pasted +on afterward. + +If you don't have to deal with bugs in software or hardware, or if you can fix +them, there are three recommended ways of using png_set_alpha_mode(): + + png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, + screen_gamma); + +You can do color correction on the result (libpng does not currently +support color correction internally.) When you handle the alpha channel +you need to undo the gamma encoding and multiply out the alpha. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, + screen_gamma); + png_set_expand_16(png_ptr); + +If you are using the high level interface don't call png_set_expand_16(); +instead pass PNG_TRANSFORM_EXPAND_16 to the interface. + +With this mode you can't do color correction, but you can do arithmetic, +including composition and scaling, on the data without further processing. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, + screen_gamma); + +You can avoid the expansion to 16-bit components with this mode, but you +lose the ability to scale the image or perform other linear arithmetic. +All you can do is compose the result onto a matching output. Since this +mode is libpng specific you also need to write your own composition +software. + +If you don't need, or can't handle, the alpha channel you can call +png_set_background() to remove it by compositing against a fixed color. Don't +call png_set_strip_alpha() to do this - it will leave spurious pixel values in +transparent parts of this image. + + png_set_background(png_ptr, &background_color, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); + +The background_color is an RGB or grayscale value according to the data format +libpng will produce for you. Because you don't yet know the format of the PNG +file if you call png_set_background at this point you must arrange for the +format produced by libpng to always have 8-bit or 16-bit components and then +store the color as an 8-bit or 16-bit color as appropriate. The color contains +separate gray and RGB component values, so you can let libpng produce gray or +RGB output according to the input format, but low bit depth grayscale images +must always be converted to at least 8-bit format. (Even low low bit depth +grayscale images can't have an alpha channel they can have a transparent +color!) + +You set the transforms you need later, either as flags to the high level +interface or libpng API calls for the low level interface. For reference the +settings and API calls required are: + +8-bit values: + PNG_TRANSFORM_SCALE_16 | PNG_EXPAND + png_set_expand(png_ptr); png_set_scale_16(png_ptr); + + If you must get exactly the same inaccurate results + produced by default in versions prior to libpng-1.5.4, + use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) + instead. + +16-bit values: + PNG_TRANSFORM_EXPAND_16 + png_set_expand_16(png_ptr); + +In either case palette image data will be expanded to RGB. If you just want +color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) +to the list. + +Calling png_set_background before the PNG file header is read will not work +prior to libpng-1.5.4. Because the failure may result in unexpected warnings or +errors it is therefore much safer to call png_set_background after the head has +been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be +used with the high level interface. + The high-level read interface At this point there are two ways to proceed; through the high-level @@ -639,8 +878,10 @@ the entire image into memory, and (b) the input transformations you want to do are limited to the following set: PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to - 8 bits + PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to + 8-bit accurately + PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to + 8-bit less accurately PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit samples to bytes @@ -659,6 +900,7 @@ you want to do are limited to the following set: PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples to RGB (or GA to RGBA) + PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits (This excludes setting a background color, doing gamma transformation, quantizing, and setting filler.) If this is the case, simply do this: @@ -727,6 +969,22 @@ call to png_read_info(). This will process all chunks up to but not including the image data. +This also copies some of the data from the PNG file into the decode structure +for use in later transformations. Important information copied in is: + +1) The PNG file gamma from the gAMA chunk. This overwrites the default value +provided by an earlier call to png_set_gamma or png_set_alpha_mode. + +2) Prior to libpng-1.5.4 the background color from a bKGd chunk. This +damages the information provided by an earlier call to png_set_background +resulting in expected behavior. Libpng-1.5.4 no longer does this. + +3) The number of significant bits in each component value. Libpng uses this to +optimize gamma handling by reducing the internal lookup table sizes. + +4) The transparent color information from a tRNS chunk. This can be modified by +a later call to png_set_tRNS. + Querying the info structure Functions are used to get the information from the info_ptr once it @@ -1069,7 +1327,7 @@ forms: 72 dpi is stored as 0.28346 pixels/meter, and when this is retrieved it is 71.9988 dpi, so be sure to round the returned value appropriately - if you want to display a reasonable-looking result. + if you want to display a reasonable-looking result. The data from the oFFs chunk can be retrieved in several convenient forms: @@ -1090,7 +1348,7 @@ forms: converted to microns and back without some loss of precision. -For more information, see the png_info definition in png.h and the +For more information, see the PNG specification for chunk contents. Be careful with trusting rowbytes, as some of the transformations could increase the space needed to hold a row (expand, filler, gray_to_rgb, etc.). @@ -1125,17 +1383,20 @@ to handle any special transformations of the image data. The various ways to transform the data will be described in the order that they should occur. This is important, as some of these change the color type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. +certain color types and bit depths. + +Transformations you request are ignored if they don't have any meaning for a +particular input data format. However some transformations can have an effect +as a result of a previous transformation. If you specify a contradictory set of +transformations, for example both adding and removing the alpha channel, you +cannot predict the final result. -The colors used for the background and transparency values should be -supplied in the same format/depth as the current image data. They -are stored in the same format/depth as the image data in a bKGD or tRNS -chunk, so this is what libpng expects for this data. The colors are -transformed to keep in sync with the image data when an application -calls the png_read_update_info() routine (see below). +The color used for the transparency values should be supplied in the same +format/depth as the current image data. It is stored in the same format/depth +as the image data in a tRNS chunk, so this is what libpng expects for this data. + +The color used for the background value depends on the need_expand argument as +described below. Data will be decoded into the supplied row buffers packed into bytes unless the library has been told to transform it into another format. @@ -1145,12 +1406,12 @@ byte, unless png_set_packing() is called. 8-bit RGB data will be stored in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() is called to insert filler bytes, either before or after each RGB triplet. 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant -byte of the color value first, unless png_set_strip_16() is called to +byte of the color value first, unless png_set_scale_16() is called to transform it to regular RGB RGB triplets, or png_set_filler() or png_set_add alpha() is called to insert filler bytes, either before or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can -be modified with -png_set_filler(), png_set_add_alpha(), or png_set_strip_16(). +be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), +or png_set_scale_16(). The following code transforms grayscale images of less than 8 to 8 bits, changes paletted images to RGB, and adds a full alpha channel if there is @@ -1161,13 +1422,13 @@ viewing application that wishes to treat all images in the same way. if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); -These three functions are actually aliases for png_set_expand(), added + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + +The first two functions are actually aliases for png_set_expand(), added in libpng version 1.0.4, with the function names expanded to improve code readability. In some future version they may actually do different things. @@ -1175,56 +1436,84 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. -As of libpng version 1.5.1, not all possible expansions are supported. +As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as +png_set_expand(), however, the resultant channels have 16 bits rather than 8. +Use this when the output color or gray channels are made linear to avoid fairly +severe accuracy loss. + + if (bit_depth < 16) + png_set_expand_16(png_ptr); + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8-bit. + + if (bit_depth == 16) + png_set_scale_16(png_ptr); + +If you need to process the alpha channel on the image separately from the image +data (for example if you convert it to a bitmap mask) it is possible to have +libpng strip the channel leaving just RGB or gray data: + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +If you strip the alpha channel you need to find some other way of dealing with +the information. If, instead, you want to convert the image to an opaque +version with no alpha channel use png_set_background; see below. + +As of libpng version 1.5.2, almost all useful expansions are supported, the +major ommissions are conversion of grayscale to indexed images (which can be +done trivially in the application) and conversion of indexed to grayscale (which +can be done by a trivial manipulation of the palette.) In the following table, the 01 means grayscale with depth<8, 31 means indexed with depth<8, other numerals represent the color type, "T" means the tRNS chunk is present, A means an alpha channel is present, and O means tRNS or alpha is present but all pixels in the image are opaque. - FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O TO - 01 - - 31 - - 0 1 - - 0T - - 0O - - 2 GX - - 2T - - 2O - - 3 1 - - 3T - - 3O - - 4A T - - 4O - - 6A GX TX TX - - 6O GX TX - + 01 - [G] - - - - - - - - - - - - - + 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q + 0 1 G + . . G G G G G G B B GB GB + 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt + 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt + 2 C P C C C + . . C - - CB CB B B + 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt + 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt + 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q + 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt + 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt + 4A lA G A T T GA GT GT GA GT GT + BA G GBA + 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G + 6A CA PA CA C C A T tT PA P P C CBA + BA + 6O CA PBA CA C C A tT T PA P P CBA C BA + Within the matrix, + "+" identifies entries where 'from' and 'to' are the same. "-" means the transformation is not supported. + "." means nothing is necessary (a tRNS chunk can just be ignored). + "t" means the transformation is obtained by png_set_tRNS. + "A" means the transformation is obtained by png_set_add_alpha(). "X" means the transformation is obtained by png_set_expand(). "1" means the transformation is obtained by - png_set_expand_gray_1_2_4_to_8 - "G" means the transformation is obtained by - png_set_gray_to_rgb(). + png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() if there + is no transparency in the original or the final format). + "C" means the transformation is obtained by png_set_gray_to_rgb(). + "G" means the transformation is obtained by png_set_rgb_to_gray(). "P" means the transformation is obtained by png_set_expand_palette_to_rgb(). - "T" means the transformation is obtained by - png_set_tRNS_to_alpha(). - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8 bit. - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - -If, for some reason, you don't need the alpha channel on an image, -and you want to remove it rather than combining it with the background -(but the image author certainly had in mind that you *would* combine -it with the background, so that's what you should probably do): - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); + "p" means the transformation is obtained by png_set_packing(). + "Q" means the transformation is obtained by png_set_quantize(). + "T" means the transformation is obtained by png_set_tRNS_to_alpha(). + "B" means the transformation is obtained by png_set_background(), or + png_strip_alpha(). + +When an entry has multiple transforms listed all are required to cause the +right overall transformation. When two transforms are separated by a comma +either will do the job. When transforms are enclosed in [] the transform should +do the job but this is currently unimplemented - a different format will result +if the suggested transformations are used. In PNG files, the alpha channel in an image is the level of opacity. If you need the alpha channel in an image to @@ -1303,8 +1592,8 @@ with alpha. if (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray_fixed(png_ptr, error_action, - int red_weight, int green_weight); + png_set_rgb_to_gray(png_ptr, error_action, double red_weight, + double green_weight); error_action = 1: silently do the conversion @@ -1317,122 +1606,89 @@ with alpha. image has any pixel where red != green or red != blue - red_weight: weight of red component times 100000 + red_weight: weight of red component - green_weight: weight of green component times 100000 + green_weight: weight of green component If either weight is negative, default - weights (21268, 71514) are used. + weights are used. + +In the corresponding fixed point API the red_weight and green_weight values are +simply scaled by 100,000: + + png_set_rgb_to_gray(png_ptr, error_action, png_fixed_point red_weight, + png_fixed_point green_weight); If you have set error_action = 1 or 2, you can later check whether the image really was gray, after processing the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. bKGD and sBIT data +1 if there were any non-gray pixels. Background and sBIT data will be silently converted to grayscale, using the green channel -data, regardless of the error_action setting. - -With red_weight+green_weight<=100000, -the normalized graylevel is computed: +data for sBIT, regardless of the error_action setting. - int rw = red_weight * 65536; - int gw = green_weight * 65536; - int bw = 65536 - (rw + gw); - gray = (rw*red + gw*green + bw*blue)/65536; +The default values come from the PNG file cHRM chunk if present, otherwise the +defaults correspond to the ITU-R recommendation 709, and also the sRGB color +space, as recommended in the Charles Poynton's Colour FAQ, +<http://www.poynton.com/>, in section 9: -The default values approximate those recommended in the Charles -Poynton's Color FAQ, <http://www.inforamp.net/~poynton/> -Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net> + <http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> Y = 0.212671 * R + 0.715160 * G + 0.072169 * B -Libpng approximates this with integers scaled by 32768: - - Y = (6968 * R + 23434 * G + 2366 * B)/32768 - The calculation is done in a linear colorspace, if the image gamma can be determined. -If you have a grayscale and you are using png_set_expand_depth(), -png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to -a higher bit-depth, you must either supply the background color as a gray -value at the original file bit-depth (need_expand = 1) or else supply the -background color as an RGB triplet at the final, expanded bit depth -(need_expand = 0). Similarly, if you are reading a paletted image, you -must either supply the background color as a palette index (need_expand = 1) -or as an RGB triplet that may or may not be in the palette (need_expand = 0). +The png_set_background() function has been described already, it tells libpng to +composite images with alpha or simple transparency against the supplied +background color. For compatibility with versions of libpng earlier than +libpng-1.5.4 it is recommended that you call the function after reading the file +header, even if you don't want to use the color in a bKGD chunk, if one exists. + +If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng how the color is represented, both the format of the +component values in the color (the number of bits) and the gamme encoding of the +color. The function takes two arguments, background_gamma_mode and need_expand +to convey this information, however only two combinations are like to be useful: png_color_16 my_background; png_color_16p image_background; if (png_get_bKGD(png_ptr, info_ptr, &image_background)) png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); else png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); -The png_set_background() function tells libpng to composite images -with alpha or simple transparency against the supplied background -color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng whether the color is in the gamma space of the -display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file -(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one -that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't -know why anyone would use this, but it's here). - -To properly display PNG images on any kind of system, the application needs -to know what the display gamma is. Ideally, the user will know this, and -the application will allow them to set it. One method of allowing the user -to set the display gamma separately for each system is to check for a -SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be -correctly set. - -Note that display_gamma is the overall gamma correction required to produce -pleasing results, which depends on the lighting conditions in the surrounding -environment. In a dim or brightly lit room, no compensation other than -the physical gamma exponent of the monitor is needed, while in a dark room -a slightly smaller exponent is better. - - double gamma, screen_gamma; - - if (/* We have a user-defined screen - gamma value */) - { - screen_gamma = user_defined_screen_gamma; - } - /* One way that applications can share the same - screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) - != NULL) - { - screen_gamma = (double)atof(gamma_str); - } +The second call was described above - my_background is in the format of the +final, display, output produced by libpng. Because you now know the format of +the PNG it is possible to avoid the need to choose either 8-bit or 16-bit +output and to retain palette images (the palette colors will be modified +appropriately and the tRNS chunk removed.) However, if you are doing this, +take great care not to ask for transformations without checking first that +they apply! - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a - PC monitor in a bright office or a dim room */ +In the first call the background color has the original bit depth and color type +of the PNG file. So, for palette images the color is supplied as a palette +index and for low bit greyscale images the color is a reduced bit value in +image_background->gray. - screen_gamma = 2.0; /* A good guess for a - PC monitor in a dark room */ +If you didn't call png_set_gamma() before reading the file header, for example +if you need your code to remain compatible with older versions of libpng prior +to libpng-1.5.4, this is the place to call it. - screen_gamma = 1.7 or 1.0; /* A good - guess for Mac systems */ - } +Do not call it if you called png_set_alpha_mode(); doing so will damage the +settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is +supported then you can certainly do png_set_gamma() before reading the PNG +header.) -The functions png_set_gamma() and its fixed point equivalent -png_set_gamma_fixed() handle gamma transformations of the data. -Pass both the file gamma and the current screen_gamma. If the file does -not have a gamma value, you can pass one anyway if you have an idea what -it is (usually 0.45455 is a good guess for GIF images on PCs). Note -that file gammas are inverted from screen gammas. See the discussions -on gamma in the PNG specification for an excellent description of what -gamma is, and why all applications should support it. It is strongly -recommended that PNG viewers support gamma correction. +This API unconditionally sets the screen and file gamma values, so it will +override the value in the PNG file unless it is called before the PNG file +reading starts. For this reason you must always call it with the PNG file +value when you call it in this position: if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) png_set_gamma(png_ptr, screen_gamma, file_gamma); @@ -1488,7 +1744,7 @@ This function can also be used to invert grayscale and gray-alpha images: color_type == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_invert_mono(png_ptr); -PNG files store 16 bit pixels in network byte order (big-endian, +PNG files store 16-bit pixels in network byte order (big-endian, ie. most significant bits first). This code changes the storage to the other way (little-endian, i.e. least significant bits first, the way PCs store them): @@ -1511,7 +1767,7 @@ with You must supply the function - void read_transform_fn(png_structp png_ptr, row_info_ptr + void read_transform_fn(png_structp png_ptr, png_row_infop row_info, png_bytep data) See pngtest.c for a working example. Your function will be called @@ -1530,6 +1786,14 @@ supported if user transforms are supported, secondly they may well return unexpected results unless the row is actually being processed at the moment they are called. +With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + You can also set up a pointer to a user structure for use by your callback function, and you can inform libpng that your transform function will change the number of channels or bit depth with the @@ -1772,15 +2036,39 @@ low-level interface, you can finish reading the file. If you are interested in comments or time, which may be stored either before or after the image data, you should pass the separate png_info struct if you want to keep the comments from before and after the image -separate. If you are not interested, you can pass NULL. +separate. + + png_infop end_info = png_create_info_struct(png_ptr); + + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } png_read_end(png_ptr, end_info); +If you are not interested, you should still call png_read_end() +but you can pass NULL, avoiding the need to create an end_info structure. + + png_read_end(png_ptr, (png_infop)NULL); + +If you don't call png_read_end(), then your file pointer will be +left pointing to the first chunk after the last IDAT, which is probably +not what you want if you expect to read something beyond the end of +the PNG datastream. + When you are done, you can free all memory allocated by libpng like this: png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +or, if you didn't create an end_info structure, + + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + It is also possible to individually free the info_ptr members that point to libpng-allocated storage with the following function: @@ -2183,6 +2471,20 @@ To inform libpng about your function, use png_set_write_status_fn(png_ptr, write_row_callback); +When this function is called the row has already been completely processed and +it has also been written out. The 'row' and 'pass' refer to the next row to be +handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + You now have the option of modifying how the compression library will run. The following functions are mainly for testing, but may be useful in some cases, like if you need to write PNG files extremely fast and @@ -2227,11 +2529,13 @@ which changes how much time zlib spends on trying to compress the image data. See the Compression Library (zlib.h and algorithm.txt, distributed with zlib) for details on the compression levels. - /* set the zlib compression level */ + #include zlib.h + + /* Set the zlib compression level */ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); - /* set other zlib parameters */ + /* Set other zlib parameters for compressing IDAT */ png_set_compression_mem_level(png_ptr, 8); png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); @@ -2239,7 +2543,15 @@ with zlib) for details on the compression levels. png_set_compression_method(png_ptr, 8); png_set_compression_buffer_size(png_ptr, 8192) -extern PNG_EXPORT(void,png_set_zbuf_size) + /* Set zlib parameters for text compression + * If you don't call these, the parameters + * fall back on those defined for IDAT chunks + */ + png_set_text_compression_mem_level(png_ptr, 8); + png_set_text_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_text_compression_window_bits(png_ptr, 15); + png_set_text_compression_method(png_ptr, 8); Setting the contents of info for output @@ -2745,7 +3057,7 @@ is required by PNG. png_set_shift(png_ptr, &sig_bit); -PNG files store 16 bit pixels in network byte order (big-endian, +PNG files store 16-bit pixels in network byte order (big-endian, ie. most significant bits first). This code would be used if they are supplied the other way (little-endian, i.e. least significant bits first, the way PCs store them): @@ -2779,8 +3091,8 @@ with You must supply the function - void write_transform_fn(png_structp png_ptr ptr, - row_info_ptr row_info, png_bytep data) + void write_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) See pngtest.c for a working example. Your function will be called before any of the other transformations are processed. If supported @@ -2788,9 +3100,15 @@ libpng also supplies an information routine that may be called from your callback: png_get_current_row_number(png_ptr); + png_get_current_pass_number(png_ptr); -This returns the current row passed to the transform. Even with interlaced -images the value returned is the row in the final output image. +This returns the current row passed to the transform. With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. You can also set up a pointer to a user structure for use by your callback function. @@ -3155,7 +3473,7 @@ the simpler ones to get an idea of how they work. Try to find a similar transformation to the one you want to add and copy off of it. More details can be found in the comments inside the code itself. -Configuring for 16 bit platforms +Configuring for 16-bit platforms You will want to look into zconf.h to tell zlib (and thus libpng) that it cannot allocate more then 64K at a time. Even if you can, the memory @@ -3210,6 +3528,7 @@ specify no compression (Z_NO_COMPRESSION = 0), but this would create files larger than just storing the raw bitmap. You can specify the compression level by calling: + #include zlib.h png_set_compression_level(png_ptr, level); Another useful one is to reduce the memory level used by the library. @@ -3220,12 +3539,14 @@ other things, lower levels will result in sections of incompressible data being emitted in smaller stored blocks, with a correspondingly larger relative overhead of up to 15% in the worst case. + #include zlib.h png_set_compression_mem_level(png_ptr, level); The other functions are for configuring zlib. They are not recommended for normal use and may result in writing an invalid PNG file. See zlib.h for more information on what these mean. + #include zlib.h png_set_compression_strategy(png_ptr, strategy); @@ -3623,12 +3944,12 @@ and memset(), respectively. The function png_set_gray_1_2_4_to_8() was removed. It has been deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with png_set_expand_gray_1_2_4_to_8() because the former function also -expanded palette images. +expanded any tRNS chunk to an alpha channel. Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 were added and are used by default instead of the corresponding functions. Unfortunately, -from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. We changed the prototype for png_malloc() from @@ -3658,7 +3979,8 @@ The png_zalloc() function no longer zeroes out the memory that it allocates. Support for dithering was disabled by default in libpng-1.4.0, because -been well tested and doesn't actually "dither". The code was not +it has not been well tested and doesn't actually "dither". +The code was not removed, however, and could be enabled by building libpng with PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support was reenabled, but the function was renamed png_set_quantize() to @@ -3671,7 +3993,7 @@ We removed the trailing '.' from the warning and error messages. X. Changes to Libpng from version 1.4.x to 1.5.x -From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. A. Changes that affect users of libpng @@ -3708,7 +4030,8 @@ application code. (It is extremely rare for an application to do this.) Any program that compiled against libpng 1.4 and did not use deprecated features or access internal library structures should compile and work -against libpng 1.5. +against libpng 1.5, except for the change in the prototype for +png_get_iCCP() and png_set_iCCP() API functions mentioned above. libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of interlaced images. The macros return the number of rows and columns in @@ -3716,10 +4039,11 @@ each pass and information that can be used to de-interlace and (if absolutely necessary) interlace an image. libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls -the application provided png_longjmp_ptr on the internal, but application +the application-provided png_longjmp_ptr on the internal, but application initialized, jmpbuf. It is provided as a convenience to avoid the need -to use the png_jmpbuf macro, which had the unnecessary side effect of -resetting the internal png_longjmp_ptr value. +initialized, longjmp buffer. It is provided as a convenience to avoid +the need to use the png_jmpbuf macro, which had the unnecessary side +effect of resetting the internal png_longjmp_ptr value. libpng 1.5.0 includes a complete fixed point API. By default this is present along with the corresponding floating point API. In general the @@ -3762,7 +4086,7 @@ reset by pngusr.h or by explicit settings on the compiler command line. These settings may produce compiler warnings or errors in 1.5.0 because of macro redefinition. -From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. libpng 1.5.0 is consistent with the implementation in 1.4.5 and 1.2.x (where the macro did not exist.) @@ -3773,6 +4097,25 @@ PNG_NO_USE_READ_MACROS before including png.h. Notice that this is only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0 will lead to a link failure. +Prior to libpng-1.5.4, the zlib compressor used the same set of parameters +when compressing the IDAT data and textual data such as zTXt and iCCP. +In libpng-1.5.4 we reinitialized the zlib stream for each type of data. +We added five png_set_text_*() functions for setting the parameters to +use with textual data. + +Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +option was off by default, and slightly inaccurate scaling occurred. +This option can no longer be turned off, and the choice of accurate +or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() +API for accurate scaling or the old png_set_strip_16_to_8() API for simple +chopping. + +Prior to libpng-1.5.4, the png_set_user_limits() function could only be +used to reduce the width and height limits from the value of +PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said +that it could be used to override them. Now this function will reduce or +increase the limits. + B. Changes to the build and configuration of libpng Details of internal changes to the library code can be found in the CHANGES @@ -4081,13 +4424,13 @@ Other rules can be inferred by inspecting the libpng source. XIV. Y2K Compliance in libpng -February 3, 2011 +July 7, 2011 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.5.1 are Y2K compliant. It is my belief that earlier +upward through 1.5.4 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that diff --git a/src/3rdparty/libpng/libpng.3 b/src/3rdparty/libpng/libpng.3 index ecc4277..04518ca 100644 --- a/src/3rdparty/libpng/libpng.3 +++ b/src/3rdparty/libpng/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "February 3, 2011" +.TH LIBPNG 3 "July 7, 2011" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 +libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4 .SH SYNOPSIS \fI\fB @@ -512,6 +512,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 \fI\fB +\fBvoid png_set_alpha_mode (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, double \fIoutput_gamma\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_alpha_mode_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fImode\fP\fB, png_fixed_point \fIoutput_gamma\fP\fB);\fP + +\fI\fB + \fBvoid png_set_background (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, double \fIbackground_gamma\fP\fB);\fP \fI\fB @@ -576,6 +584,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 \fI\fB +\fBvoid png_set_expand_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP \fI\fB @@ -752,6 +764,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 \fI\fB +\fBvoid png_set_scale_16 (png_structp \fIpng_ptr\fP\fB);\fP + +\fI\fB + \fBvoid png_set_shift (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fItrue_bits\fP\fB);\fP \fI\fB @@ -796,6 +812,26 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 \fI\fB +\fBvoid png_set_text_compression_level (png_structp \fP\fIpng_ptr\fP\fB, int \fIlevel\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_text_compression_mem_level (png_structp \fP\fIpng_ptr\fP\fB, int \fImem_level\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_text_compression_strategy (png_structp \fP\fIpng_ptr\fP\fB, int \fIstrategy\fP\fB);\fP + +\fI\fB + +\fBvoid png_set_text_compression_window_bits (png_structp \fP\fIpng_ptr\fP\fB, int \fIwindow_bits\fP\fB);\fP + +\fI\fB + +\fBvoid \fP\fIpng_set_text_compression_method\fP\fB, (png_structp \fP\fIpng_ptr\fP\fB, int \fImethod)\fP\fB);\fP + +\fI\fB + \fBvoid png_set_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP \fI\fB @@ -919,7 +955,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.5.1 - February 3, 2011 + libpng version 1.5.4 - July 7, 2011 Updated and distributed by Glenn Randers-Pehrson <glennrp at users.sourceforge.net> Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -930,7 +966,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011 + libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -1117,9 +1153,9 @@ reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand. Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing -the lines defining the supported features, paying very close attention to the -'option' information in scripts/pnglibconf.dfa that describes those features and -their requirements. This is easy to get wrong. +the lines defining the supported features, paying very close attention to +the 'option' information in scripts/pnglibconf.dfa that describes those +features and their requirements. This is easy to get wrong. B. Configuration using DFA_XTRA @@ -1267,21 +1303,12 @@ create the structure, so your application should check for that. return (ERROR); } - png_infop end_info = png_create_info_struct(png_ptr); - - if (!end_info) - { - png_destroy_read_struct(&png_ptr, &info_ptr, - (png_infopp)NULL); - return (ERROR); - } - If you want to use your own memory allocation routines, use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use png_create_read_struct_2() instead of png_create_read_struct(): png_structp png_ptr = png_create_read_struct_2 - (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, + (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, user_error_fn, user_warning_fn, (png_voidp) user_mem_ptr, user_malloc_fn, user_free_fn); @@ -1293,7 +1320,7 @@ handling and memory alloc/free functions. When libpng encounters an error, it expects to longjmp back to your routine. Therefore, you will need to call setjmp and pass your png_jmpbuf(png_ptr). If you read the file from different -routines, you will need to update the jmpbuf field every time you enter +routines, you will need to update the longjmp buffer every time you enter a new routine that will call a png_*() function. See your documentation of setjmp/longjmp for your compiler for more @@ -1311,6 +1338,9 @@ free any memory. return (ERROR); } +Pass (png_infopp)NULL instead of &end_info if you didn't create +an end_info structure. + If you would rather avoid the complexity of setjmp/longjmp issues, you can compile libpng with PNG_NO_SETJMP, in which case errors will result in a call to PNG_ABORT() which defaults to abort(). @@ -1432,6 +1462,19 @@ To inform libpng about your function, use png_set_read_status_fn(png_ptr, read_row_callback); +When this function is called the row has already been completely processed and +the 'row' and 'pass' refer to the next row to be handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + .SS Unknown-chunk handling Now you get to set the way the library processes unknown chunks in the @@ -1509,7 +1552,7 @@ large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. Since very few applications really need to process such large images, we have imposed an arbitrary 1-million limit on rows and columns. Larger images will be rejected immediately with a png_error() call. If -you wish to override this limit, you can use +you wish to change this limit, you can use png_set_user_limits(png_ptr, width_max, height_max); @@ -1519,6 +1562,10 @@ anyway because of potential buffer overflow conditions). You should put this statement after you create the PNG structure and before calling png_read_info(), png_read_png(), or png_process_data(). + +When writing a PNG datastream, put this statement before calling +png_write_info() or png_write_png(). + If you need to retrieve the limits that are being applied, use width_max = png_get_user_width_max(png_ptr); @@ -1549,6 +1596,234 @@ and you can retrieve the limit with Any chunks that would cause either of these limits to be exceeded will be ignored. +.SS Information about your system + +If you intend to display the PNG or to incorporate it in other image data you +need to tell libpng information about your display or drawing surface so that +libpng can convert the values in the image to match the display. + +From libpng-1.5.4 this information can be set before reading the PNG file +header. In earlier versions png_set_gamma() existed but behaved incorrectly if +called before the PNG file header had been read and png_set_alpha_mode() did not +exist. + +If you need to support versions prior to libpng-1.5.4 test the version number +and follow the procedures described in the appropriate manual page. + +You give libpng the encoding expected by your system expressed as a 'gamma' +value. You can also specify a default encoding for the PNG file in +case the required information is missing from the file. By default libpng +assumes that the PNG data matches your system, to keep this default call: + + png_set_gamma(png_ptr, screen_gamma, 1/screen_gamma/*file gamma*/); + +or you can use the fixed point equivalent: + + png_set_gamma_fixed(png_ptr, PNG_FP_1*screen_gamma, PNG_FP_1/screen_gamma); + +If you don't know the gamma for you system it is probably 2.2 - a good +approximation to the IEC standard for display systems (sRGB). If images are +too contrasty or washed out you got the value wrong - check your system +documentation! + +Many systems permit the system gamma to be changed via a lookup table in the +display driver, a few systems, including older Macs, change the response by +default. As of 1.5.4 three special values are available to handle common +situations: + + PNG_DEFAULT_sRGB: Indicates that the system conforms to the IEC 61966-2-1 + standard. This matches almost all systems. + PNG_GAMMA_MAC_18: Indicates that the system is an older (pre Mac OS 10.6) + Apple Macintosh system with the default settings. + PNG_GAMMA_LINEAR: Just the fixed point value for 1.0 - indicates that the + system expects data with no gamma encoding. + +You would use the linear (unencoded) value if you need to process the pixel +values further because this avoids the need to decode and reencode each +component value whenever arithmetic is performed. A lot of graphics software +uses linear values for this reason, often with higher precision component values +to preserve overall accuracy. + +The second thing you may need to tell libpng about is how your system handles +alpha channel information. Some, but not all, PNG files contain an alpha +channel. To display these files correctly you need to compose the data onto a +suitable background, as described in the PNG specification. + +Libpng only supports composing onto a single color (using png_set_background; +see below.) Otherwise you must do the composition yourself and, in this case, +you may need to call png_set_alpha_mode: + + png_set_alpha_mode(png_ptr, mode, screen_gamma); + +The screen_gamma value is the same as the argument to png_set_gamma, however how +it affects the output depends on the mode. png_set_alpha_mode() sets the file +gamma default to 1/screen_gamma, so normally you don't need to call +png_set_gamma. If you need different defaults call png_set_gamma() before +png_set_alpha_mode() - if you call it after it will override the settings made +by png_set_alpha_mode(). + +The mode is as follows: + + PNG_ALPHA_PNG: The data is encoded according to the PNG specification. Red, +green and blue, or gray, components are gamma encoded color +values and are not premultiplied by the alpha value. The +alpha value is a linear measure of the contribution of the +pixel to the corresponding final output pixel. + +You should normally use this format if you intend to perform +color correction on the color values; most, maybe all, color +correction software has no handling for the alpha channel and, +anyway, the math to handle pre-multiplied component values is +unnecessarily complex. + +Before you do any arithmetic on the component values you need +to remove the gamma encoding and multiply out the alpha +channel. See the PNG specification for more detail. It is +important to note that when an image with an alpha channel is +scaled, linear encoded, pre-multiplied component values must +be used! + +The remaining modes assume you don't need to do any further color correction or +that if you do your color correction software knows all about alpha (it +probably doesn't!) + + PNG_ALPHA_STANDARD: The data libpng produces is encoded in the standard way +assumed by most correctly written graphics software. +The gamma encoding will be removed by libpng and the +linear component values will be pre-multiplied by the +alpha channel. + +With this format the final image must be re-encoded to +match the display gamma before the image is displayed. +If your system doesn't do that, yet still seems to +perform arithmetic on the pixels without decoding them, +it is broken - check out the modes below. + +With PNG_ALPHA_STANDARD libpng always produces linear +component values, whatever screen_gamma you supply. The +screen_gamma value is, however, used as a default for +the file gamma if the PNG file has no gamma information. + +If you call png_set_gamma() after png_set_alpha_mode() you +will override the linear encoding. Instead the +pre-multiplied pixel values will be gamma encoded but +the alpha channel will still be linear. This may +actually match the requirements of some broken software, +but it is unlikely. + +While linear 8-bit data is often used it has +insufficient precision for any image with a reasonable +dynamic range. To avoid problems, and if your software +supports it, use png_set_expand_16() to force all +components to 16 bits. + + PNG_ALPHA_OPTIMIZED: This mode is the same as PNG_ALPHA_STANDARD except that +completely opaque pixels are gamma encoded according to +the screen_gamma value. Pixels with alpha less than 1.0 +will still have linear components. + +Use this format if you have control over your +compositing software and do don't do other arithmetic +(such as scaling) on the data you get from libpng. Your +compositing software can simply copy opaque pixels to +the output but still has linear values for the +non-opaque pixels. + +In normal compositing, where the alpha channel encodes +partial pixel coverage (as opposed to broad area +translucency), the inaccuracies of the 8-bit +representation of non-opaque pixels are irrelevant. + +You can also try this format if your software is broken; +it might look better. + + PNG_ALPHA_BROKEN: This is PNG_ALPHA_STANDARD however all component values, +including the alpha channel are gamma encoded. This is +an appropriate format to try if your software, or more +likely hardware, is totally broken: if it performs +linear arithmetic directly on gamma encoded values. + +In most cases of broken software or hardware the bug in the final display +manifests as a subtle halo around composited parts of the image. You may not +even perceive this as a halo; the composited part of the image may simply appear +separate from the background, as though it had been cut out of paper and pasted +on afterward. + +If you don't have to deal with bugs in software or hardware, or if you can fix +them, there are three recommended ways of using png_set_alpha_mode(): + + png_set_alpha_mode(png_ptr, PNG_ALPHA_PNG, + screen_gamma); + +You can do color correction on the result (libpng does not currently +support color correction internally.) When you handle the alpha channel +you need to undo the gamma encoding and multiply out the alpha. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_STANDARD, + screen_gamma); + png_set_expand_16(png_ptr); + +If you are using the high level interface don't call png_set_expand_16(); +instead pass PNG_TRANSFORM_EXPAND_16 to the interface. + +With this mode you can't do color correction, but you can do arithmetic, +including composition and scaling, on the data without further processing. + + png_set_alpha_mode(png_ptr, PNG_ALPHA_OPTIMIZED, + screen_gamma); + +You can avoid the expansion to 16-bit components with this mode, but you +lose the ability to scale the image or perform other linear arithmetic. +All you can do is compose the result onto a matching output. Since this +mode is libpng specific you also need to write your own composition +software. + +If you don't need, or can't handle, the alpha channel you can call +png_set_background() to remove it by compositing against a fixed color. Don't +call png_set_strip_alpha() to do this - it will leave spurious pixel values in +transparent parts of this image. + + png_set_background(png_ptr, &background_color, + PNG_BACKGROUND_GAMMA_SCREEN, 0, 1); + +The background_color is an RGB or grayscale value according to the data format +libpng will produce for you. Because you don't yet know the format of the PNG +file if you call png_set_background at this point you must arrange for the +format produced by libpng to always have 8-bit or 16-bit components and then +store the color as an 8-bit or 16-bit color as appropriate. The color contains +separate gray and RGB component values, so you can let libpng produce gray or +RGB output according to the input format, but low bit depth grayscale images +must always be converted to at least 8-bit format. (Even low low bit depth +grayscale images can't have an alpha channel they can have a transparent +color!) + +You set the transforms you need later, either as flags to the high level +interface or libpng API calls for the low level interface. For reference the +settings and API calls required are: + +8-bit values: + PNG_TRANSFORM_SCALE_16 | PNG_EXPAND + png_set_expand(png_ptr); png_set_scale_16(png_ptr); + + If you must get exactly the same inaccurate results + produced by default in versions prior to libpng-1.5.4, + use PNG_TRANSFORM_STRIP_16 and png_set_strip_16(png_ptr) + instead. + +16-bit values: + PNG_TRANSFORM_EXPAND_16 + png_set_expand_16(png_ptr); + +In either case palette image data will be expanded to RGB. If you just want +color data you can add PNG_TRANSFORM_GRAY_TO_RGB or png_set_gray_to_rgb(png_ptr) +to the list. + +Calling png_set_background before the PNG file header is read will not work +prior to libpng-1.5.4. Because the failure may result in unexpected warnings or +errors it is therefore much safer to call png_set_background after the head has +been read. Unfortunately this means that prior to libpng-1.5.4 it cannot be +used with the high level interface. + .SS The high-level read interface At this point there are two ways to proceed; through the high-level @@ -1558,8 +1833,10 @@ the entire image into memory, and (b) the input transformations you want to do are limited to the following set: PNG_TRANSFORM_IDENTITY No transformation - PNG_TRANSFORM_STRIP_16 Strip 16-bit samples to - 8 bits + PNG_TRANSFORM_SCALE_16 Strip 16-bit samples to + 8-bit accurately + PNG_TRANSFORM_STRIP_16 Chop 16-bit samples to + 8-bit less accurately PNG_TRANSFORM_STRIP_ALPHA Discard the alpha channel PNG_TRANSFORM_PACKING Expand 1, 2 and 4-bit samples to bytes @@ -1578,6 +1855,7 @@ you want to do are limited to the following set: PNG_TRANSFORM_SWAP_ENDIAN Byte-swap 16-bit samples PNG_TRANSFORM_GRAY_TO_RGB Expand grayscale samples to RGB (or GA to RGBA) + PNG_TRANSFORM_EXPAND_16 Expand samples to 16 bits (This excludes setting a background color, doing gamma transformation, quantizing, and setting filler.) If this is the case, simply do this: @@ -1646,6 +1924,22 @@ call to png_read_info(). This will process all chunks up to but not including the image data. +This also copies some of the data from the PNG file into the decode structure +for use in later transformations. Important information copied in is: + +1) The PNG file gamma from the gAMA chunk. This overwrites the default value +provided by an earlier call to png_set_gamma or png_set_alpha_mode. + +2) Prior to libpng-1.5.4 the background color from a bKGd chunk. This +damages the information provided by an earlier call to png_set_background +resulting in expected behavior. Libpng-1.5.4 no longer does this. + +3) The number of significant bits in each component value. Libpng uses this to +optimize gamma handling by reducing the internal lookup table sizes. + +4) The transparent color information from a tRNS chunk. This can be modified by +a later call to png_set_tRNS. + .SS Querying the info structure Functions are used to get the information from the info_ptr once it @@ -1988,7 +2282,7 @@ forms: 72 dpi is stored as 0.28346 pixels/meter, and when this is retrieved it is 71.9988 dpi, so be sure to round the returned value appropriately - if you want to display a reasonable-looking result. + if you want to display a reasonable-looking result. The data from the oFFs chunk can be retrieved in several convenient forms: @@ -2009,7 +2303,7 @@ forms: converted to microns and back without some loss of precision. -For more information, see the png_info definition in png.h and the +For more information, see the PNG specification for chunk contents. Be careful with trusting rowbytes, as some of the transformations could increase the space needed to hold a row (expand, filler, gray_to_rgb, etc.). @@ -2044,17 +2338,20 @@ to handle any special transformations of the image data. The various ways to transform the data will be described in the order that they should occur. This is important, as some of these change the color type and/or bit depth of the data, and some others only work on -certain color types and bit depths. Even though each transformation -checks to see if it has data that it can do something with, you should -make sure to only enable a transformation if it will be valid for the -data. For example, don't swap red and blue on grayscale data. +certain color types and bit depths. + +Transformations you request are ignored if they don't have any meaning for a +particular input data format. However some transformations can have an effect +as a result of a previous transformation. If you specify a contradictory set of +transformations, for example both adding and removing the alpha channel, you +cannot predict the final result. -The colors used for the background and transparency values should be -supplied in the same format/depth as the current image data. They -are stored in the same format/depth as the image data in a bKGD or tRNS -chunk, so this is what libpng expects for this data. The colors are -transformed to keep in sync with the image data when an application -calls the png_read_update_info() routine (see below). +The color used for the transparency values should be supplied in the same +format/depth as the current image data. It is stored in the same format/depth +as the image data in a tRNS chunk, so this is what libpng expects for this data. + +The color used for the background value depends on the need_expand argument as +described below. Data will be decoded into the supplied row buffers packed into bytes unless the library has been told to transform it into another format. @@ -2064,12 +2361,12 @@ byte, unless png_set_packing() is called. 8-bit RGB data will be stored in RGB RGB RGB format unless png_set_filler() or png_set_add_alpha() is called to insert filler bytes, either before or after each RGB triplet. 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant -byte of the color value first, unless png_set_strip_16() is called to +byte of the color value first, unless png_set_scale_16() is called to transform it to regular RGB RGB triplets, or png_set_filler() or png_set_add alpha() is called to insert filler bytes, either before or after each RRGGBB triplet. Similarly, 8-bit or 16-bit grayscale data can -be modified with -png_set_filler(), png_set_add_alpha(), or png_set_strip_16(). +be modified with png_set_filler(), png_set_add_alpha(), png_set_strip_16(), +or png_set_scale_16(). The following code transforms grayscale images of less than 8 to 8 bits, changes paletted images to RGB, and adds a full alpha channel if there is @@ -2080,13 +2377,13 @@ viewing application that wishes to treat all images in the same way. if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png_ptr); - if (color_type == PNG_COLOR_TYPE_GRAY && - bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); - if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr); -These three functions are actually aliases for png_set_expand(), added + if (color_type == PNG_COLOR_TYPE_GRAY && + bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr); + +The first two functions are actually aliases for png_set_expand(), added in libpng version 1.0.4, with the function names expanded to improve code readability. In some future version they may actually do different things. @@ -2094,56 +2391,84 @@ things. As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was added. It expands the sample depth without changing tRNS to alpha. -As of libpng version 1.5.1, not all possible expansions are supported. +As of libpng version 1.5.2, png_set_expand_16() was added. It behaves as +png_set_expand(), however, the resultant channels have 16 bits rather than 8. +Use this when the output color or gray channels are made linear to avoid fairly +severe accuracy loss. + + if (bit_depth < 16) + png_set_expand_16(png_ptr); + +PNG can have files with 16 bits per channel. If you only can handle +8 bits per channel, this will strip the pixels down to 8-bit. + + if (bit_depth == 16) + png_set_scale_16(png_ptr); + +If you need to process the alpha channel on the image separately from the image +data (for example if you convert it to a bitmap mask) it is possible to have +libpng strip the channel leaving just RGB or gray data: + + if (color_type & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha(png_ptr); + +If you strip the alpha channel you need to find some other way of dealing with +the information. If, instead, you want to convert the image to an opaque +version with no alpha channel use png_set_background; see below. + +As of libpng version 1.5.2, almost all useful expansions are supported, the +major ommissions are conversion of grayscale to indexed images (which can be +done trivially in the application) and conversion of indexed to grayscale (which +can be done by a trivial manipulation of the palette.) In the following table, the 01 means grayscale with depth<8, 31 means indexed with depth<8, other numerals represent the color type, "T" means the tRNS chunk is present, A means an alpha channel is present, and O means tRNS or alpha is present but all pixels in the image are opaque. - FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O + FROM 01 31 0 0T 0O 2 2T 2O 3 3T 3O 4A 4O 6A 6O TO - 01 - - 31 - - 0 1 - - 0T - - 0O - - 2 GX - - 2T - - 2O - - 3 1 - - 3T - - 3O - - 4A T - - 4O - - 6A GX TX TX - - 6O GX TX - + 01 - [G] - - - - - - - - - - - - - + 31 [Q] Q [Q] [Q] [Q] Q Q Q Q Q Q [Q] [Q] Q Q + 0 1 G + . . G G G G G G B B GB GB + 0T lt Gt t + . Gt G G Gt G G Bt Bt GBt GBt + 0O lt Gt t . + Gt Gt G Gt Gt G Bt Bt GBt GBt + 2 C P C C C + . . C - - CB CB B B + 2T Ct - Ct C C t + t - - - CBt CBt Bt Bt + 2O Ct - Ct C C t t + - - - CBt CBt Bt Bt + 3 [Q] p [Q] [Q] [Q] Q Q Q + . . [Q] [Q] Q Q + 3T [Qt] p [Qt][Q] [Q] Qt Qt Qt t + t [Qt][Qt] Qt Qt + 3O [Qt] p [Qt][Q] [Q] Qt Qt Qt t t + [Qt][Qt] Qt Qt + 4A lA G A T T GA GT GT GA GT GT + BA G GBA + 4O lA GBA A T T GA GT GT GA GT GT BA + GBA G + 6A CA PA CA C C A T tT PA P P C CBA + BA + 6O CA PBA CA C C A tT T PA P P CBA C BA + Within the matrix, + "+" identifies entries where 'from' and 'to' are the same. "-" means the transformation is not supported. + "." means nothing is necessary (a tRNS chunk can just be ignored). + "t" means the transformation is obtained by png_set_tRNS. + "A" means the transformation is obtained by png_set_add_alpha(). "X" means the transformation is obtained by png_set_expand(). "1" means the transformation is obtained by - png_set_expand_gray_1_2_4_to_8 - "G" means the transformation is obtained by - png_set_gray_to_rgb(). + png_set_expand_gray_1_2_4_to_8() (and by png_set_expand() if there + is no transparency in the original or the final format). + "C" means the transformation is obtained by png_set_gray_to_rgb(). + "G" means the transformation is obtained by png_set_rgb_to_gray(). "P" means the transformation is obtained by png_set_expand_palette_to_rgb(). - "T" means the transformation is obtained by - png_set_tRNS_to_alpha(). - -PNG can have files with 16 bits per channel. If you only can handle -8 bits per channel, this will strip the pixels down to 8 bit. - - if (bit_depth == 16) - png_set_strip_16(png_ptr); - -If, for some reason, you don't need the alpha channel on an image, -and you want to remove it rather than combining it with the background -(but the image author certainly had in mind that you *would* combine -it with the background, so that's what you should probably do): - - if (color_type & PNG_COLOR_MASK_ALPHA) - png_set_strip_alpha(png_ptr); + "p" means the transformation is obtained by png_set_packing(). + "Q" means the transformation is obtained by png_set_quantize(). + "T" means the transformation is obtained by png_set_tRNS_to_alpha(). + "B" means the transformation is obtained by png_set_background(), or + png_strip_alpha(). + +When an entry has multiple transforms listed all are required to cause the +right overall transformation. When two transforms are separated by a comma +either will do the job. When transforms are enclosed in [] the transform should +do the job but this is currently unimplemented - a different format will result +if the suggested transformations are used. In PNG files, the alpha channel in an image is the level of opacity. If you need the alpha channel in an image to @@ -2222,8 +2547,8 @@ with alpha. if (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA) - png_set_rgb_to_gray_fixed(png_ptr, error_action, - int red_weight, int green_weight); + png_set_rgb_to_gray(png_ptr, error_action, double red_weight, + double green_weight); error_action = 1: silently do the conversion @@ -2236,122 +2561,89 @@ with alpha. image has any pixel where red != green or red != blue - red_weight: weight of red component times 100000 + red_weight: weight of red component - green_weight: weight of green component times 100000 + green_weight: weight of green component If either weight is negative, default - weights (21268, 71514) are used. + weights are used. + +In the corresponding fixed point API the red_weight and green_weight values are +simply scaled by 100,000: + + png_set_rgb_to_gray(png_ptr, error_action, png_fixed_point red_weight, + png_fixed_point green_weight); If you have set error_action = 1 or 2, you can later check whether the image really was gray, after processing the image rows, with the png_get_rgb_to_gray_status(png_ptr) function. It will return a png_byte that is zero if the image was gray or -1 if there were any non-gray pixels. bKGD and sBIT data +1 if there were any non-gray pixels. Background and sBIT data will be silently converted to grayscale, using the green channel -data, regardless of the error_action setting. +data for sBIT, regardless of the error_action setting. -With red_weight+green_weight<=100000, -the normalized graylevel is computed: +The default values come from the PNG file cHRM chunk if present, otherwise the +defaults correspond to the ITU-R recommendation 709, and also the sRGB color +space, as recommended in the Charles Poynton's Colour FAQ, +<http://www.poynton.com/>, in section 9: - int rw = red_weight * 65536; - int gw = green_weight * 65536; - int bw = 65536 - (rw + gw); - gray = (rw*red + gw*green + bw*blue)/65536; - -The default values approximate those recommended in the Charles -Poynton's Color FAQ, <http://www.inforamp.net/~poynton/> -Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net> + <http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC9> Y = 0.212671 * R + 0.715160 * G + 0.072169 * B -Libpng approximates this with integers scaled by 32768: - - Y = (6968 * R + 23434 * G + 2366 * B)/32768 - The calculation is done in a linear colorspace, if the image gamma can be determined. -If you have a grayscale and you are using png_set_expand_depth(), -png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to -a higher bit-depth, you must either supply the background color as a gray -value at the original file bit-depth (need_expand = 1) or else supply the -background color as an RGB triplet at the final, expanded bit depth -(need_expand = 0). Similarly, if you are reading a paletted image, you -must either supply the background color as a palette index (need_expand = 1) -or as an RGB triplet that may or may not be in the palette (need_expand = 0). +The png_set_background() function has been described already, it tells libpng to +composite images with alpha or simple transparency against the supplied +background color. For compatibility with versions of libpng earlier than +libpng-1.5.4 it is recommended that you call the function after reading the file +header, even if you don't want to use the color in a bKGD chunk, if one exists. + +If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), +you may use this color, or supply another color more suitable for +the current display (e.g., the background color from a web page). You +need to tell libpng how the color is represented, both the format of the +component values in the color (the number of bits) and the gamme encoding of the +color. The function takes two arguments, background_gamma_mode and need_expand +to convey this information, however only two combinations are like to be useful: png_color_16 my_background; png_color_16p image_background; if (png_get_bKGD(png_ptr, info_ptr, &image_background)) png_set_background(png_ptr, image_background, - PNG_BACKGROUND_GAMMA_FILE, 1, 1.0); + PNG_BACKGROUND_GAMMA_FILE, 1/*needs to be expanded*/, 1); else png_set_background(png_ptr, &my_background, - PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0); + PNG_BACKGROUND_GAMMA_SCREEN, 0/*do not expand*/, 1); -The png_set_background() function tells libpng to composite images -with alpha or simple transparency against the supplied background -color. If the PNG file contains a bKGD chunk (PNG_INFO_bKGD valid), -you may use this color, or supply another color more suitable for -the current display (e.g., the background color from a web page). You -need to tell libpng whether the color is in the gamma space of the -display (PNG_BACKGROUND_GAMMA_SCREEN for colors you supply), the file -(PNG_BACKGROUND_GAMMA_FILE for colors from the bKGD chunk), or one -that is neither of these gammas (PNG_BACKGROUND_GAMMA_UNIQUE - I don't -know why anyone would use this, but it's here). - -To properly display PNG images on any kind of system, the application needs -to know what the display gamma is. Ideally, the user will know this, and -the application will allow them to set it. One method of allowing the user -to set the display gamma separately for each system is to check for a -SCREEN_GAMMA or DISPLAY_GAMMA environment variable, which will hopefully be -correctly set. - -Note that display_gamma is the overall gamma correction required to produce -pleasing results, which depends on the lighting conditions in the surrounding -environment. In a dim or brightly lit room, no compensation other than -the physical gamma exponent of the monitor is needed, while in a dark room -a slightly smaller exponent is better. - - double gamma, screen_gamma; - - if (/* We have a user-defined screen - gamma value */) - { - screen_gamma = user_defined_screen_gamma; - } - /* One way that applications can share the same - screen gamma value */ - else if ((gamma_str = getenv("SCREEN_GAMMA")) - != NULL) - { - screen_gamma = (double)atof(gamma_str); - } +The second call was described above - my_background is in the format of the +final, display, output produced by libpng. Because you now know the format of +the PNG it is possible to avoid the need to choose either 8-bit or 16-bit +output and to retain palette images (the palette colors will be modified +appropriately and the tRNS chunk removed.) However, if you are doing this, +take great care not to ask for transformations without checking first that +they apply! - /* If we don't have another value */ - else - { - screen_gamma = 2.2; /* A good guess for a - PC monitor in a bright office or a dim room */ +In the first call the background color has the original bit depth and color type +of the PNG file. So, for palette images the color is supplied as a palette +index and for low bit greyscale images the color is a reduced bit value in +image_background->gray. - screen_gamma = 2.0; /* A good guess for a - PC monitor in a dark room */ +If you didn't call png_set_gamma() before reading the file header, for example +if you need your code to remain compatible with older versions of libpng prior +to libpng-1.5.4, this is the place to call it. - screen_gamma = 1.7 or 1.0; /* A good - guess for Mac systems */ - } +Do not call it if you called png_set_alpha_mode(); doing so will damage the +settings put in place by png_set_alpha_mode(). (If png_set_alpha_mode() is +supported then you can certainly do png_set_gamma() before reading the PNG +header.) -The functions png_set_gamma() and its fixed point equivalent -png_set_gamma_fixed() handle gamma transformations of the data. -Pass both the file gamma and the current screen_gamma. If the file does -not have a gamma value, you can pass one anyway if you have an idea what -it is (usually 0.45455 is a good guess for GIF images on PCs). Note -that file gammas are inverted from screen gammas. See the discussions -on gamma in the PNG specification for an excellent description of what -gamma is, and why all applications should support it. It is strongly -recommended that PNG viewers support gamma correction. +This API unconditionally sets the screen and file gamma values, so it will +override the value in the PNG file unless it is called before the PNG file +reading starts. For this reason you must always call it with the PNG file +value when you call it in this position: if (png_get_gAMA(png_ptr, info_ptr, &file_gamma)) png_set_gamma(png_ptr, screen_gamma, file_gamma); @@ -2407,7 +2699,7 @@ This function can also be used to invert grayscale and gray-alpha images: color_type == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_invert_mono(png_ptr); -PNG files store 16 bit pixels in network byte order (big-endian, +PNG files store 16-bit pixels in network byte order (big-endian, ie. most significant bits first). This code changes the storage to the other way (little-endian, i.e. least significant bits first, the way PCs store them): @@ -2430,7 +2722,7 @@ with You must supply the function - void read_transform_fn(png_structp png_ptr, row_info_ptr + void read_transform_fn(png_structp png_ptr, png_row_infop row_info, png_bytep data) See pngtest.c for a working example. Your function will be called @@ -2449,6 +2741,14 @@ supported if user transforms are supported, secondly they may well return unexpected results unless the row is actually being processed at the moment they are called. +With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). + +The discussion of interlace handling above contains more information on how to +use these values. + You can also set up a pointer to a user structure for use by your callback function, and you can inform libpng that your transform function will change the number of channels or bit depth with the @@ -2691,15 +2991,39 @@ low-level interface, you can finish reading the file. If you are interested in comments or time, which may be stored either before or after the image data, you should pass the separate png_info struct if you want to keep the comments from before and after the image -separate. If you are not interested, you can pass NULL. +separate. + + png_infop end_info = png_create_info_struct(png_ptr); + + if (!end_info) + { + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + return (ERROR); + } png_read_end(png_ptr, end_info); +If you are not interested, you should still call png_read_end() +but you can pass NULL, avoiding the need to create an end_info structure. + + png_read_end(png_ptr, (png_infop)NULL); + +If you don't call png_read_end(), then your file pointer will be +left pointing to the first chunk after the last IDAT, which is probably +not what you want if you expect to read something beyond the end of +the PNG datastream. + When you are done, you can free all memory allocated by libpng like this: png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +or, if you didn't create an end_info structure, + + png_destroy_read_struct(&png_ptr, &info_ptr, + (png_infopp)NULL); + It is also possible to individually free the info_ptr members that point to libpng-allocated storage with the following function: @@ -3102,6 +3426,20 @@ To inform libpng about your function, use png_set_write_status_fn(png_ptr, write_row_callback); +When this function is called the row has already been completely processed and +it has also been written out. The 'row' and 'pass' refer to the next row to be +handled. For the +non-interlaced case the row that was just handled is simply one less than the +passed in row number, and pass will always be 0. For the interlaced case the +same applies unless the row value is 0, in which case the row just handled was +the last one from one of the preceding passes. Because interlacing may skip a +pass you cannot be sure that the preceding pass is just 'pass-1', if you really +need to know what the last pass is record (row,pass) from the callback and use +the last recorded value each time. + +As with the user transform you can find the output row using the +PNG_ROW_FROM_PASS_ROW macro. + You now have the option of modifying how the compression library will run. The following functions are mainly for testing, but may be useful in some cases, like if you need to write PNG files extremely fast and @@ -3146,11 +3484,13 @@ which changes how much time zlib spends on trying to compress the image data. See the Compression Library (zlib.h and algorithm.txt, distributed with zlib) for details on the compression levels. - /* set the zlib compression level */ + #include zlib.h + + /* Set the zlib compression level */ png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); - /* set other zlib parameters */ + /* Set other zlib parameters for compressing IDAT */ png_set_compression_mem_level(png_ptr, 8); png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY); @@ -3158,7 +3498,15 @@ with zlib) for details on the compression levels. png_set_compression_method(png_ptr, 8); png_set_compression_buffer_size(png_ptr, 8192) -extern PNG_EXPORT(void,png_set_zbuf_size) + /* Set zlib parameters for text compression + * If you don't call these, the parameters + * fall back on those defined for IDAT chunks + */ + png_set_text_compression_mem_level(png_ptr, 8); + png_set_text_compression_strategy(png_ptr, + Z_DEFAULT_STRATEGY); + png_set_text_compression_window_bits(png_ptr, 15); + png_set_text_compression_method(png_ptr, 8); .SS Setting the contents of info for output @@ -3664,7 +4012,7 @@ is required by PNG. png_set_shift(png_ptr, &sig_bit); -PNG files store 16 bit pixels in network byte order (big-endian, +PNG files store 16-bit pixels in network byte order (big-endian, ie. most significant bits first). This code would be used if they are supplied the other way (little-endian, i.e. least significant bits first, the way PCs store them): @@ -3698,8 +4046,8 @@ with You must supply the function - void write_transform_fn(png_structp png_ptr ptr, - row_info_ptr row_info, png_bytep data) + void write_transform_fn(png_structp png_ptr, png_row_infop + row_info, png_bytep data) See pngtest.c for a working example. Your function will be called before any of the other transformations are processed. If supported @@ -3707,9 +4055,15 @@ libpng also supplies an information routine that may be called from your callback: png_get_current_row_number(png_ptr); + png_get_current_pass_number(png_ptr); + +This returns the current row passed to the transform. With interlaced +images the value returned is the row in the input sub-image image. Use +PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to +find the output pixel (x,y) given an interlaced sub-image pixel (row,col,pass). -This returns the current row passed to the transform. Even with interlaced -images the value returned is the row in the final output image. +The discussion of interlace handling above contains more information on how to +use these values. You can also set up a pointer to a user structure for use by your callback function. @@ -4074,7 +4428,7 @@ the simpler ones to get an idea of how they work. Try to find a similar transformation to the one you want to add and copy off of it. More details can be found in the comments inside the code itself. -.SS Configuring for 16 bit platforms +.SS Configuring for 16-bit platforms You will want to look into zconf.h to tell zlib (and thus libpng) that it cannot allocate more then 64K at a time. Even if you can, the memory @@ -4129,6 +4483,7 @@ specify no compression (Z_NO_COMPRESSION = 0), but this would create files larger than just storing the raw bitmap. You can specify the compression level by calling: + #include zlib.h png_set_compression_level(png_ptr, level); Another useful one is to reduce the memory level used by the library. @@ -4139,12 +4494,14 @@ other things, lower levels will result in sections of incompressible data being emitted in smaller stored blocks, with a correspondingly larger relative overhead of up to 15% in the worst case. + #include zlib.h png_set_compression_mem_level(png_ptr, level); The other functions are for configuring zlib. They are not recommended for normal use and may result in writing an invalid PNG file. See zlib.h for more information on what these mean. + #include zlib.h png_set_compression_strategy(png_ptr, strategy); @@ -4542,12 +4899,12 @@ and memset(), respectively. The function png_set_gray_1_2_4_to_8() was removed. It has been deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with png_set_expand_gray_1_2_4_to_8() because the former function also -expanded palette images. +expanded any tRNS chunk to an alpha channel. Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32 were added and are used by default instead of the corresponding functions. Unfortunately, -from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. We changed the prototype for png_malloc() from @@ -4577,7 +4934,8 @@ The png_zalloc() function no longer zeroes out the memory that it allocates. Support for dithering was disabled by default in libpng-1.4.0, because -been well tested and doesn't actually "dither". The code was not +it has not been well tested and doesn't actually "dither". +The code was not removed, however, and could be enabled by building libpng with PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support was reenabled, but the function was renamed png_set_quantize() to @@ -4590,7 +4948,7 @@ We removed the trailing '.' from the warning and error messages. .SH X. Changes to Libpng from version 1.4.x to 1.5.x -From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. A. Changes that affect users of libpng @@ -4627,7 +4985,8 @@ application code. (It is extremely rare for an application to do this.) Any program that compiled against libpng 1.4 and did not use deprecated features or access internal library structures should compile and work -against libpng 1.5. +against libpng 1.5, except for the change in the prototype for +png_get_iCCP() and png_set_iCCP() API functions mentioned above. libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of interlaced images. The macros return the number of rows and columns in @@ -4635,10 +4994,11 @@ each pass and information that can be used to de-interlace and (if absolutely necessary) interlace an image. libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls -the application provided png_longjmp_ptr on the internal, but application +the application-provided png_longjmp_ptr on the internal, but application initialized, jmpbuf. It is provided as a convenience to avoid the need -to use the png_jmpbuf macro, which had the unnecessary side effect of -resetting the internal png_longjmp_ptr value. +initialized, longjmp buffer. It is provided as a convenience to avoid +the need to use the png_jmpbuf macro, which had the unnecessary side +effect of resetting the internal png_longjmp_ptr value. libpng 1.5.0 includes a complete fixed point API. By default this is present along with the corresponding floating point API. In general the @@ -4681,7 +5041,7 @@ reset by pngusr.h or by explicit settings on the compiler command line. These settings may produce compiler warnings or errors in 1.5.0 because of macro redefinition. -From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the +From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the function) incorrectly returned a value of type png_uint_32. libpng 1.5.0 is consistent with the implementation in 1.4.5 and 1.2.x (where the macro did not exist.) @@ -4692,6 +5052,25 @@ PNG_NO_USE_READ_MACROS before including png.h. Notice that this is only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0 will lead to a link failure. +Prior to libpng-1.5.4, the zlib compressor used the same set of parameters +when compressing the IDAT data and textual data such as zTXt and iCCP. +In libpng-1.5.4 we reinitialized the zlib stream for each type of data. +We added five png_set_text_*() functions for setting the parameters to +use with textual data. + +Prior to libpng-1.5.4, the PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +option was off by default, and slightly inaccurate scaling occurred. +This option can no longer be turned off, and the choice of accurate +or inaccurate 16-to-8 scaling is by using the new png_set_scale_16_to_8() +API for accurate scaling or the old png_set_strip_16_to_8() API for simple +chopping. + +Prior to libpng-1.5.4, the png_set_user_limits() function could only be +used to reduce the width and height limits from the value of +PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said +that it could be used to override them. Now this function will reduce or +increase the limits. + B. Changes to the build and configuration of libpng Details of internal changes to the library code can be found in the CHANGES @@ -5000,13 +5379,13 @@ Other rules can be inferred by inspecting the libpng source. .SH XIV. Y2K Compliance in libpng -February 3, 2011 +July 7, 2011 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.5.1 are Y2K compliant. It is my belief that earlier +upward through 1.5.4 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has three year fields. One is a 2-byte unsigned integer that @@ -5192,6 +5571,16 @@ the first widely used release: 1.5.1beta01-11 15 10501 15.so.15.1[.0] 1.5.1rc01-02 15 10501 15.so.15.1[.0] 1.5.1 15 10501 15.so.15.1[.0] + 1.5.2beta01-03 15 10502 15.so.15.2[.0] + 1.5.2rc01-03 15 10502 15.so.15.2[.0] + 1.5.2 15 10502 15.so.15.2[.0] + 1.5.3beta01-10 15 10503 15.so.15.3[.0] + 1.5.3rc01-02 15 10503 15.so.15.3[.0] + 1.5.3beta11 15 10503 15.so.15.3[.0] + 1.5.3 [omitted] + 1.5.4beta01-08 15 10504 15.so.15.4[.0] + 1.5.4rc01 15 10504 15.so.15.4[.0] + 1.5.4 15 10504 15.so.15.4[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -5248,7 +5637,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.5.1 - February 3, 2011: +Libpng version 1.5.4 - July 7, 2011: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -5271,7 +5660,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are +libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -5370,7 +5759,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -February 3, 2011 +July 7, 2011 .\" end of man page diff --git a/src/3rdparty/libpng/libpngpf.3 b/src/3rdparty/libpng/libpngpf.3 index ff6e164..33c9ad3 100644 --- a/src/3rdparty/libpng/libpngpf.3 +++ b/src/3rdparty/libpng/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "February 3, 2011" +.TH LIBPNGPF 3 "July 7, 2011" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 +libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4 (private functions) .SH SYNOPSIS \fB#include \fI"pngpriv.h" @@ -18,11 +18,9 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1 \fI\fB .SH DESCRIPTION -The functions previously listed here are used privately by libpng +The functions previously listed here are used privately by libpng and are not recommended for use by applications. They are -not "exported" to applications using shared libraries. They -are listed alphabetically here as an aid to libpng maintainers. -See pngpriv.h for more information on these functions. +not "exported" to applications using shared libraries. .SH SEE ALSO .BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5) diff --git a/src/3rdparty/libpng/png.5 b/src/3rdparty/libpng/png.5 index 9c5f8d3..0fca76e 100644 --- a/src/3rdparty/libpng/png.5 +++ b/src/3rdparty/libpng/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "February 3, 2011" +.TH PNG 5 "July 7, 2011" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/src/3rdparty/libpng/png.c b/src/3rdparty/libpng/png.c index 764f47c..eed3136 100644 --- a/src/3rdparty/libpng/png.c +++ b/src/3rdparty/libpng/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_5_1 Your_png_h_is_not_version_1_5_1; +typedef png_libpng_version_1_5_4 Your_png_h_is_not_version_1_5_4; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -137,6 +137,61 @@ png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length) png_ptr->crc = crc32(png_ptr->crc, ptr, (uInt)length); } +/* Check a user supplied version number, called from both read and write + * functions that create a png_struct + */ +int +png_user_version_check(png_structp png_ptr, png_const_charp user_png_ver) +{ + if (user_png_ver) + { + int i = 0; + + do + { + if (user_png_ver[i] != png_libpng_ver[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + } while (png_libpng_ver[i++]); + } + + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + + if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) + { + /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so + * we must recompile any applications that use any older library version. + * For versions after libpng 1.0, we will be compatible, so we need + * only check the first digit. + */ + if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || + (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || + (user_png_ver[0] == '0' && user_png_ver[2] < '9')) + { +#ifdef PNG_WARNINGS_SUPPORTED + size_t pos = 0; + char m[128]; + + pos = png_safecat(m, sizeof m, pos, "Application built with libpng-"); + pos = png_safecat(m, sizeof m, pos, user_png_ver); + pos = png_safecat(m, sizeof m, pos, " but running with "); + pos = png_safecat(m, sizeof m, pos, png_libpng_ver); + + png_warning(png_ptr, m); +#endif + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags = 0; +#endif + + return 0; + } + } + + /* Success return. */ + return 1; +} + /* Allocate the memory for an info_struct for the application. We don't * really need the png_ptr, but it could potentially be useful in the * future. This should be used in favour of malloc(png_sizeof(png_info)) @@ -291,12 +346,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask, /* Free any sCAL entry */ if ((mask & PNG_FREE_SCAL) & info_ptr->free_me) { -#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED) png_free(png_ptr, info_ptr->scal_s_width); png_free(png_ptr, info_ptr->scal_s_height); info_ptr->scal_s_width = NULL; info_ptr->scal_s_height = NULL; -#endif info_ptr->valid &= ~PNG_INFO_sCAL; } #endif @@ -518,28 +571,37 @@ png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime) if (png_ptr == NULL) return (NULL); - if (png_ptr->time_buffer == NULL) { - png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29* - png_sizeof(char))); + size_t pos = 0; + char number_buf[5]; /* enough for a four digit year */ + +# define APPEND_STRING(string)\ + pos = png_safecat(png_ptr->time_buffer, sizeof png_ptr->time_buffer,\ + pos, (string)) +# define APPEND_NUMBER(format, value)\ + APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value))) +# define APPEND(ch)\ + if (pos < (sizeof png_ptr->time_buffer)-1)\ + png_ptr->time_buffer[pos++] = (ch) + + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, (unsigned)ptime->day % 32); + APPEND(' '); + APPEND_STRING(short_months[(ptime->month - 1) % 12]); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, ptime->year); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->hour % 24); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->minute % 60); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second % 61); + APPEND_STRING(" +0000"); /* This reliably terminates the buffer */ + +# undef APPEND +# undef APPEND_NUMBER +# undef APPEND_STRING } -# ifdef USE_FAR_KEYWORD - { - char near_time_buf[29]; - png_snprintf6(near_time_buf, 29, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); - png_memcpy(png_ptr->time_buffer, near_time_buf, - 29*png_sizeof(char)); - } -# else - png_snprintf6(png_ptr->time_buffer, 29, "%d %s %d %02d:%02d:%02d +0000", - ptime->day % 32, short_months[(ptime->month - 1) % 12], - ptime->year, ptime->hour % 24, ptime->minute % 60, - ptime->second % 61); -# endif return png_ptr->time_buffer; } # endif /* PNG_TIME_RFC1123_SUPPORTED */ @@ -555,13 +617,13 @@ png_get_copyright(png_const_structp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.5.1 - February 3, 2011" PNG_STRING_NEWLINE \ + "libpng version 1.5.4 - July 7, 2011" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.5.1 - February 3, 2011\ + return "libpng version 1.5.4 - July 7, 2011\ Copyright (c) 1998-2011 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -681,6 +743,13 @@ png_check_cHRM_fixed(png_structp png_ptr, if (png_ptr == NULL) return 0; + /* (x,y,z) values are first limited to 0..100000 (PNG_FP_1), the white + * y must also be greater than 0. To test for the upper limit calculate + * (PNG_FP_1-y) - x must be <= to this for z to be >= 0 (and the expression + * cannot overflow.) At this point we know x and y are >= 0 and (x+y) is + * <= PNG_FP_1. The previous test on PNG_MAX_UINT_31 is removed because it + * pointless (and it produces compiler warnings!) + */ if (white_x < 0 || white_y <= 0 || red_x < 0 || red_y < 0 || green_x < 0 || green_y < 0 || @@ -690,38 +759,26 @@ png_check_cHRM_fixed(png_structp png_ptr, "Ignoring attempt to set negative chromaticity value"); ret = 0; } - if (white_x > (png_fixed_point)PNG_UINT_31_MAX || - white_y > (png_fixed_point)PNG_UINT_31_MAX || - red_x > (png_fixed_point)PNG_UINT_31_MAX || - red_y > (png_fixed_point)PNG_UINT_31_MAX || - green_x > (png_fixed_point)PNG_UINT_31_MAX || - green_y > (png_fixed_point)PNG_UINT_31_MAX || - blue_x > (png_fixed_point)PNG_UINT_31_MAX || - blue_y > (png_fixed_point)PNG_UINT_31_MAX ) - { - png_warning(png_ptr, - "Ignoring attempt to set chromaticity value exceeding 21474.83"); - ret = 0; - } - if (white_x > 100000L - white_y) + /* And (x+y) must be <= PNG_FP_1 (so z is >= 0) */ + if (white_x > PNG_FP_1 - white_y) { png_warning(png_ptr, "Invalid cHRM white point"); ret = 0; } - if (red_x > 100000L - red_y) + if (red_x > PNG_FP_1 - red_y) { png_warning(png_ptr, "Invalid cHRM red point"); ret = 0; } - if (green_x > 100000L - green_y) + if (green_x > PNG_FP_1 - green_y) { png_warning(png_ptr, "Invalid cHRM green point"); ret = 0; } - if (blue_x > 100000L - blue_y) + if (blue_x > PNG_FP_1 - blue_y) { png_warning(png_ptr, "Invalid cHRM blue point"); ret = 0; @@ -763,7 +820,7 @@ png_check_IHDR(png_structp png_ptr, } # ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX) + if (width > png_ptr->user_width_max) # else if (width > PNG_USER_WIDTH_MAX) @@ -774,7 +831,7 @@ png_check_IHDR(png_structp png_ptr, } # ifdef PNG_SET_USER_LIMITS_SUPPORTED - if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX) + if (height > png_ptr->user_height_max) # else if (height > PNG_USER_HEIGHT_MAX) # endif @@ -889,16 +946,9 @@ png_check_IHDR(png_structp png_ptr, /* Check an ASCII formated floating point value, see the more detailed * comments in pngpriv.h */ -/* The following is used internally to preserve the 'valid' flag */ +/* The following is used internally to preserve the sticky flags */ #define png_fp_add(state, flags) ((state) |= (flags)) -#define png_fp_set(state, value)\ - ((state) = (value) | ((state) & PNG_FP_WAS_VALID)) - -/* Internal type codes: bits above the base state! */ -#define PNG_FP_SIGN 0 /* [+-] */ -#define PNG_FP_DOT 4 /* . */ -#define PNG_FP_DIGIT 8 /* [0123456789] */ -#define PNG_FP_E 12 /* [Ee] */ +#define png_fp_set(state, value) ((state) = (value) | ((state) & PNG_FP_STICKY)) int /* PRIVATE */ png_check_fp_number(png_const_charp string, png_size_t size, int *statep, @@ -911,55 +961,55 @@ png_check_fp_number(png_const_charp string, png_size_t size, int *statep, { int type; /* First find the type of the next character */ + switch (string[i]) { - char ch = string[i]; - - if (ch >= 48 && ch <= 57) - type = PNG_FP_DIGIT; - - else switch (ch) - { - case 43: case 45: type = PNG_FP_SIGN; break; - case 46: type = PNG_FP_DOT; break; - case 69: case 101: type = PNG_FP_E; break; - default: goto PNG_FP_End; - } + case 43: type = PNG_FP_SAW_SIGN; break; + case 45: type = PNG_FP_SAW_SIGN + PNG_FP_NEGATIVE; break; + case 46: type = PNG_FP_SAW_DOT; break; + case 48: type = PNG_FP_SAW_DIGIT; break; + case 49: case 50: case 51: case 52: + case 53: case 54: case 55: case 56: + case 57: type = PNG_FP_SAW_DIGIT + PNG_FP_NONZERO; break; + case 69: + case 101: type = PNG_FP_SAW_E; break; + default: goto PNG_FP_End; } /* Now deal with this type according to the current * state, the type is arranged to not overlap the * bits of the PNG_FP_STATE. */ - switch ((state & PNG_FP_STATE) + type) + switch ((state & PNG_FP_STATE) + (type & PNG_FP_SAW_ANY)) { - case PNG_FP_INTEGER + PNG_FP_SIGN: + case PNG_FP_INTEGER + PNG_FP_SAW_SIGN: if (state & PNG_FP_SAW_ANY) goto PNG_FP_End; /* not a part of the number */ - png_fp_add(state, PNG_FP_SAW_SIGN); + png_fp_add(state, type); break; - case PNG_FP_INTEGER + PNG_FP_DOT: + case PNG_FP_INTEGER + PNG_FP_SAW_DOT: /* Ok as trailer, ok as lead of fraction. */ if (state & PNG_FP_SAW_DOT) /* two dots */ goto PNG_FP_End; else if (state & PNG_FP_SAW_DIGIT) /* trailing dot? */ - png_fp_add(state, PNG_FP_SAW_DOT); + png_fp_add(state, type); else - png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); + png_fp_set(state, PNG_FP_FRACTION | type); break; - case PNG_FP_INTEGER + PNG_FP_DIGIT: + case PNG_FP_INTEGER + PNG_FP_SAW_DIGIT: if (state & PNG_FP_SAW_DOT) /* delayed fraction */ png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); - png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + png_fp_add(state, type | PNG_FP_WAS_VALID); break; - case PNG_FP_INTEGER + PNG_FP_E: + + case PNG_FP_INTEGER + PNG_FP_SAW_E: if ((state & PNG_FP_SAW_DIGIT) == 0) goto PNG_FP_End; @@ -967,17 +1017,17 @@ png_check_fp_number(png_const_charp string, png_size_t size, int *statep, break; - /* case PNG_FP_FRACTION + PNG_FP_SIGN: - goto PNG_FP_End; ** no sign in exponent */ + /* case PNG_FP_FRACTION + PNG_FP_SAW_SIGN: + goto PNG_FP_End; ** no sign in fraction */ - /* case PNG_FP_FRACTION + PNG_FP_DOT: + /* case PNG_FP_FRACTION + PNG_FP_SAW_DOT: goto PNG_FP_End; ** Because SAW_DOT is always set */ - case PNG_FP_FRACTION + PNG_FP_DIGIT: - png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + case PNG_FP_FRACTION + PNG_FP_SAW_DIGIT: + png_fp_add(state, type | PNG_FP_WAS_VALID); break; - case PNG_FP_FRACTION + PNG_FP_E: + case PNG_FP_FRACTION + PNG_FP_SAW_E: /* This is correct because the trailing '.' on an * integer is handled above - so we can only get here * with the sequence ".E" (with no preceding digits). @@ -989,7 +1039,7 @@ png_check_fp_number(png_const_charp string, png_size_t size, int *statep, break; - case PNG_FP_EXPONENT + PNG_FP_SIGN: + case PNG_FP_EXPONENT + PNG_FP_SAW_SIGN: if (state & PNG_FP_SAW_ANY) goto PNG_FP_End; /* not a part of the number */ @@ -997,15 +1047,15 @@ png_check_fp_number(png_const_charp string, png_size_t size, int *statep, break; - /* case PNG_FP_EXPONENT + PNG_FP_DOT: + /* case PNG_FP_EXPONENT + PNG_FP_SAW_DOT: goto PNG_FP_End; */ - case PNG_FP_EXPONENT + PNG_FP_DIGIT: - png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID); + case PNG_FP_EXPONENT + PNG_FP_SAW_DIGIT: + png_fp_add(state, PNG_FP_SAW_DIGIT | PNG_FP_WAS_VALID); break; - /* case PNG_FP_EXPONEXT + PNG_FP_E: + /* case PNG_FP_EXPONEXT + PNG_FP_SAW_E: goto PNG_FP_End; */ default: goto PNG_FP_End; /* I.e. break 2 */ @@ -1033,8 +1083,11 @@ png_check_fp_string(png_const_charp string, png_size_t size) int state=0; png_size_t char_index=0; - return png_check_fp_number(string, size, &state, &char_index) && - (char_index == size || string[char_index] == 0); + if (png_check_fp_number(string, size, &state, &char_index) && + (char_index == size || string[char_index] == 0)) + return state /* must be non-zero - see above */; + + return 0; /* i.e. fail */ } #endif /* pCAL or sCAL */ @@ -1102,7 +1155,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size, if (fp < 0) { fp = -fp; - *ascii++ = 45; /* '-' PLUS 1 TOTAL 1*/ + *ascii++ = 45; /* '-' PLUS 1 TOTAL 1 */ --size; } @@ -1329,7 +1382,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size, */ size -= cdigits; - *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision*/ + *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision */ if (exp_b10 < 0) { *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */ @@ -1401,7 +1454,7 @@ png_ascii_from_fixed(png_structp png_ptr, png_charp ascii, png_size_t size, if (num <= 0x80000000U) /* else overflowed */ { - unsigned int ndigits = 0, first = 16/*flag value*/; + unsigned int ndigits = 0, first = 16 /* flag value */; char digits[10]; while (num) @@ -1495,7 +1548,7 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times, r /= divisor; r = floor(r+.5); - /* A png_fixed_point is a 32 bit integer. */ + /* A png_fixed_point is a 32-bit integer. */ if (r <= 2147483647. && r >= -2147483648.) { *res = (png_fixed_point)r; @@ -1540,7 +1593,7 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times, if (s32 < D) /* else overflow */ { - /* s32.s00 is now the 64 bit product, do a standard + /* s32.s00 is now the 64-bit product, do a standard * division, we know that s32 < D, so the maximum * required shift is 31. */ @@ -1683,7 +1736,7 @@ png_reciprocal2(png_fixed_point a, png_fixed_point b) * 2010: moved from pngset.c) */ /* * Multiply two 32-bit numbers, V1 and V2, using 32-bit - * arithmetic, to produce a 64 bit result in the HI/LO words. + * arithmetic, to produce a 64-bit result in the HI/LO words. * * A B * x C D @@ -1727,17 +1780,17 @@ png_64bit_product (long v1, long v2, unsigned long *hi_product, /* Fixed point gamma. * * To calculate gamma this code implements fast log() and exp() calls using only - * fixed point arithmetic. This code has sufficient precision for either 8 or - * 16 bit sample values. + * fixed point arithmetic. This code has sufficient precision for either 8-bit + * or 16-bit sample values. * * The tables used here were calculated using simple 'bc' programs, but C double * precision floating point arithmetic would work fine. The programs are given * at the head of each table. * - * 8 bit log table + * 8-bit log table * This is a table of -log(value/255)/log(2) for 'value' in the range 128 to - * 255, so it's the base 2 logarithm of a normalized 8 bit floating point - * mantissa. The numbers are 32 bit fractions. + * 255, so it's the base 2 logarithm of a normalized 8-bit floating point + * mantissa. The numbers are 32-bit fractions. */ static png_uint_32 png_8bit_l2[128] = @@ -1768,10 +1821,10 @@ png_8bit_l2[128] = 172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U, 24347096U, 0U #if 0 - /* The following are the values for 16 bit tables - these work fine for the 8 - * bit conversions but produce very slightly larger errors in the 16 bit log - * (about 1.2 as opposed to 0.7 absolute error in the final value). To use - * these all the shifts below must be adjusted appropriately. + /* The following are the values for 16-bit tables - these work fine for the + * 8-bit conversions but produce very slightly larger errors in the 16-bit + * log (about 1.2 as opposed to 0.7 absolute error in the final value). To + * use these all the shifts below must be adjusted appropriately. */ 65166, 64430, 63700, 62976, 62257, 61543, 60835, 60132, 59434, 58741, 58054, 57371, 56693, 56020, 55352, 54689, 54030, 53375, 52726, 52080, 51439, 50803, @@ -1788,7 +1841,7 @@ png_8bit_l2[128] = #endif }; -static png_int_32 +PNG_STATIC png_int_32 png_log8bit(unsigned int x) { unsigned int lg2 = 0; @@ -1814,11 +1867,11 @@ png_log8bit(unsigned int x) return (png_int_32)((lg2 << 16) + ((png_8bit_l2[x-128]+32768)>>16)); } -/* The above gives exact (to 16 binary places) log2 values for 8 bit images, - * for 16 bit images we use the most significant 8 bits of the 16 bit value to +/* The above gives exact (to 16 binary places) log2 values for 8-bit images, + * for 16-bit images we use the most significant 8 bits of the 16-bit value to * get an approximation then multiply the approximation by a correction factor * determined by the remaining up to 8 bits. This requires an additional step - * in the 16 bit case. + * in the 16-bit case. * * We want log2(value/65535), we have log2(v'/255), where: * @@ -1827,8 +1880,8 @@ png_log8bit(unsigned int x) * * So f is value/v', which is equal to (256+v''/v') since v' is in the range 128 * to 255 and v'' is in the range 0 to 255 f will be in the range 256 to less - * than 258. The final factor also needs to correct for the fact that our 8 bit - * value is scaled by 255, whereas the 16 bit values must be scaled by 65535. + * than 258. The final factor also needs to correct for the fact that our 8-bit + * value is scaled by 255, whereas the 16-bit values must be scaled by 65535. * * This gives a final formula using a calculated value 'x' which is value/v' and * scaling by 65536 to match the above table: @@ -1838,13 +1891,13 @@ png_log8bit(unsigned int x) * Since these numbers are so close to '1' we can use simple linear * interpolation between the two end values 256/257 (result -368.61) and 258/257 * (result 367.179). The values used below are scaled by a further 64 to give - * 16 bit precision in the interpolation: + * 16-bit precision in the interpolation: * * Start (256): -23591 * Zero (257): 0 * End (258): 23499 */ -static png_int_32 +PNG_STATIC png_int_32 png_log16bit(png_uint_32 x) { unsigned int lg2 = 0; @@ -1865,7 +1918,7 @@ png_log16bit(png_uint_32 x) if ((x & 0x8000) == 0) lg2 += 1, x <<= 1; - /* Calculate the base logarithm from the top 8 bits as a 28 bit fractional + /* Calculate the base logarithm from the top 8 bits as a 28-bit fractional * value. */ lg2 <<= 28; @@ -1895,18 +1948,18 @@ png_log16bit(png_uint_32 x) return (png_int_32)((lg2 + 2048) >> 12); } -/* The 'exp()' case must invert the above, taking a 20 bit fixed point - * logarithmic value and returning a 16 or 8 bit number as appropriate. In +/* The 'exp()' case must invert the above, taking a 20-bit fixed point + * logarithmic value and returning a 16 or 8-bit number as appropriate. In * each case only the low 16 bits are relevant - the fraction - since the * integer bits (the top 4) simply determine a shift. * - * The worst case is the 16 bit distinction between 65535 and 65534, this + * The worst case is the 16-bit distinction between 65535 and 65534, this * requires perhaps spurious accuracty in the decoding of the logarithm to * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance * of getting this accuracy in practice. * * To deal with this the following exp() function works out the exponent of the - * frational part of the logarithm by using an accurate 32 bit value from the + * frational part of the logarithm by using an accurate 32-bit value from the * top four fractional bits then multiplying in the remaining bits. */ static png_uint_32 @@ -1915,7 +1968,7 @@ png_32bit_exp[16] = # if PNG_DO_BC for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; } # endif - /* NOTE: the first entry is deliberately set to the maximum 32 bit value. */ + /* NOTE: the first entry is deliberately set to the maximum 32-bit value. */ 4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U, 3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U, 2553802834U, 2445529972U, 2341847524U, 2242560872U @@ -1938,12 +1991,12 @@ for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"} 0 45425.85339951654943850496 #endif -static png_uint_32 +PNG_STATIC png_uint_32 png_exp(png_fixed_point x) { if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */ { - /* Obtain a 4 bit approximation */ + /* Obtain a 4-bit approximation */ png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf]; /* Incorporate the low 12 bits - these decrease the returned value by @@ -1986,13 +2039,13 @@ png_exp(png_fixed_point x) return 0; } -static png_byte +PNG_STATIC png_byte png_exp8bit(png_fixed_point lg2) { - /* Get a 32 bit value: */ + /* Get a 32-bit value: */ png_uint_32 x = png_exp(lg2); - /* Convert the 32 bit value to 0..255 by multiplying by 256-1, note that the + /* Convert the 32-bit value to 0..255 by multiplying by 256-1, note that the * second, rounding, step can't overflow because of the first, subtraction, * step. */ @@ -2000,13 +2053,13 @@ png_exp8bit(png_fixed_point lg2) return (png_byte)((x + 0x7fffffU) >> 24); } -static png_uint_16 +PNG_STATIC png_uint_16 png_exp16bit(png_fixed_point lg2) { - /* Get a 32 bit value: */ + /* Get a 32-bit value: */ png_uint_32 x = png_exp(lg2); - /* Convert the 32 bit value to 0..65535 by multiplying by 65536-1: */ + /* Convert the 32-bit value to 0..65535 by multiplying by 65536-1: */ x -= x >> 16; return (png_uint_16)((x + 32767U) >> 16); } @@ -2059,9 +2112,9 @@ png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val) } /* This does the right thing based on the bit_depth field of the - * png_struct, interpreting values as 8 or 16 bit. While the result - * is nominally a 16 bit value if bit depth is 8 then the result is - * 8 bit (as are the arguments.) + * png_struct, interpreting values as 8-bit or 16-bit. While the result + * is nominally a 16-bit value if bit depth is 8 then the result is + * 8-bit (as are the arguments.) */ png_uint_16 /* PRIVATE */ png_gamma_correct(png_structp png_ptr, unsigned int value, @@ -2084,7 +2137,7 @@ png_gamma_significant(png_fixed_point gamma_val) gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED; } -/* Internal function to build a single 16 bit table - the table consists of +/* Internal function to build a single 16-bit table - the table consists of * 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount * to shift the input values right (or 16-number_of_signifiant_bits). * @@ -2111,7 +2164,7 @@ png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable, (png_uint_16p)png_malloc(png_ptr, 256 * png_sizeof(png_uint_16)); /* The 'threshold' test is repeated here because it can arise for one of - * the 16 bit tables even if the others don't hit it. + * the 16-bit tables even if the others don't hit it. */ if (png_gamma_significant(gamma_val)) { @@ -2173,7 +2226,7 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable, (png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p)); /* 'num' is the number of tables and also the number of low bits of low - * bits of the input 16 bit value used to select a table. Each table is + * bits of the input 16-bit value used to select a table. Each table is * itself index by the high 8 bits of the value. */ for (i = 0; i < num; i++) @@ -2183,24 +2236,24 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable, /* 'gamma_val' is set to the reciprocal of the value calculated above, so * pow(out,g) is an *input* value. 'last' is the last input value set. * - * In the loop 'i' is used to find output values. Since the output is 8 - * bit there are only 256 possible values. The tables are set up to + * In the loop 'i' is used to find output values. Since the output is + * 8-bit there are only 256 possible values. The tables are set up to * select the closest possible output value for each input by finding * the input value at the boundary between each pair of output values * and filling the table up to that boundary with the lower output * value. * - * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9 bit - * values the code below uses a 16 bit value in i; the values start at + * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9-bit + * values the code below uses a 16-bit value in i; the values start at * 128.5 (for 0.5) and step by 257, for a total of 254 values (the last * entries are filled with 255). Start i at 128 and fill all 'last' * table entries <= 'max' */ last = 0; - for (i = 0; i < 255; ++i) /* 8 bit output value */ + for (i = 0; i < 255; ++i) /* 8-bit output value */ { /* Find the corresponding maximum input value */ - png_uint_16 out = (png_uint_16)(i * 257U); /* 16 bit output value */ + png_uint_16 out = (png_uint_16)(i * 257U); /* 16-bit output value */ /* Find the boundary value in 16 bits: */ png_uint_32 bound = png_gamma_16bit_correct(out+128U, gamma_val); @@ -2223,7 +2276,7 @@ png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable, } } -/* Build a single 8 bit table: same as the 16 bit case but much simpler (and +/* Build a single 8-bit table: same as the 16-bit case but much simpler (and * typically much faster). Note that libpng currently does no sBIT processing * (apparently contrary to the spec) so a 256 entry table is always generated. */ @@ -2258,8 +2311,9 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) png_ptr->screen_gamma) : PNG_FP_1); #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY)) + if (png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) { png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, png_reciprocal(png_ptr->gamma)); @@ -2268,7 +2322,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : png_ptr->gamma/* Probably doing rgb_to_gray */); } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ } else { @@ -2287,7 +2341,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) else sig_bit = png_ptr->sig_bit.gray; - /* 16 bit gamma code uses this equation: + /* 16-bit gamma code uses this equation: * * ov = table[(iv & 0xff) >> gamma_shift][iv >> 8] * @@ -2302,7 +2356,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) * * So the table 'n' corresponds to all those 'iv' of: * - * <all high 8 bit values><n << gamma_shift>..<(n+1 << gamma_shift)-1> + * <all high 8-bit values><n << gamma_shift>..<(n+1 << gamma_shift)-1> * */ if (sig_bit > 0 && sig_bit < 16U) @@ -2311,7 +2365,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) else shift = 0; /* keep all 16 bits */ - if (png_ptr->transformations & PNG_16_TO_8) + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) { /* PNG_MAX_GAMMA_8 is the number of bits to keep - effectively * the significant bits in the *input* when the output will @@ -2327,7 +2381,12 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) png_ptr->gamma_shift = shift; #ifdef PNG_16BIT_SUPPORTED - if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND)) + /* NOTE: prior to 1.5.4 this test used to include PNG_BACKGROUND (now + * PNG_COMPOSE). This effectively smashed the background calculation for + * 16-bit output because the 8-bit table assumes the result will be reduced + * to 8 bits. + */ + if (png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) #endif png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, png_ptr->screen_gamma > 0 ? png_product2(png_ptr->gamma, @@ -2341,8 +2400,9 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) #endif #if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) - if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY)) + if (png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) { png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, png_reciprocal(png_ptr->gamma)); @@ -2355,7 +2415,7 @@ png_build_gamma_table(png_structp png_ptr, int bit_depth) png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) : png_ptr->gamma/* Probably doing rgb_to_gray */); } -#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */ +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ } } #endif /* READ_GAMMA */ diff --git a/src/3rdparty/libpng/png.h b/src/3rdparty/libpng/png.h index 100f56d..c655a51 100644 --- a/src/3rdparty/libpng/png.h +++ b/src/3rdparty/libpng/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.5.1 - February 3, 2011 + * libpng version 1.5.4 - July 7, 2011 * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -11,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011: Glenn + * libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -147,6 +147,16 @@ * 1.5.1beta01-11 15 10501 15.so.15.1[.0] * 1.5.1rc01-02 15 10501 15.so.15.1[.0] * 1.5.1 15 10501 15.so.15.1[.0] + * 1.5.2beta01-03 15 10502 15.so.15.2[.0] + * 1.5.2rc01-03 15 10502 15.so.15.2[.0] + * 1.5.2 15 10502 15.so.15.2[.0] + * 1.5.3beta01-10 15 10503 15.so.15.3[.0] + * 1.5.3rc01-02 15 10503 15.so.15.3[.0] + * 1.5.3beta11 15 10503 15.so.15.3[.0] + * 1.5.3 [omitted] + * 1.5.4beta01-08 15 10504 15.so.15.4[.0] + * 1.5.4rc01 15 10504 15.so.15.4[.0] + * 1.5.4 15 10504 15.so.15.4[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -178,7 +188,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are + * libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are * Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: @@ -205,7 +215,7 @@ * * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are * Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are - * distributed according to the same disclaimer and license as libpng-0.96, + * distributed according to the same disclaimer and license as libpng-0.96, * with the following individuals added to the list of Contributing Authors: * * Tom Lane @@ -214,7 +224,7 @@ * * libpng versions 0.89, June 1996, through 0.96, May 1997, are * Copyright (c) 1996, 1997 Andreas Dilger - * Distributed according to the same disclaimer and license as libpng-0.88, + * Distributed according to the same disclaimer and license as libpng-0.88, * with the following individuals added to the list of Contributing Authors: * * John Bowler @@ -237,10 +247,10 @@ * Tim Wegner * * The PNG Reference Library is supplied "AS IS". The Contributing Authors - * and Group 42, Inc. disclaim all warranties, expressed or implied, + * and Group 42, Inc. disclaim all warranties, expressed or implied, * including, without limitation, the warranties of merchantability and of * fitness for any purpose. The Contributing Authors and Group 42, Inc. - * assume no liability for direct, indirect, incidental, special, exemplary, + * assume no liability for direct, indirect, incidental, special, exemplary, * or consequential damages, which may result from the use of the PNG * Reference Library, even if advised of the possibility of such damage. * @@ -290,25 +300,24 @@ * Y2K compliance in libpng: * ========================= * - * February 3, 2011 + * July 7, 2011 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.5.1 are Y2K compliant. It is my belief that + * upward through 1.5.4 are Y2K compliant. It is my belief that * earlier versions were also Y2K compliant. * - * Libpng only has three year fields. One is a 2-byte unsigned integer - * that will hold years up to 65535. The other two hold the date in text + * Libpng only has two year fields. One is a 2-byte unsigned integer + * that will hold years up to 65535. The other holds the date in text * format, and will hold years up to 9999. * * The integer is * "png_uint_16 year" in png_time_struct. * - * The strings are - * "png_charp time_buffer" in png_struct and - * "near_time_buffer", which is a local character string in png.c. + * The string is + * "png_char time_buffer" in png_struct * * There are seven time-related functions: * png.c: png_convert_to_rfc_1123() in png.c @@ -326,7 +335,7 @@ * the full 4-digit year. There is a possibility that applications using * libpng are not passing 4-digit years into the png_convert_to_rfc_1123() * function, or that they are incorrectly passing only a 2-digit year - * instead of "year - 1900" into the png_convert_from_struct_tm() function, + * instead of "year - 1900" into the png_convert_from_struct_tm() function, * but this is not under our control. The libpng documentation has always * stated that it works with 4-digit years, and the APIs have been * documented as such. @@ -352,9 +361,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.5.1" +#define PNG_LIBPNG_VER_STRING "1.5.4" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.5.1 - February 3, 2011\n" + " libpng version 1.5.4 - July 7, 2011\n" #define PNG_LIBPNG_VER_SONUM 15 #define PNG_LIBPNG_VER_DLLNUM 15 @@ -362,7 +371,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 5 -#define PNG_LIBPNG_VER_RELEASE 1 +#define PNG_LIBPNG_VER_RELEASE 4 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ @@ -392,7 +401,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10501 /* 1.5.1 */ +#define PNG_LIBPNG_VER 10504 /* 1.5.4 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -405,19 +414,24 @@ #endif #ifndef PNG_VERSION_INFO_ONLY -/* Standard header files (not needed for the version info) */ -# ifdef PNG_SETJMP_SUPPORTED -# include <setjmp.h> +# ifndef PNG_BUILDING_SYMBOL_TABLE + /* + * Standard header files (not needed for the version info or while + * building symbol table -- see scripts/pnglibconf.dfa) + */ +# ifdef PNG_SETJMP_SUPPORTED +# include <setjmp.h> +# endif + + /* Need the time information for converting tIME chunks, it + * defines struct tm: + */ +# ifdef PNG_CONVERT_tIME_SUPPORTED + /* "time.h" functions are not supported on all operating systems */ +# include <time.h> +# endif # endif -/* Need the time information for converting tIME chunks, it - * defines struct tm: - */ -#ifdef PNG_CONVERT_tIME_SUPPORTED - /* "time.h" functions are not supported on all operating systems */ -# include <time.h> -#endif - /* Machine specific configuration. */ # include "pngconf.h" #endif @@ -509,7 +523,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_5_1; +typedef char* png_libpng_version_1_5_4; /* Three color definitions. The order of the red, green, and blue, (and the * exact size) is not important, although the size of the fields need to @@ -582,12 +596,12 @@ typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp; typedef png_sPLT_t FAR * FAR * png_sPLT_tpp; #ifdef PNG_TEXT_SUPPORTED -/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, * and whether that contents is compressed or not. The "key" field * points to a regular zero-terminated C string. The "text", "lang", and * "lang_key" fields can be regular C strings, empty strings, or NULL pointers. - * However, the * structure returned by png_get_text() will always contain - * regular zero-terminated C strings (possibly empty), never NULL pointers, + * However, the structure returned by png_get_text() will always contain + * regular zero-terminated C strings (possibly empty), never NULL pointers, * so they can be safely used in printf() and other string-handling functions. */ typedef struct png_text_struct @@ -657,12 +671,24 @@ typedef struct png_unknown_chunk_t /* libpng-using applications should NOT directly modify this byte. */ png_byte location; /* mode of operation at read time */ } + + png_unknown_chunk; typedef png_unknown_chunk FAR * png_unknown_chunkp; typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp; typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; #endif +/* Values for the unknown chunk location byte */ + +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* The complete definition of png_info has, as of libpng-1.5.0, + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ typedef struct png_info_def png_info; typedef png_info FAR * png_infop; typedef PNG_CONST png_info FAR * png_const_infop; @@ -678,6 +704,8 @@ typedef png_info FAR * FAR * png_infopp; */ #define PNG_FP_1 100000 #define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) /* These describe the color_type field in png_info. */ /* color type masks */ @@ -784,6 +812,14 @@ typedef struct png_row_info_struct typedef png_row_info FAR * png_row_infop; typedef png_row_info FAR * FAR * png_row_infopp; +/* The complete definition of png_struct has, as of libpng-1.5.0, + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_struct_def png_struct; +typedef PNG_CONST png_struct FAR * png_const_structp; +typedef png_struct FAR * png_structp; + /* These are the function types for the I/O functions and for the functions * that allow the user to override the default I/O functions with his or her * own. The png_error_ptr type should match that of user-supplied warning @@ -792,61 +828,59 @@ typedef png_row_info FAR * FAR * png_row_infopp; * modify the buffer it is passed. The 'read' function, on the other hand, is * expected to return the read data in the buffer. */ -typedef struct png_struct_def png_struct; -typedef PNG_CONST png_struct FAR * png_const_structp; -typedef png_struct FAR * png_structp; - -typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp), ); -typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t), ); -typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp), ); -typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, - int), ); -typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, - int), ); +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef PNG_CALLBACK(void, *png_progressive_info_ptr, - (png_structp, png_infop), ); -typedef PNG_CALLBACK(void, *png_progressive_end_ptr, - (png_structp, png_infop), ); -typedef PNG_CALLBACK(void, *png_progressive_row_ptr, - (png_structp, png_bytep, png_uint_32, int), ); +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); #endif #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) -typedef PNG_CALLBACK(void, *png_user_transform_ptr, - (png_structp, png_row_infop, png_bytep), ); +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, - png_unknown_chunkp), ); +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp), ); +typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); #endif #ifdef PNG_SETJMP_SUPPORTED -/* This must match the function definition in <setjmp.h>, and the - * application must include this before png.h to obtain the definition - * of jmp_buf. The function is required to be PNG_NORETURN. (Note that - * PNG_PTR_NORETURN is used here because current versions of the Microsoft - * C compiler do not support the PNG_NORETURN attribute on a pointer.) - * - * If you get a type warning from the compiler when linking against this line - * then your compiler has 'longjmp' that does not match the requirements of the - * compiler that built libpng. You will have to write a wrapper function for - * your compiler's longjmp and call png_set_longjmp_fn directly (not via the - * png_jmpbuf macro.) - * - * If you get a warning here while building the library you will need to make +/* This must match the function definition in <setjmp.h>, and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make * changes to ensure that pnglibconf.h records the calling convention used by * your compiler. This may be very difficult - try using a different compiler * to build the library! */ -typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), - PNG_PTR_NORETURN); +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), typedef); #endif /* Transform masks for the high-level interface */ @@ -868,21 +902,24 @@ typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)), #define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ /* Added to libpng-1.4.0 */ #define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ /* Flags for MNG supported features */ #define PNG_FLAG_MNG_EMPTY_PLTE 0x01 #define PNG_FLAG_MNG_FILTER_64 0x04 #define PNG_ALL_MNG_FEATURES 0x05 -/* NOTE: prior to 1.5 these functions had no 'API' style declaration, +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, * this allowed the zlib default functions to be used on Windows * platforms. In 1.5 the zlib default malloc (which just calls malloc and * ignores the first argument) should be completely compatible with the * following. */ -typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, - png_alloc_size_t), ); -typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp), ); +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); typedef png_struct FAR * FAR * png_structpp; @@ -928,7 +965,7 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structp png_ptr, int num_bytes)); * signature, and non-zero otherwise. Having num_to_check == 0 or * start > 7 will always fail (ie return non-zero). */ -PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, png_size_t num_to_check)); /* Simple signature checking function. This is the same as calling @@ -939,19 +976,19 @@ PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start, /* Allocate and initialize png_ptr struct for reading, and any other memory. */ PNG_EXPORTA(4, png_structp, png_create_read_struct, (png_const_charp user_png_ver, png_voidp error_ptr, - png_error_ptr error_fn, png_error_ptr warn_fn), + png_error_ptr error_fn, png_error_ptr warn_fn), PNG_ALLOCATED); /* Allocate and initialize png_ptr struct for writing, and any other memory */ PNG_EXPORTA(5, png_structp, png_create_write_struct, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warn_fn), + png_error_ptr warn_fn), PNG_ALLOCATED); PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size, (png_const_structp png_ptr)); -PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, png_size_t size)); /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp @@ -965,7 +1002,7 @@ PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr, * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ -PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr, +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); # define png_jmpbuf(png_ptr) \ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) @@ -990,13 +1027,13 @@ PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr)); #ifdef PNG_USER_MEM_SUPPORTED PNG_EXPORTA(11, png_structp, png_create_read_struct_2, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warn_fn, - png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), PNG_ALLOCATED); PNG_EXPORTA(12, png_structp, png_create_write_struct_2, (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, - png_error_ptr warn_fn, - png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), PNG_ALLOCATED); #endif @@ -1008,7 +1045,7 @@ PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep chunk_name, png_const_bytep data, png_size_t length)); /* Write the start of a PNG chunk - length and chunk name. */ -PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr, +PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr, png_const_bytep chunk_name, png_uint_32 length)); /* Write the data of a PNG chunk started with png_write_chunk_start(). */ @@ -1019,10 +1056,10 @@ PNG_EXPORT(16, void, png_write_chunk_data, (png_structp png_ptr, PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr)); /* Allocate and initialize the info structure */ -PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr), +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr), PNG_ALLOCATED); -PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr, +PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr, png_size_t png_info_struct_size)); /* Writes all the PNG information before the image. */ @@ -1039,13 +1076,13 @@ PNG_EXPORT(22, void, png_read_info, #ifdef PNG_TIME_RFC1123_SUPPORTED PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123, - (png_structp png_ptr, + (png_structp png_ptr, png_const_timep ptime)); #endif #ifdef PNG_CONVERT_tIME_SUPPORTED /* Convert from a struct tm to png_time */ -PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, PNG_CONST struct tm FAR * ttime)); /* Convert from time_t to png_time. Uses gmtime() */ @@ -1061,6 +1098,13 @@ PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr)); PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp png_ptr)); #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structp png_ptr)); +#endif + #if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) /* Use blue, green, red order for pixels. */ PNG_EXPORT(30, void, png_set_bgr, (png_structp png_ptr)); @@ -1075,15 +1119,226 @@ PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr)); /* Reduce RGB to grayscale. */ PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr, int error_action, double red, double green)); -PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr, +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr, int error_action, png_fixed_point red, png_fixed_point green)); PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp png_ptr)); #endif -PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels of + * a PNG file are returned when an alpha channel, or tRNS chunk in a palette + * file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel. The gamma encoded color channels must be + * scaled according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and reencode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. The + * advantage is that the color channels can be resampled (the image can be + * scaled) in this form. The disadvantage is that normal practice is to store + * linear, not (gamma) encoded, values and this requires 16-bit channels for + * still images rather than the 8-bit channels that are just about sufficient if + * gamma encoding is used. In addition all non-transparent pixel values, + * including completely opaque ones, must be gamma encoded to produce the final + * image. This is the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' mode (the + * latter being the two common names for associated alpha color channels.) + * + * Since it is not necessary to perform arithmetic on opaque color values so + * long as they are not to be resampled and are in the final color space it is + * possible to optimize the handling of alpha by storing the opaque pixels in + * the PNG format (adjusted for the output color space) while storing partially + * opaque pixels in the standard, linear, format. The accuracy required for + * standard alpha composition is relatively low, because the pixels are + * isolated, therefore typically the accuracy loss in storing 8-bit linear + * values is acceptable. (This is not true if the alpha channel is used to + * simulate transparency over large areas - use 16 bits or the PNG mode in + * this case!) This is the 'OPTIMIZED' mode. For this mode a pixel is + * treated as opaque only if the alpha value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structp png_ptr, int mode, + double output_gamma)); +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structp png_ptr, + int mode, png_fixed_point output_gamma)); +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. The values used + * correspond to the normal numbers used to describe the overall gamma of a + * computer display system; for example 2.2 for an sRGB conformant system. The + * values are scaled by 100000 in the _fixed version of the API (so 220000 for + * sRGB.) + * + * The inverse of the value is always used to provide a default for the PNG file + * encoding if it has no gAMA chunk and if png_set_gamma() has not been called + * to override the PNG gamma information. + * + * When the ALPHA_OPTIMIZED mode is selected the output gamma is used to encode + * opaque pixels however pixels with lower alpha values are not encoded, + * regardless of the output gamma setting. + * + * When the standard Porter Duff handling is requested with mode 1 the output + * encoding is set to be linear and the output_gamma value is only relevant + * as a default for input data that has no gamma information. The linear output + * encoding will be overridden if png_set_gamma() is called - the results may be + * highly unexpected! + * + * The following numbers are derived from the sRGB standard and the research + * behind it. sRGB is defined to be approximated by a PNG gAMA chunk value of + * 0.45455 (1/2.2) for PNG. The value implicitly includes any viewing + * correction required to take account of any differences in the color + * environment of the original scene and the intended display environment; the + * value expresses how to *decode* the image for display, not how the original + * data was *encoded*. + * + * sRGB provides a peg for the PNG standard by defining a viewing environment. + * sRGB itself, and earlier TV standards, actually use a more complex transform + * (a linear portion then a gamma 2.4 power law) than PNG can express. (PNG is + * limited to simple power laws.) By saying that an image for direct display on + * an sRGB conformant system should be stored with a gAMA chunk value of 45455 + * (11.3.3.2 and 11.3.3.5 of the ISO PNG specification) the PNG specification + * makes it possible to derive values for other display systems and + * environments. + * + * The Mac value is deduced from the sRGB based on an assumption that the actual + * extra viewing correction used in early Mac display systems was implemented as + * a power 1.45 lookup table. + * + * Any system where a programmable lookup table is used or where the behavior of + * the final display device characteristics can be changed requires system + * specific code to obtain the current characteristic. However this can be + * difficult and most PNG gamma correction only requires an approximate value. + * + * By default, if png_set_alpha_mode() is not called, libpng assumes that all + * values are unencoded, linear, values and that the output device also has a + * linear characteristic. This is only very rarely correct - it is invariably + * better to call png_set_alpha_mode() with PNG_DEFAULT_sRGB than rely on the + * default if you don't know what the right answer is! + * + * The special value PNG_GAMMA_MAC_18 indicates an older Mac system (pre Mac OS + * 10.6) which used a correction table to implement a somewhat lower gamma on an + * otherwise sRGB system. + * + * Both these values are reserved (not simple gamma values) in order to allow + * more precise correction internally in the future. + * + * NOTE: the following values can be passed to either the fixed or floating + * point APIs, but the floating point API will also accept floating point + * values. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceeded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the ouput gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED PNG_EXPORT(36, void, png_set_strip_alpha, (png_structp png_ptr)); @@ -1101,14 +1356,14 @@ PNG_EXPORT(38, void, png_set_invert_alpha, (png_structp png_ptr)); #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */ -PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler, +PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler, int flags)); /* The values of the PNG_FILLER_ defines should NOT be changed */ # define PNG_FILLER_BEFORE 0 # define PNG_FILLER_AFTER 1 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */ PNG_EXPORT(40, void, png_set_add_alpha, - (png_structp png_ptr, png_uint_32 filler, + (png_structp png_ptr, png_uint_32 filler, int flags)); #endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */ @@ -1151,12 +1406,16 @@ PNG_EXPORT(46, void, png_set_invert_mono, (png_structp png_ptr)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED -/* Handle alpha and tRNS by replacing with a background color. */ -PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr, - png_const_color_16p background_color, int background_gamma_code, +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr, + png_const_color_16p background_color, int background_gamma_code, int need_expand, double background_gamma)); PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr, - png_const_color_16p background_color, int background_gamma_code, + png_const_color_16p background_color, int background_gamma_code, int need_expand, png_fixed_point background_gamma)); #endif #ifdef PNG_READ_BACKGROUND_SUPPORTED @@ -1166,7 +1425,13 @@ PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr, # define PNG_BACKGROUND_GAMMA_UNIQUE 3 #endif -#ifdef PNG_READ_16_TO_8_SUPPORTED +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8 SUPPORTED /* Name prior to 1.5.4 */ /* Strip the second byte of information from a 16-bit depth file. */ PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr)); #endif @@ -1176,8 +1441,8 @@ PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr)); * available. */ PNG_EXPORT(49, void, png_set_quantize, - (png_structp png_ptr, png_colorp palette, - int num_palette, int maximum_colors, png_const_uint_16p histogram, + (png_structp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_const_uint_16p histogram, int full_quantize)); #endif @@ -1187,12 +1452,22 @@ PNG_EXPORT(49, void, png_set_quantize, */ #define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) -/* Handle gamma correction. Screen_gamma=(display_exponent) */ +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ PNG_FP_EXPORT(50, void, png_set_gamma, - (png_structp png_ptr, double screen_gamma, - double default_file_gamma)); -PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr, - png_fixed_point screen_gamma, png_fixed_point default_file_gamma)); + (png_structp png_ptr, double screen_gamma, + double override_file_gamma)); +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)); #endif #ifdef PNG_WRITE_FLUSH_SUPPORTED @@ -1211,13 +1486,13 @@ PNG_EXPORT(54, void, png_read_update_info, #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read one or more rows of image data. */ -PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row, +PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row, png_bytepp display_row, png_uint_32 num_rows)); #endif #ifdef PNG_SEQUENTIAL_READ_SUPPORTED /* Read a row of data. */ -PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row, +PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row, png_bytep display_row)); #endif @@ -1235,7 +1510,7 @@ PNG_EXPORT(58, void, png_write_row, * of libpng and to allow the 'display_row' array from read_rows to be passed * unchanged to write_rows. */ -PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row, +PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row, png_uint_32 num_rows)); /* Write the image data */ @@ -1252,15 +1527,15 @@ PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr)); #endif /* Free any memory associated with the png_info_struct */ -PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr, +PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr, png_infopp info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); /* Free any memory associated with the png_struct and the png_info_structs */ -PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)); /* Set the libpng method of handling chunk CRC errors */ @@ -1270,7 +1545,7 @@ PNG_EXPORT(66, void, png_set_crc_action, /* Values for png_set_crc_action() say how to handle CRC errors in * ancillary and critical chunks, and whether to use the data contained * therein. Note that it is impossible to "discard" data in a critical - * chunk. For versions prior to 0.90, the action was always error/quit, + * chunk. For versions prior to 0.90, the action was always error/quit, * whereas in version 0.90 and later, the action for CRC errors in ancillary * chunks is warn/discard. These values should NOT be changed. * @@ -1350,11 +1625,11 @@ PNG_EXPORT(67, void, png_set_filter, * the weights and costs are set to 1.0, this degenerates the WEIGHTED method * to the UNWEIGHTED method, but with added encoding time/computation. */ -PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr, - int heuristic_method, int num_weights, png_const_doublep filter_weights, +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, png_const_doublep filter_costs)); PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, - (png_structp png_ptr, + (png_structp png_ptr, int heuristic_method, int num_weights, png_const_fixed_point_p filter_weights, png_const_fixed_point_p filter_costs)); #endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */ @@ -1367,30 +1642,56 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, #define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ #define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ +#ifdef PNG_WRITE_SUPPORTED /* Set the library compression level. Currently, valid values range from * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 * (0 - no compression, 9 - "maximal" compression). Note that tests have * shown that zlib compression levels 3-6 usually perform as well as level 9 - * for PNG images, and do considerably fewer caclulations. In the future, + * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ PNG_EXPORT(69, void, png_set_compression_level, (png_structp png_ptr, int level)); -PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr, +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr, int mem_level)); -PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr, +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr, int strategy)); -PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr, +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr, int window_bits)); PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr, int method)); +#endif + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, + (png_structp png_ptr, int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, (png_structp + png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structp png_ptr, + int method)); +#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ /* These next functions are called for input/output, memory, and error - * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, * and call standard C I/O routines such as fread(), fwrite(), and * fprintf(). These functions can be made to use other I/O routines * at run time for those applications that need to handle I/O in a @@ -1412,7 +1713,7 @@ PNG_EXPORT(74, void, png_init_io, (png_structp png_ptr, png_FILE_p fp)); */ PNG_EXPORT(75, void, png_set_error_fn, - (png_structp png_ptr, png_voidp error_ptr, + (png_structp png_ptr, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); /* Return the user pointer associated with the error functions */ @@ -1428,43 +1729,43 @@ PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr)); * default flush function, which uses the standard *FILE structure, will * be used. */ -PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr, +PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); /* Replace the default data input function with a user supplied one. */ -PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr, +PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn)); /* Return the user pointer associated with the I/O functions */ PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_structp png_ptr)); -PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr, +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr, png_read_status_ptr read_row_fn)); -PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr, +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr, png_write_status_ptr write_row_fn)); #ifdef PNG_USER_MEM_SUPPORTED /* Replace the default memory allocation functions with user supplied one(s). */ -PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr, +PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn)); /* Return the user pointer associated with the memory functions */ PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr)); #endif #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED -PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr, +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr, png_user_transform_ptr read_user_transform_fn)); #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED -PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr, +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr, png_user_transform_ptr write_user_transform_fn)); #endif #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED -PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr, - png_voidp user_transform_ptr, int user_transform_depth, +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, int user_transform_channels)); /* Return the user pointer associated with the user transform functions */ PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, @@ -1475,16 +1776,20 @@ PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, /* Return information about the row currently being processed. Note that these * APIs do not fail but will return unexpected results if called outside a user * transform callback. Also note that when transforming an interlaced image the - * row number is still the row in the final, de-interlaced, image but the row - * only contains the data of the current pass - consult png_row_info for the - * actual width of the row! + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) */ PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp)); PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr, +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr, png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr)); #endif @@ -1493,8 +1798,8 @@ PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr)); /* Sets the function callbacks for the push reader, and a pointer to a * user-defined structure available to the callback functions. */ -PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr, - png_voidp progressive_ptr, png_progressive_info_ptr info_fn, +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); /* Returns the user pointer associated with the push read functions */ @@ -1502,7 +1807,7 @@ PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr)); /* Function to be called when data becomes available */ PNG_EXPORT(92, void, png_process_data, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_bytep buffer, png_size_t buffer_size)); /* A function which may be called *only* within png_process_data to stop the @@ -1527,20 +1832,20 @@ PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp)); * stores its own version of the new data internally and ignores the passed * in value. */ -PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr, +PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr, png_bytep old_row, png_const_bytep new_row)); #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ PNG_EXPORTA(94, png_voidp, png_malloc, - (png_structp png_ptr, png_alloc_size_t size), + (png_structp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Added at libpng version 1.4.0 */ PNG_EXPORTA(95, png_voidp, png_calloc, - (png_structp png_ptr, png_alloc_size_t size), + (png_structp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Added at libpng version 1.2.4 */ -PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr, +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); /* Frees a pointer allocated by png_malloc() */ @@ -1575,7 +1880,7 @@ PNG_EXPORT(99, void, png_data_freer, #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED -PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr, +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr, png_alloc_size_t size), PNG_ALLOCATED); PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr)); #endif @@ -1583,11 +1888,11 @@ PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr)); #ifdef PNG_ERROR_TEXT_SUPPORTED /* Fatal error in PNG image of libpng - can't continue */ PNG_EXPORTA(102, void, png_error, - (png_structp png_ptr, png_const_charp error_message), + (png_structp png_ptr, png_const_charp error_message), PNG_NORETURN); /* The same, but the chunk name is prepended to the error string. */ -PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr, +PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr, png_const_charp error_message), PNG_NORETURN); #else @@ -1595,24 +1900,26 @@ PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr, PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN); #endif +#ifdef PNG_WARNINGS_SUPPORTED /* Non-fatal error in libpng. Can continue, but may have a problem. */ -PNG_EXPORT(105, void, png_warning, (png_structp png_ptr, +PNG_EXPORT(105, void, png_warning, (png_structp png_ptr, png_const_charp warning_message)); /* Non-fatal error in libpng, chunk name is prepended to message. */ -PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr, +PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr, png_const_charp warning_message)); +#endif #ifdef PNG_BENIGN_ERRORS_SUPPORTED /* Benign error in libpng. Can continue, but may have a problem. * User can choose whether to handle as a fatal error or as a warning. */ # undef png_benign_error -PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr, +PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr, png_const_charp warning_message)); /* Same, chunk name is prepended to message. */ # undef png_chunk_benign_error -PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr, +PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr, png_const_charp warning_message)); PNG_EXPORT(109, void, png_set_benign_errors, @@ -1641,11 +1948,11 @@ PNG_EXPORT(109, void, png_set_benign_errors, */ /* Returns "flag" if chunk data is valid in info_ptr. */ PNG_EXPORT(110, png_uint_32, png_get_valid, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 flag)); /* Returns number of bytes needed to hold a transformed row. */ -PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr, +PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr, png_const_infop info_ptr)); #ifdef PNG_INFO_IMAGE_SUPPORTED @@ -1667,11 +1974,11 @@ PNG_EXPORT(114, png_byte, png_get_channels, #ifdef PNG_EASY_ACCESS_SUPPORTED /* Returns image width in pixels. */ -PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr, +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image height in pixels. */ -PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr, +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image bit_depth. */ @@ -1679,19 +1986,19 @@ PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image color_type. */ -PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr, +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image filter_type. */ -PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr, +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image interlace_type. */ -PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr, +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image compression_type. */ -PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr, +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image resolution in pixels per meter, from pHYs chunk data. */ @@ -1705,7 +2012,7 @@ PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, /* Returns pixel aspect ratio, computed from pHYs chunk data. */ PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, (png_const_structp png_ptr, png_const_infop info_ptr)); -PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, (png_const_structp png_ptr, png_const_infop info_ptr)); /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ @@ -1726,47 +2033,47 @@ PNG_EXPORT(130, png_const_bytep, png_get_signature, #ifdef PNG_bKGD_SUPPORTED PNG_EXPORT(131, png_uint_32, png_get_bKGD, - (png_const_structp png_ptr, png_infop info_ptr, + (png_const_structp png_ptr, png_infop info_ptr, png_color_16p *background)); #endif #ifdef PNG_bKGD_SUPPORTED -PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr, +PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr, png_const_color_16p background)); #endif #ifdef PNG_cHRM_SUPPORTED -PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr, - png_const_infop info_ptr, double *white_x, double *white_y, double *red_x, - double *red_y, double *green_x, double *green_y, double *blue_x, +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr, + png_const_infop info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y)); #ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */ PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, - (png_const_structp png_ptr, - png_const_infop info_ptr, png_fixed_point *int_white_x, - png_fixed_point *int_white_y, png_fixed_point *int_red_x, - png_fixed_point *int_red_y, png_fixed_point *int_green_x, - png_fixed_point *int_green_y, png_fixed_point *int_blue_x, + (png_const_structp png_ptr, + png_const_infop info_ptr, png_fixed_point *int_white_x, + png_fixed_point *int_white_y, png_fixed_point *int_red_x, + png_fixed_point *int_red_y, png_fixed_point *int_green_x, + png_fixed_point *int_green_y, png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)); #endif #endif #ifdef PNG_cHRM_SUPPORTED PNG_FP_EXPORT(135, void, png_set_cHRM, - (png_structp png_ptr, png_infop info_ptr, - double white_x, double white_y, double red_x, double red_y, double green_x, + (png_structp png_ptr, png_infop info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, double green_y, double blue_x, double blue_y)); -PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr, - png_infop info_ptr, png_fixed_point int_white_x, - png_fixed_point int_white_y, png_fixed_point int_red_x, - png_fixed_point int_red_y, png_fixed_point int_green_x, - png_fixed_point int_green_y, png_fixed_point int_blue_x, +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr, + png_infop info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, png_fixed_point int_blue_y)); #endif #ifdef PNG_gAMA_SUPPORTED PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, double *file_gamma)); PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, (png_const_structp png_ptr, png_const_infop info_ptr, @@ -1776,13 +2083,13 @@ PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, #ifdef PNG_gAMA_SUPPORTED PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr, png_infop info_ptr, double file_gamma)); -PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr, +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr, png_infop info_ptr, png_fixed_point int_file_gamma)); #endif #ifdef PNG_hIST_SUPPORTED PNG_EXPORT(141, png_uint_32, png_get_hIST, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_16p *hist)); #endif @@ -1792,65 +2099,65 @@ PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr, #endif PNG_EXPORT(143, png_uint_32, png_get_IHDR, - (png_structp png_ptr, png_infop info_ptr, - png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method)); PNG_EXPORT(144, void, png_set_IHDR, - (png_structp png_ptr, png_infop info_ptr, - png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, + (png_structp png_ptr, png_infop info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, int interlace_method, int compression_method, int filter_method)); #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(145, png_uint_32, png_get_oFFs, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)); #endif #ifdef PNG_oFFs_SUPPORTED PNG_EXPORT(146, void, png_set_oFFs, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y, int unit_type)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(147, png_uint_32, png_get_pCAL, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, - int *nparams, + int *nparams, png_charp *units, png_charpp *params)); #endif #ifdef PNG_pCAL_SUPPORTED PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr, - png_infop info_ptr, - png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + png_infop info_ptr, + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, png_const_charp units, png_charpp params)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(149, png_uint_32, png_get_pHYs, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); #endif #ifdef PNG_pHYs_SUPPORTED PNG_EXPORT(150, void, png_set_pHYs, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); #endif PNG_EXPORT(151, png_uint_32, png_get_PLTE, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_colorp *palette, int *num_palette)); PNG_EXPORT(152, void, png_set_PLTE, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_const_colorp palette, int num_palette)); #ifdef PNG_sBIT_SUPPORTED PNG_EXPORT(153, png_uint_32, png_get_sBIT, - (png_const_structp png_ptr, png_infop info_ptr, + (png_const_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)); #endif @@ -1867,44 +2174,44 @@ PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr, #ifdef PNG_sRGB_SUPPORTED PNG_EXPORT(156, void, png_set_sRGB, (png_structp png_ptr, png_infop info_ptr, int srgb_intent)); -PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr, +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr, png_infop info_ptr, int srgb_intent)); #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(158, png_uint_32, png_get_iCCP, - (png_const_structp png_ptr, png_const_infop info_ptr, - png_charpp name, int *compression_type, png_bytepp profile, + (png_const_structp png_ptr, png_const_infop info_ptr, + png_charpp name, int *compression_type, png_bytepp profile, png_uint_32 *proflen)); #endif #ifdef PNG_iCCP_SUPPORTED PNG_EXPORT(159, void, png_set_iCCP, - (png_structp png_ptr, png_infop info_ptr, - png_const_charp name, int compression_type, png_const_bytep profile, + (png_structp png_ptr, png_infop info_ptr, + png_const_charp name, int compression_type, png_const_bytep profile, png_uint_32 proflen)); #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(160, png_uint_32, png_get_sPLT, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_sPLT_tpp entries)); #endif #ifdef PNG_sPLT_SUPPORTED PNG_EXPORT(161, void, png_set_sPLT, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_const_sPLT_tp entries, int nentries)); #endif #ifdef PNG_TEXT_SUPPORTED /* png_get_text also returns the number of text chunks in *num_text */ PNG_EXPORT(162, png_uint_32, png_get_text, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, png_textp *text_ptr, int *num_text)); #endif -/* Note while png_set_text() will accept a structure whose text, +/* Note while png_set_text() will accept a structure whose text, * language, and translated keywords are NULL pointers, the structure * returned by png_get_text will always contain regular * zero-terminated C strings. They might be empty strings but @@ -1913,7 +2220,7 @@ PNG_EXPORT(162, png_uint_32, png_get_text, #ifdef PNG_TEXT_SUPPORTED PNG_EXPORT(163, void, png_set_text, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, png_const_textp text_ptr, int num_text)); #endif @@ -1929,30 +2236,30 @@ PNG_EXPORT(165, void, png_set_tIME, #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(166, png_uint_32, png_get_tRNS, - (png_const_structp png_ptr, png_infop info_ptr, + (png_const_structp png_ptr, png_infop info_ptr, png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)); #endif #ifdef PNG_tRNS_SUPPORTED PNG_EXPORT(167, void, png_set_tRNS, - (png_structp png_ptr, png_infop info_ptr, - png_const_bytep trans_alpha, int num_trans, + (png_structp png_ptr, png_infop info_ptr, + png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color)); #endif #ifdef PNG_sCAL_SUPPORTED PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, - (png_const_structp png_ptr, png_const_infop info_ptr, + (png_const_structp png_ptr, png_const_infop info_ptr, int *unit, double *width, double *height)); #ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED -/* NOTE: this API is currently implemented using floating point arithmetic, +/* NOTE: this API is currently implemented using floating point arithmetic, * consequently it can only be used on systems with floating point support. * In any case the range of values supported by png_fixed_point is small and it * is highly recommended that png_get_sCAL_s be used instead. */ PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, (png_structp png_ptr, png_const_infop info_ptr, int *unit, - png_fixed_point *width, + png_fixed_point *width, png_fixed_point *height)); #endif PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, @@ -1960,13 +2267,13 @@ PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, int *unit, png_charpp swidth, png_charpp sheight)); PNG_FP_EXPORT(170, void, png_set_sCAL, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, int unit, double width, double height)); -PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr, - png_infop info_ptr, int unit, png_fixed_point width, +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr, + png_infop info_ptr, int unit, png_fixed_point width, png_fixed_point height)); PNG_EXPORT(171, void, png_set_sCAL_s, - (png_structp png_ptr, png_infop info_ptr, + (png_structp png_ptr, png_infop info_ptr, int unit, png_const_charp swidth, png_const_charp sheight)); #endif /* PNG_sCAL_SUPPORTED */ @@ -1981,23 +2288,23 @@ PNG_EXPORT(171, void, png_set_sCAL_s, = 3: keep even if unsafe-to-copy */ PNG_EXPORT(172, void, png_set_keep_unknown_chunks, - (png_structp png_ptr, int keep, + (png_structp png_ptr, int keep, png_const_bytep chunk_list, int num_chunks)); -PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr, +PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr, png_const_bytep chunk_name)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED -PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr, +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr, png_infop info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns)); PNG_EXPORT(175, void, png_set_unknown_chunk_location, (png_structp png_ptr, png_infop info_ptr, int chunk, int location)); -PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr, +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr, png_const_infop info_ptr, png_unknown_chunkpp entries)); #endif /* Png_free_data() will turn off the "valid" flag for anything it frees. - * If you need to turn it off for a chunk that your application has freed, + * If you need to turn it off for a chunk that your application has freed, * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); */ PNG_EXPORT(177, void, png_set_invalid, @@ -2005,9 +2312,9 @@ PNG_EXPORT(177, void, png_set_invalid, #ifdef PNG_INFO_IMAGE_SUPPORTED /* The "params" pointer is currently not used and is for future expansion. */ -PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr, +PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); -PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr, +PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr, int transforms, png_voidp params)); #endif @@ -2021,7 +2328,7 @@ PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, (png_const_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED -PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr, +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr, png_uint_32 mng_features_permitted)); #endif @@ -2036,25 +2343,25 @@ PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr, */ #ifdef PNG_ERROR_NUMBERS_SUPPORTED PNG_EXPORT(185, void, png_set_strip_error_numbers, - (png_structp png_ptr, + (png_structp png_ptr, png_uint_32 strip_mode)); #endif /* Added in libpng-1.2.6 */ #ifdef PNG_SET_USER_LIMITS_SUPPORTED -PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr, +PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max)); PNG_EXPORT(187, png_uint_32, png_get_user_width_max, (png_const_structp png_ptr)); PNG_EXPORT(188, png_uint_32, png_get_user_height_max, (png_const_structp png_ptr)); /* Added in libpng-1.4.0 */ -PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr, +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr, png_uint_32 user_chunk_cache_max)); PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, (png_const_structp png_ptr)); /* Added in libpng-1.4.1 */ -PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr, +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr, png_alloc_size_t user_chunk_cache_max)); PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, (png_const_structp png_ptr)); @@ -2073,19 +2380,19 @@ PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, PNG_FP_EXPORT(196, float, png_get_x_offset_inches, (png_const_structp png_ptr, png_const_infop info_ptr)); #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ -PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, (png_structp png_ptr, png_const_infop info_ptr)); #endif -PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr, +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr, png_const_infop info_ptr)); #ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ -PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, (png_structp png_ptr, png_const_infop info_ptr)); #endif # ifdef PNG_pHYs_SUPPORTED -PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr, +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr, png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)); # endif /* PNG_pHYs_SUPPORTED */ @@ -2142,8 +2449,9 @@ PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, #define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\ -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass)) -/* For the progressive reader it is necessary to find the row in the output - * image given a row in an interlaced image, so two more macros: +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: */ #define PNG_ROW_FROM_PASS_ROW(yIn, pass) \ (((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass)) @@ -2213,7 +2521,7 @@ PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); #endif -PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr, +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr, png_const_bytep buf)); /* No png_get_int_16 -- may be added if there's a real need for it. */ @@ -2226,7 +2534,7 @@ PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); #endif /* Place a 16-bit number into a buffer in PNG byte order. - * The parameter is declared unsigned int, not png_uint_16, + * The parameter is declared unsigned int, not png_uint_16, * just to avoid potential problems on pre-ANSI C compilers. */ #ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED @@ -2268,7 +2576,7 @@ PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); * scripts/symbols.def as well. */ #ifdef PNG_EXPORT_LAST_ORDINAL - PNG_EXPORT_LAST_ORDINAL(220); + PNG_EXPORT_LAST_ORDINAL(229); #endif #ifdef __cplusplus diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h index d0b3454..2a41a29 100644 --- a/src/3rdparty/libpng/pngconf.h +++ b/src/3rdparty/libpng/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.5.1 - February 3, 2011 + * libpng version 1.5.4 - July 7, 2011 * * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -22,29 +22,31 @@ #ifndef PNGCONF_H #define PNGCONF_H +#ifndef PNG_BUILDING_SYMBOL_TABLE /* PNG_NO_LIMITS_H may be used to turn off the use of the standard C * definition file for machine specific limits, this may impact the * correctness of the definitons below (see uses of INT_MAX). */ -#ifndef PNG_NO_LIMITS_H -# include <limits.h> -#endif +# ifndef PNG_NO_LIMITS_H +# include <limits.h> +# endif /* For the memory copy APIs (i.e. the standard definitions of these), * because this file defines png_memcpy and so on the base APIs must * be defined here. */ -#if defined(BSD) && !defined(VXWORKS) -# include <strings.h> -#else -# include <string.h> -#endif +# if defined(BSD) && !defined(VXWORKS) +# include <strings.h> +# else +# include <string.h> +# endif /* For png_FILE_p - this provides the standard definition of a * FILE */ -#ifdef PNG_STDIO_SUPPORTED -# include <stdio.h> +# ifdef PNG_STDIO_SUPPORTED +# include <stdio.h> +# endif #endif /* This controls optimization of the reading of 16 and 32 bit values @@ -289,23 +291,15 @@ # endif #endif -/* THe following complexity is concerned with getting the 'attributes' of the - * declared function in the correct place. This potentially requires a separate - * PNG_EXPORT function for every compiler. +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) */ #ifndef PNG_FUNCTION -# ifdef __GNUC__ -# define PNG_FUNCTION(type, name, args, attributes)\ - attributes type name args -# else /* !GNUC */ -# ifdef _MSC_VER -# define PNG_FUNCTION(type, name, args, attributes)\ - attributes type name args -# else /* !MSC */ -# define PNG_FUNCTION(type, name, args, attributes)\ - type name args -# endif -# endif +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args #endif #ifndef PNG_EXPORT_TYPE @@ -317,13 +311,19 @@ * scripts directory. */ #ifndef PNG_EXPORTA + # define PNG_EXPORTA(ordinal, type, name, args, attributes)\ - extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\ - attributes) + PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args), \ + extern attributes) #endif +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + #define PNG_EXPORT(ordinal, type, name, args)\ - PNG_EXPORTA(ordinal, type, name, args, ) + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) /* Use PNG_REMOVED to comment out a removed interface. */ #ifndef PNG_REMOVED @@ -331,8 +331,7 @@ #endif #ifndef PNG_CALLBACK -# define PNG_CALLBACK(type, name, args, attributes)\ - type (PNGCBAPI name) PNGARG(args) attributes +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args) #endif /* Support for compiler specific function attributes. These are used @@ -354,16 +353,13 @@ * functions in png.h will generate compiler warnings. Added at libpng * version 1.2.41. */ -# ifdef __GNUC__ +# if defined(__GNUC__) # ifndef PNG_USE_RESULT # define PNG_USE_RESULT __attribute__((__warn_unused_result__)) # endif # ifndef PNG_NORETURN # define PNG_NORETURN __attribute__((__noreturn__)) # endif -# ifndef PNG_PTR_NORETURN -# define PNG_PTR_NORETURN __attribute__((__noreturn__)) -# endif # ifndef PNG_ALLOCATED # define PNG_ALLOCATED __attribute__((__malloc__)) # endif @@ -376,9 +372,6 @@ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __attribute__((__deprecated__)) # endif -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __attribute__((__deprecated__)) -# endif # ifndef PNG_PRIVATE # if 0 /* Doesn't work so we use deprecated instead*/ # define PNG_PRIVATE \ @@ -387,21 +380,21 @@ # define PNG_PRIVATE \ __attribute__((__deprecated__)) # endif -# endif /* PNG_PRIVATE */ +# endif # endif /* PNGLIB_BUILD */ # endif /* __GNUC__ */ -# ifdef _MSC_VER /* may need to check value */ + +# if defined(_MSC_VER) && (_MSC_VER >= 1300) # ifndef PNG_USE_RESULT -# define PNG_USE_RESULT /*not supported*/ +# define PNG_USE_RESULT /* not supported */ # endif # ifndef PNG_NORETURN # define PNG_NORETURN __declspec(noreturn) # endif -# ifndef PNG_PTR_NORETURN -# define PNG_PTR_NORETURN /*not supported*/ -# endif # ifndef PNG_ALLOCATED -# define PNG_ALLOCATED __declspec(restrict) +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif # endif /* This specifically protects structure members that should only be @@ -412,14 +405,11 @@ # ifndef PNG_DEPRECATED # define PNG_DEPRECATED __declspec(deprecated) # endif -# ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT __declspec(deprecated) -# endif # ifndef PNG_PRIVATE # define PNG_PRIVATE __declspec(deprecated) -# endif /* PNG_PRIVATE */ +# endif # endif /* PNGLIB_BUILD */ -# endif /* __GNUC__ */ +# endif /* _MSC_VER */ #endif /* PNG_PEDANTIC_WARNINGS */ #ifndef PNG_DEPRECATED @@ -434,9 +424,6 @@ #ifndef PNG_ALLOCATED # define PNG_ALLOCATED /* The result of the function is new memory */ #endif -#ifndef PNG_DEPSTRUCT -# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */ -#endif #ifndef PNG_PRIVATE # define PNG_PRIVATE /* This is a private libpng function */ #endif diff --git a/src/3rdparty/libpng/pngerror.c b/src/3rdparty/libpng/pngerror.c index 8290bb4..4d4ceba 100644 --- a/src/3rdparty/libpng/pngerror.c +++ b/src/3rdparty/libpng/pngerror.c @@ -1,7 +1,7 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -89,15 +89,121 @@ png_error,(png_structp png_ptr, png_const_charp error_message),PNG_NORETURN) PNG_FUNCTION(void,PNGAPI png_err,(png_structp png_ptr),PNG_NORETURN) { + /* Prior to 1.5.2 the error_fn received a NULL pointer, expressed + * erroneously as '\0', instead of the empty string "". This was + * apparently an error, introduced in libpng-1.2.20, and png_default_error + * will crash in this case. + */ if (png_ptr != NULL && png_ptr->error_fn != NULL) - (*(png_ptr->error_fn))(png_ptr, '\0'); + (*(png_ptr->error_fn))(png_ptr, ""); /* If the custom handler doesn't exist, or if it returns, use the default handler, which will not return. */ - png_default_error(png_ptr, '\0'); + png_default_error(png_ptr, ""); } #endif /* PNG_ERROR_TEXT_SUPPORTED */ +/* Utility to safely appends strings to a buffer. This never errors out so + * error checking is not required in the caller. + */ +size_t +png_safecat(png_charp buffer, size_t bufsize, size_t pos, + png_const_charp string) +{ + if (buffer != NULL && pos < bufsize) + { + if (string != NULL) + while (*string != '\0' && pos < bufsize-1) + buffer[pos++] = *string++; + + buffer[pos] = '\0'; + } + + return pos; +} + +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. + */ +png_charp +png_format_number(png_const_charp start, png_charp end, int format, + png_alloc_size_t number) +{ + int count = 0; /* number of digits output */ + int mincount = 1; /* minimum number required */ + int output = 0; /* digit output (for the fixed point format) */ + + *--end = '\0'; + + /* This is written so that the loop always runs at least once, even with + * number zero. + */ + while (end > start && (number != 0 || count < mincount)) + { + + static const char digits[] = "0123456789ABCDEF"; + + switch (format) + { + case PNG_NUMBER_FORMAT_fixed: + /* Needs five digits (the fraction) */ + mincount = 5; + if (output || number % 10 != 0) + { + *--end = digits[number % 10]; + output = 1; + } + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02u: + /* Expects at least 2 digits. */ + mincount = 2; + /* fall through */ + + case PNG_NUMBER_FORMAT_u: + *--end = digits[number % 10]; + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02x: + /* This format expects at least two digits */ + mincount = 2; + /* fall through */ + + case PNG_NUMBER_FORMAT_x: + *--end = digits[number & 0xf]; + number >>= 4; + break; + + default: /* an error */ + number = 0; + break; + } + + /* Keep track of the number of digits added */ + ++count; + + /* Float a fixed number here: */ + if (format == PNG_NUMBER_FORMAT_fixed) if (count == 5) if (end > start) + { + /* End of the fraction, but maybe nothing was output? In that case + * drop the decimal point. If the number is a true zero handle that + * here. + */ + if (output) + *--end = '.'; + else if (number == 0) /* and !output */ + *--end = '0'; + } + } + + return end; +} +#endif + #ifdef PNG_WARNINGS_SUPPORTED /* This function is called whenever there is a non-fatal error. This function * should not be changed. If there is a need to handle warnings differently, @@ -128,6 +234,115 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) else png_default_warning(png_ptr, warning_message + offset); } + +/* These functions support 'formatted' warning messages with up to + * PNG_WARNING_PARAMETER_COUNT parameters. In the format string the parameter + * is introduced by @<number>, where 'number' starts at 1. This follows the + * standard established by X/Open for internationalizable error messages. + */ +void +png_warning_parameter(png_warning_parameters p, int number, + png_const_charp string) +{ + if (number > 0 && number <= PNG_WARNING_PARAMETER_COUNT) + (void)png_safecat(p[number-1], (sizeof p[number-1]), 0, string); +} + +void +png_warning_parameter_unsigned(png_warning_parameters p, int number, int format, + png_alloc_size_t value) +{ + char buffer[PNG_NUMBER_BUFFER_SIZE]; + png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value)); +} + +void +png_warning_parameter_signed(png_warning_parameters p, int number, int format, + png_int_32 value) +{ + png_alloc_size_t u; + png_charp str; + char buffer[PNG_NUMBER_BUFFER_SIZE]; + + /* Avoid overflow by doing the negate in a png_alloc_size_t: */ + u = (png_alloc_size_t)value; + if (value < 0) + u = ~u + 1; + + str = PNG_FORMAT_NUMBER(buffer, format, u); + + if (value < 0 && str > buffer) + *--str = '-'; + + png_warning_parameter(p, number, str); +} + +void +png_formatted_warning(png_structp png_ptr, png_warning_parameters p, + png_const_charp message) +{ + /* The internal buffer is just 128 bytes - enough for all our messages, + * overflow doesn't happen because this code checks! + */ + size_t i; + char msg[128]; + + for (i=0; i<(sizeof msg)-1 && *message != '\0'; ++i) + { + if (*message == '@') + { + int parameter = -1; + switch (*++message) + { + case '1': + parameter = 0; + break; + + case '2': + parameter = 1; + break; + + case '\0': + continue; /* To break out of the for loop above. */ + + default: + break; + } + + if (parameter >= 0 && parameter < PNG_WARNING_PARAMETER_COUNT) + { + /* Append this parameter */ + png_const_charp parm = p[parameter]; + png_const_charp pend = p[parameter] + (sizeof p[parameter]); + + /* No need to copy the trailing '\0' here, but there is no guarantee + * that parm[] has been initialized, so there is no guarantee of a + * trailing '\0': + */ + for (; i<(sizeof msg)-1 && parm != '\0' && parm < pend; ++i) + msg[i] = *parm++; + + ++message; + continue; + } + + /* else not a parameter and there is a character after the @ sign; just + * copy that. + */ + } + + /* At this point *message can't be '\0', even in the bad parameter case + * above where there is a lone '@' at the end of the message string. + */ + msg[i] = *message++; + } + + /* i is always less than (sizeof msg), so: */ + msg[i] = '\0'; + + /* And this is the formatted message: */ + png_warning(png_ptr, msg); +} #endif /* PNG_WARNINGS_SUPPORTED */ #ifdef PNG_BENIGN_ERRORS_SUPPORTED @@ -185,8 +400,13 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp { buffer[iout++] = ':'; buffer[iout++] = ' '; - png_memcpy(buffer + iout, error_message, PNG_MAX_ERROR_TEXT); - buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0'; + + iin = 0; + while (iin < PNG_MAX_ERROR_TEXT-1 && error_message[iin] != '\0') + buffer[iout++] = error_message[iin++]; + + /* iin < PNG_MAX_ERROR_TEXT, so the following is safe: */ + buffer[iout] = '\0'; } } #endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ @@ -272,7 +492,7 @@ png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn, return NULL; png_ptr->longjmp_fn = longjmp_fn; - return &png_ptr->png_jmpbuf; + return &png_ptr->longjmp_buffer; } #endif @@ -287,7 +507,8 @@ png_default_error,(png_structp png_ptr, png_const_charp error_message), { #ifdef PNG_CONSOLE_IO_SUPPORTED #ifdef PNG_ERROR_NUMBERS_SUPPORTED - if (*error_message == PNG_LITERAL_SHARP) + /* Check on NULL only added in 1.5.4 */ + if (error_message != NULL && *error_message == PNG_LITERAL_SHARP) { /* Strip "#nnnn " from beginning of error message. */ int offset; @@ -317,11 +538,11 @@ png_default_error,(png_structp png_ptr, png_const_charp error_message), else #endif { - fprintf(stderr, "libpng error: %s", error_message); + fprintf(stderr, "libpng error: %s", error_message ? error_message : + "undefined"); fprintf(stderr, PNG_STRING_NEWLINE); } -#endif -#ifndef PNG_CONSOLE_IO_SUPPORTED +#else PNG_UNUSED(error_message) /* Make compiler happy */ #endif png_longjmp(png_ptr, 1); @@ -335,13 +556,13 @@ png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN) { # ifdef USE_FAR_KEYWORD { - jmp_buf png_jmpbuf; - png_memcpy(png_jmpbuf, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); - png_ptr->longjmp_fn(png_jmpbuf, val); + jmp_buf tmp_jmpbuf; + png_memcpy(tmp_jmpbuf, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); + png_ptr->longjmp_fn(tmp_jmpbuf, val); } # else - png_ptr->longjmp_fn(png_ptr->png_jmpbuf, val); + png_ptr->longjmp_fn(png_ptr->longjmp_buffer, val); # endif } #endif @@ -403,7 +624,7 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message) /* This function is called when the application wants to use another method * of handling errors and warnings. Note that the error function MUST NOT * return to the calling routine or serious problems will occur. The return - * method used in the default routine calls longjmp(png_ptr->png_jmpbuf, 1) + * method used in the default routine calls longjmp(png_ptr->longjmp_buffer, 1) */ void PNGAPI png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, @@ -414,7 +635,11 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr, png_ptr->error_ptr = error_ptr; png_ptr->error_fn = error_fn; +#ifdef PNG_WARNINGS_SUPPORTED png_ptr->warning_fn = warning_fn; +#else + PNG_UNUSED(warning_fn) +#endif } diff --git a/src/3rdparty/libpng/pnginfo.h b/src/3rdparty/libpng/pnginfo.h index fa19f85..a33bfab 100644 --- a/src/3rdparty/libpng/pnginfo.h +++ b/src/3rdparty/libpng/pnginfo.h @@ -138,7 +138,6 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) * single color specified that should be treated as fully transparent. * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. */ - png_bytep trans; /* alpha values for paletted image */ png_bytep trans_alpha; /* alpha values for paletted image */ png_color_16 trans_color; /* transparent color for non-palette image */ #endif diff --git a/src/3rdparty/libpng/pnglibconf.h b/src/3rdparty/libpng/pnglibconf.h index b1d2169..827d17e 100644 --- a/src/3rdparty/libpng/pnglibconf.h +++ b/src/3rdparty/libpng/pnglibconf.h @@ -3,7 +3,7 @@ /* pnglibconf.h - library build configuration */ -/* libpng version 1.5.0 - last changed on January 6, 2011 */ +/* libpng version 1.5.4 - last changed on June 22, 2011 */ /* Copyright (c) 1998-2011 Glenn Randers-Pehrson */ @@ -12,165 +12,176 @@ /* and license in png.h */ /* pnglibconf.h */ -/* Machine generated file: DO NOT EDIT */ /* Derived from: scripts/pnglibconf.dfa */ +/* If you edit this file by hand you must obey the rules expressed in */ +/* pnglibconf.dfa with respect to the dependencies between the following */ +/* symbols. It is much better to generate a new file using */ +/* scripts/libpngconf.mak */ + #ifndef PNGLCONF_H #define PNGLCONF_H /* settings */ -#define PNG_MAX_GAMMA_8 11 -#define PNG_CALLOC_SUPPORTED -#define PNG_QUANTIZE_RED_BITS 5 -#define PNG_USER_WIDTH_MAX 1000000L -#define PNG_QUANTIZE_GREEN_BITS 5 #define PNG_API_RULE 0 +#define PNG_CALLOC_SUPPORTED +#define PNG_COST_SHIFT 3 +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_MAX_GAMMA_8 11 #define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_sCAL_PRECISION 5 #define PNG_USER_CHUNK_CACHE_MAX 0 +#define PNG_USER_CHUNK_MALLOC_MAX 0 #define PNG_USER_HEIGHT_MAX 1000000L -#define PNG_sCAL_PRECISION 5 -#define PNG_COST_SHIFT 3 +#define PNG_USER_WIDTH_MAX 1000000L #define PNG_WEIGHT_SHIFT 8 -#define PNG_USER_CHUNK_MALLOC_MAX 0 -#define PNG_DEFAULT_READ_MACROS 1 #define PNG_ZBUF_SIZE 8192 -#define PNG_GAMMA_THRESHOLD_FIXED 5000 /* end of settings */ /* options */ -#define PNG_INFO_IMAGE_SUPPORTED -#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED -#define PNG_POINTER_INDEXING_SUPPORTED -#define PNG_WARNINGS_SUPPORTED -#define PNG_FLOATING_ARITHMETIC_SUPPORTED -#define PNG_WRITE_SUPPORTED -#define PNG_WRITE_INTERLACING_SUPPORTED -#define PNG_WRITE_16BIT_SUPPORTED -#define PNG_EASY_ACCESS_SUPPORTED +#define PNG_16BIT_SUPPORTED #define PNG_ALIGN_MEMORY_SUPPORTED -#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED -#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED -#define PNG_USER_LIMITS_SUPPORTED -#define PNG_FIXED_POINT_SUPPORTED +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_cHRM_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +#define PNG_EASY_ACCESS_SUPPORTED /*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ #define PNG_ERROR_TEXT_SUPPORTED -#define PNG_READ_SUPPORTED -/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/ -#define PNG_BENIGN_ERRORS_SUPPORTED -#define PNG_SETJMP_SUPPORTED -#define PNG_WRITE_FLUSH_SUPPORTED -#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED #define PNG_FLOATING_POINT_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED #define PNG_INCH_CONVERSIONS_SUPPORTED -#define PNG_STDIO_SUPPORTED -#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED -#define PNG_USER_MEM_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED #define PNG_IO_STATE_SUPPORTED -#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED #define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED -#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED -#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED -#define PNG_WRITE_FILTER_SUPPORTED -#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED -#define PNG_WRITE_iCCP_SUPPORTED -#define PNG_READ_TRANSFORMS_SUPPORTED -#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED #define PNG_READ_bKGD_SUPPORTED -#define PNG_UNKNOWN_CHUNKS_SUPPORTED -#define PNG_READ_sCAL_SUPPORTED -#define PNG_WRITE_hIST_SUPPORTED -#define PNG_READ_OPT_PLTE_SUPPORTED -#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED -#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED #define PNG_READ_GRAY_TO_RGB_SUPPORTED -#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED #define PNG_READ_INVERT_ALPHA_SUPPORTED -#define PNG_WRITE_TRANSFORMS_SUPPORTED -#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED #define PNG_READ_PACK_SUPPORTED -#define PNG_WRITE_SWAP_SUPPORTED -#define PNG_READ_cHRM_SUPPORTED -#define PNG_WRITE_tIME_SUPPORTED -#define PNG_READ_INTERLACING_SUPPORTED -#define PNG_READ_tRNS_SUPPORTED -#define PNG_WRITE_pHYs_SUPPORTED -#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED #define PNG_READ_RGB_TO_GRAY_SUPPORTED -#define PNG_WRITE_sRGB_SUPPORTED -#define PNG_READ_oFFs_SUPPORTED -#define PNG_WRITE_FILLER_SUPPORTED -#define PNG_WRITE_TEXT_SUPPORTED -#define PNG_WRITE_SHIFT_SUPPORTED -#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED #define PNG_READ_SHIFT_SUPPORTED -#define PNG_CONVERT_tIME_SUPPORTED -#define PNG_READ_USER_TRANSFORM_SUPPORTED -#define PNG_READ_INT_FUNCTIONS_SUPPORTED -#define PNG_READ_USER_CHUNKS_SUPPORTED -#define PNG_READ_hIST_SUPPORTED -#define PNG_READ_16BIT_SUPPORTED -#define PNG_READ_SWAP_ALPHA_SUPPORTED -#define PNG_READ_COMPOSITE_NODIV_SUPPORTED -#define PNG_SEQUENTIAL_READ_SUPPORTED -#define PNG_READ_BACKGROUND_SUPPORTED -#define PNG_READ_QUANTIZE_SUPPORTED -#define PNG_READ_iCCP_SUPPORTED -#define PNG_READ_STRIP_ALPHA_SUPPORTED -#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED #define PNG_READ_sRGB_SUPPORTED -#define PNG_WRITE_tEXt_SUPPORTED -#define PNG_READ_gAMA_SUPPORTED -#define PNG_READ_pCAL_SUPPORTED -#define PNG_READ_EXPAND_SUPPORTED -#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED #define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED #define PNG_READ_tIME_SUPPORTED -#define PNG_READ_pHYs_SUPPORTED -#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_TEXT_SUPPORTED #define PNG_TIME_RFC1123_SUPPORTED -#define PNG_READ_TEXT_SUPPORTED -#define PNG_WRITE_BGR_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED #define PNG_USER_CHUNKS_SUPPORTED -#define PNG_CONSOLE_IO_SUPPORTED -#define PNG_WRITE_PACK_SUPPORTED -#define PNG_READ_FILLER_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED #define PNG_WRITE_bKGD_SUPPORTED -#define PNG_WRITE_tRNS_SUPPORTED -#define PNG_READ_sPLT_SUPPORTED -#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED #define PNG_WRITE_oFFs_SUPPORTED -#define PNG_READ_tEXt_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED #define PNG_WRITE_sBIT_SUPPORTED -#define PNG_READ_INVERT_SUPPORTED -#define PNG_READ_16_TO_8_SUPPORTED -#define PNG_WRITE_cHRM_SUPPORTED -#define PNG_16BIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED #define PNG_WRITE_USER_TRANSFORM_SUPPORTED -#define PNG_READ_BGR_SUPPORTED -#define PNG_WRITE_PACKSWAP_SUPPORTED -#define PNG_WRITE_INVERT_ALPHA_SUPPORTED -#define PNG_sCAL_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED #define PNG_WRITE_zTXt_SUPPORTED -#define PNG_sBIT_SUPPORTED -#define PNG_cHRM_SUPPORTED -#define PNG_bKGD_SUPPORTED -#define PNG_tRNS_SUPPORTED -#define PNG_WRITE_iTXt_SUPPORTED -#define PNG_oFFs_SUPPORTED -#define PNG_USER_TRANSFORM_PTR_SUPPORTED -#define PNG_USER_TRANSFORM_INFO_SUPPORTED -#define PNG_hIST_SUPPORTED -#define PNG_iCCP_SUPPORTED -#define PNG_sRGB_SUPPORTED -#define PNG_READ_zTXt_SUPPORTED -#define PNG_gAMA_SUPPORTED -#define PNG_pCAL_SUPPORTED -#define PNG_CHECK_cHRM_SUPPORTED -#define PNG_tIME_SUPPORTED -#define PNG_pHYs_SUPPORTED -#define PNG_READ_iTXt_SUPPORTED -#define PNG_TEXT_SUPPORTED -#define PNG_SAVE_INT_32_SUPPORTED -#define PNG_sPLT_SUPPORTED -#define PNG_tEXt_SUPPORTED #define PNG_zTXt_SUPPORTED -#define PNG_iTXt_SUPPORTED /* end of options */ #endif /* PNGLCONF_H */ diff --git a/src/3rdparty/libpng/pngmem.c b/src/3rdparty/libpng/pngmem.c index a15d8b0..ea606d6 100644 --- a/src/3rdparty/libpng/pngmem.c +++ b/src/3rdparty/libpng/pngmem.c @@ -1,7 +1,7 @@ /* pngmem.c - stub functions for memory allocation * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -187,8 +187,9 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) int num_blocks; png_uint_32 total_size; png_bytep table; - int i; + int i, mem_level, window_bits; png_byte huge * hptr; + int window_bits if (ret != NULL) { @@ -196,14 +197,22 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) ret = NULL; } - if (png_ptr->zlib_window_bits > 14) - num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14)); + window_bits = + png_ptr->zlib_window_bits >= png_ptr->zlib_text_window_bits ? + png_ptr->zlib_window_bits : png_ptr->zlib_text_window_bits; + + if (window_bits > 14) + num_blocks = (int)(1 << (window_bits - 14)); else num_blocks = 1; - if (png_ptr->zlib_mem_level >= 7) - num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7)); + mem_level = + png_ptr->zlib_mem_level >= png_ptr->zlib_text_mem_level ? + png_ptr->zlib_mem_level : png_ptr->zlib_text_mem_level; + + if (mem_level >= 7) + num_blocks += (int)(1 << (mem_level - 7)); else num_blocks++; @@ -277,7 +286,7 @@ png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) { # ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */ + png_error(png_ptr, "Out of Memory"); /* Note "O" and "M" */ else png_warning(png_ptr, "Out of Memory"); diff --git a/src/3rdparty/libpng/pngpread.c b/src/3rdparty/libpng/pngpread.c index 7b1149b..a50292a 100644 --- a/src/3rdparty/libpng/pngpread.c +++ b/src/3rdparty/libpng/pngpread.c @@ -1,7 +1,7 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.2 [March 31, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -1026,8 +1026,10 @@ png_push_process_row(png_structp png_ptr) png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1); - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations) png_do_read_transformations(png_ptr); +#endif #ifdef PNG_READ_INTERLACING_SUPPORTED /* Blow up interlaced rows to full size */ @@ -1288,7 +1290,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 { PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ png_error(png_ptr, "Out of place tEXt"); - /*NOT REACHED*/ + /* NOT REACHED */ } #ifdef PNG_MAX_MALLOC_64K @@ -1385,7 +1387,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 { PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ png_error(png_ptr, "Out of place zTXt"); - /*NOT REACHED*/ + /* NOT REACHED */ } #ifdef PNG_MAX_MALLOC_64K @@ -1589,7 +1591,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 { PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */ png_error(png_ptr, "Out of place iTXt"); - /*NOT REACHED*/ + /* NOT REACHED */ } #ifdef PNG_MAX_MALLOC_64K diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h index 9b90f26..ca2fb8c 100644 --- a/src/3rdparty/libpng/pngpriv.h +++ b/src/3rdparty/libpng/pngpriv.h @@ -6,7 +6,7 @@ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -29,6 +29,20 @@ # define _CRT_SECURE_NO_DEPRECATE #endif +/* Feature Test Macros. The following are defined here to ensure that correctly + * implemented libraries reveal the APIs libpng needs to build and hide those + * that are not needed and potentially damaging to the compilation. + * + * Feature Test Macros must be defined before any system header is included (see + * POSIX 1003.1 2.8.2 "POSIX Symbols." + * + * These macros only have an effect if the operating system supports either + * POSIX 1003.1 or C99, or both. On other operating systems (particularly + * Windows/Visual Studio) there is no effect; the OS specific tests below are + * still required (as of 2011-05-02.) + */ +#define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */ + /* This is required for the definition of abort(), used as a last ditch * error handler when all else fails. */ @@ -87,13 +101,15 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; # define PNG_MAX_MALLOC_64K #endif +#ifndef PNG_UNUSED /* Unused formal parameter warnings are silenced using the following macro * which is expected to have no bad effects on performance (optimizing * compilers will probably remove it entirely). Note that if you replace * it with something other than whitespace, you must include the terminating * semicolon. */ -#define PNG_UNUSED(param) (void)param; +# define PNG_UNUSED(param) (void)param; +#endif /* Just a little check that someone hasn't tried to define something * contradictory. @@ -103,12 +119,27 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; # define PNG_ZBUF_SIZE 65536L #endif -/* If warnings or errors are turned off the code is disabled - * or redirected here. +/* PNG_STATIC is used to mark internal file scope functions if they need to be + * accessed for implementation tests (see the code in tests/?*). */ -#ifndef PNG_WARNINGS_SUPPORTED -# define png_warning(s1,s2) ((void)0) -# define png_chunk_warning(s1,s2) ((void)0) +#ifndef PNG_STATIC +# define PNG_STATIC static +#endif + +/* If warnings or errors are turned off the code is disabled or redirected here. + * From 1.5.4 functions have been added to allow very limited formatting of + * error and warning messages - this code will also be disabled here. + */ +#ifdef PNG_WARNINGS_SUPPORTED +# define PNG_WARNING_PARAMETERS(p) png_warning_parameters p; +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +# define png_warning_parameter(p,number,string) ((void)0) +# define png_warning_parameter_unsigned(p,number,format,value) ((void)0) +# define png_warning_parameter_signed(p,number,format,value) ((void)0) +# define png_formatted_warning(pp,p,message) ((void)(pp)) +# define PNG_WARNING_PARAMETERS(p) #endif #ifndef PNG_ERROR_TEXT_SUPPORTED # define png_error(s1,s2) png_err(s1) @@ -204,60 +235,28 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; # define NOCHECK 0 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) -# define png_strcpy _fstrcpy -# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ # define png_strlen _fstrlen # define png_memcmp _fmemcmp /* SJT: added */ # define png_memcpy _fmemcpy # define png_memset _fmemset -# define png_sprintf sprintf #else # ifdef _WINDOWS_ /* Favor Windows over C runtime fns */ # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strcpy lstrcpyA -# define png_strncpy lstrcpynA # define png_strlen lstrlenA # define png_memcmp memcmp # define png_memcpy CopyMemory # define png_memset memset -# define png_sprintf wsprintfA # else # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) -# define png_strcpy strcpy -# define png_strncpy strncpy /* Added to v 1.2.6 */ # define png_strlen strlen # define png_memcmp memcmp /* SJT: added */ # define png_memcpy memcpy # define png_memset memset -# define png_sprintf sprintf # endif #endif /* End of memory model/platform independent support */ - -#ifndef PNG_NO_SNPRINTF -# ifdef _MSC_VER -# define png_snprintf _snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 _snprintf -# define png_snprintf6 _snprintf -# else -# define png_snprintf snprintf /* Added to v 1.2.19 */ -# define png_snprintf2 snprintf -# define png_snprintf6 snprintf -# endif -#else - /* You don't have or don't want to use snprintf(). Caution: Using - * sprintf instead of snprintf exposes your application to accidental - * or malevolent buffer overflows. If you don't have snprintf() - * as a general rule you should provide one (you can get one from - * Portable OpenSSH). - */ -# define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1) -# define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2) -# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ - png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) -#endif /* End of 1.5.0beta36 move from pngconf.h */ /* CONSTANTS and UTILITY MACROS @@ -265,12 +264,14 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; */ /* Various modes of operation. Note that after an init, mode is set to - * zero automatically when the structure is created. + * zero automatically when the structure is created. Three of these + * are defined in png.h because they need to be visible to applications + * that call png_set_unknown_chunk(). */ -#define PNG_HAVE_IHDR 0x01 -#define PNG_HAVE_PLTE 0x02 +/* #define PNG_HAVE_IHDR 0x01 (defined in png.h) */ +/* #define PNG_HAVE_PLTE 0x02 (defined in png.h) */ #define PNG_HAVE_IDAT 0x04 -#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */ +/* #define PNG_AFTER_IDAT 0x08 (defined in png.h) */ #define PNG_HAVE_IEND 0x10 #define PNG_HAVE_gAMA 0x20 #define PNG_HAVE_cHRM 0x40 @@ -290,10 +291,10 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; #define PNG_SWAP_BYTES 0x0010 #define PNG_INVERT_MONO 0x0020 #define PNG_QUANTIZE 0x0040 -#define PNG_BACKGROUND 0x0080 +#define PNG_COMPOSE 0x0080 /* Was PNG_BACKGROUND */ #define PNG_BACKGROUND_EXPAND 0x0100 - /* 0x0200 unused */ -#define PNG_16_TO_8 0x0400 +#define PNG_EXPAND_16 0x0200 /* Added to libpng 1.5.2 */ +#define PNG_16_TO_8 0x0400 /* Becomes 'chop' in 1.5.4 */ #define PNG_RGBA 0x0800 #define PNG_EXPAND 0x1000 #define PNG_GAMMA 0x2000 @@ -307,10 +308,10 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; #define PNG_RGB_TO_GRAY_ERR 0x200000L #define PNG_RGB_TO_GRAY_WARN 0x400000L #define PNG_RGB_TO_GRAY 0x600000L /* two bits, RGB_TO_GRAY_ERR|WARN */ - /* 0x800000L Unused */ +#define PNG_ENCODE_ALPHA 0x800000L /* Added to libpng-1.5.4 */ #define PNG_ADD_ALPHA 0x1000000L /* Added to libpng-1.2.7 */ #define PNG_EXPAND_tRNS 0x2000000L /* Added to libpng-1.2.9 */ - /* 0x4000000L unused */ +#define PNG_SCALE_16_TO_8 0x4000000L /* Added to libpng-1.5.4 */ /* 0x8000000L unused */ /* 0x10000000L unused */ /* 0x20000000L unused */ @@ -337,25 +338,25 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; #define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200 #define PNG_FLAG_CRC_CRITICAL_USE 0x0400 #define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800 - /* 0x1000 unused */ - /* 0x2000 unused */ - /* 0x4000 unused */ +#define PNG_FLAG_ASSUME_sRGB 0x1000 /* Added to libpng-1.5.4 */ +#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000 /* Added to libpng-1.5.4 */ +#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000 /* Added to libpng-1.5.4 */ #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000L #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000L #define PNG_FLAG_LIBRARY_MISMATCH 0x20000L #define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000L #define PNG_FLAG_STRIP_ERROR_TEXT 0x80000L #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L -#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ -#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ + /* 0x200000L unused */ + /* 0x400000L unused */ #define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */ - /* 0x1000000L unused */ - /* 0x2000000L unused */ - /* 0x4000000L unused */ - /* 0x8000000L unused */ - /* 0x10000000L unused */ - /* 0x20000000L unused */ - /* 0x40000000L unused */ +#define PNG_FLAG_ZTXT_CUSTOM_STRATEGY 0x1000000L /* 5 lines added */ +#define PNG_FLAG_ZTXT_CUSTOM_LEVEL 0x2000000L /* to libpng-1.5.4 */ +#define PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL 0x4000000L +#define PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS 0x8000000L +#define PNG_FLAG_ZTXT_CUSTOM_METHOD 0x10000000L + /* 0x20000000L unused */ + /* 0x40000000L unused */ #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ PNG_FLAG_CRC_ANCILLARY_NOWARN) @@ -464,6 +465,11 @@ PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp, #define PNG_tRNS PNG_CONST png_byte png_tRNS[5] = {116, 82, 78, 83, '\0'} #define PNG_zTXt PNG_CONST png_byte png_zTXt[5] = {122, 84, 88, 116, '\0'} +/* Gamma values (new at libpng-1.5.4): */ +#define PNG_GAMMA_MAC_OLD 151724 /* Assume '1.8' is really 2.2/1.45! */ +#define PNG_GAMMA_MAC_INVERSE 65909 +#define PNG_GAMMA_sRGB_INVERSE 45455 + /* Inhibit C++ name-mangling for libpng functions but not for system calls. */ #ifdef __cplusplus @@ -476,6 +482,12 @@ extern "C" { * be found in the files where the functions are located. */ +/* Check the user version string for compatibility, returns false if the version + * numbers aren't compatible. + */ +PNG_EXTERN int png_user_version_check(png_structp png_ptr, + png_const_charp user_png_ver); + /* Allocate memory for an internal libpng struct */ PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)), PNG_ALLOCATED); @@ -544,8 +556,7 @@ PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf, png_size_t length)); /* Decompress data in a chunk that uses compression */ -#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ - defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +#if defined(PNG_READ_COMPRESSED_TEXT_SUPPORTED) PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length)); @@ -648,6 +659,7 @@ PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_const_uint_16p hist, int num_hist)); #endif +/* Chunks that have keywords */ #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr, @@ -738,17 +750,17 @@ PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr, PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr, png_row_infop row_info)); -/* Write out the filtered row. */ -PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr, - png_bytep filtered_row)); /* Finish a row while reading, dealing with interlacing passes, etc. */ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr)); /* Initialize the row buffers, etc. */ PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Optional call to update the users info structure */ PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr, png_infop info_ptr)); +#endif /* These are the functions that do the transformations */ #ifdef PNG_READ_FILLER_SUPPORTED @@ -778,8 +790,8 @@ PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info, #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info, - png_bytep row, png_uint_32 flags)); +PNG_EXTERN void png_do_strip_channel PNGARG((png_row_infop row_info, + png_bytep row, int at_start)); #endif #ifdef PNG_16BIT_SUPPORTED @@ -820,7 +832,12 @@ PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row)); #endif -#ifdef PNG_READ_16_TO_8_SUPPORTED +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +PNG_EXTERN void png_do_scale_16_to_8 PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row)); #endif @@ -851,26 +868,20 @@ PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row, png_const_color_8p bit_depth)); #endif -#ifdef PNG_READ_BACKGROUND_SUPPORTED -# ifdef PNG_READ_GAMMA_SUPPORTED -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, - png_bytep row, png_const_color_16p trans_color, - png_const_color_16p background, png_const_color_16p background_1, - png_const_bytep gamma_table, png_const_bytep gamma_from_1, - png_const_bytep gamma_to_1, png_const_uint_16pp gamma_16, - png_const_uint_16pp gamma_16_from_1, png_const_uint_16pp gamma_16_to_1, - int gamma_shift)); -# else -PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, - png_bytep row, png_const_color_16p trans_color, - png_const_color_16p background)); -# endif +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) +PNG_EXTERN void png_do_compose PNGARG((png_row_infop row_info, + png_bytep row, png_structp png_ptr)); #endif #ifdef PNG_READ_GAMMA_SUPPORTED PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, - png_bytep row, png_const_bytep gamma_table, - png_const_uint_16pp gamma_16_table, int gamma_shift)); + png_bytep row, png_structp png_ptr)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +PNG_EXTERN void png_do_encode_alpha PNGARG((png_row_infop row_info, + png_bytep row, png_structp png_ptr)); #endif #ifdef PNG_READ_EXPAND_SUPPORTED @@ -881,6 +892,11 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info, png_bytep row, png_const_color_16p trans_color)); #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED +PNG_EXTERN void png_do_expand_16 PNGARG((png_row_infop row_info, + png_bytep row)); +#endif + /* The following decodes the appropriate chunks, and does error correction, * then calls the appropriate callback for the chunk if it is valid. */ @@ -985,10 +1001,16 @@ PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr, png_const_bytep chunk_name)); /* Handle the transformations for reading and writing */ +#ifdef PNG_READ_TRANSFORMS_SUPPORTED PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr)); +#endif +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED PNG_EXTERN void png_do_write_transformations PNGARG((png_structp png_ptr)); +#endif +#ifdef PNG_READ_TRANSFORMS_SUPPORTED PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr)); +#endif #ifdef PNG_PROGRESSIVE_READ_SUPPORTED PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr, @@ -1085,6 +1107,76 @@ PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp png_ptr, png_const_charp name),PNG_NORETURN); #endif +/* Puts 'string' into 'buffer' at buffer[pos], taking care never to overwrite + * the end. Always leaves the buffer nul terminated. Never errors out (and + * there is no error code.) + */ +PNG_EXTERN size_t png_safecat(png_charp buffer, size_t bufsize, size_t pos, + png_const_charp string); + +/* Various internal functions to handle formatted warning messages, currently + * only implemented for warnings. + */ +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. This utility only + * does unsigned values. + */ +PNG_EXTERN png_charp png_format_number(png_const_charp start, png_charp end, + int format, png_alloc_size_t number); + +/* Convenience macro that takes an array: */ +#define PNG_FORMAT_NUMBER(buffer,format,number) \ + png_format_number(buffer, buffer + (sizeof buffer), format, number) + +/* Suggested size for a number buffer (enough for 64 bits and a sign!) */ +#define PNG_NUMBER_BUFFER_SIZE 24 + +/* These are the integer formats currently supported, the name is formed from + * the standard printf(3) format string. + */ +#define PNG_NUMBER_FORMAT_u 1 /* chose unsigned API! */ +#define PNG_NUMBER_FORMAT_02u 2 +#define PNG_NUMBER_FORMAT_d 1 /* chose signed API! */ +#define PNG_NUMBER_FORMAT_02d 2 +#define PNG_NUMBER_FORMAT_x 3 +#define PNG_NUMBER_FORMAT_02x 4 +#define PNG_NUMBER_FORMAT_fixed 5 /* choose the signed API */ +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* New defines and members adding in libpng-1.5.4 */ +# define PNG_WARNING_PARAMETER_SIZE 32 +# define PNG_WARNING_PARAMETER_COUNT 8 + +/* An l-value of this type has to be passed to the APIs below to cache the + * values of the parameters to a formatted warning message. + */ +typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][ + PNG_WARNING_PARAMETER_SIZE]; + +PNG_EXTERN void png_warning_parameter(png_warning_parameters p, int number, + png_const_charp string); + /* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters, + * including the trailing '\0'. + */ +PNG_EXTERN void png_warning_parameter_unsigned(png_warning_parameters p, + int number, int format, png_alloc_size_t value); + /* Use png_alloc_size_t because it is an unsigned type as big as any we + * need to output. Use the following for a signed value. + */ +PNG_EXTERN void png_warning_parameter_signed(png_warning_parameters p, + int number, int format, png_int_32 value); + +PNG_EXTERN void png_formatted_warning(png_structp png_ptr, + png_warning_parameters p, png_const_charp message); + /* 'message' follows the X/Open approach of using @1, @2 to insert + * parameters previously supplied using the above functions. Errors in + * specifying the paramters will simple result in garbage substitutions. + */ +#endif + /* ASCII to FP interfaces, currently only implemented if sCAL * support is required. */ @@ -1147,8 +1239,18 @@ PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr, #define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */ #define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */ #define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */ + +/* These three values don't affect the parser. They are set but not used. + */ #define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */ -#define PNG_FP_INVALID 128 /* Available for callers as a distinct value */ +#define PNG_FP_NEGATIVE 128 /* A negative number, including "-0" */ +#define PNG_FP_NONZERO 256 /* A non-zero value */ +#define PNG_FP_STICKY 448 /* The above three flags */ + +/* This is available for the caller to store in 'state' if required. Do not + * call the parser after setting it (the parser sometimes clears it.) + */ +#define PNG_FP_INVALID 512 /* Available for callers as a distinct value */ /* Result codes for the parser (boolean - true meants ok, false means * not ok yet.) @@ -1156,6 +1258,20 @@ PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr, #define PNG_FP_MAYBE 0 /* The number may be valid in the future */ #define PNG_FP_OK 1 /* The number is valid */ +/* Tests on the sticky non-zero and negative flags. To pass these checks + * the state must also indicate that the whole number is valid - this is + * achieved by testing PNG_FP_SAW_DIGIT (see the implementation for why this + * is equivalent to PNG_FP_OK above.) + */ +#define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO) + /* NZ_MASK: the string is valid and a non-zero negative value */ +#define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO) + /* Z MASK: the string is valid and a non-zero value. */ + /* PNG_FP_SAW_DIGIT: the string is valid. */ +#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT) +#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK) +#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK) + /* The actual parser. This can be called repeatedly, it updates * the index into the string and the state variable (which must * be initialzed to 0). It returns a result code, as above. There @@ -1175,7 +1291,10 @@ PNG_EXTERN int png_check_fp_number PNGARG((png_const_charp string, png_size_t size, int *statep, png_size_tp whereami)); /* This is the same but it checks a complete string and returns true - * only if it just contains a floating point number. + * only if it just contains a floating point number. As of 1.5.4 this + * function also returns the state at the end of parsing the number if + * it was valid (otherwise it returns 0.) This can be used for testing + * for negative or zero values using the sticky flag. */ PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string, png_size_t size)); @@ -1190,13 +1309,13 @@ PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string, * holds the result. */ PNG_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a, - png_int_32 times, png_int_32 div)); + png_int_32 multiplied_by, png_int_32 divided_by)); #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED) /* Same deal, but issue a warning on overflow and return 0. */ PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr, - png_fixed_point a, png_int_32 times, png_int_32 div)); + png_fixed_point a, png_int_32 multiplied_by, png_int_32 divided_by)); #endif #ifdef PNG_READ_GAMMA_SUPPORTED @@ -1223,12 +1342,12 @@ PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a, * correct bit value - 0..255 or 0..65535 as required. */ PNG_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr, - unsigned int value, png_fixed_point gamma)); -PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma)); + unsigned int value, png_fixed_point gamma_value)); +PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma_value)); PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value, - png_fixed_point gamma)); + png_fixed_point gamma_value)); PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value, - png_fixed_point gamma)); + png_fixed_point gamma_value)); PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr, int bit_depth)); #endif diff --git a/src/3rdparty/libpng/pngread.c b/src/3rdparty/libpng/pngread.c index 2c8f2cd..be3df47 100644 --- a/src/3rdparty/libpng/pngread.c +++ b/src/3rdparty/libpng/pngread.c @@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.5.1 [$RDATE%] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -47,12 +47,10 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf png_jmpbuf; + jmp_buf tmp_jmpbuf; #endif #endif - int i; - png_debug(1, "in png_create_read_struct"); #ifdef PNG_USER_MEM_SUPPORTED @@ -85,13 +83,13 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, encounter a png_error() will longjmp here. Since the jmpbuf is then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD - if (setjmp(png_jmpbuf)) + if (setjmp(tmp_jmpbuf)) #else if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */ #endif PNG_ABORT(); #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); #endif #endif /* PNG_SETJMP_SUPPORTED */ @@ -101,54 +99,9 @@ png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - if (user_png_ver) - { - i = 0; - - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - } - - else - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#ifdef PNG_CONSOLE_IO_SUPPORTED - char msg[80]; - if (user_png_ver) - { - png_snprintf2(msg, 80, - "Application built with libpng-%.20s" - " but running with %.20s", - user_png_ver, - png_libpng_ver); - png_warning(png_ptr, msg); - } -#else - png_warning(png_ptr, - "Incompatible libpng version in application and library"); -#endif -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - - png_cleanup_needed = 1; - } - } + /* Call the general version checker (shared with read and write code): */ + if (!png_user_version_check(png_ptr, user_png_ver)) + png_cleanup_needed = 1; if (!png_cleanup_needed) { @@ -457,7 +410,11 @@ png_read_update_info(png_structp png_ptr, png_infop info_ptr) "Ignoring extra png_read_update_info() call;" " row buffer not reallocated"); +#ifdef PNG_READ_TRANSFORMS_SUPPORTED png_read_transform_info(png_ptr, info_ptr); +#else + PNG_UNUSED(info_ptr) +#endif } #ifdef PNG_SEQUENTIAL_READ_SUPPORTED @@ -488,9 +445,11 @@ void PNGAPI png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) { PNG_IDAT; +#ifdef PNG_READ_INTERLACING_SUPPORTED PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff}; PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}; +#endif int ret; if (png_ptr == NULL) @@ -702,8 +661,10 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) #endif - if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA)) +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations) png_do_read_transformations(png_ptr); +#endif #ifdef PNG_READ_INTERLACING_SUPPORTED /* Blow up interlaced rows to full size */ @@ -1161,7 +1122,9 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, jmp_buf tmp_jmp; #endif png_error_ptr error_fn; +#ifdef PNG_WARNINGS_SUPPORTED png_error_ptr warning_fn; +#endif png_voidp error_ptr; #ifdef PNG_USER_MEM_SUPPORTED png_free_ptr free_fn; @@ -1247,10 +1210,6 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, #endif #endif -#ifdef PNG_TIME_RFC1123_SUPPORTED - png_free(png_ptr, png_ptr->time_buffer); -#endif - inflateEnd(&png_ptr->zstream); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED @@ -1267,11 +1226,13 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, * being used again. */ #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(tmp_jmp, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); #endif error_fn = png_ptr->error_fn; +#ifdef PNG_WARNINGS_SUPPORTED warning_fn = png_ptr->warning_fn; +#endif error_ptr = png_ptr->error_ptr; #ifdef PNG_USER_MEM_SUPPORTED free_fn = png_ptr->free_fn; @@ -1280,14 +1241,16 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_memset(png_ptr, 0, png_sizeof(png_struct)); png_ptr->error_fn = error_fn; +#ifdef PNG_WARNINGS_SUPPORTED png_ptr->warning_fn = warning_fn; +#endif png_ptr->error_ptr = error_ptr; #ifdef PNG_USER_MEM_SUPPORTED png_ptr->free_fn = free_fn; #endif #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); + png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf)); #endif } @@ -1311,7 +1274,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, { int row; - if (png_ptr == NULL) + if (png_ptr == NULL || info_ptr == NULL) return; /* png_read_info() gives us all of the information from the @@ -1323,8 +1286,22 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, /* -------------- image transformations start here ------------------- */ -#ifdef PNG_READ_16_TO_8_SUPPORTED - /* Tell libpng to strip 16 bit/color files down to 8 bits per color. +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + /* Tell libpng to strip 16-bit/color files down to 8 bits per color. + */ + if (transforms & PNG_TRANSFORM_SCALE_16) + { + /* Added at libpng-1.5.4. "strip_16" produces the same result that it + * did in earlier versions, while "scale_16" is now more accurate. + */ + png_set_scale_16(png_ptr); + } +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* If both SCALE and STRIP are required pngrtran will effectively cancel the + * latter by doing SCALE first. This is ok and allows apps not to check for + * which is supported to get the right answer. */ if (transforms & PNG_TRANSFORM_STRIP_16) png_set_strip_16(png_ptr); @@ -1405,7 +1382,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_READ_SWAP_SUPPORTED - /* Swap bytes of 16 bit files to least significant byte first */ + /* Swap bytes of 16-bit files to least significant byte first */ if (transforms & PNG_TRANSFORM_SWAP_ENDIAN) png_set_swap(png_ptr); #endif @@ -1424,8 +1401,19 @@ png_read_png(png_structp png_ptr, png_infop info_ptr, png_set_gray_to_rgb(png_ptr); #endif +/* Added at libpng-1.5.4 */ +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (transforms & PNG_TRANSFORM_EXPAND_16) + png_set_expand_16(png_ptr); +#endif + /* We don't handle adding filler bytes */ + /* We use png_read_image and rely on that for interlace handling, but we also + * call png_read_update_info therefore must turn on interlace handling now: + */ + (void)png_set_interlace_handling(png_ptr); + /* Optional call to gamma correct and add the background to the palette * and update info structure. REQUIRED if you are expecting libpng to * update the palette for you (i.e., you selected such a transform above). diff --git a/src/3rdparty/libpng/pngrtran.c b/src/3rdparty/libpng/pngrtran.c index e6e0c46..4e0401a 100644 --- a/src/3rdparty/libpng/pngrtran.c +++ b/src/3rdparty/libpng/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -106,12 +106,18 @@ png_set_background_fixed(png_structp png_ptr, return; } - png_ptr->transformations |= PNG_BACKGROUND; + png_ptr->transformations |= PNG_COMPOSE | PNG_STRIP_ALPHA; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + png_memcpy(&(png_ptr->background), background_color, png_sizeof(png_color_16)); png_ptr->background_gamma = background_gamma; png_ptr->background_gamma_type = (png_byte)(background_gamma_code); - png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0); + if (need_expand) + png_ptr->transformations |= PNG_BACKGROUND_EXPAND; + else + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; } # ifdef PNG_FLOATING_POINT_SUPPORTED @@ -126,8 +132,25 @@ png_set_background(png_structp png_ptr, # endif /* FLOATING_POINT */ #endif /* READ_BACKGROUND */ -#ifdef PNG_READ_16_TO_8_SUPPORTED -/* Strip 16 bit depth files to 8 bit depth */ +/* Scale 16-bit depth files to 8-bit depth. If both of these are set then the + * one that pngrtran does first (scale) happens. This is necessary to allow the + * TRANSFORM and API behavior to be somewhat consistent, and it's simpler. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +void PNGAPI +png_set_scale_16(png_structp png_ptr) +{ + png_debug(1, "in png_set_scale_16"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_SCALE_16_TO_8; +} +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +/* Chop 16-bit depth files to 8-bit depth */ void PNGAPI png_set_strip_16(png_structp png_ptr) { @@ -149,12 +172,194 @@ png_set_strip_alpha(png_structp png_ptr) if (png_ptr == NULL) return; - png_ptr->flags |= PNG_FLAG_STRIP_ALPHA; + png_ptr->transformations |= PNG_STRIP_ALPHA; } #endif +#if defined(PNG_READ_ALPHA_MODE_SUPPORTED) || defined(PNG_READ_GAMMA_SUPPORTED) +static png_fixed_point +translate_gamma_flags(png_structp png_ptr, png_fixed_point output_gamma, + int is_screen) +{ + /* Check for flag values. The main reason for having the old Mac value as a + * flag is that it is pretty near impossible to work out what the correct + * value is from Apple documentation - a working Mac system is needed to + * discover the value! + */ + if (output_gamma == PNG_DEFAULT_sRGB || + output_gamma == PNG_FP_1 / PNG_DEFAULT_sRGB) + { + /* If there is no sRGB support this just sets the gamma to the standard + * sRGB value. (This is a side effect of using this function!) + */ +# ifdef PNG_READ_sRGB_SUPPORTED + png_ptr->flags |= PNG_FLAG_ASSUME_sRGB; +# endif + if (is_screen) + output_gamma = PNG_GAMMA_sRGB; + else + output_gamma = PNG_GAMMA_sRGB_INVERSE; + } + + else if (output_gamma == PNG_GAMMA_MAC_18 || + output_gamma == PNG_FP_1 / PNG_GAMMA_MAC_18) + { + if (is_screen) + output_gamma = PNG_GAMMA_MAC_OLD; + else + output_gamma = PNG_GAMMA_MAC_INVERSE; + } + + return output_gamma; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +static png_fixed_point +convert_gamma_value(png_structp png_ptr, double output_gamma) +{ + /* The following silently ignores cases where fixed point (times 100,000) + * gamma values are passed to the floating point API. This is safe and it + * means the fixed point constants work just fine with the floating point + * API. The alternative would just lead to undetected errors and spurious + * bug reports. Negative values fail inside the _fixed API unless they + * correspond to the flag values. + */ + if (output_gamma > 0 && output_gamma < 128) + output_gamma *= PNG_FP_1; + + /* This preserves -1 and -2 exactly: */ + output_gamma = floor(output_gamma + .5); + + if (output_gamma > PNG_FP_MAX || output_gamma < PNG_FP_MIN) + png_fixed_error(png_ptr, "gamma value"); + + return (png_fixed_point)output_gamma; +} +# endif +#endif /* READ_ALPHA_MODE || READ_GAMMA */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +void PNGFAPI +png_set_alpha_mode_fixed(png_structp png_ptr, int mode, + png_fixed_point output_gamma) +{ + int compose = 0; + png_fixed_point file_gamma; + + png_debug(1, "in png_set_alpha_mode"); + + if (png_ptr == NULL) + return; + + output_gamma = translate_gamma_flags(png_ptr, output_gamma, 1/*screen*/); + + /* Validate the value to ensure it is in a reasonable range. The value + * is expected to be 1 or greater, but this range test allows for some + * viewing correction values. The intent is to weed out users of this API + * who use the inverse of the gamma value accidentally! Since some of these + * values are reasonable this may have to be changed. + */ + if (output_gamma < 70000 || output_gamma > 300000) + png_error(png_ptr, "output gamma out of expected range"); + + /* The default file gamma is the inverse of the output gamma; the output + * gamma may be changed below so get the file value first: + */ + file_gamma = png_reciprocal(output_gamma); + + /* There are really 8 possibilities here, composed of any combination + * of: + * + * premultiply the color channels + * do not encode non-opaque pixels + * encode the alpha as well as the color channels + * + * The differences disappear if the input/output ('screen') gamma is 1.0, + * because then the encoding is a no-op and there is only the choice of + * premultiplying the color channels or not. + * + * png_set_alpha_mode and png_set_background interact because both use + * png_compose to do the work. Calling both is only useful when + * png_set_alpha_mode is used to set the default mode - PNG_ALPHA_PNG - along + * with a default gamma value. Otherwise PNG_COMPOSE must not be set. + */ + switch (mode) + { + case PNG_ALPHA_PNG: /* default: png standard */ + /* No compose, but it may be set by png_set_background! */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + case PNG_ALPHA_ASSOCIATED: /* color channels premultiplied */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + /* The output is linear: */ + output_gamma = PNG_FP_1; + break; + + case PNG_ALPHA_OPTIMIZED: /* associated, non-opaque pixels linear */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags |= PNG_FLAG_OPTIMIZE_ALPHA; + /* output_gamma records the encoding of opaque pixels! */ + break; + + case PNG_ALPHA_BROKEN: /* associated, non-linear, alpha encoded */ + compose = 1; + png_ptr->transformations |= PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + default: + png_error(png_ptr, "invalid alpha mode"); + } + + /* Only set the default gamma if the file gamma has not been set (this has + * the side effect that the gamma in a second call to png_set_alpha_mode will + * be ignored.) + */ + if (png_ptr->gamma == 0) + png_ptr->gamma = file_gamma; + + /* But always set the output gamma: */ + png_ptr->screen_gamma = output_gamma; + + /* Finally, if pre-multiplying, set the background fields to achieve the + * desired result. + */ + if (compose) + { + /* And obtain alpha pre-multiplication by composing on black: */ + png_memset(&png_ptr->background, 0, sizeof png_ptr->background); + png_ptr->background_gamma = png_ptr->gamma; /* just in case */ + png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_FILE; + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; + + if (png_ptr->transformations & PNG_COMPOSE) + png_error(png_ptr, + "conflicting calls to set alpha mode and background"); + + png_ptr->transformations |= PNG_COMPOSE; + } + + /* New API, make sure apps call the correct initializers: */ + png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_alpha_mode(png_structp png_ptr, int mode, double output_gamma) +{ + png_set_alpha_mode_fixed(png_ptr, mode, convert_gamma_value(png_ptr, + output_gamma)); +} +# endif +#endif + #ifdef PNG_READ_QUANTIZE_SUPPORTED -/* Dither file to 8 bit. Supply a palette, the current number +/* Dither file to 8-bit. Supply a palette, the current number * of elements in the palette, the maximum number of elements * allowed, and a histogram if possible. If the current number * of colors is greater then the maximum number, the palette will be @@ -560,30 +765,6 @@ png_set_quantize(png_structp png_ptr, png_colorp palette, #endif /* PNG_READ_QUANTIZE_SUPPORTED */ #ifdef PNG_READ_GAMMA_SUPPORTED -/* Transform the image from the file_gamma to the screen_gamma. We - * only do transformations on images where the file_gamma and screen_gamma - * are not close reciprocals, otherwise it slows things down slightly, and - * also needlessly introduces small errors. - * - * We will turn off gamma transformation later if no semitransparent entries - * are present in the tRNS array for palette images. We can't do it here - * because we don't necessarily have the tRNS chunk yet. - */ -static int /* PRIVATE */ -png_gamma_threshold(png_fixed_point scrn_gamma, png_fixed_point file_gamma) -{ - /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma - * correction as a difference of the overall transform from 1.0 - * - * We want to compare the threshold with s*f - 1, if we get - * overflow here it is because of wacky gamma values so we - * turn on processing anyway. - */ - png_fixed_point gtest; - return !png_muldiv(>est, scrn_gamma, file_gamma, PNG_FP_1) || - png_gamma_significant(gtest); -} - void PNGFAPI png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma, png_fixed_point file_gamma) @@ -593,10 +774,32 @@ png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma, if (png_ptr == NULL) return; - if ((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) || - (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) || - png_gamma_threshold(scrn_gamma, file_gamma)) - png_ptr->transformations |= PNG_GAMMA; + /* New in libpng-1.5.4 - reserve particular negative values as flags. */ + scrn_gamma = translate_gamma_flags(png_ptr, scrn_gamma, 1/*screen*/); + file_gamma = translate_gamma_flags(png_ptr, file_gamma, 0/*file*/); + +#if PNG_LIBPNG_VER >= 10600 + /* Checking the gamma values for being >0 was added in 1.5.4 along with the + * premultiplied alpha support; this actually hides an undocumented feature + * of the previous implementation which allowed gamma processing to be + * disabled in background handling. There is no evidence (so far) that this + * was being used; however, png_set_background itself accepted and must still + * accept '0' for the gamma value it takes, because it isn't always used. + * + * Since this is an API change (albeit a very minor one that removes an + * undocumented API feature) it will not be made until libpng-1.6.0. + */ + if (file_gamma <= 0) + png_error(png_ptr, "invalid file gamma in png_set_gamma"); + + if (scrn_gamma <= 0) + png_error(png_ptr, "invalid screen gamma in png_set_gamma"); +#endif + + /* Set the gamma values unconditionally - this overrides the value in the PNG + * file if a gAMA chunk was present. png_set_alpha_mode provides a + * different, easier, way to default the file gamma. + */ png_ptr->gamma = file_gamma; png_ptr->screen_gamma = scrn_gamma; } @@ -605,9 +808,8 @@ png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma, void PNGAPI png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma) { - png_set_gamma_fixed(png_ptr, - png_fixed(png_ptr, scrn_gamma, "png_set_gamma screen gamma"), - png_fixed(png_ptr, file_gamma, "png_set_gamma file gamma")); + png_set_gamma_fixed(png_ptr, convert_gamma_value(png_ptr, scrn_gamma), + convert_gamma_value(png_ptr, file_gamma)); } # endif /* FLOATING_POINT_SUPPORTED */ #endif /* READ_GAMMA */ @@ -686,6 +888,26 @@ png_set_tRNS_to_alpha(png_structp png_ptr) } #endif /* defined(PNG_READ_EXPAND_SUPPORTED) */ +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, expand the tRNS chunk too (because otherwise + * it may not work correctly.) + */ +void PNGAPI +png_set_expand_16(png_structp png_ptr) +{ + png_debug(1, "in png_set_expand_16"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= (PNG_EXPAND_16 | PNG_EXPAND | PNG_EXPAND_tRNS); + png_ptr->flags &= ~PNG_FLAG_ROW_INIT; + + /* New API, make sure apps call the correct initializers: */ + png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; +} +#endif + #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED void PNGAPI png_set_gray_to_rgb(png_structp png_ptr) @@ -742,30 +964,38 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action, } #endif { - png_uint_16 red_int, green_int; - if (red < 0 || green < 0) + if (red >= 0 && green >= 0 && red + green <= PNG_FP_1) { - red_int = 6968; /* .212671 * 32768 + .5 */ - green_int = 23434; /* .715160 * 32768 + .5 */ - } + png_uint_16 red_int, green_int; - else if (red + green < 100000L) - { red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L); green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L); + + png_ptr->rgb_to_gray_red_coeff = red_int; + png_ptr->rgb_to_gray_green_coeff = green_int; + png_ptr->rgb_to_gray_blue_coeff = + (png_uint_16)(32768 - red_int - green_int); } else { - png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients"); - red_int = 6968; - green_int = 23434; - } + if (red >= 0 && green >= 0) + png_warning(png_ptr, + "ignoring out of range rgb_to_gray coefficients"); - png_ptr->rgb_to_gray_red_coeff = red_int; - png_ptr->rgb_to_gray_green_coeff = green_int; - png_ptr->rgb_to_gray_blue_coeff = - (png_uint_16)(32768 - red_int - green_int); + /* Use the defaults, from the cHRM chunk if set, else the built in Rec + * 709 values (which correspond to sRGB, so we don't have to worry + * about the sRGB chunk!) + */ + if (png_ptr->rgb_to_gray_red_coeff == 0 && + png_ptr->rgb_to_gray_green_coeff == 0 && + png_ptr->rgb_to_gray_blue_coeff == 0) + { + png_ptr->rgb_to_gray_red_coeff = 6968; /* .212671 * 32768 + .5 */ + png_ptr->rgb_to_gray_green_coeff = 23434; /* .715160 * 32768 + .5 */ + png_ptr->rgb_to_gray_blue_coeff = 2366; + } + } } } @@ -807,55 +1037,160 @@ png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr } #endif +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +#ifdef PNG_READ_GAMMA_SUPPORTED +/* In the case of gamma transformations only do transformations on images where + * the [file] gamma and screen_gamma are not close reciprocals, otherwise it + * slows things down slightly, and also needlessly introduces small errors. + */ +static int /* PRIVATE */ +png_gamma_threshold(png_fixed_point screen_gamma, png_fixed_point file_gamma) +{ + /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma + * correction as a difference of the overall transform from 1.0 + * + * We want to compare the threshold with s*f - 1, if we get + * overflow here it is because of wacky gamma values so we + * turn on processing anyway. + */ + png_fixed_point gtest; + return !png_muldiv(>est, screen_gamma, file_gamma, PNG_FP_1) || + png_gamma_significant(gtest); +} +#endif + /* Initialize everything needed for the read. This includes modifying * the palette. */ -void /* PRIVATE */ -png_init_read_transformations(png_structp png_ptr) + +/*For the moment 'png_init_palette_transformations' and + * 'png_init_rgb_transformations' only do some flag canceling optimizations. + * The intent is that these two routines should have palette or rgb operations + * extracted from 'png_init_read_transformations'. + */ +static void /* PRIVATE */ +png_init_palette_transformations(png_structp png_ptr) { - png_debug(1, "in png_init_read_transformations"); + /* Called to handle the (input) palette case. In png_do_read_transformations + * the first step is to expand the palette if requested, so this code must + * take care to only make changes that are invariant with respect to the + * palette expansion, or only do them if there is no expansion. + * + * STRIP_ALPHA has already been handled in the caller (by setting num_trans + * to 0.) + */ + int input_has_alpha = 0; + int input_has_transparency = 0; - { -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ - defined(PNG_READ_SHIFT_SUPPORTED) || \ - defined(PNG_READ_GAMMA_SUPPORTED) - int color_type = png_ptr->color_type; -#endif + if (png_ptr->num_trans > 0) + { + int i; + + /* Ignore if all the entries are opaque (unlikely!) */ + for (i=0; i<png_ptr->num_trans; ++i) + if (png_ptr->trans_alpha[i] == 255) + continue; + else if (png_ptr->trans_alpha[i] == 0) + input_has_transparency = 1; + else + input_has_alpha = 1; + } + + /* If no alpha we can optimize. */ + if (!input_has_alpha) + { + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + if (!input_has_transparency) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); + } #if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - /* Detect gray background and attempt to enable optimization - * for gray --> RGB case - * - * Note: if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or - * RGB_ALPHA (in which case need_expand is superfluous anyway), the - * background color might actually be gray yet not be flagged as such. - * This is not a problem for the current code, which uses - * PNG_BACKGROUND_IS_GRAY only to decide when to do the - * png_do_gray_to_rgb() transformation. + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. */ if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - !(color_type & PNG_COLOR_MASK_COLOR)) + (png_ptr->transformations & PNG_EXPAND)) { - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; - } + { + png_ptr->background.red = + png_ptr->palette[png_ptr->background.index].red; + png_ptr->background.green = + png_ptr->palette[png_ptr->background.index].green; + png_ptr->background.blue = + png_ptr->palette[png_ptr->background.index].blue; - else if ((png_ptr->transformations & PNG_BACKGROUND) && - !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - (png_ptr->transformations & PNG_GRAY_TO_RGB) && - png_ptr->background.red == png_ptr->background.green && - png_ptr->background.red == png_ptr->background.blue) +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + if (png_ptr->transformations & PNG_INVERT_ALPHA) + { + if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) + { + /* Invert the alpha channel (in tRNS) unless the pixels are + * going to be expanded, in which case leave it for later + */ + int i, istop = png_ptr->num_trans; + + for (i=0; i<istop; i++) + png_ptr->trans_alpha[i] = (png_byte)(255 - + png_ptr->trans_alpha[i]); + } + } +#endif /* PNG_READ_INVERT_ALPHA_SUPPORTED */ + } + } /* background expand and (therefore) no alpha association. */ +#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ +} + +static void /* PRIVATE */ +png_init_rgb_transformations(png_structp png_ptr) +{ + /* Added to libpng-1.5.4: check the color type to determine whether there + * is any alpha or transparency in the image and simply cancel the + * background and alpha mode stuff if there isn't. + */ + int input_has_alpha = (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0; + int input_has_transparency = png_ptr->num_trans > 0; + + /* If no alpha we can optimize. */ + if (!input_has_alpha) { - png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; - png_ptr->background.gray = png_ptr->background.red; + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ +# ifdef PNG_READ_ALPHA_MODE_SUPPORTED + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; +# endif + + if (!input_has_transparency) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); } -#endif +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ + + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. + */ if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) && - (png_ptr->transformations & PNG_EXPAND)) + (png_ptr->transformations & PNG_EXPAND) && + !(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) + /* i.e., GRAY or GRAY_ALPHA */ { - if (!(color_type & PNG_COLOR_MASK_COLOR)) /* i.e., GRAY or GRAY_ALPHA */ { /* Expand background and tRNS chunks */ switch (png_ptr->bit_depth) @@ -906,68 +1241,286 @@ png_init_read_transformations(png_structp png_ptr) break; } } - else if (color_type == PNG_COLOR_TYPE_PALETTE) - { - png_ptr->background.red = - png_ptr->palette[png_ptr->background.index].red; - png_ptr->background.green = - png_ptr->palette[png_ptr->background.index].green; - png_ptr->background.blue = - png_ptr->palette[png_ptr->background.index].blue; + } /* background expand and (therefore) no alpha association. */ +#endif /* PNG_READ_EXPAND_SUPPORTED && PNG_READ_BACKGROUND_SUPPORTED */ +} -#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED - if (png_ptr->transformations & PNG_INVERT_ALPHA) - { -#ifdef PNG_READ_EXPAND_SUPPORTED - if (!(png_ptr->transformations & PNG_EXPAND_tRNS)) -#endif - { - /* Invert the alpha channel (in tRNS) unless the pixels are - * going to be expanded, in which case leave it for later - */ - int i, istop; - istop=(int)png_ptr->num_trans; - for (i=0; i<istop; i++) - png_ptr->trans_alpha[i] = (png_byte)(255 - - png_ptr->trans_alpha[i]); - } - } -#endif +void /* PRIVATE */ +png_init_read_transformations(png_structp png_ptr) +{ + png_debug(1, "in png_init_read_transformations"); + /* This internal function is called from png_read_start_row in pngrutil.c + * and it is called before the 'rowbytes' calculation is done, so the code + * in here can change or update the transformations flags. + * + * First do updates that do not depend on the details of the PNG image data + * being processed. + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* Prior to 1.5.4 these tests were performed from png_set_gamma, 1.5.4 adds + * png_set_alpha_mode and this is another source for a default file gamma so + * the test needs to be performed later - here. In addition prior to 1.5.4 + * the tests were repeated for the PALETTE color type here - this is no + * longer necessary (and doesn't seem to have been necessary before.) + */ + { + /* The following temporary indicates if overall gamma correction is + * required. + */ + int gamma_correction = 0; + + if (png_ptr->gamma != 0) /* has been set */ + { + if (png_ptr->screen_gamma != 0) /* screen set too */ + gamma_correction = png_gamma_threshold(png_ptr->gamma, + png_ptr->screen_gamma); + + else + /* Assume the output matches the input; a long time default behavior + * of libpng, although the standard has nothing to say about this. + */ + png_ptr->screen_gamma = png_reciprocal(png_ptr->gamma); } + + else if (png_ptr->screen_gamma != 0) + /* The converse - assume the file matches the screen, note that this + * perhaps undesireable default can (from 1.5.4) be changed by calling + * png_set_alpha_mode (even if the alpha handling mode isn't required + * or isn't changed from the default.) + */ + png_ptr->gamma = png_reciprocal(png_ptr->screen_gamma); + + else /* neither are set */ + /* Just in case the following prevents any processing - file and screen + * are both assumed to be linear and there is no way to introduce a + * third gamma value other than png_set_background with 'UNIQUE', and, + * prior to 1.5.4 + */ + png_ptr->screen_gamma = png_ptr->gamma = PNG_FP_1; + + /* Now turn the gamma transformation on or off as appropriate. Notice + * that PNG_GAMMA just refers to the file->screen correction. Alpha + * composition may independently cause gamma correction because it needs + * linear data (e.g. if the file has a gAMA chunk but the screen gamma + * hasn't been specified.) In any case this flag may get turned off in + * the code immediately below if the transform can be handled outside the + * row loop. + */ + if (gamma_correction) + png_ptr->transformations |= PNG_GAMMA; + + else + png_ptr->transformations &= ~PNG_GAMMA; } #endif -#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED) - png_ptr->background_1 = png_ptr->background; + /* Certain transformations have the effect of preventing other + * transformations that happen afterward in png_do_read_transformations, + * resolve the interdependencies here. From the code of + * png_do_read_transformations the order is: + * + * 1) PNG_EXPAND (including PNG_EXPAND_tRNS) + * 2) PNG_STRIP_ALPHA (if no compose) + * 3) PNG_RGB_TO_GRAY + * 4) PNG_GRAY_TO_RGB iff !PNG_BACKGROUND_IS_GRAY + * 5) PNG_COMPOSE + * 6) PNG_GAMMA + * 7) PNG_STRIP_ALPHA (if compose) + * 8) PNG_ENCODE_ALPHA + * 9) PNG_SCALE_16_TO_8 + * 10) PNG_16_TO_8 + * 11) PNG_QUANTIZE (converts to palette) + * 12) PNG_EXPAND_16 + * 13) PNG_GRAY_TO_RGB iff PNG_BACKGROUND_IS_GRAY + * 14) PNG_INVERT_MONO + * 15) PNG_SHIFT + * 16) PNG_PACK + * 17) PNG_BGR + * 18) PNG_PACKSWAP + * 19) PNG_FILLER (includes PNG_ADD_ALPHA) + * 20) PNG_INVERT_ALPHA + * 21) PNG_SWAP_ALPHA + * 22) PNG_SWAP_BYTES + * 23) PNG_USER_TRANSFORM [must be last] + */ +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + !(png_ptr->transformations & PNG_COMPOSE)) + { + /* Stripping the alpha channel happens immediately after the 'expand' + * transformations, before all other transformation, so it cancels out + * the alpha handling. It has the side effect negating the effect of + * PNG_EXPAND_tRNS too: + */ + png_ptr->transformations &= ~(PNG_BACKGROUND_EXPAND | PNG_ENCODE_ALPHA | + PNG_EXPAND_tRNS); + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + /* Kill the tRNS chunk itself too. Prior to 1.5.4 this did not happen + * so transparency information would remain just so long as it wasn't + * expanded. This produces unexpected API changes if the set of things + * that do PNG_EXPAND_tRNS changes (perfectly possible given the + * documentation - which says ask for what you want, accept what you + * get.) This makes the behavior consistent from 1.5.4: + */ + png_ptr->num_trans = 0; + } +#endif /* STRIP_ALPHA supported, no COMPOSE */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + /* If the screen gamma is about 1.0 then the OPTIMIZE_ALPHA and ENCODE_ALPHA + * settings will have no effect. + */ + if (!png_gamma_significant(png_ptr->screen_gamma)) + { + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + } #endif -#ifdef PNG_READ_GAMMA_SUPPORTED - if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0) - && png_gamma_threshold(png_ptr->screen_gamma, png_ptr->gamma)) +#if defined(PNG_READ_EXPAND_SUPPORTED) && \ + defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_READ_GRAY_TO_RGB_SUPPORTED) + /* Detect gray background and attempt to enable optimization for + * gray --> RGB case. + * + * Note: if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or + * RGB_ALPHA (in which case need_expand is superfluous anyway), the + * background color might actually be gray yet not be flagged as such. + * This is not a problem for the current code, which uses + * PNG_BACKGROUND_IS_GRAY only to decide when to do the + * png_do_gray_to_rgb() transformation. + * + * TODO: this code needs to be revised to avoid the complexity and + * interdependencies. The color type of the background should be recorded in + * png_set_background, along with the bit depth, then the code has a record + * of exactly what color space the background is currently in. + */ + if (png_ptr->transformations & PNG_BACKGROUND_EXPAND) + { + /* PNG_BACKGROUND_EXPAND: the background is in the file color space, so if + * the file was greyscale the background value is gray. + */ + if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + } + + else if (png_ptr->transformations & PNG_COMPOSE) { - int i, k; - k=0; - for (i=0; i<png_ptr->num_trans; i++) + /* PNG_COMPOSE: png_set_background was called with need_expand false, + * so the color is in the color space of the output or png_set_alpha_mode + * was called and the color is black. Ignore RGB_TO_GRAY because that + * happens before GRAY_TO_RGB. + */ + if (png_ptr->transformations & PNG_GRAY_TO_RGB) { - if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff) - k=1; /* Partial transparency is present */ + if (png_ptr->background.red == png_ptr->background.green && + png_ptr->background.red == png_ptr->background.blue) + { + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + png_ptr->background.gray = png_ptr->background.red; + } } - if (k == 0) - png_ptr->transformations &= ~PNG_GAMMA; } +#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED (etc) */ + + /* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations + * can be performed directly on the palette, and some (such as rgb to gray) + * can be optimized inside the palette. This is particularly true of the + * composite (background and alpha) stuff, which can be pretty much all done + * in the palette even if the result is expanded to RGB or gray afterward. + * + * NOTE: this is Not Yet Implemented, the code behaves as in 1.5.1 and + * earlier and the palette stuff is actually handled on the first row. This + * leads to the reported bug that the palette returned by png_get_PLTE is not + * updated. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_init_palette_transformations(png_ptr); + + else + png_init_rgb_transformations(png_ptr); + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_READ_EXPAND_16_SUPPORTED) + if ((png_ptr->transformations & PNG_EXPAND_16) && + (png_ptr->transformations & PNG_COMPOSE) && + !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) && + png_ptr->bit_depth != 16) + { + /* TODO: fix this. Because the expand_16 operation is after the compose + * handling the background color must be 8, not 16, bits deep, but the + * application will supply a 16-bit value so reduce it here. + * + * The PNG_BACKGROUND_EXPAND code above does not expand to 16 bits at + * present, so that case is ok (until do_expand_16 is moved.) + * + * NOTE: this discards the low 16 bits of the user supplied background + * color, but until expand_16 works properly there is no choice! + */ +# define CHOP(x) (x)=((png_uint_16)(((png_uint_32)(x)*255+32895) >> 16)) + CHOP(png_ptr->background.red); + CHOP(png_ptr->background.green); + CHOP(png_ptr->background.blue); + CHOP(png_ptr->background.gray); +# undef CHOP + } +#endif /* PNG_READ_BACKGROUND_SUPPORTED && PNG_READ_EXPAND_16_SUPPORTED */ + + /* NOTE: below 'PNG_READ_ALPHA_MODE_SUPPORTED' is presumed to also enable the + * background support (see the comments in scripts/pnglibconf.dfa), this + * allows pre-multiplication of the alpha channel to be implemented as + * compositing on black. This is probably sub-optimal and has been done in + * 1.5.4 betas simply to enable external critique and testing (i.e. to + * implement the new API quickly, without lots of internal changes.) + */ - if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) && - png_ptr->gamma != 0) +#ifdef PNG_READ_GAMMA_SUPPORTED +# ifdef PNG_READ_BACKGROUND_SUPPORTED + /* Includes ALPHA_MODE */ + png_ptr->background_1 = png_ptr->background; +# endif + + /* This needs to change - in the palette image case a whole set of tables are + * built when it would be quicker to just calculate the correct value for + * each palette entry directly. Also, the test is too tricky - why check + * PNG_RGB_TO_GRAY if PNG_GAMMA is not set? The answer seems to be that + * PNG_GAMMA is cancelled even if the gamma is known? The test excludes the + * PNG_COMPOSE case, so apparently if there is no *overall* gamma correction + * the gamma tables will not be built even if composition is required on a + * gamma encoded value. + * + * In 1.5.4 this is addressed below by an additional check on the individual + * file gamma - if it is not 1.0 both RGB_TO_GRAY and COMPOSE need the + * tables. + */ + if ((png_ptr->transformations & PNG_GAMMA) + || ((png_ptr->transformations & PNG_RGB_TO_GRAY) + && (png_gamma_significant(png_ptr->gamma) || + png_gamma_significant(png_ptr->screen_gamma))) + || ((png_ptr->transformations & PNG_COMPOSE) + && (png_gamma_significant(png_ptr->gamma) + || png_gamma_significant(png_ptr->screen_gamma) +# ifdef PNG_READ_BACKGROUND_SUPPORTED + || (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_UNIQUE + && png_gamma_significant(png_ptr->background_gamma)) +# endif + )) || ((png_ptr->transformations & PNG_ENCODE_ALPHA) + && png_gamma_significant(png_ptr->screen_gamma)) + ) { png_build_gamma_table(png_ptr, png_ptr->bit_depth); #ifdef PNG_READ_BACKGROUND_SUPPORTED - if (png_ptr->transformations & PNG_BACKGROUND) + if (png_ptr->transformations & PNG_COMPOSE) { - if (color_type == PNG_COLOR_TYPE_PALETTE) + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { - /* Could skip if no transparency */ + /* We don't get to here unless there is a tRNS chunk with non-opaque + * entries - see the checking code at the start of this function. + */ png_color back, back_1; png_colorp palette = png_ptr->palette; int num_palette = png_ptr->num_palette; @@ -1013,26 +1566,39 @@ png_init_read_transformations(png_structp png_ptr) if (png_gamma_significant(gs)) { + back.red = png_gamma_8bit_correct(png_ptr->background.red, + gs); + back.green = png_gamma_8bit_correct(png_ptr->background.green, + gs); + back.blue = png_gamma_8bit_correct(png_ptr->background.blue, + gs); + } + + else + { back.red = (png_byte)png_ptr->background.red; back.green = (png_byte)png_ptr->background.green; back.blue = (png_byte)png_ptr->background.blue; } + if (png_gamma_significant(g)) + { + back_1.red = png_gamma_8bit_correct(png_ptr->background.red, + g); + back_1.green = png_gamma_8bit_correct( + png_ptr->background.green, g); + back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue, + g); + } + else { - back.red = png_gamma_8bit_correct(png_ptr->background.red, - gs); - back.green = png_gamma_8bit_correct(png_ptr->background.green, - gs); - back.blue = png_gamma_8bit_correct(png_ptr->background.blue, - gs); + back_1.red = (png_byte)png_ptr->background.red; + back_1.green = (png_byte)png_ptr->background.green; + back_1.blue = (png_byte)png_ptr->background.blue; } - back_1.red = png_gamma_8bit_correct(png_ptr->background.red, g); - back_1.green = png_gamma_8bit_correct(png_ptr->background.green, - g); - back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue, - g); } + for (i = 0; i < num_palette; i++) { if (i < (int)png_ptr->num_trans && @@ -1066,19 +1632,18 @@ png_init_read_transformations(png_structp png_ptr) palette[i].blue = png_ptr->gamma_table[palette[i].blue]; } } - /* Prevent the transformations being done again, and make sure - * that the now spurious alpha channel is stripped - the code - * has just reduced background composition and gamma correction - * to a simple alpha channel strip. + + /* Prevent the transformations being done again. + * + * NOTE: this is highly dubious; it zaps the transformations in + * place. This seems inconsistent with the general treatment of the + * transformations elsewhere. */ - png_ptr->transformations &= ~PNG_BACKGROUND; - png_ptr->transformations &= ~PNG_GAMMA; - png_ptr->flags |= PNG_FLAG_STRIP_ALPHA; - } + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_GAMMA); + } /* color_type == PNG_COLOR_TYPE_PALETTE */ /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ - else - /* color_type != PNG_COLOR_TYPE_PALETTE */ + else /* color_type != PNG_COLOR_TYPE_PALETTE */ { png_fixed_point g = PNG_FP_1; png_fixed_point gs = PNG_FP_1; @@ -1144,17 +1709,21 @@ png_init_read_transformations(png_structp png_ptr) png_ptr->background.red = png_ptr->background.green = png_ptr->background.blue = png_ptr->background.gray; } - } - } + } /* color_type != PNG_COLOR_TYPE_PALETTE */ + }/* png_ptr->transformations & PNG_BACKGROUND */ + else /* Transformation does not include PNG_BACKGROUND */ #endif /* PNG_READ_BACKGROUND_SUPPORTED */ - if (color_type == PNG_COLOR_TYPE_PALETTE) + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { png_colorp palette = png_ptr->palette; int num_palette = png_ptr->num_palette; int i; + /*NOTE: there are other transformations that should probably be in here + * too. + */ for (i = 0; i < num_palette; i++) { palette[i].red = png_ptr->gamma_table[palette[i].red]; @@ -1164,16 +1733,17 @@ png_init_read_transformations(png_structp png_ptr) /* Done the gamma correction. */ png_ptr->transformations &= ~PNG_GAMMA; - } + } /* color_type == PALETTE && !PNG_BACKGROUND transformation */ } #ifdef PNG_READ_BACKGROUND_SUPPORTED else #endif #endif /* PNG_READ_GAMMA_SUPPORTED */ + #ifdef PNG_READ_BACKGROUND_SUPPORTED - /* No GAMMA transformation */ - if ((png_ptr->transformations & PNG_BACKGROUND) && - (color_type == PNG_COLOR_TYPE_PALETTE)) + /* No GAMMA transformation (see the hanging else 4 lines above) */ + if ((png_ptr->transformations & PNG_COMPOSE) && + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) { int i; int istop = (int)png_ptr->num_trans; @@ -1205,15 +1775,13 @@ png_init_read_transformations(png_structp png_ptr) } } - /* Handled alpha, still need to strip the channel. */ - png_ptr->transformations &= ~PNG_BACKGROUND; - png_ptr->flags |= PNG_FLAG_STRIP_ALPHA; + png_ptr->transformations &= ~PNG_COMPOSE; } #endif /* PNG_READ_BACKGROUND_SUPPORTED */ #ifdef PNG_READ_SHIFT_SUPPORTED if ((png_ptr->transformations & PNG_SHIFT) && - (color_type == PNG_COLOR_TYPE_PALETTE)) + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) { png_uint_16 i; png_uint_16 istop = png_ptr->num_palette; @@ -1238,12 +1806,6 @@ png_init_read_transformations(png_structp png_ptr) } } #endif /* PNG_READ_SHIFT_SUPPORTED */ - } -#if !defined(PNG_READ_GAMMA_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) \ - && !defined(PNG_READ_BACKGROUND_SUPPORTED) - if (png_ptr) - return; -#endif } /* Modify the info structure to reflect the transformations. The @@ -1260,8 +1822,11 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) { if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { - if (png_ptr->num_trans && - (png_ptr->transformations & PNG_EXPAND_tRNS)) + /* This check must match what actually happens in + * png_do_expand_palette; if it ever checks the tRNS chunk to see if + * it is all opaque we must do the same (at present it does not.) + */ + if (png_ptr->num_trans > 0) info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; else @@ -1285,36 +1850,61 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif -#ifdef PNG_READ_BACKGROUND_SUPPORTED - if (png_ptr->transformations & PNG_BACKGROUND) - { - info_ptr->color_type = (png_byte)(info_ptr->color_type & - ~PNG_COLOR_MASK_ALPHA); - info_ptr->num_trans = 0; +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + /* The following is almost certainly wrong unless the background value is in + * the screen space! + */ + if (png_ptr->transformations & PNG_COMPOSE) info_ptr->background = png_ptr->background; - } #endif #ifdef PNG_READ_GAMMA_SUPPORTED - if (png_ptr->transformations & PNG_GAMMA) - { - info_ptr->gamma = png_ptr->gamma; - } + /* The following used to be conditional on PNG_GAMMA (prior to 1.5.4), + * however it seems that the code in png_init_read_transformations, which has + * been called before this from png_read_update_info->png_read_start_row + * sometimes does the gamma transform and cancels the flag. + */ + info_ptr->gamma = png_ptr->gamma; #endif -#ifdef PNG_READ_16_TO_8_SUPPORTED -#ifdef PNG_READ_16BIT_SUPPORTED - if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16)) - info_ptr->bit_depth = 8; -#else - /* Force chopping 16-bit input down to 8 */ if (info_ptr->bit_depth == 16) { - png_ptr->transformations |=PNG_16_TO_8; - info_ptr->bit_depth = 8; +# ifdef PNG_READ_16BIT_SUPPORTED +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_SCALE_16_TO_8) + info_ptr->bit_depth = 8; +# endif + +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_16_TO_8) + info_ptr->bit_depth = 8; +# endif + +# else + /* No 16 bit support: force chopping 16-bit input down to 8, in this case + * the app program can chose if both APIs are available by setting the + * correct scaling to use. + */ +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* For compatibility with previous versions use the strip method by + * default. This code works because if PNG_SCALE_16_TO_8 is already + * set the code below will do that in preference to the chop. + */ + png_ptr->transformations |= PNG_16_TO_8; + info_ptr->bit_depth = 8; +# else + +# if PNG_READ_SCALE_16_TO_8_SUPPORTED + png_ptr->transformations |= PNG_SCALE_16_TO_8; + info_ptr->bit_depth = 8; +# else + + CONFIGURATION ERROR: you must enable at least one 16 to 8 method +# endif +# endif +#endif /* !READ_16BIT_SUPPORTED */ } -#endif -#endif #ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED if (png_ptr->transformations & PNG_GRAY_TO_RGB) @@ -1338,6 +1928,14 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16 && info_ptr->bit_depth == 8 && + info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + info_ptr->bit_depth = 16; + } +#endif + #ifdef PNG_READ_PACK_SUPPORTED if ((png_ptr->transformations & PNG_PACK) && (info_ptr->bit_depth < 8)) info_ptr->bit_depth = 8; @@ -1353,8 +1951,11 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr) info_ptr->channels = 1; #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) + if (png_ptr->transformations & PNG_STRIP_ALPHA) + { info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA; + info_ptr->num_trans = 0; + } #endif if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) @@ -1390,6 +1991,14 @@ defined(PNG_READ_USER_TRANSFORM_SUPPORTED) info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); + /* Adding in 1.5.4: cache the above value in png_struct so that we can later + * check in png_rowbytes that the user buffer won't get overwritten. Note + * that the field is not always set - if png_read_update_info isn't called + * the application has to either not do any transforms or get the calculation + * right itself. + */ + png_ptr->info_rowbytes = info_ptr->rowbytes; + #ifndef PNG_READ_EXPAND_SUPPORTED if (png_ptr) return; @@ -1407,29 +2016,27 @@ png_do_read_transformations(png_structp png_ptr) if (png_ptr->row_buf == NULL) { -#ifdef PNG_CONSOLE_IO_SUPPORTED - char msg[50]; - - png_snprintf2(msg, 50, - "NULL row buffer for row %ld, pass %d", (long)png_ptr->row_number, - png_ptr->pass); - png_error(png_ptr, msg); -#else + /* Prior to 1.5.4 this output row/pass where the NULL pointer is, but this + * error is incredibly rare and incredibly easy to debug without this + * information. + */ png_error(png_ptr, "NULL row buffer"); -#endif } -#ifdef PNG_WARN_UNINITIALIZED_ROW - if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) - /* Application has failed to call either png_read_start_image() - * or png_read_update_info() after setting transforms that expand - * pixels. This check added to libpng-1.2.19 + + /* The following is debugging; prior to 1.5.4 the code was never compiled in; + * in 1.5.4 PNG_FLAG_DETECT_UNINITIALIZED was added and the macro + * PNG_WARN_UNINITIALIZED_ROW removed. In 1.5 the new flag is set only for + * selected new APIs to ensure that there is no API change. + */ + if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 && + !(png_ptr->flags & PNG_FLAG_ROW_INIT)) + { + /* Application has failed to call either png_read_start_image() or + * png_read_update_info() after setting transforms that expand pixels. + * This check added to libpng-1.2.19 (but not enabled until 1.5.4). */ -#if (PNG_WARN_UNINITIALIZED_ROW==1) png_error(png_ptr, "Uninitialized row"); -#else - png_warning(png_ptr, "Uninitialized row"); -#endif -#endif + } #ifdef PNG_READ_EXPAND_SUPPORTED if (png_ptr->transformations & PNG_EXPAND) @@ -1439,14 +2046,15 @@ png_do_read_transformations(png_structp png_ptr) png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); } + else { if (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND_tRNS)) png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, &(png_ptr->trans_color)); - else + else png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1, NULL); } @@ -1454,9 +2062,12 @@ png_do_read_transformations(png_structp png_ptr) #endif #ifdef PNG_READ_STRIP_ALPHA_SUPPORTED - if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)); + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + !(png_ptr->transformations & PNG_COMPOSE) && + (png_ptr->row_info.color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->row_info.color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED @@ -1520,36 +2131,49 @@ png_do_read_transformations(png_structp png_ptr) png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#ifdef PNG_READ_BACKGROUND_SUPPORTED - if ((png_ptr->transformations & PNG_BACKGROUND) && - ((png_ptr->num_trans != 0) || - (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) - png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1, - &(png_ptr->trans_color), &(png_ptr->background) -#ifdef PNG_READ_GAMMA_SUPPORTED - , &(png_ptr->background_1), - png_ptr->gamma_table, png_ptr->gamma_from_1, - png_ptr->gamma_to_1, png_ptr->gamma_16_table, - png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1, - png_ptr->gamma_shift -#endif - ); +#if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\ + (defined PNG_READ_ALPHA_MODE_SUPPORTED) + if (png_ptr->transformations & PNG_COMPOSE) + png_do_compose(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr); #endif #ifdef PNG_READ_GAMMA_SUPPORTED if ((png_ptr->transformations & PNG_GAMMA) && -#ifdef PNG_READ_BACKGROUND_SUPPORTED - !((png_ptr->transformations & PNG_BACKGROUND) && +#if (defined PNG_READ_BACKGROUND_SUPPORTED) ||\ + (defined PNG_READ_ALPHA_MODE_SUPPORTED) + !((png_ptr->transformations & PNG_COMPOSE) && ((png_ptr->num_trans != 0) || (png_ptr->color_type & PNG_COLOR_MASK_ALPHA))) && #endif (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) - png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->gamma_table, png_ptr->gamma_16_table, - png_ptr->gamma_shift); + png_do_gamma(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) && + (png_ptr->transformations & PNG_COMPOSE) && + (png_ptr->row_info.color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->row_info.color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + if ((png_ptr->transformations & PNG_ENCODE_ALPHA) && + (png_ptr->row_info.color_type & PNG_COLOR_MASK_ALPHA)) + png_do_encode_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if (png_ptr->transformations & PNG_SCALE_16_TO_8) + png_do_scale_16_to_8(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#ifdef PNG_READ_16_TO_8_SUPPORTED +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* There is no harm in doing both of these because only one has any effect, + * by putting the 'scale' option first if the app asks for scale (either by + * calling the API or in a TRANSFORM flag) this is what happens. + */ if (png_ptr->transformations & PNG_16_TO_8) png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif @@ -1565,6 +2189,23 @@ png_do_read_transformations(png_structp png_ptr) } #endif /* PNG_READ_QUANTIZE_SUPPORTED */ +#ifdef PNG_READ_EXPAND_16_SUPPORTED + /* Do the expansion now, after all the arithmetic has been done. Notice + * that previous transformations can handle the PNG_EXPAND_16 flag if this + * is efficient (particularly true in the case of gamma correction, where + * better accuracy results faster!) + */ + if (png_ptr->transformations & PNG_EXPAND_16) + png_do_expand_16(&png_ptr->row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /*NOTE: moved here in 1.5.4 (from much later in this list.) */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && + (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) + png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); +#endif + #ifdef PNG_READ_INVERT_SUPPORTED if (png_ptr->transformations & PNG_INVERT_MONO) png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1); @@ -1591,13 +2232,6 @@ png_do_read_transformations(png_structp png_ptr) png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1); #endif -#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED - /* If gray -> RGB, do so now only if we did not do so above */ - if ((png_ptr->transformations & PNG_GRAY_TO_RGB) && - (png_ptr->mode & PNG_BACKGROUND_IS_GRAY)) - png_do_gray_to_rgb(&(png_ptr->row_info), png_ptr->row_buf + 1); -#endif - #ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, @@ -1649,7 +2283,6 @@ png_do_read_transformations(png_structp png_ptr) png_ptr->row_info.width); } #endif - } #ifdef PNG_READ_PACK_SUPPORTED @@ -1804,7 +2437,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, switch (row_info->bit_depth) { default: - break; + break; case 2: { @@ -1871,54 +2504,86 @@ png_do_unshift(png_row_infop row_info, png_bytep row, } #endif -#ifdef PNG_READ_16_TO_8_SUPPORTED -/* Chop rows of bit depth 16 down to 8 */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale rows of bit depth 16 down to 8 accurately */ void /* PRIVATE */ -png_do_chop(png_row_infop row_info, png_bytep row) +png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) { - png_debug(1, "in png_do_chop"); + png_debug(1, "in png_do_scale_16_to_8"); if (row_info->bit_depth == 16) { - png_bytep sp = row; - png_bytep dp = row; - png_uint_32 i; - png_uint_32 istop = row_info->width * row_info->channels; + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destinaton */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ - for (i = 0; i<istop; i++, sp += 2, dp++) + while (sp < ep) { -#ifdef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED - /* This does a more accurate scaling of the 16-bit color - * value, rather than a simple low-byte truncation. - * - * What the ideal calculation should be: - * *dp = (((((png_uint_32)(*sp) << 8) | - * (png_uint_32)(*(sp + 1))) * 255 + 127) - * / (png_uint_32)65535L; - * - * GRR: no, I think this is what it really should be: - * *dp = (((((png_uint_32)(*sp) << 8) | - * (png_uint_32)(*(sp + 1))) + 128L) - * / (png_uint_32)257L; - * - * GRR: here's the exact calculation with shifts: - * temp = (((png_uint_32)(*sp) << 8) | - * (png_uint_32)(*(sp + 1))) + 128L; - * *dp = (temp - (temp >> 8)) >> 8; - * - * Approximate calculation with shift/add instead of multiply/divide: - * *dp = ((((png_uint_32)(*sp) << 8) | - * (png_uint_32)((int)(*(sp + 1)) - *sp)) + 128) >> 8; - * - * What we actually do to avoid extra shifting and conversion: - */ + /* The input is an array of 16 bit components, these must be scaled to + * 8 bits each. For a 16 bit value V the required value (from the PNG + * specification) is: + * + * (V * 255) / 65535 + * + * This reduces to round(V / 257), or floor((V + 128.5)/257) + * + * Represent V as the two byte value vhi.vlo. Make a guess that the + * result is the top byte of V, vhi, then the correction to this value + * is: + * + * error = floor(((V-vhi.vhi) + 128.5) / 257) + * = floor(((vlo-vhi) + 128.5) / 257) + * + * This can be approximated using integer arithmetic (and a signed + * shift): + * + * error = (vlo-vhi+128) >> 8; + * + * The approximate differs from the exact answer only when (vlo-vhi) is + * 128; it then gives a correction of +1 when the exact correction is + * 0. This gives 128 errors. The exact answer (correct for all 16 bit + * input values) is: + * + * error = (vlo-vhi+128)*65535 >> 24; + * + * An alternative arithmetic calculation which also gives no errors is: + * + * (V * 255 + 32895) >> 16 + */ - *dp = *sp + ((((int)(*(sp + 1)) - *sp) > 128) ? 1 : 0); -#else - /* Simply discard the low order byte */ - *dp = *sp; + png_int_32 tmp = *sp++; /* must be signed! */ + tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; + *dp++ = (png_byte)tmp; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} #endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +void /* PRIVATE */ +/* Simply discard the low byte. This was the default behavior prior + * to libpng-1.5.4. + */ +png_do_chop(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_chop"); + + if (row_info->bit_depth == 16) + { + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destinaton */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ + + while (sp < ep) + { + *dp++ = *sp; + sp += 2; /* skip low byte */ } + row_info->bit_depth = 8; row_info->pixel_depth = (png_byte)(8 * row_info->channels); row_info->rowbytes = row_info->width * row_info->channels; @@ -2673,11 +3338,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row) return rgb_error; } #endif +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED /* Build a grayscale palette. Palette is assumed to be 1 << bit_depth * large of png_color. This lets grayscale images be treated as * paletted. Most useful for gamma correction and simplification - * of code. + * of code. This API is not used internally. */ void PNGAPI png_build_grayscale_palette(int bit_depth, png_colorp palette) @@ -2727,34 +3394,36 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette) palette[i].blue = (png_byte)v; } } +#endif +#ifdef PNG_READ_TRANSFORMS_SUPPORTED #ifdef PNG_READ_BACKGROUND_SUPPORTED /* Replace any alpha or transparency with the supplied background color. * "background" is already in the screen gamma, while "background_1" is * at a gamma of 1.0. Paletted files have already been taken care of. */ void /* PRIVATE */ -png_do_background(png_row_infop row_info, png_bytep row, - png_const_color_16p trans_color, png_const_color_16p background +png_do_compose(png_row_infop row_info, png_bytep row, png_structp png_ptr) +{ #ifdef PNG_READ_GAMMA_SUPPORTED - , png_const_color_16p background_1, png_const_bytep gamma_table, - png_const_bytep gamma_from_1, png_const_bytep gamma_to_1, - png_const_uint_16pp gamma_16, png_const_uint_16pp gamma_16_from_1, - png_const_uint_16pp gamma_16_to_1, int gamma_shift + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_bytep gamma_from_1 = png_ptr->gamma_from_1; + png_const_bytep gamma_to_1 = png_ptr->gamma_to_1; + png_const_uint_16pp gamma_16 = png_ptr->gamma_16_table; + png_const_uint_16pp gamma_16_from_1 = png_ptr->gamma_16_from_1; + png_const_uint_16pp gamma_16_to_1 = png_ptr->gamma_16_to_1; + int gamma_shift = png_ptr->gamma_shift; #endif - ) -{ - png_bytep sp, dp; + + png_bytep sp; png_uint_32 i; png_uint_32 row_width = row_info->width; + int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0; int shift; - png_debug(1, "in png_do_background"); + png_debug(1, "in png_do_compose"); - if (background != NULL && - (!(row_info->color_type & PNG_COLOR_MASK_ALPHA) || - (row_info->color_type != PNG_COLOR_TYPE_PALETTE && trans_color))) { switch (row_info->color_type) { @@ -2769,10 +3438,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x01) - == trans_color->gray) + == png_ptr->trans_color.gray) { *sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); + *sp |= (png_byte)(png_ptr->background.gray << shift); } if (!shift) @@ -2797,10 +3466,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_color->gray) + == png_ptr->trans_color.gray) { *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); + *sp |= (png_byte)(png_ptr->background.gray << shift); } else @@ -2831,10 +3500,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x03) - == trans_color->gray) + == png_ptr->trans_color.gray) { *sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); + *sp |= (png_byte)(png_ptr->background.gray << shift); } if (!shift) @@ -2860,10 +3529,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_color->gray) + == png_ptr->trans_color.gray) { *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); + *sp |= (png_byte)(png_ptr->background.gray << shift); } else @@ -2894,10 +3563,10 @@ png_do_background(png_row_infop row_info, png_bytep row, for (i = 0; i < row_width; i++) { if ((png_uint_16)((*sp >> shift) & 0x0f) - == trans_color->gray) + == png_ptr->trans_color.gray) { *sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff); - *sp |= (png_byte)(background->gray << shift); + *sp |= (png_byte)(png_ptr->background.gray << shift); } if (!shift) @@ -2921,8 +3590,8 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp++) { - if (*sp == trans_color->gray) - *sp = (png_byte)background->gray; + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; else *sp = gamma_table[*sp]; @@ -2934,8 +3603,8 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp++) { - if (*sp == trans_color->gray) - *sp = (png_byte)background->gray; + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; } } break; @@ -2953,11 +3622,11 @@ png_do_background(png_row_infop row_info, png_bytep row, v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_color->gray) + if (v == png_ptr->trans_color.gray) { /* Background is already in screen gamma */ - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); + *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); } else @@ -2978,10 +3647,10 @@ png_do_background(png_row_infop row_info, png_bytep row, v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - if (v == trans_color->gray) + if (v == png_ptr->trans_color.gray) { - *sp = (png_byte)((background->gray >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->gray & 0xff); + *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); } } } @@ -3004,13 +3673,13 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp += 3) { - if (*sp == trans_color->red && - *(sp + 1) == trans_color->green && - *(sp + 2) == trans_color->blue) + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; } else @@ -3027,13 +3696,13 @@ png_do_background(png_row_infop row_info, png_bytep row, sp = row; for (i = 0; i < row_width; i++, sp += 3) { - if (*sp == trans_color->red && - *(sp + 1) == trans_color->green && - *(sp + 2) == trans_color->blue) + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) { - *sp = (png_byte)background->red; - *(sp + 1) = (png_byte)background->green; - *(sp + 2) = (png_byte)background->blue; + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; } } } @@ -3054,16 +3723,17 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + *(sp + 5)); - if (r == trans_color->red && g == trans_color->green && - b == trans_color->blue) + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) { /* Background is already in screen gamma */ - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); } else @@ -3097,15 +3767,16 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + *(sp + 5)); - if (r == trans_color->red && g == trans_color->green && - b == trans_color->blue) + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) { - *sp = (png_byte)((background->red >> 8) & 0xff); - *(sp + 1) = (png_byte)(background->red & 0xff); - *(sp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(sp + 3) = (png_byte)(background->green & 0xff); - *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(sp + 5) = (png_byte)(background->blue & 0xff); + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); } } } @@ -3122,18 +3793,17 @@ png_do_background(png_row_infop row_info, png_bytep row, gamma_table != NULL) { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 2, dp++) + for (i = 0; i < row_width; i++, sp += 2) { png_uint_16 a = *(sp + 1); if (a == 0xff) - *dp = gamma_table[*sp]; + *sp = gamma_table[*sp]; else if (a == 0) { /* Background is already in screen gamma */ - *dp = (png_byte)background->gray; + *sp = (png_byte)png_ptr->background.gray; } else @@ -3141,8 +3811,10 @@ png_do_background(png_row_infop row_info, png_bytep row, png_byte v, w; v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->gray); - *dp = gamma_from_1[w]; + png_composite(w, v, a, png_ptr->background_1.gray); + if (!optimize) + w = gamma_from_1[w]; + *sp = w; } } } @@ -3150,24 +3822,15 @@ png_do_background(png_row_infop row_info, png_bytep row, #endif { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 2, dp++) + for (i = 0; i < row_width; i++, sp += 2) { png_byte a = *(sp + 1); - if (a == 0xff) - *dp = *sp; - -#ifdef PNG_READ_GAMMA_SUPPORTED - else if (a == 0) - *dp = (png_byte)background->gray; - - else - png_composite(*dp, *sp, a, background_1->gray); + if (a == 0) + *sp = (png_byte)png_ptr->background.gray; -#else - *dp = (png_byte)background->gray; -#endif + else if (a < 0xff) + png_composite(*sp, *sp, a, png_ptr->background_1.gray); } } } @@ -3178,8 +3841,7 @@ png_do_background(png_row_infop row_info, png_bytep row, gamma_16_to_1 != NULL) { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 2) + for (i = 0; i < row_width; i++, sp += 4) { png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + *(sp + 3)); @@ -3189,69 +3851,56 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); } -#ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) -#else - else -#endif { /* Background is already in screen gamma */ - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); + *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); } -#ifdef PNG_READ_GAMMA_SUPPORTED else { png_uint_16 g, v, w; g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(v, g, a, background_1->gray); - w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; - *dp = (png_byte)((w >> 8) & 0xff); - *(dp + 1) = (png_byte)(w & 0xff); + png_composite_16(v, g, a, png_ptr->background_1.gray); + if (optimize) + w = v; + else + w = gamma_16_from_1[(v&0xff) >> gamma_shift][v >> 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); } -#endif } } else #endif { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 2) + for (i = 0; i < row_width; i++, sp += 4) { png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + *(sp + 3)); - if (a == (png_uint_16)0xffff) - png_memcpy(dp, sp, 2); - -#ifdef PNG_READ_GAMMA_SUPPORTED - else if (a == 0) -#else - else -#endif + if (a == 0) { - *dp = (png_byte)((background->gray >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->gray & 0xff); + *sp = (png_byte)((png_ptr->background.gray >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); } -#ifdef PNG_READ_GAMMA_SUPPORTED - else + else if (a < 0xffff) { png_uint_16 g, v; g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); - png_composite_16(v, g, a, background_1->gray); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); + png_composite_16(v, g, a, png_ptr->background_1.gray); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); } -#endif } } } @@ -3267,24 +3916,23 @@ png_do_background(png_row_infop row_info, png_bytep row, gamma_table != NULL) { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 3) + for (i = 0; i < row_width; i++, sp += 4) { png_byte a = *(sp + 3); if (a == 0xff) { - *dp = gamma_table[*sp]; - *(dp + 1) = gamma_table[*(sp + 1)]; - *(dp + 2) = gamma_table[*(sp + 2)]; + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; } else if (a == 0) { /* Background is already in screen gamma */ - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; } else @@ -3292,16 +3940,19 @@ png_do_background(png_row_infop row_info, png_bytep row, png_byte v, w; v = gamma_to_1[*sp]; - png_composite(w, v, a, background_1->red); - *dp = gamma_from_1[w]; + png_composite(w, v, a, png_ptr->background_1.red); + if (!optimize) w = gamma_from_1[w]; + *sp = w; v = gamma_to_1[*(sp + 1)]; - png_composite(w, v, a, background_1->green); - *(dp + 1) = gamma_from_1[w]; + png_composite(w, v, a, png_ptr->background_1.green); + if (!optimize) w = gamma_from_1[w]; + *(sp + 1) = w; v = gamma_to_1[*(sp + 2)]; - png_composite(w, v, a, background_1->blue); - *(dp + 2) = gamma_from_1[w]; + png_composite(w, v, a, png_ptr->background_1.blue); + if (!optimize) w = gamma_from_1[w]; + *(sp + 2) = w; } } } @@ -3309,34 +3960,26 @@ png_do_background(png_row_infop row_info, png_bytep row, #endif { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 4, dp += 3) + for (i = 0; i < row_width; i++, sp += 4) { png_byte a = *(sp + 3); - if (a == 0xff) + if (a == 0) { - *dp = *sp; - *(dp + 1) = *(sp + 1); - *(dp + 2) = *(sp + 2); + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; } - else if (a == 0) - { - *dp = (png_byte)background->red; - *(dp + 1) = (png_byte)background->green; - *(dp + 2) = (png_byte)background->blue; - } - - else + else if (a < 0xff) { - png_composite(*dp, *sp, a, background->red); + png_composite(*sp, *sp, a, png_ptr->background.red); - png_composite(*(dp + 1), *(sp + 1), a, - background->green); + png_composite(*(sp + 1), *(sp + 1), a, + png_ptr->background.green); - png_composite(*(dp + 2), *(sp + 2), a, - background->blue); + png_composite(*(sp + 2), *(sp + 2), a, + png_ptr->background.blue); } } } @@ -3348,8 +3991,7 @@ png_do_background(png_row_infop row_info, png_bytep row, gamma_16_to_1 != NULL) { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 8, dp += 6) + for (i = 0; i < row_width; i++, sp += 8) { png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) << 8) + (png_uint_16)(*(sp + 7))); @@ -3359,53 +4001,55 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 v; v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); } else if (a == 0) { /* Background is already in screen gamma */ - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); } else { - png_uint_16 v, w, x; + png_uint_16 v, w; v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; - png_composite_16(w, v, a, background_1->red); - - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *dp = (png_byte)((x >> 8) & 0xff); - *(dp + 1) = (png_byte)(x & 0xff); + png_composite_16(w, v, a, png_ptr->background_1.red); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; - png_composite_16(w, v, a, background_1->green); + png_composite_16(w, v, a, png_ptr->background_1.green); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - *(dp + 2) = (png_byte)((x >> 8) & 0xff); - *(dp + 3) = (png_byte)(x & 0xff); + *(sp + 2) = (png_byte)((w >> 8) & 0xff); + *(sp + 3) = (png_byte)(w & 0xff); v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; - png_composite_16(w, v, a, background_1->blue); + png_composite_16(w, v, a, png_ptr->background_1.blue); + if (!optimize) + w = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8]; - x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8]; - *(dp + 4) = (png_byte)((x >> 8) & 0xff); - *(dp + 5) = (png_byte)(x & 0xff); + *(sp + 4) = (png_byte)((w >> 8) & 0xff); + *(sp + 5) = (png_byte)(w & 0xff); } } } @@ -3414,28 +4058,22 @@ png_do_background(png_row_infop row_info, png_bytep row, #endif { sp = row; - dp = row; - for (i = 0; i < row_width; i++, sp += 8, dp += 6) + for (i = 0; i < row_width; i++, sp += 8) { png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) << 8) + (png_uint_16)(*(sp + 7))); - if (a == (png_uint_16)0xffff) - { - png_memcpy(dp, sp, 6); - } - - else if (a == 0) + if (a == 0) { - *dp = (png_byte)((background->red >> 8) & 0xff); - *(dp + 1) = (png_byte)(background->red & 0xff); - *(dp + 2) = (png_byte)((background->green >> 8) & 0xff); - *(dp + 3) = (png_byte)(background->green & 0xff); - *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff); - *(dp + 5) = (png_byte)(background->blue & 0xff); + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); } - else + else if (a < 0xffff) { png_uint_16 v; @@ -3445,17 +4083,17 @@ png_do_background(png_row_infop row_info, png_bytep row, png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + *(sp + 5)); - png_composite_16(v, r, a, background->red); - *dp = (png_byte)((v >> 8) & 0xff); - *(dp + 1) = (png_byte)(v & 0xff); + png_composite_16(v, r, a, png_ptr->background.red); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); - png_composite_16(v, g, a, background->green); - *(dp + 2) = (png_byte)((v >> 8) & 0xff); - *(dp + 3) = (png_byte)(v & 0xff); + png_composite_16(v, g, a, png_ptr->background.green); + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); - png_composite_16(v, b, a, background->blue); - *(dp + 4) = (png_byte)((v >> 8) & 0xff); - *(dp + 5) = (png_byte)(v & 0xff); + png_composite_16(v, b, a, png_ptr->background.blue); + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); } } } @@ -3466,16 +4104,6 @@ png_do_background(png_row_infop row_info, png_bytep row, default: break; } - - if (row_info->color_type & PNG_COLOR_MASK_ALPHA) - { - row_info->color_type = (png_byte)(row_info->color_type & - ~PNG_COLOR_MASK_ALPHA); - row_info->channels--; - row_info->pixel_depth = (png_byte)(row_info->channels * - row_info->bit_depth); - row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); - } } } #endif @@ -3488,10 +4116,12 @@ png_do_background(png_row_infop row_info, png_bytep row, * build_gamma_table(). */ void /* PRIVATE */ -png_do_gamma(png_row_infop row_info, png_bytep row, - png_const_bytep gamma_table, png_const_uint_16pp gamma_16_table, - int gamma_shift) +png_do_gamma(png_row_infop row_info, png_bytep row, png_structp png_ptr) { + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_uint_16pp gamma_16_table = png_ptr->gamma_16_table; + int gamma_shift = png_ptr->gamma_shift; + png_bytep sp; png_uint_32 i; png_uint_32 row_width=row_info->width; @@ -3681,6 +4311,73 @@ png_do_gamma(png_row_infop row_info, png_bytep row, } #endif +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* Encode the alpha channel to the output gamma (the input channel is always + * linear.) Called only with color types that have an alpha channel. Needs the + * from_1 tables. + */ +void /* PRIVATE */ +png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structp png_ptr) +{ + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_encode_alpha"); + + if (row_info->color_type & PNG_COLOR_MASK_ALPHA) + { + if (row_info->bit_depth == 8) + { + PNG_CONST png_bytep table = png_ptr->gamma_from_1; + + if (table != NULL) + { + PNG_CONST int step = + (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2; + + /* The alpha channel is the last component: */ + row += step - 1; + + for (; row_width > 0; --row_width, row += step) + *row = table[*row]; + + return; + } + } + + else if (row_info->bit_depth == 16) + { + PNG_CONST png_uint_16pp table = png_ptr->gamma_16_from_1; + PNG_CONST int gamma_shift = png_ptr->gamma_shift; + + if (table != NULL) + { + PNG_CONST int step = + (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4; + + /* The alpha channel is the last component: */ + row += step - 2; + + for (; row_width > 0; --row_width, row += step) + { + png_uint_16 v; + + v = table[*(row + 1) >> gamma_shift][*row]; + *row = (png_byte)((v >> 8) & 0xff); + *(row + 1) = (png_byte)(v & 0xff); + } + + return; + } + } + } + + /* Only get to here if called with a weird row_info; no harm has been done, + * so just issue a warning. + */ + png_warning(png_ptr, "png_do_encode_alpha: unexpected call"); +} +#endif + #ifdef PNG_READ_EXPAND_SUPPORTED /* Expands a palette row to an RGB or RGBA row depending * upon whether you supply trans and num_trans. @@ -3786,7 +4483,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, if (row_info->bit_depth == 8) { { - if (trans_alpha != NULL) + if (num_trans > 0) { sp = row + (png_size_t)row_width - 1; dp = row + (png_size_t)(row_width << 2) - 1; @@ -3840,7 +4537,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row, */ void /* PRIVATE */ png_do_expand(png_row_infop row_info, png_bytep row, - png_const_color_16p trans_value) + png_const_color_16p trans_color) { int shift, value; png_bytep sp, dp; @@ -3852,7 +4549,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, { if (row_info->color_type == PNG_COLOR_TYPE_GRAY) { - png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0); + png_uint_16 gray = (png_uint_16)(trans_color ? trans_color->gray : 0); if (row_info->bit_depth < 8) { @@ -3944,7 +4641,7 @@ png_do_expand(png_row_infop row_info, png_bytep row, row_info->rowbytes = row_width; } - if (trans_value != NULL) + if (trans_color != NULL) { if (row_info->bit_depth == 8) { @@ -3996,13 +4693,13 @@ png_do_expand(png_row_infop row_info, png_bytep row, row_width); } } - else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value) + else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_color) { if (row_info->bit_depth == 8) { - png_byte red = (png_byte)(trans_value->red & 0xff); - png_byte green = (png_byte)(trans_value->green & 0xff); - png_byte blue = (png_byte)(trans_value->blue & 0xff); + png_byte red = (png_byte)(trans_color->red & 0xff); + png_byte green = (png_byte)(trans_color->green & 0xff); + png_byte blue = (png_byte)(trans_color->blue & 0xff); sp = row + (png_size_t)row_info->rowbytes - 1; dp = row + (png_size_t)(row_width << 2) - 1; for (i = 0; i < row_width; i++) @@ -4020,12 +4717,12 @@ png_do_expand(png_row_infop row_info, png_bytep row, } else if (row_info->bit_depth == 16) { - png_byte red_high = (png_byte)((trans_value->red >> 8) & 0xff); - png_byte green_high = (png_byte)((trans_value->green >> 8) & 0xff); - png_byte blue_high = (png_byte)((trans_value->blue >> 8) & 0xff); - png_byte red_low = (png_byte)(trans_value->red & 0xff); - png_byte green_low = (png_byte)(trans_value->green & 0xff); - png_byte blue_low = (png_byte)(trans_value->blue & 0xff); + png_byte red_high = (png_byte)((trans_color->red >> 8) & 0xff); + png_byte green_high = (png_byte)((trans_color->green >> 8) & 0xff); + png_byte blue_high = (png_byte)((trans_color->blue >> 8) & 0xff); + png_byte red_low = (png_byte)(trans_color->red & 0xff); + png_byte green_low = (png_byte)(trans_color->green & 0xff); + png_byte blue_low = (png_byte)(trans_color->blue & 0xff); sp = row + row_info->rowbytes - 1; dp = row + (png_size_t)(row_width << 3) - 1; for (i = 0; i < row_width; i++) @@ -4064,6 +4761,37 @@ png_do_expand(png_row_infop row_info, png_bytep row, } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* If the bit depth is 8 and the colour type is not a palette type expand the + * whole row to 16 bits. Has no effect otherwise. + */ +void /* PRIVATE */ +png_do_expand_16(png_row_infop row_info, png_bytep row) +{ + if (row_info->bit_depth == 8 && + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + /* The row have a sequence of bytes containing [0..255] and we need + * to turn it into another row containing [0..65535], to do this we + * calculate: + * + * (input / 255) * 65535 + * + * Which happens to be exactly input * 257 and this can be achieved + * simply by byte replication in place (copying backwards). + */ + png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ + png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ + while (dp > sp) + dp[-2] = dp[-1] = *--sp, dp -= 2; + + row_info->rowbytes *= 2; + row_info->bit_depth = 16; + row_info->pixel_depth = (png_byte)(row_info->channels * 16); + } +} +#endif + #ifdef PNG_READ_QUANTIZE_SUPPORTED void /* PRIVATE */ png_do_quantize(png_row_infop row_info, png_bytep row, @@ -4157,6 +4885,7 @@ png_do_quantize(png_row_infop row_info, png_bytep row, } } #endif /* PNG_READ_QUANTIZE_SUPPORTED */ +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED /* Undoes intrapixel differencing */ diff --git a/src/3rdparty/libpng/pngrutil.c b/src/3rdparty/libpng/pngrutil.c index 4c3cd53..07e46e2 100644 --- a/src/3rdparty/libpng/pngrutil.c +++ b/src/3rdparty/libpng/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -278,8 +278,7 @@ png_crc_error(png_structp png_ptr) return (0); } -#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ - defined(PNG_READ_iCCP_SUPPORTED) +#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED static png_size_t png_inflate(png_structp png_ptr, png_bytep data, png_size_t size, png_bytep output, png_size_t output_size) @@ -370,41 +369,31 @@ png_inflate(png_structp png_ptr, png_bytep data, png_size_t size, * and the error message is dumped into the uncompressed * buffer if available. */ +# ifdef PNG_WARNINGS_SUPPORTED { - PNG_CONST char *msg; -#ifdef PNG_CONSOLE_IO_SUPPORTED - char umsg[52]; -#endif + png_const_charp msg; + if (png_ptr->zstream.msg != 0) msg = png_ptr->zstream.msg; - else + else switch (ret) { -#ifdef PNG_CONSOLE_IO_SUPPORTED - switch (ret) - { - case Z_BUF_ERROR: - msg = "Buffer error in compressed datastream in %s chunk"; - break; + case Z_BUF_ERROR: + msg = "Buffer error in compressed datastream"; + break; - case Z_DATA_ERROR: - msg = "Data error in compressed datastream in %s chunk"; - break; + case Z_DATA_ERROR: + msg = "Data error in compressed datastream"; + break; - default: - msg = "Incomplete compressed datastream in %s chunk"; - break; - } - - png_snprintf(umsg, sizeof umsg, msg, png_ptr->chunk_name); - msg = umsg; -#else - msg = "Damaged compressed datastream in chunk other than IDAT"; -#endif + default: + msg = "Incomplete compressed datastream"; + break; } - png_warning(png_ptr, msg); + png_chunk_warning(png_ptr, msg); } +# endif /* 0 means an error - notice that this code simply ignores * zero length compressed chunks as a result. @@ -438,8 +427,8 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, png_size_t expanded_size = png_inflate(png_ptr, (png_bytep)(png_ptr->chunkdata + prefix_size), chunklength - prefix_size, - 0, /*output*/ - 0); /*output size*/ + 0, /* output */ + 0); /* output size */ /* Now check the limits on this chunk - if the limit fails the * compressed data will be removed, the prefix will remain. @@ -500,15 +489,9 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */ { -#ifdef PNG_STDIO_SUPPORTED - char umsg[50]; - - png_snprintf(umsg, sizeof umsg, - "Unknown zTXt compression type %d", comp_type); - png_warning(png_ptr, umsg); -#else - png_warning(png_ptr, "Unknown zTXt compression type"); -#endif + PNG_WARNING_PARAMETERS(p) + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, comp_type); + png_formatted_warning(png_ptr, p, "Unknown zTXt compression type @1"); /* The recovery is to simply drop the data. */ } @@ -536,7 +519,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, *newlength = prefix_size; } -#endif +#endif /* PNG_READ_COMPRESSED_TEXT_SUPPORTED */ /* Read and check the IDHR chunk */ void /* PRIVATE */ @@ -846,12 +829,10 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { if (PNG_OUT_OF_RANGE(igamma, 45500L, 500)) { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); - -# ifdef PNG_CONSOLE_IO_SUPPORTED - fprintf(stderr, "gamma = (%d/100000)", (int)igamma); -# endif + PNG_WARNING_PARAMETERS(p) + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, igamma); + png_formatted_warning(png_ptr, p, + "Ignoring incorrect gAMA value @1 when sRGB is also present"); return; } } @@ -1020,21 +1001,52 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) PNG_OUT_OF_RANGE(x_blue, 15000, 1000) || PNG_OUT_OF_RANGE(y_blue, 6000, 1000)) { - png_warning(png_ptr, - "Ignoring incorrect cHRM value when sRGB is also present"); - -#ifdef PNG_CONSOLE_IO_SUPPORTED - fprintf(stderr, "wx=%d, wy=%d, rx=%d, ry=%d\n", - x_white, y_white, x_red, y_red); - - fprintf(stderr, "gx=%d, gy=%d, bx=%d, by=%d\n", - x_green, y_green, x_blue, y_blue); -#endif /* PNG_CONSOLE_IO_SUPPORTED */ + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, x_white); + png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_fixed, y_white); + png_warning_parameter_signed(p, 3, PNG_NUMBER_FORMAT_fixed, x_red); + png_warning_parameter_signed(p, 4, PNG_NUMBER_FORMAT_fixed, y_red); + png_warning_parameter_signed(p, 5, PNG_NUMBER_FORMAT_fixed, x_green); + png_warning_parameter_signed(p, 6, PNG_NUMBER_FORMAT_fixed, y_green); + png_warning_parameter_signed(p, 7, PNG_NUMBER_FORMAT_fixed, x_blue); + png_warning_parameter_signed(p, 8, PNG_NUMBER_FORMAT_fixed, y_blue); + + png_formatted_warning(png_ptr, p, + "Ignoring incorrect cHRM white(@1,@2) r(@3,@4)g(@5,@6)b(@7,@8) " + "when sRGB is also present"); } return; } #endif /* PNG_READ_sRGB_SUPPORTED */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* Store the _white values as default coefficients for the rgb to gray + * operation if it is supported. + */ + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == 0) + { + /* png_set_background has not been called, the coefficients must be in + * range for the following to work without overflow. + */ + if (y_red <= (1<<17) && y_green <= (1<<17) && y_blue <= (1<<17)) + { + /* The y values are chromaticities: Y/X+Y+Z, the weights for the gray + * transformation are simply the normalized Y values for red, green and + * blue scaled by 32768. + */ + png_uint_32 w = y_red + y_green + y_blue; + + png_ptr->rgb_to_gray_red_coeff = (png_uint_16)(((png_uint_32)y_red * + 32768)/w); + png_ptr->rgb_to_gray_green_coeff = (png_uint_16)(((png_uint_32)y_green + * 32768)/w); + png_ptr->rgb_to_gray_blue_coeff = (png_uint_16)(((png_uint_32)y_blue * + 32768)/w); + } + } +#endif + png_set_cHRM_fixed(png_ptr, info_ptr, x_white, y_white, x_red, y_red, x_green, y_green, x_blue, y_blue); } @@ -1096,11 +1108,13 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { if (PNG_OUT_OF_RANGE(info_ptr->gamma, 45500L, 500)) { - png_warning(png_ptr, - "Ignoring incorrect gAMA value when sRGB is also present"); -#ifdef PNG_CONSOLE_IO_SUPPORTED - fprintf(stderr, "incorrect gamma=(%d/100000)\n", info_ptr->gamma); -#endif + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_fixed, + info_ptr->gamma); + + png_formatted_warning(png_ptr, p, + "Ignoring incorrect gAMA value @1 when sRGB is also present"); } } #endif /* PNG_READ_gAMA_SUPPORTED */ @@ -1240,23 +1254,15 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* And the following guarantees that profile_size == profile_length. */ if (profile_size > profile_length) { + PNG_WARNING_PARAMETERS(p) + png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; -#ifdef PNG_STDIO_SUPPORTED - { - char umsg[80]; - - png_snprintf2(umsg, 80, - "Ignoring iCCP chunk with declared size = %u " - "and actual length = %u", - (unsigned int) profile_size, - (unsigned int) profile_length); - png_warning(png_ptr, umsg); - } -#else - png_warning(png_ptr, - "Ignoring iCCP chunk with uncompressed size mismatch"); -#endif + + png_warning_parameter_unsigned(p, 1, PNG_NUMBER_FORMAT_u, profile_size); + png_warning_parameter_unsigned(p, 2, PNG_NUMBER_FORMAT_u, profile_length); + png_formatted_warning(png_ptr, p, + "Ignoring iCCP chunk with declared size = @1 and actual length = @2"); return; } @@ -1275,9 +1281,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_bytep entry_start; png_sPLT_t new_palette; -#ifdef PNG_POINTER_INDEXING_SUPPORTED png_sPLT_entryp pp; -#endif png_uint_32 data_length; int entry_size, i; png_uint_32 skip = 0; @@ -1442,7 +1446,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2; } - pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2; } #endif @@ -1567,6 +1571,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) { png_size_t truelen; png_byte buf[6]; + png_color_16 background; png_debug(1, "in png_handle_bKGD"); @@ -1623,7 +1628,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) */ if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { - png_ptr->background.index = buf[0]; + background.index = buf[0]; if (info_ptr && info_ptr->num_palette) { @@ -1633,33 +1638,36 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } - png_ptr->background.red = - (png_uint_16)png_ptr->palette[buf[0]].red; + background.red = (png_uint_16)png_ptr->palette[buf[0]].red; + background.green = (png_uint_16)png_ptr->palette[buf[0]].green; + background.blue = (png_uint_16)png_ptr->palette[buf[0]].blue; + } - png_ptr->background.green = - (png_uint_16)png_ptr->palette[buf[0]].green; + else + background.red = background.green = background.blue = 0; - png_ptr->background.blue = - (png_uint_16)png_ptr->palette[buf[0]].blue; - } + background.gray = 0; } else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */ { - png_ptr->background.red = - png_ptr->background.green = - png_ptr->background.blue = - png_ptr->background.gray = png_get_uint_16(buf); + background.index = 0; + background.red = + background.green = + background.blue = + background.gray = png_get_uint_16(buf); } else { - png_ptr->background.red = png_get_uint_16(buf); - png_ptr->background.green = png_get_uint_16(buf + 2); - png_ptr->background.blue = png_get_uint_16(buf + 4); + background.index = 0; + background.red = png_get_uint_16(buf); + background.green = png_get_uint_16(buf + 2); + background.blue = png_get_uint_16(buf + 4); + background.gray = 0; } - png_set_bKGD(png_ptr, info_ptr, &(png_ptr->background)); + png_set_bKGD(png_ptr, info_ptr, &background); } #endif @@ -1984,6 +1992,14 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) return; } + /* Need unit type, width, \0, height: minimum 4 bytes */ + else if (length < 4) + { + png_warning(png_ptr, "sCAL chunk too short"); + png_crc_finish(png_ptr, length); + return; + } + png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", length + 1); @@ -2019,23 +2035,29 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) /* Validate the ASCII numbers, need two ASCII numbers separated by * a '\0' and they need to fit exactly in the chunk data. */ - i = 0; + i = 1; state = 0; - if (png_ptr->chunkdata[1] == 45 /* negative width */ || - !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || + if (!png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || i >= slength || png_ptr->chunkdata[i++] != 0) png_warning(png_ptr, "Invalid sCAL chunk ignored: bad width format"); + else if (!PNG_FP_IS_POSITIVE(state)) + png_warning(png_ptr, "Invalid sCAL chunk ignored: non-positive width"); + else { png_size_t heighti = i; - if (png_ptr->chunkdata[i] == 45 /* negative height */ || - !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || + state = 0; + if (!png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) || i != slength) png_warning(png_ptr, "Invalid sCAL chunk ignored: bad height format"); + else if (!PNG_FP_IS_POSITIVE(state)) + png_warning(png_ptr, + "Invalid sCAL chunk ignored: non-positive height"); + else /* This is the (only) success case. */ png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], @@ -2662,6 +2684,14 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask) { png_debug(1, "in png_combine_row"); + /* Added in 1.5.4: the row_info should match the information returned by any + * call to png_read_update_info at this point. Do not continue if we got + * this wrong. + */ + if (png_ptr->info_rowbytes != 0 && png_ptr->info_rowbytes != + PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width)) + png_error(png_ptr, "internal row size calculation error"); + if (mask == 0xff) { png_memcpy(row, png_ptr->row_buf + 1, @@ -3400,7 +3430,9 @@ png_read_start_row(png_structp png_ptr) png_debug(1, "in png_read_start_row"); png_ptr->zstream.avail_in = 0; +#ifdef PNG_READ_TRANSFORMS_SUPPORTED png_init_read_transformations(png_ptr); +#endif #ifdef PNG_READ_INTERLACING_SUPPORTED if (png_ptr->interlaced) { @@ -3463,6 +3495,24 @@ png_read_start_row(png_structp png_ptr) } #endif +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if (png_ptr->transformations & PNG_EXPAND_16) + { +# ifdef PNG_READ_EXPAND_SUPPORTED + /* In fact it is an error if it isn't supported, but checking is + * the safe way. + */ + if (png_ptr->transformations & PNG_EXPAND) + { + if (png_ptr->bit_depth < 16) + max_pixel_depth *= 2; + } + else +# endif + png_ptr->transformations &= ~PNG_EXPAND_16; + } +#endif + #ifdef PNG_READ_FILLER_SUPPORTED if (png_ptr->transformations & (PNG_FILLER)) { diff --git a/src/3rdparty/libpng/pngset.c b/src/3rdparty/libpng/pngset.c index 2cfcf33..7eaad7d 100644 --- a/src/3rdparty/libpng/pngset.c +++ b/src/3rdparty/libpng/pngset.c @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -94,15 +94,16 @@ png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point if (png_ptr == NULL || info_ptr == NULL) return; - /* Previously these values were limited, however they must be - * wrong, therefore storing them (and setting PNG_INFO_gAMA) - * must be wrong too. + /* Changed in libpng-1.5.4 to limit the values to ensure overflow can't + * occur. Since the fixed point representation is assymetrical it is + * possible for 1/gamma to overflow the limit of 21474 and this means the + * gamma value must be at least 5/100000 and hence at most 20000.0. For + * safety the limits here are a little narrower. The values are 0.00016 to + * 6250.0, which are truely ridiculous gammma values (and will produce + * displays that are all black or all white.) */ - if (file_gamma > (png_fixed_point)PNG_UINT_31_MAX) - png_warning(png_ptr, "Gamma too large, ignored"); - - else if (file_gamma <= 0) - png_warning(png_ptr, "Negative or zero gamma ignored"); + if (file_gamma < 16 || file_gamma > 625000000) + png_warning(png_ptr, "Out of range gamma value ignored"); else { @@ -340,12 +341,12 @@ png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr, if (unit != 1 && unit != 2) png_error(png_ptr, "Invalid sCAL unit"); - if (swidth == NULL || (lengthw = png_strlen(swidth)) <= 0 || - swidth[0] == 45 /*'-'*/ || !png_check_fp_string(swidth, lengthw)) + if (swidth == NULL || (lengthw = png_strlen(swidth)) == 0 || + swidth[0] == 45 /* '-' */ || !png_check_fp_string(swidth, lengthw)) png_error(png_ptr, "Invalid sCAL width"); - if (sheight == NULL || (lengthh = png_strlen(sheight)) <= 0 || - sheight[0] == 45 /*'-'*/ || !png_check_fp_string(sheight, lengthh)) + if (sheight == NULL || (lengthh = png_strlen(sheight)) == 0 || + sheight[0] == 45 /* '-' */ || !png_check_fp_string(sheight, lengthh)) png_error(png_ptr, "Invalid sCAL height"); info_ptr->scal_unit = (png_byte)unit; @@ -545,7 +546,7 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr, png_set_sRGB(png_ptr, info_ptr, srgb_intent); # ifdef PNG_gAMA_SUPPORTED - png_set_gAMA_fixed(png_ptr, info_ptr, 45455L); + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE); # endif # ifdef PNG_cHRM_SUPPORTED diff --git a/src/3rdparty/libpng/pngstruct.h b/src/3rdparty/libpng/pngstruct.h index 8d781fa..93b2b3e 100644 --- a/src/3rdparty/libpng/pngstruct.h +++ b/src/3rdparty/libpng/pngstruct.h @@ -5,7 +5,7 @@ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -29,11 +29,13 @@ struct png_struct_def { #ifdef PNG_SETJMP_SUPPORTED - jmp_buf png_jmpbuf; /* used in png_error */ + jmp_buf longjmp_buffer; /* used in png_error */ png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ #endif png_error_ptr error_fn; /* function for printing errors and aborting */ +#ifdef PNG_WARNINGS_SUPPORTED png_error_ptr warning_fn; /* function for printing warnings */ +#endif png_voidp error_ptr; /* user supplied struct for error functions */ png_rw_ptr write_data_fn; /* function for writing output data */ png_rw_ptr read_data_fn; /* function for reading input data */ @@ -64,11 +66,36 @@ struct png_struct_def z_stream zstream; /* pointer to decompression structure (below) */ png_bytep zbuf; /* buffer for zlib */ uInt zbuf_size; /* size of zbuf (typically 65536) */ +#ifdef PNG_WRITE_SUPPORTED + +/* Added in 1.5.4: state to keep track of whether the zstream has been + * initialized and if so whether it is for IDAT or some other chunk. + */ +#define PNG_ZLIB_UNINITIALIZED 0 +#define PNG_ZLIB_FOR_IDAT 1 +#define PNG_ZLIB_FOR_TEXT 2 /* anything other than IDAT */ +#define PNG_ZLIB_USE_MASK 3 /* bottom two bits */ +#define PNG_ZLIB_IN_USE 4 /* a flag value */ + + png_uint_32 zlib_state; /* State of zlib initialization */ +/* End of material added at libpng 1.5.4 */ + int zlib_level; /* holds zlib compression level */ int zlib_method; /* holds zlib compression method */ int zlib_window_bits; /* holds zlib compression window bits */ int zlib_mem_level; /* holds zlib compression memory level */ int zlib_strategy; /* holds zlib compression strategy */ +#endif +/* Added at libpng 1.5.4 */ +#if defined(PNG_WRITE_COMPRESSED_TEXT_SUPPORTED) || \ + defined(PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED) + int zlib_text_level; /* holds zlib compression level */ + int zlib_text_method; /* holds zlib compression method */ + int zlib_text_window_bits; /* holds zlib compression window bits */ + int zlib_text_mem_level; /* holds zlib compression memory level */ + int zlib_text_strategy; /* holds zlib compression strategy */ +#endif +/* End of material added at libpng 1.5.4 */ png_uint_32 width; /* width of image in pixels */ png_uint_32 height; /* height of image in pixels */ @@ -84,6 +111,7 @@ struct png_struct_def png_bytep avg_row; /* buffer to save "avg" row when filtering */ png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ png_row_info row_info; /* used for transformation routines */ + png_size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */ png_uint_32 idat_size; /* current IDAT size for read */ png_uint_32 crc; /* current chunk CRC value */ @@ -108,7 +136,8 @@ struct png_struct_def png_uint_16 filler; /* filler bytes for pixel expansion */ #endif -#ifdef PNG_bKGD_SUPPORTED +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) png_byte background_gamma_type; png_fixed_point background_gamma; png_color_16 background; /* background color in screen gamma space */ @@ -209,7 +238,7 @@ struct png_struct_def #endif #ifdef PNG_TIME_RFC1123_SUPPORTED - png_charp time_buffer; /* String to hold RFC 1123 time text */ + char time_buffer[29]; /* String to hold RFC 1123 time text */ #endif /* New members added in libpng-1.0.6 */ diff --git a/src/3rdparty/libpng/pngtest.c b/src/3rdparty/libpng/pngtest.c index cbb7eb2..9084ada 100644 --- a/src/3rdparty/libpng/pngtest.c +++ b/src/3rdparty/libpng/pngtest.c @@ -1,7 +1,7 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -31,6 +31,8 @@ * of files at once by typing "pngtest -m file1.png file2.png ..." */ +#define _POSIX_SOURCE 1 + #include "zlib.h" #include "png.h" /* Copied from pngpriv.h but only used in error messages below. */ @@ -779,7 +781,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) int bit_depth, color_type; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf png_jmpbuf; + jmp_buf tmp_jmpbuf; #endif #endif @@ -848,7 +850,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) #ifdef PNG_SETJMP_SUPPORTED pngtest_debug("Setting jmpbuf for read struct"); #ifdef USE_FAR_KEYWORD - if (setjmp(png_jmpbuf)) + if (setjmp(tmp_jmpbuf)) #else if (setjmp(png_jmpbuf(read_ptr))) #endif @@ -866,14 +868,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) return (1); } #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(read_ptr), png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(read_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); #endif #ifdef PNG_WRITE_SUPPORTED pngtest_debug("Setting jmpbuf for write struct"); #ifdef USE_FAR_KEYWORD - if (setjmp(png_jmpbuf)) + if (setjmp(tmp_jmpbuf)) #else if (setjmp(png_jmpbuf(write_ptr))) #endif @@ -890,7 +892,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) } #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(write_ptr), png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(write_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); #endif #endif #endif @@ -913,6 +915,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) # endif #endif +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + /* Normally one would use Z_DEFAULT_STRATEGY for text compression. + * This is here just to make pngtest replicate the results from libpng + * versions prior to 1.5.4, and to test this new API. + */ + png_set_text_compression_strategy(write_ptr, Z_FILTERED); +#endif + if (status_dots_requested == 1) { #ifdef PNG_WRITE_SUPPORTED @@ -1784,4 +1794,4 @@ main(int argc, char *argv[]) } /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_5_1 Your_png_h_is_not_version_1_5_1; +typedef png_libpng_version_1_5_4 Your_png_h_is_not_version_1_5_4; diff --git a/src/3rdparty/libpng/pngtrans.c b/src/3rdparty/libpng/pngtrans.c index 137f555..6a6908d 100644 --- a/src/3rdparty/libpng/pngtrans.c +++ b/src/3rdparty/libpng/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -424,170 +424,119 @@ png_do_packswap(png_row_infop row_info, png_bytep row) #if defined(PNG_WRITE_FILLER_SUPPORTED) || \ defined(PNG_READ_STRIP_ALPHA_SUPPORTED) -/* Remove filler or alpha byte(s) */ +/* Remove a channel - this used to be 'png_do_strip_filler' but it used a + * somewhat weird combination of flags to determine what to do. All the calls + * to png_do_strip_filler are changed in 1.5.2 to call this instead with the + * correct arguments. + * + * The routine isn't general - the channel must be the channel at the start or + * end (not in the middle) of each pixel. + */ void /* PRIVATE */ -png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) +png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start) { - png_debug(1, "in png_do_strip_filler"); - + png_bytep sp = row; /* source pointer */ + png_bytep dp = row; /* destination pointer */ + png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */ + + /* At the start sp will point to the first byte to copy and dp to where + * it is copied to. ep always points just beyond the end of the row, so + * the loop simply copies (channels-1) channels until sp reaches ep. + * + * at_start: 0 -- convert AG, XG, ARGB, XRGB, AAGG, XXGG, etc. + * nonzero -- convert GA, GX, RGBA, RGBX, GGAA, RRGGBBXX, etc. + */ + + /* GA, GX, XG cases */ + if (row_info->channels == 2) { - png_bytep sp = row; - png_bytep dp = row; - png_uint_32 row_width = row_info->width; - png_uint_32 i; - - if ((row_info->color_type == PNG_COLOR_TYPE_RGB || - (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && - (flags & PNG_FLAG_STRIP_ALPHA))) && - row_info->channels == 4) + if (row_info->bit_depth == 8) { - if (row_info->bit_depth == 8) - { - /* This converts from RGBX or RGBA to RGB */ - if (flags & PNG_FLAG_FILLER_AFTER) - { - dp += 3; sp += 4; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp++; - } - } + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channel and, for sp, the filler */ + sp += 2, ++dp; - /* This converts from XRGB or ARGB to RGB */ - else - { - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } - row_info->pixel_depth = 24; - row_info->rowbytes = row_width * 3; - } + /* For a 1 pixel wide image there is nothing to do */ + while (sp < ep) + *dp++ = *sp, sp += 2; - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from RRGGBBXX or RRGGBBAA to RRGGBB */ - sp += 8; dp += 6; - for (i = 1; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } + row_info->pixel_depth = 8; + } - else - { - /* This converts from XXRRGGBB or AARRGGBB to RRGGBB */ - for (i = 0; i < row_width; i++) - { - /* This could be (although png_memcpy is probably slower): - png_memcpy(dp, sp, 6); - sp += 8; - dp += 6; - */ - - sp += 2; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - *dp++ = *sp++; - } - } + else if (row_info->bit_depth == 16) + { + if (at_start) /* Skip initial filler */ + sp += 2; + else /* Skip initial channel and, for sp, the filler */ + sp += 4, dp += 2; - row_info->pixel_depth = 48; - row_info->rowbytes = row_width * 6; - } - row_info->channels = 3; + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp, sp += 3; + + row_info->pixel_depth = 16; } - else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY || - (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && - (flags & PNG_FLAG_STRIP_ALPHA))) && - row_info->channels == 2) - { - if (row_info->bit_depth == 8) - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from GX or GA to G */ - for (i = 0; i < row_width; i++) - { - *dp++ = *sp++; - sp++; - } - } + else + return; /* bad bit depth */ - else - { - /* This converts from XG or AG to G */ - for (i = 0; i < row_width; i++) - { - sp++; - *dp++ = *sp++; - } - } + row_info->channels = 1; - row_info->pixel_depth = 8; - row_info->rowbytes = row_width; - } + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_GRAY; + } - else /* if (row_info->bit_depth == 16) */ - { - if (flags & PNG_FLAG_FILLER_AFTER) - { - /* This converts from GGXX or GGAA to GG */ - sp += 4; dp += 2; - for (i = 1; i < row_width; i++) - { - *dp++ = *sp++; - *dp++ = *sp++; - sp += 2; - } - } + /* RGBA, RGBX, XRGB cases */ + else if (row_info->channels == 4) + { + if (row_info->bit_depth == 8) + { + if (at_start) /* Skip initial filler */ + ++sp; + else /* Skip initial channels and, for sp, the filler */ + sp += 4, dp += 3; - else - { - /* This converts from XXGG or AAGG to GG */ - for (i = 0; i < row_width; i++) - { - sp += 2; - *dp++ = *sp++; - *dp++ = *sp++; - } - } + /* Note that the loop adds 3 to dp and 4 to sp each time. */ + while (sp < ep) + *dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2; - row_info->pixel_depth = 16; - row_info->rowbytes = row_width * 2; + row_info->pixel_depth = 24; + } + + else if (row_info->bit_depth == 16) + { + if (at_start) /* Skip initial filler */ + sp += 2; + else /* Skip initial channels and, for sp, the filler */ + sp += 8, dp += 6; + + while (sp < ep) + { + /* Copy 6 bytes, skip 2 */ + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp++; + *dp++ = *sp++, *dp++ = *sp, sp += 3; } - row_info->channels = 1; + + row_info->pixel_depth = 48; } - if (flags & PNG_FLAG_STRIP_ALPHA) - row_info->color_type = (png_byte)(row_info->color_type & - ~PNG_COLOR_MASK_ALPHA); + else + return; /* bad bit depth */ + + row_info->channels = 3; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_RGB; } + + else + return; /* The filler channel has gone already */ + + /* Fix the rowbytes value. */ + row_info->rowbytes = dp-row; } #endif @@ -703,11 +652,16 @@ png_get_user_transform_ptr(png_const_structp png_ptr) } #endif +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED png_uint_32 PNGAPI png_get_current_row_number(png_const_structp png_ptr) { + /* See the comments in png.h - this is the sub-image row when reading and + * interlaced image. + */ if (png_ptr != NULL) return png_ptr->row_number; + return PNG_UINT_32_MAX; /* help the app not to fail silently */ } @@ -718,6 +672,7 @@ png_get_current_pass_number(png_const_structp png_ptr) return png_ptr->pass; return 8; /* invalid */ } +#endif /* PNG_USER_TRANSFORM_INFO_SUPPORTED */ #endif /* PNG_READ_USER_TRANSFORM_SUPPORTED || PNG_WRITE_USER_TRANSFORM_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ diff --git a/src/3rdparty/libpng/pngvalid.c b/src/3rdparty/libpng/pngvalid.c index faebe4b..6d1736c 100644 --- a/src/3rdparty/libpng/pngvalid.c +++ b/src/3rdparty/libpng/pngvalid.c @@ -1,7 +1,7 @@ /* pngvalid.c - validate libpng by constructing then reading png files. * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 2011 Glenn Randers-Pehrson * Written by John Cunningham Bowler * @@ -19,6 +19,8 @@ * transformations performed by libpng. */ +#define _POSIX_SOURCE 1 + #include "png.h" #if PNG_LIBPNG_VER < 10500 /* This delibarately lacks the PNG_CONST. */ @@ -46,9 +48,13 @@ typedef png_byte *png_const_bytep; #define PNG_COL_IN_INTERLACE_PASS(x, pass) \ ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) -/* These are needed too for the defualt build: */ +/* These are needed too for the default build: */ #define PNG_WRITE_16BIT_SUPPORTED #define PNG_READ_16BIT_SUPPORTED + +/* This comes from pnglibconf.h afer 1.5: */ +#define PNG_GAMMA_THRESHOLD_FIXED\ + ((png_fixed_point)(PNG_GAMMA_THRESHOLD * 100000)) #endif #include "zlib.h" /* For crc32 */ @@ -108,6 +114,7 @@ static size_t safecatn(char *buffer, size_t bufsize, size_t pos, int n) return safecat(buffer, bufsize, pos, number); } +#ifdef PNG_READ_TRANSFORMS_SUPPORTED static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d, int precision) { @@ -115,59 +122,76 @@ static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d, sprintf(number, "%.*f", precision, d); return safecat(buffer, bufsize, pos, number); } +#endif static PNG_CONST char invalid[] = "invalid"; static PNG_CONST char sep[] = ": "; -/* NOTE: this is indexed by ln2(bit_depth)! */ -static PNG_CONST char *bit_depths[8] = -{ - "1", "2", "4", "8", "16", invalid, invalid, invalid -}; - static PNG_CONST char *colour_types[8] = { "greyscale", invalid, "truecolour", "indexed-colour", "greyscale with alpha", invalid, "truecolour with alpha", invalid }; -/* To get log-bit-depth from bit depth, returns 0 to 7 (7 on error). */ -static unsigned int -log2depth(png_byte bit_depth) +/* Generate random bytes. This uses a boring repeatable algorithm and it + * is implemented here so that it gives the same set of numbers on every + * architecture. It's a linear congruential generator (Knuth or Sedgewick + * "Algorithms") but it comes from the 'feedback taps' table in Horowitz and + * Hill, "The Art of Electronics". + */ +static void +make_random_bytes(png_uint_32* seed, void* pv, size_t size) { - switch (bit_depth) - { - case 1: - return 0; - - case 2: - return 1; + png_uint_32 u0 = seed[0], u1 = seed[1]; + png_bytep bytes = /*no cast required*/pv; - case 4: - return 2; + /* There are thirty three bits, the next bit in the sequence is bit-33 XOR + * bit-20. The top 1 bit is in u1, the bottom 32 are in u0. + */ + size_t i; + for (i=0; i<size; ++i) + { + /* First generate 8 new bits then shift them in at the end. */ + png_uint_32 u = ((u0 >> (20-8)) ^ ((u1 << 7) | (u0 >> (32-7)))) & 0xff; + u1 <<= 8; + u1 |= u0 >> 24; + u0 <<= 8; + u0 |= u; + *bytes++ = (png_byte)u; + } - case 8: - return 3; + seed[0] = u0; + seed[1] = u1; +} - case 16: - return 4; +static void +make_four_random_bytes(png_uint_32* seed, png_bytep bytes) +{ + make_random_bytes(seed, bytes, 4); +} - default: - return 7; - } +static void +randomize(void *pv, size_t size) +{ + static png_uint_32 random_seed[2] = {0x56789abc, 0xd}; + make_random_bytes(random_seed, pv, size); } +#define RANDOMIZE(this) randomize(&(this), sizeof (this)) + /* A numeric ID based on PNG file characteristics. The 'do_interlace' field * simply records whether pngvalid did the interlace itself or whether it - * was done by libpng. Width and height must be less than 256. + * was done by libpng. Width and height must be less than 256. 'palette' is an + * index of the palette to use for formats with a palette (0 otherwise.) */ -#define FILEID(col, depth, interlace, width, height, do_interlace) \ - ((png_uint_32)((col) + ((depth)<<3) + ((interlace)<<8) + \ +#define FILEID(col, depth, palette, interlace, width, height, do_interlace) \ + ((png_uint_32)((col) + ((depth)<<3) + ((palette)<<8) + ((interlace)<<13) + \ (((do_interlace)!=0)<<15) + ((width)<<16) + ((height)<<24))) #define COL_FROM_ID(id) ((png_byte)((id)& 0x7U)) #define DEPTH_FROM_ID(id) ((png_byte)(((id) >> 3) & 0x1fU)) -#define INTERLACE_FROM_ID(id) ((int)(((id) >> 8) & 0x3)) +#define PALETTE_FROM_ID(id) ((int)(((id) >> 8) & 0x1f)) +#define INTERLACE_FROM_ID(id) ((int)(((id) >> 13) & 0x3)) #define DO_INTERLACE_FROM_ID(id) ((int)(((id)>>15) & 1)) #define WIDTH_FROM_ID(id) (((id)>>16) & 0xff) #define HEIGHT_FROM_ID(id) (((id)>>24) & 0xff) @@ -175,20 +199,29 @@ log2depth(png_byte bit_depth) /* Utility to construct a standard name for a standard image. */ static size_t standard_name(char *buffer, size_t bufsize, size_t pos, png_byte colour_type, - int log_bit_depth, int interlace_type, png_uint_32 w, png_uint_32 h, - int do_interlace) + int bit_depth, int npalette, int interlace_type, + png_uint_32 w, png_uint_32 h, int do_interlace) { pos = safecat(buffer, bufsize, pos, colour_types[colour_type]); + if (npalette > 0) + { + pos = safecat(buffer, bufsize, pos, "["); + pos = safecatn(buffer, bufsize, pos, npalette); + pos = safecat(buffer, bufsize, pos, "]"); + } pos = safecat(buffer, bufsize, pos, " "); - pos = safecat(buffer, bufsize, pos, bit_depths[log_bit_depth]); - pos = safecat(buffer, bufsize, pos, " bit "); + pos = safecatn(buffer, bufsize, pos, bit_depth); + pos = safecat(buffer, bufsize, pos, " bit"); if (interlace_type != PNG_INTERLACE_NONE) - pos = safecat(buffer, bufsize, pos, "interlaced"); - if (do_interlace) - pos = safecat(buffer, bufsize, pos, "(pngvalid)"); - else - pos = safecat(buffer, bufsize, pos, "(libpng)"); + { + pos = safecat(buffer, bufsize, pos, " interlaced"); + if (do_interlace) + pos = safecat(buffer, bufsize, pos, "(pngvalid)"); + else + pos = safecat(buffer, bufsize, pos, "(libpng)"); + } + if (w > 0 || h > 0) { pos = safecat(buffer, bufsize, pos, " "); @@ -204,7 +237,7 @@ static size_t standard_name_from_id(char *buffer, size_t bufsize, size_t pos, png_uint_32 id) { return standard_name(buffer, bufsize, pos, COL_FROM_ID(id), - log2depth(DEPTH_FROM_ID(id)), INTERLACE_FROM_ID(id), + DEPTH_FROM_ID(id), PALETTE_FROM_ID(id), INTERLACE_FROM_ID(id), WIDTH_FROM_ID(id), HEIGHT_FROM_ID(id), DO_INTERLACE_FROM_ID(id)); } @@ -225,15 +258,29 @@ standard_name_from_id(char *buffer, size_t bufsize, size_t pos, png_uint_32 id) # define READ_BDHI 3 #endif +/* The following defines the number of different palettes to generate for + * each log bit depth of a colour type 3 standard image. + */ +#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1 : 16) + static int -next_format(png_bytep colour_type, png_bytep bit_depth) +next_format(png_bytep colour_type, png_bytep bit_depth, int* palette_number) { if (*bit_depth == 0) { - *colour_type = 0, *bit_depth = 1; + *colour_type = 0, *bit_depth = 1, *palette_number = 0; return 1; } + if (*colour_type == 3) + { + /* Add multiple palettes for colour type 3. */ + if (++*palette_number < PALETTE_COUNT(*bit_depth)) + return 1; + + *palette_number = 0; + } + *bit_depth = (png_byte)(*bit_depth << 1); /* Palette images are restricted to 8 bit depth */ @@ -272,6 +319,7 @@ next_format(png_bytep colour_type, png_bytep bit_depth) } } +#ifdef PNG_READ_TRANSFORMS_SUPPORTED static unsigned int sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth, png_uint_32 x, unsigned int sample_index) @@ -290,8 +338,9 @@ sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth, if (colour_type & 4) bit_index += x; /* Alpha channel */ + /* Multiple channels; select one: */ if (colour_type & (2+4)) - bit_index += sample_index * bit_depth; /* Multiple channels: select one */ + bit_index += sample_index * bit_depth; } /* Return the sample from the row as an integer. */ @@ -308,6 +357,7 @@ sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth, bit_index &= 7; return (result >> (8-bit_index-bit_depth)) & ((1U<<bit_depth)-1); } +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ /* Copy a single pixel, of a given size, from one buffer to another - * while this is basically bit addressed there is an implicit assumption @@ -389,6 +439,14 @@ typedef struct png_store_buffer #define FILE_NAME_SIZE 64 +typedef struct store_palette_entry /* record of a single palette entry */ +{ + png_byte red; + png_byte green; + png_byte blue; + png_byte alpha; +} store_palette_entry, store_palette[256]; + typedef struct png_store_file { struct png_store_file* next; /* as many as you like... */ @@ -396,6 +454,8 @@ typedef struct png_store_file png_uint_32 id; /* must be correct (see FILEID) */ png_size_t datacount; /* In this (the last) buffer */ png_store_buffer data; /* Last buffer in file */ + int npalette; /* Number of entries in palette */ + store_palette_entry* palette; /* May be NULL */ } png_store_file; /* The following is a pool of memory allocated by a single libpng read or write @@ -448,7 +508,9 @@ typedef struct png_store png_store_buffer* next; /* Set when reading */ png_size_t readpos; /* Position in *next */ png_byte* image; /* Buffer for reading interlaced images */ - size_t cb_image; /* Size of this buffer */ + png_size_t cb_image; /* Size of this buffer */ + png_size_t cb_row; /* Row size of the image(s) */ + png_uint_32 image_h; /* Number of rows in a single image */ store_pool read_memory_pool; /* Write fields */ @@ -459,37 +521,20 @@ typedef struct png_store char wname[FILE_NAME_SIZE]; png_store_buffer new; /* The end of the new PNG file being written. */ store_pool write_memory_pool; + store_palette_entry* palette; + int npalette; } png_store; /* Initialization and cleanup */ static void -store_pool_mark(png_byte *mark) +store_pool_mark(png_bytep mark) { - /* Generate a new mark. This uses a boring repeatable algorithm and it is - * implemented here so that it gives the same set of numbers on every - * architecture. It's a linear congruential generator (Knuth or Sedgewick - * "Algorithms") but it comes from the 'feedback taps' table in Horowitz and - * Hill, "The Art of Electronics". - */ - static png_uint_32 u0 = 0x12345678, u1 = 1; + static png_uint_32 store_seed[2] = { 0x12345678, 1}; - /* There are thirty three bits, the next bit in the sequence is bit-33 XOR - * bit-20. The top 1 bit is in u1, the bottom 32 are in u0. - */ - int i; - for (i=0; i<4; ++i) - { - /* First generate 8 new bits then shift them in at the end. */ - png_uint_32 u = ((u0 >> (20-8)) ^ ((u1 << 7) | (u0 >> (32-7)))) & 0xff; - u1 <<= 8; - u1 |= u0 >> 24; - u0 <<= 8; - u0 |= u; - *mark++ = (png_byte)u; - } + make_four_random_bytes(store_seed, mark); } -/* Use this for random 32 bit values, this function makes sure the result is +/* Use this for random 32 bit values; this function makes sure the result is * non-zero. */ static png_uint_32 @@ -544,40 +589,14 @@ store_init(png_store* ps) ps->readpos = 0; ps->image = NULL; ps->cb_image = 0; + ps->cb_row = 0; + ps->image_h = 0; ps->pwrite = NULL; ps->piwrite = NULL; ps->writepos = 0; ps->new.prev = NULL; -} - -/* This somewhat odd function is used when reading an image to ensure that the - * buffer is big enough - this is why a png_structp is available. - */ -static void -store_ensure_image(png_store *ps, png_structp pp, size_t cb) -{ - if (ps->cb_image < cb) - { - if (ps->image != NULL) - { - free(ps->image-1); - ps->cb_image = 0; - } - - /* The buffer is deliberately mis-aligned. */ - ps->image = malloc(cb+1); - if (ps->image == NULL) - png_error(pp, "OOM allocating image buffer"); - - ++(ps->image); - ps->cb_image = cb; - } - - /* And, for error checking, the whole buffer is set to '1' - this - * matches what happens with the 'size' test images on write and also - * matches the unused bits in the test rows. - */ - memset(ps->image, 0xff, cb); + ps->palette = NULL; + ps->npalette = 0; } static void @@ -596,6 +615,12 @@ store_freenew(png_store *ps) { store_freebuffer(&ps->new); ps->writepos = 0; + if (ps->palette != NULL) + { + free(ps->palette); + ps->palette = NULL; + ps->npalette = 0; + } } static void @@ -625,6 +650,12 @@ store_freefile(png_store_file **ppf) store_freebuffer(&(*ppf)->data); (*ppf)->datacount = 0; + if ((*ppf)->palette != NULL) + { + free((*ppf)->palette); + (*ppf)->palette = NULL; + (*ppf)->npalette = 0; + } free(*ppf); *ppf = NULL; } @@ -645,6 +676,10 @@ store_storefile(png_store *ps, png_uint_32 id) pf->datacount = ps->writepos; ps->new.prev = NULL; ps->writepos = 0; + pf->palette = ps->palette; + pf->npalette = ps->npalette; + ps->palette = 0; + ps->npalette = 0; /* And save it. */ pf->next = ps->saved; @@ -691,6 +726,21 @@ store_message(png_store *ps, png_structp pp, char *buffer, size_t bufsize, return pos; } +/* Verbose output to the error stream: */ +static void +store_verbose(png_store *ps, png_structp pp, png_const_charp prefix, + png_const_charp message) +{ + char buffer[512]; + + if (prefix) + fputs(prefix, stderr); + + (void)store_message(ps, pp, buffer, sizeof buffer, 0, message); + fputs(buffer, stderr); + fputc('\n', stderr); +} + /* Log an error or warning - the relevant count is always incremented. */ static void store_log(png_store* ps, png_structp pp, png_const_charp message, int is_error) @@ -704,19 +754,7 @@ store_log(png_store* ps, png_structp pp, png_const_charp message, int is_error) store_message(ps, pp, ps->error, sizeof ps->error, 0, message); if (ps->verbose) - { - char buffer[256]; - size_t pos; - - if (is_error) - pos = safecat(buffer, sizeof buffer, 0, "error: "); - else - pos = safecat(buffer, sizeof buffer, 0, "warning: "); - - store_message(ps, pp, buffer, sizeof buffer, pos, message); - fputs(buffer, stderr); - fputc('\n', stderr); - } + store_verbose(ps, pp, is_error ? "error: " : "warning: ", message); } /* Functions to use as PNG callbacks. */ @@ -746,6 +784,141 @@ store_warning(png_structp pp, png_const_charp message) ps->saw_warning = 1; } +/* These somewhat odd functions are used when reading an image to ensure that + * the buffer is big enough, the png_structp is for errors. + */ +/* Return a single row from the correct image. */ +static png_bytep +store_image_row(PNG_CONST png_store* ps, png_structp pp, int nImage, + png_uint_32 y) +{ + png_size_t coffset = (nImage * ps->image_h + y) * (ps->cb_row + 5) + 2; + + if (ps->image == NULL) + png_error(pp, "no allocated image"); + + if (coffset + ps->cb_row + 3 > ps->cb_image) + png_error(pp, "image too small"); + + return ps->image + coffset; +} + +static void +store_image_free(png_store *ps, png_structp pp) +{ + if (ps->image != NULL) + { + png_bytep image = ps->image; + + if (image[-1] != 0xed || image[ps->cb_image] != 0xfe) + { + if (pp != NULL) + png_error(pp, "png_store image overwrite (1)"); + else + store_log(ps, NULL, "png_store image overwrite (2)", 1); + } + + ps->image = NULL; + ps->cb_image = 0; + --image; + free(image); + } +} + +static void +store_ensure_image(png_store *ps, png_structp pp, int nImages, png_size_t cbRow, + png_uint_32 cRows) +{ + png_size_t cb = nImages * cRows * (cbRow + 5); + + if (ps->cb_image < cb) + { + png_bytep image; + + store_image_free(ps, pp); + + /* The buffer is deliberately mis-aligned. */ + image = malloc(cb+2); + if (image == NULL) + { + /* Called from the startup - ignore the error for the moment. */ + if (pp == NULL) + return; + + png_error(pp, "OOM allocating image buffer"); + } + + /* These magic tags are used to detect overwrites above. */ + ++image; + image[-1] = 0xed; + image[cb] = 0xfe; + + ps->image = image; + ps->cb_image = cb; + } + + /* We have an adequate sized image; lay out the rows. There are 2 bytes at + * the start and three at the end of each (this ensures that the row + * alignment starts out odd - 2+1 and changes for larger images on each row.) + */ + ps->cb_row = cbRow; + ps->image_h = cRows; + + /* For error checking, the whole buffer is set to '1' - this matches what + * happens with the 'size' test images on write and also matches the unused + * bits in the test rows. + */ + memset(ps->image, 0xff, cb); + + /* Then put in the marks. */ + while (--nImages >= 0) + { + png_uint_32 y; + + for (y=0; y<cRows; ++y) + { + png_bytep row = store_image_row(ps, pp, nImages, y); + + /* The markers: */ + row[-2] = 190; + row[-1] = 239; + row[cbRow] = 222; + row[cbRow+1] = 173; + row[cbRow+2] = 17; + } + } +} + +static void +store_image_check(PNG_CONST png_store* ps, png_structp pp, int iImage) +{ + png_const_bytep image = ps->image; + + if (image[-1] != 0xed || image[ps->cb_image] != 0xfe) + png_error(pp, "image overwrite"); + else + { + png_size_t cbRow = ps->cb_row; + png_uint_32 rows = ps->image_h; + + image += iImage * (cbRow+5) * ps->image_h; + + image += 2; /* skip image first row markers */ + + while (rows-- > 0) + { + if (image[-2] != 190 || image[-1] != 239) + png_error(pp, "row start overwritten"); + + if (image[cbRow] != 222 || image[cbRow+1] != 173 || + image[cbRow+2] != 17) + png_error(pp, "row end overwritten"); + + image += cbRow+5; + } + } +} + static void store_write(png_structp pp, png_bytep pb, png_size_t st) { @@ -789,6 +962,7 @@ store_read_buffer_size(png_store *ps) return ps->current->datacount; } +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Return total bytes available for read. */ static size_t store_read_buffer_avail(png_store *ps) @@ -813,6 +987,7 @@ store_read_buffer_avail(png_store *ps) return 0; } +#endif static int store_read_buffer_next(png_store *ps) @@ -894,6 +1069,44 @@ store_progressive_read(png_store *ps, png_structp pp, png_infop pi) while (store_read_buffer_next(ps)); } +/* The caller must fill this in: */ +static store_palette_entry * +store_write_palette(png_store *ps, int npalette) +{ + if (ps->pwrite == NULL) + store_log(ps, NULL, "attempt to write palette without write stream", 1); + + if (ps->palette != NULL) + png_error(ps->pwrite, "multiple store_write_palette calls"); + + /* This function can only return NULL if called with '0'! */ + if (npalette > 0) + { + ps->palette = malloc(npalette * sizeof *ps->palette); + + if (ps->palette == NULL) + png_error(ps->pwrite, "store new palette: OOM"); + + ps->npalette = npalette; + } + + return ps->palette; +} + +static store_palette_entry * +store_current_palette(png_store *ps, int *npalette) +{ + /* This is an internal error (the call has been made outside a read + * operation.) + */ + if (ps->current == NULL) + store_log(ps, ps->pread, "no current stream for palette", 1); + + /* The result may be null if there is no palette. */ + *npalette = ps->current->npalette; + return ps->current->palette; +} + /***************************** MEMORY MANAGEMENT*** ***************************/ /* A store_memory is simply the header for an allocated block of memory. The * pointer returned to libpng is just after the end of the header block, the @@ -979,7 +1192,7 @@ store_pool_delete(png_store *ps, store_pool *pool) next->next = NULL; fprintf(stderr, "\t%lu bytes @ %p\n", - (unsigned long)next->size, next+1); + (unsigned long)next->size, (PNG_CONST void*)(next+1)); /* The NULL means this will always return, even if the memory is * corrupted. */ @@ -1258,13 +1471,7 @@ store_delete(png_store *ps) store_write_reset(ps); store_read_reset(ps); store_freefile(&ps->saved); - - if (ps->image != NULL) - { - free(ps->image-1); - ps->image = NULL; - ps->cb_image = 0; - } + store_image_free(ps, NULL); } /*********************** PNG FILE MODIFICATION ON READ ************************/ @@ -1310,11 +1517,19 @@ typedef struct png_modifier */ double maxout8; /* Maximum output value error */ double maxabs8; /* Absolute sample error 0..1 */ + double maxcalc8; /* Absolute sample error 0..1 */ double maxpc8; /* Percentage sample error 0..100% */ double maxout16; /* Maximum output value error */ double maxabs16; /* Absolute sample error 0..1 */ + double maxcalc16;/* Absolute sample error 0..1 */ double maxpc16; /* Percentage sample error 0..100% */ + /* Log limits - values above this are logged, but not necessarily + * warned. + */ + double log8; /* Absolute error in 8 bits to log */ + double log16; /* Absolute error in 16 bits to log */ + /* Logged 8 and 16 bit errors ('output' values): */ double error_gray_2; double error_gray_4; @@ -1322,6 +1537,7 @@ typedef struct png_modifier double error_gray_16; double error_color_8; double error_color_16; + double error_indexed; /* Flags: */ /* Whether or not to interlace. */ @@ -1341,11 +1557,24 @@ typedef struct png_modifier unsigned int use_input_precision_sbit :1; unsigned int use_input_precision_16to8 :1; + /* If set assume that the calculation bit depth is set by the input + * precision, not the output precision. + */ + unsigned int calculations_use_input_precision :1; + + /* If set assume that the calculations are done in 16 bits even if both input + * and output are 8 bit or less. + */ + unsigned int assume_16_bit_calculations :1; + /* Which gamma tests to run: */ unsigned int test_gamma_threshold :1; unsigned int test_gamma_transform :1; /* main tests */ unsigned int test_gamma_sbit :1; - unsigned int test_gamma_strip16 :1; + unsigned int test_gamma_scale16 :1; + unsigned int test_gamma_background :1; + unsigned int test_gamma_alpha_mode :1; + unsigned int test_gamma_expand16 :1; unsigned int log :1; /* Log max error */ @@ -1358,35 +1587,6 @@ typedef struct png_modifier png_byte buffer[1024]; } png_modifier; -static double abserr(png_modifier *pm, png_byte bit_depth) -{ - return bit_depth == 16 ? pm->maxabs16 : pm->maxabs8; -} - -static double pcerr(png_modifier *pm, png_byte bit_depth) -{ - return (bit_depth == 16 ? pm->maxpc16 : pm->maxpc8) * .01; -} - -static double outerr(png_modifier *pm, png_byte bit_depth) -{ - /* There is a serious error in the 2 and 4 bit grayscale transform because - * the gamma table value (8 bits) is simply shifted, not rounded, so the - * error in 4 bit greyscale gamma is up to the value below. This is a hack - * to allow pngvalid to succeed: - */ - if (bit_depth == 2) - return .73182-.5; - - if (bit_depth == 4) - return .90644-.5; - - if (bit_depth == 16) - return pm->maxout16; - - return pm->maxout8; -} - /* This returns true if the test should be stopped now because it has already * failed and it is running silently. */ @@ -1404,10 +1604,14 @@ modifier_init(png_modifier *pm) pm->modifications = NULL; pm->state = modifier_start; pm->sbitlow = 1U; - pm->maxout8 = pm->maxpc8 = pm->maxabs8 = 0; - pm->maxout16 = pm->maxpc16 = pm->maxabs16 = 0; + pm->ngammas = 0; + pm->gammas = 0; + pm->maxout8 = pm->maxpc8 = pm->maxabs8 = pm->maxcalc8 = 0; + pm->maxout16 = pm->maxpc16 = pm->maxabs16 = pm->maxcalc16 = 0; + pm->log8 = pm->log16 = 0; /* Means 'off' */ pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0; pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0; + pm->error_indexed = 0; pm->interlace_type = PNG_INTERLACE_NONE; pm->test_standard = 0; pm->test_size = 0; @@ -1415,15 +1619,156 @@ modifier_init(png_modifier *pm) pm->use_input_precision = 0; pm->use_input_precision_sbit = 0; pm->use_input_precision_16to8 = 0; + pm->calculations_use_input_precision = 0; pm->test_gamma_threshold = 0; pm->test_gamma_transform = 0; pm->test_gamma_sbit = 0; - pm->test_gamma_strip16 = 0; + pm->test_gamma_scale16 = 0; + pm->test_gamma_background = 0; + pm->test_gamma_alpha_mode = 0; + pm->test_gamma_expand16 = 0; pm->log = 0; /* Rely on the memset for all the other fields - there are no pointers */ } +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +/* If pm->calculations_use_input_precision is set then operations will happen + * with only 8 bit precision unless both the input and output bit depth are 16. + * + * If pm->assume_16_bit_calculations is set then even 8 bit calculations use 16 + * bit precision. This only affects those of the following limits that pertain + * to a calculation - not a digitization operation! + */ +static double abserr(png_modifier *pm, int in_depth, int out_depth) +{ + /* Absolute error permitted in linear values - affected by the bit depth of + * the calculations. + */ + if (pm->assume_16_bit_calculations || (out_depth == 16 && (in_depth == 16 || + !pm->calculations_use_input_precision))) + return pm->maxabs16; + else + return pm->maxabs8; +} + +static double calcerr(png_modifier *pm, int in_depth, int out_depth) +{ + /* Error in the linear composition arithmetic - only relevant when + * composition actually happens (0 < alpha < 1). + */ + if (pm->assume_16_bit_calculations || (out_depth == 16 && (in_depth == 16 || + !pm->calculations_use_input_precision))) + return pm->maxcalc16; + else + return pm->maxcalc8; +} + +static double pcerr(png_modifier *pm, int in_depth, int out_depth) +{ + /* Percentage error permitted in the linear values. Note that the specified + * value is a percentage but this routine returns a simple number. + */ + if (pm->assume_16_bit_calculations || (out_depth == 16 && (in_depth == 16 || + !pm->calculations_use_input_precision))) + return pm->maxpc16 * .01; + else + return pm->maxpc8 * .01; +} + +/* Output error - the error in the encoded value. This is determined by the + * digitization of the output so can be +/-0.5 in the actual output value. In + * the expand_16 case with the current code in libpng the expand happens after + * all the calculations are done in 8 bit arithmetic, so even though the output + * depth is 16 the output error is determined by the 8 bit calculation. + * + * This limit is not determined by the bit depth of internal calculations. + * + * The specified parameter does *not* include the base .5 digitization error but + * it is added here. + */ +static double outerr(png_modifier *pm, int in_depth, int out_depth) +{ + /* There is a serious error in the 2 and 4 bit grayscale transform because + * the gamma table value (8 bits) is simply shifted, not rounded, so the + * error in 4 bit greyscale gamma is up to the value below. This is a hack + * to allow pngvalid to succeed: + * + * TODO: fix this in libpng + */ + if (out_depth == 2) + return .73182-.5; + + if (out_depth == 4) + return .90644-.5; + + if (out_depth == 16 && (in_depth == 16 || + !pm->calculations_use_input_precision)) + return pm->maxout16; + + /* This is the case where the value was calculated at 8-bit precision then + * scaled to 16 bits. + */ + else if (out_depth == 16) + return pm->maxout8 * 257; + + else + return pm->maxout8; +} + +/* This does the same thing as the above however it returns the value to log, + * rather than raising a warning. This is useful for debugging to track down + * exactly what set of parameters cause high error values. + */ +static double outlog(png_modifier *pm, int in_depth, int out_depth) +{ + /* The command line parameters are either 8 bit (0..255) or 16 bit (0..65535) + * and so must be adjusted for low bit depth grayscale: + */ + if (out_depth <= 8) + { + if (pm->log8 == 0) /* switched off */ + return 256; + + if (out_depth < 8) + return pm->log8 / 255 * ((1<<out_depth)-1); + + return pm->log8; + } + + if (out_depth == 16 && (in_depth == 16 || + !pm->calculations_use_input_precision)) + { + if (pm->log16 == 0) + return 65536; + + return pm->log16; + } + + /* This is the case where the value was calculated at 8-bit precision then + * scaled to 16 bits. + */ + if (pm->log8 == 0) + return 65536; + + return pm->log8 * 257; +} + +/* This complements the above by providing the appropriate quantization for the + * final value. Normally this would just be quantization to an integral value, + * but in the 8 bit calculation case it's actually quantization to a multiple of + * 257! + */ +static int output_quantization_factor(png_modifier *pm, int in_depth, + int out_depth) +{ + if (out_depth == 16 && in_depth != 16 + && pm->calculations_use_input_precision) + return 257; + else + return 1; +} + /* One modification structure must be provided for each chunk to be modified (in * fact more than one can be provided if multiple separate changes are desired * for a single chunk.) Modifications include adding a new chunk when a @@ -1586,7 +1931,7 @@ modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st) store_read_imp(&pm->this, pb, cb); pb += cb; st -= cb; - if (st <= 0) return; + if (st == 0) return; } /* No more bytes to flush, read a header, or handle a pending @@ -1813,6 +2158,7 @@ set_modifier_for_read(png_modifier *pm, png_infopp ppi, png_uint_32 id, return set_store_for_read(&pm->this, ppi, id, name); } +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ /***************************** STANDARD PNG FILES *****************************/ /* Standard files - write and save standard files. */ @@ -1840,9 +2186,170 @@ set_modifier_for_read(png_modifier *pm, png_infopp ppi, png_uint_32 id, * a maximum width of 16 pixels (for the 64bpp case.) They also have a maximum * height of 16 rows. The width and height are stored in the FILEID and, being * non-zero, indicate a size file. + * + * For palette image (colour type 3) multiple transform images are stored with + * the same bit depth to allow testing of more colour combinations - + * particularly important for testing the gamma code because libpng uses a + * different code path for palette images. For size images a single palette is + * used. + */ + +/* Make a 'standard' palette. Because there are only 256 entries in a palette + * (maximum) this actually makes a random palette in the hope that enough tests + * will catch enough errors. (Note that the same palette isn't produced every + * time for the same test - it depends on what previous tests have been run - + * but a given set of arguments to pngvalid will always produce the same palette + * at the same test! This is why pseudo-random number generators are useful for + * testing.) + * + * The store must be open for write when this is called, otherwise an internal + * error will occur. This routine contains its own magic number seed, so the + * palettes generated don't change if there are intervening errors (changing the + * calls to the store_mark seed.) + */ +static store_palette_entry * +make_standard_palette(png_store* ps, int npalette, int do_tRNS) +{ + static png_uint_32 palette_seed[2] = { 0x87654321, 9 }; + + int i = 0; + png_byte values[256][4]; + + /* Always put in black and white plus the six primary and secondary colors. + */ + for (; i<8; ++i) + { + values[i][1] = (i&1) ? 255 : 0; + values[i][2] = (i&2) ? 255 : 0; + values[i][3] = (i&4) ? 255 : 0; + } + + /* Then add 62 greys (one quarter of the remaining 256 slots). */ + { + int j = 0; + png_byte random_bytes[4]; + png_byte need[256]; + + need[0] = 0; /*got black*/ + memset(need+1, 1, (sizeof need)-2); /*need these*/ + need[255] = 0; /*but not white*/ + + while (i<70) + { + png_byte b; + + if (j==0) + { + make_four_random_bytes(palette_seed, random_bytes); + j = 4; + } + + b = random_bytes[--j]; + if (need[b]) + { + values[i][1] = b; + values[i][2] = b; + values[i++][3] = b; + } + } + } + + /* Finally add 192 colors at random - don't worry about matches to things we + * already have, chance is less than 1/65536. Don't worry about greys, + * chance is the same, so we get a duplicate or extra gray less than 1 time + * in 170. + */ + for (; i<256; ++i) + make_four_random_bytes(palette_seed, values[i]); + + /* Fill in the alpha values in the first byte. Just use all possible values + * (0..255) in an apparently random order: + */ + { + store_palette_entry *palette; + png_byte selector[4]; + + make_four_random_bytes(palette_seed, selector); + + if (do_tRNS) + for (i=0; i<256; ++i) + values[i][0] = (png_byte)(i ^ selector[0]); + + else + for (i=0; i<256; ++i) + values[i][0] = 255; /* no transparency/tRNS chunk */ + + /* 'values' contains 256 ARGB values, but we only need 'npalette'. + * 'npalette' will always be a power of 2: 2, 4, 16 or 256. In the low + * bit depth cases select colors at random, else it is difficult to have + * a set of low bit depth palette test with any chance of a reasonable + * range of colors. Do this by randomly permuting values into the low + * 'npalette' entries using an XOR mask generated here. This also + * permutes the npalette == 256 case in a potentially useful way (there is + * no relationship between palette index and the color value therein!) + */ + palette = store_write_palette(ps, npalette); + + for (i=0; i<npalette; ++i) + { + palette[i].alpha = values[i ^ selector[1]][0]; + palette[i].red = values[i ^ selector[1]][1]; + palette[i].green = values[i ^ selector[1]][2]; + palette[i].blue = values[i ^ selector[1]][3]; + } + + return palette; + } +} + +/* Initialize a standard palette on a write stream. The 'do_tRNS' argument + * indicates whether or not to also set the tRNS chunk. */ +static void +init_standard_palette(png_store *ps, png_structp pp, png_infop pi, int npalette, + int do_tRNS) +{ + store_palette_entry *ppal = make_standard_palette(ps, npalette, do_tRNS); -/* The number of passes is related to the interlace type. There wass no libpng + { + int i; + png_color palette[256]; + + /* Set all entries to detect overread errors. */ + for (i=0; i<npalette; ++i) + { + palette[i].red = ppal[i].red; + palette[i].green = ppal[i].green; + palette[i].blue = ppal[i].blue; + } + + /* Just in case fill in the rest with detectable values: */ + for (; i<256; ++i) + palette[i].red = palette[i].green = palette[i].blue = 42; + + png_set_PLTE(pp, pi, palette, npalette); + } + + if (do_tRNS) + { + int i, j; + png_byte tRNS[256]; + + /* Set all the entries, but skip trailing opaque entries */ + for (i=j=0; i<npalette; ++i) + if ((tRNS[i] = ppal[i].alpha) < 255) + j = i+1; + + /* Fill in the remainder with a detectable value: */ + for (; i<256; ++i) + tRNS[i] = 24; + + if (j > 0) + png_set_tRNS(pp, pi, tRNS, j, 0/*color*/); + } +} + +/* The number of passes is related to the interlace type. There was no libpng * API to determine this prior to 1.5, so we need an inquiry function: */ static int @@ -1866,6 +2373,8 @@ bit_size(png_structp pp, png_byte colour_type, png_byte bit_depth) { switch (colour_type) { + default: png_error(pp, "invalid color type"); + case 0: return bit_depth; case 2: return 3*bit_depth; @@ -1875,8 +2384,6 @@ bit_size(png_structp pp, png_byte colour_type, png_byte bit_depth) case 4: return 2*bit_depth; case 6: return 4*bit_depth; - - default: png_error(pp, "invalid color type"); } } @@ -1884,12 +2391,7 @@ bit_size(png_structp pp, png_byte colour_type, png_byte bit_depth) #define TRANSFORM_ROWMAX (TRANSFORM_WIDTH*8U) #define SIZE_ROWMAX (16*8U) /* 16 pixels, max 8 bytes each - 128 bytes */ #define STANDARD_ROWMAX TRANSFORM_ROWMAX /* The larger of the two */ - -/* So the maximum image sizes are as follows. A 'transform' image may require - * more than 65535 bytes. The size images are a maximum of 2046 bytes. - */ -#define TRANSFORM_IMAGEMAX (TRANSFORM_ROWMAX * (png_uint_32)2048) -#define SIZE_IMAGEMAX (SIZE_ROWMAX * 16U) +#define SIZE_HEIGHTMAX 16 /* Maximum range of size images */ static size_t transform_rowsize(png_structp pp, png_byte colour_type, png_byte bit_depth) @@ -1925,6 +2427,7 @@ transform_height(png_structp pp, png_byte colour_type, png_byte bit_depth) case 48: case 64: return 2048;/* 4 x 65536 pixels. */ +# define TRANSFORM_HEIGHTMAX 2048 default: return 0; /* Error, will be caught later */ @@ -2088,7 +2591,8 @@ transform_row(png_structp pp, png_byte buffer[TRANSFORM_ROWMAX], */ static void make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, - png_byte PNG_CONST bit_depth, int interlace_type, png_const_charp name) + png_byte PNG_CONST bit_depth, int palette_number, int interlace_type, + png_const_charp name) { context(ps, fault); @@ -2111,17 +2615,32 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, bit_depth, colour_type, interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - if (colour_type == 3) /* palette */ +#ifdef PNG_TEXT_SUPPORTED { - unsigned int i = 0; - png_color pal[256]; - - do - pal[i].red = pal[i].green = pal[i].blue = (png_byte)i; - while(++i < 256U); + static char key[] = "image name"; /* must be writeable */ + size_t pos; + png_text text; + char copy[FILE_NAME_SIZE]; - png_set_PLTE(pp, pi, pal, 256); + /* Use a compressed text string to test the correct interaction of text + * compression and IDAT compression. + */ + text.compression = PNG_TEXT_COMPRESSION_zTXt; + text.key = key; + /* Yuck: the text must be writable! */ + pos = safecat(copy, sizeof copy, 0, ps->wname); + text.text = copy; + text.text_length = pos; + text.itxt_length = 0; + text.lang = 0; + text.lang_key = 0; + + png_set_text(pp, pi, &text, 1); } +#endif + + if (colour_type == 3) /* palette */ + init_standard_palette(ps, pp, pi, 1U << bit_depth, 1/*do tRNS*/); png_write_info(pp, pi); @@ -2155,11 +2674,32 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, } } +#ifdef PNG_TEXT_SUPPORTED + { + static char key[] = "end marker"; + static char comment[] = "end"; + png_text text; + + /* Use a compressed text string to test the correct interaction of text + * compression and IDAT compression. + */ + text.compression = PNG_TEXT_COMPRESSION_zTXt; + text.key = key; + text.text = comment; + text.text_length = (sizeof comment)-1; + text.itxt_length = 0; + text.lang = 0; + text.lang_key = 0; + + png_set_text(pp, pi, &text, 1); + } +#endif + png_write_end(pp, pi); /* And store this under the appropriate id, then clean up. */ - store_storefile(ps, FILEID(colour_type, bit_depth, interlace_type, - 0, 0, 0)); + store_storefile(ps, FILEID(colour_type, bit_depth, palette_number, + interlace_type, 0, 0, 0)); store_write_reset(ps); } @@ -2175,10 +2715,19 @@ make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, } static void -make_standard(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo, - int PNG_CONST bdhi) +make_transform_images(png_store *ps) { - for (; bdlo <= bdhi; ++bdlo) + png_byte colour_type = 0; + png_byte bit_depth = 0; + int palette_number = 0; + + /* This is in case of errors. */ + safecat(ps->test, sizeof ps->test, 0, "make standard images"); + + /* Use next_format to enumerate all the combinations we test, including + * generating multiple low bit depth palette images. + */ + while (next_format(&colour_type, &bit_depth, &palette_number)) { int interlace_type; @@ -2187,29 +2736,14 @@ make_standard(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo, { char name[FILE_NAME_SIZE]; - standard_name(name, sizeof name, 0, colour_type, bdlo, interlace_type, - 0, 0, 0); - make_transform_image(ps, colour_type, DEPTH(bdlo), interlace_type, - name); + standard_name(name, sizeof name, 0, colour_type, bit_depth, + palette_number, interlace_type, 0, 0, 0); + make_transform_image(ps, colour_type, bit_depth, palette_number, + interlace_type, name); } } } -static void -make_transform_images(png_store *ps) -{ - /* This is in case of errors. */ - safecat(ps->test, sizeof ps->test, 0, "make standard images"); - - /* Arguments are colour_type, low bit depth, high bit depth - */ - make_standard(ps, 0, 0, WRITE_BDHI); - make_standard(ps, 2, 3, WRITE_BDHI); - make_standard(ps, 3, 0, 3 /*palette: max 8 bits*/); - make_standard(ps, 4, 3, WRITE_BDHI); - make_standard(ps, 6, 3, WRITE_BDHI); -} - /* The following two routines use the PNG interlace support macros from * png.h to interlace or deinterlace rows. */ @@ -2254,7 +2788,7 @@ deinterlace_row(png_bytep buffer, png_const_bytep row, } } -/* Build a single row for the 'size' test images, this fills in only the +/* Build a single row for the 'size' test images; this fills in only the * first bit_width bits of the sample row. */ static void @@ -2294,8 +2828,8 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, /* Make a name and get an appropriate id for the store: */ char name[FILE_NAME_SIZE]; - PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, interlace_type, - w, h, do_interlace); + PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, 0/*palette*/, + interlace_type, w, h, do_interlace); standard_name_from_id(name, sizeof name, 0, id); pp = set_store_for_write(ps, &pi, name); @@ -2310,20 +2844,8 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - /* Same palette as make_transform_image - I don' think there is any - * benefit from using a different one (JB 20101211) - */ if (colour_type == 3) /* palette */ - { - unsigned int i = 0; - png_color pal[256]; - - do - pal[i].red = pal[i].green = pal[i].blue = (png_byte)i; - while(++i < 256U); - - png_set_PLTE(pp, pi, pal, 256); - } + init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); png_write_info(pp, pi); @@ -2369,7 +2891,7 @@ make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, png_byte tempRow[SIZE_ROWMAX]; /* If do_interlace *and* the image is interlaced we - * need a reduced interlace row, this may be reduced + * need a reduced interlace row; this may be reduced * to empty. */ if (do_interlace && interlace_type == PNG_INTERLACE_ADAM7) @@ -2480,6 +3002,7 @@ standard_row(png_structp pp, png_byte std[STANDARD_ROWMAX], png_uint_32 id, * to ensure that they get detected - it should not be possible to write an * invalid image with libpng! */ +#ifdef PNG_WARNINGS_SUPPORTED static void sBIT0_error_fn(png_structp pp, png_infop pi) { @@ -2514,6 +3037,7 @@ static PNG_CONST struct unsigned int warning :1; /* the error is a warning... */ } error_test[] = { + /* no warnings makes these errors undetectable. */ { sBIT0_error_fn, "sBIT(0): failed to detect error", 1 }, { sBIT_error_fn, "sBIT(too big): failed to detect error", 1 }, }; @@ -2539,18 +3063,9 @@ make_error(png_store* volatile ps, png_byte PNG_CONST colour_type, interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); if (colour_type == 3) /* palette */ - { - unsigned int i = 0; - png_color pal[256]; - - do - pal[i].red = pal[i].green = pal[i].blue = (png_byte)i; - while(++i < 256U); + init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/); - png_set_PLTE(pp, pi, pal, 256); - } - - /* Time for a few errors, these are in various optional chunks, the + /* Time for a few errors; these are in various optional chunks, the * standard tests test the standard chunks pretty well. */ # define exception__prev exception_prev_1 @@ -2641,8 +3156,8 @@ make_errors(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, unsigned int test; char name[FILE_NAME_SIZE]; - standard_name(name, sizeof name, 0, colour_type, bdlo, interlace_type, - 0, 0, 0); + standard_name(name, sizeof name, 0, colour_type, 1<<bdlo, 0, + interlace_type, 0, 0, 0); for (test=0; test<(sizeof error_test)/(sizeof error_test[0]); ++test) { @@ -2657,10 +3172,12 @@ make_errors(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, return 1; /* keep going */ } +#endif static void perform_error_test(png_modifier *pm) { +#ifdef PNG_WARNINGS_SUPPORTED /* else there are no cases that work! */ /* Need to do this here because we just write in this test. */ safecat(pm->this.test, sizeof pm->this.test, 0, "error test"); @@ -2678,6 +3195,73 @@ perform_error_test(png_modifier *pm) if (!make_errors(pm, 6, 3, WRITE_BDHI)) return; +#else + UNUSED(pm) +#endif +} + +/* This is just to validate the internal PNG formatting code - if this fails + * then the warning messages the library outputs will probably be garbage. + */ +static void +perform_formatting_test(png_store *volatile ps) +{ +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* The handle into the formatting code is the RFC1123 support; this test does + * nothing if that is compiled out. + */ + context(ps, fault); + + Try + { + png_const_charp correct = "29 Aug 2079 13:53:60 +0000"; + png_const_charp result; + png_structp pp; + png_time pt; + + pp = set_store_for_write(ps, NULL, "libpng formatting test"); + + if (pp == NULL) + Throw ps; + + + /* Arbitrary settings: */ + pt.year = 2079; + pt.month = 8; + pt.day = 29; + pt.hour = 13; + pt.minute = 53; + pt.second = 60; /* a leap second */ + + result = png_convert_to_rfc1123(pp, &pt); + + if (result == NULL) + png_error(pp, "png_convert_to_rfc1123 failed"); + + if (strcmp(result, correct) != 0) + { + size_t pos = 0; + char msg[128]; + + pos = safecat(msg, sizeof msg, pos, "png_convert_to_rfc1123("); + pos = safecat(msg, sizeof msg, pos, correct); + pos = safecat(msg, sizeof msg, pos, ") returned: '"); + pos = safecat(msg, sizeof msg, pos, result); + pos = safecat(msg, sizeof msg, pos, "'"); + + png_error(pp, msg); + } + + store_write_reset(ps); + } + + Catch(fault) + { + store_write_reset(fault); + } +#else + UNUSED(ps) +#endif } /* Because we want to use the same code in both the progressive reader and the @@ -2702,16 +3286,8 @@ perform_error_test(png_modifier *pm) * requirement that the pointer to the first member of a structure must be the * same as the pointer to the structure. This allows us to reuse standard_ * functions in the gamma test code; something that could not be done with - * nested funtions! + * nested functions! */ -typedef struct standard_palette_entry /* pngvalid format palette! */ -{ - png_byte red; - png_byte green; - png_byte blue; - png_byte alpha; -} standard_palette[256]; - typedef struct standard_display { png_store* ps; /* Test parameters (passed to the function) */ @@ -2730,14 +3306,16 @@ typedef struct standard_display png_uint_32 bit_width; /* Width of output row in bits */ size_t cbRow; /* Bytes in a row of the output image */ int do_interlace; /* Do interlacing internally */ - int is_transparent; /* Transparecy information was present. */ + int is_transparent; /* Transparency information was present. */ + int speed; /* Doing a speed test */ struct { png_uint_16 red; png_uint_16 green; png_uint_16 blue; } transparent; /* The transparent color, if set. */ - standard_palette + int npalette; /* Number of entries in the palette. */ + store_palette palette; } standard_display; @@ -2748,8 +3326,11 @@ standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id, dp->ps = ps; dp->colour_type = COL_FROM_ID(id); dp->bit_depth = DEPTH_FROM_ID(id); - dp->alpha_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT = - dp->bit_depth; + if (dp->colour_type == 3) + dp->red_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT = 8; + else + dp->red_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT = + dp->bit_depth; dp->interlace_type = INTERLACE_FROM_ID(id); dp->id = id; /* All the rest are filled in after the read_info: */ @@ -2761,48 +3342,98 @@ standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id, dp->cbRow = 0; dp->do_interlace = do_interlace; dp->is_transparent = 0; + dp->speed = ps->speed; + dp->npalette = 0; /* Preset the transparent color to black: */ memset(&dp->transparent, 0, sizeof dp->transparent); /* Preset the palette to full intensity/opaque througout: */ memset(dp->palette, 0xff, sizeof dp->palette); +} +/* Initialize the palette fields - this must be done later because the palette + * comes from the particular png_store_file that is selected. + */ +static void +standard_palette_init(standard_display *dp) +{ + store_palette_entry *palette = store_current_palette(dp->ps, &dp->npalette); + + /* The remaining entries remain white/opaque. */ + if (dp->npalette > 0) + { + int i = dp->npalette; + memcpy(dp->palette, palette, i * sizeof *palette); + + /* Check for a non-opaque palette entry: */ + while (--i >= 0) + if (palette[i].alpha < 255) + break; + +# ifdef __GNUC__ + /* GCC can't handle the more obviously optimizable version. */ + if (i >= 0) + dp->is_transparent = 1; + else + dp->is_transparent = 0; +# else + dp->is_transparent = (i >= 0); +# endif + } } -/* Call this only if the colour type is 3 - PNG_COLOR_TYPE_PALETTE - otherwise - * it will png_error out. The API returns true if tRNS information was - * present. +/* Utility to read the palette from the PNG file and convert it into + * store_palette format. This returns 1 if there is any transparency in the + * palette (it does not check for a transparent colour in the non-palette case.) */ static int -standard_palette_init(standard_palette palette, png_structp pp, png_infop pi) +read_palette(store_palette palette, int *npalette, png_structp pp, png_infop pi) { png_colorp pal; png_bytep trans_alpha; int num; pal = 0; - num = -1; - if (png_get_PLTE(pp, pi, &pal, &num) & PNG_INFO_PLTE) + *npalette = -1; + + if (png_get_PLTE(pp, pi, &pal, npalette) & PNG_INFO_PLTE) { - int i; + int i = *npalette; - for (i=0; i<num; ++i) + if (i <= 0 || i > 256) + png_error(pp, "validate: invalid PLTE count"); + + while (--i >= 0) { palette[i].red = pal[i].red; palette[i].green = pal[i].green; palette[i].blue = pal[i].blue; } - /* Mark the remainder of the entries with a flag value: */ - for (; i<256; ++i) - palette[i].red = palette[i].green = palette[i].blue = 126; + /* Mark the remainder of the entries with a flag value (other than + * white/opaque which is the flag value stored above.) + */ + memset(palette + *npalette, 126, (256-*npalette) * sizeof *palette); } else /* !png_get_PLTE */ - png_error(pp, "validate: missing PLTE with color type 3"); + { + if (*npalette != (-1)) + png_error(pp, "validate: invalid PLTE result"); + /* But there is no palette, so record this: */ + *npalette = 0; + memset(palette, 113, sizeof palette); + } trans_alpha = 0; - num = -1; - if (png_get_tRNS(pp, pi, &trans_alpha, &num, 0) & PNG_INFO_tRNS) + num = 2; /* force error below */ + if ((png_get_tRNS(pp, pi, &trans_alpha, &num, 0) & PNG_INFO_tRNS) != 0 && + (trans_alpha != NULL || num != 1/*returns 1 for a transparent color*/) && + /* Oops, if a palette tRNS gets expanded png_read_update_info (at least so + * far as 1.5.4) does not zap the trans_alpha pointer, only num_trans, so + * in the above call we get a success, we get a pointer (who knows what + * to) and we get num_trans == 0: + */ + !(trans_alpha != NULL && num == 0)) /* TODO: fix this in libpng. */ { int i; @@ -2812,30 +3443,72 @@ standard_palette_init(standard_palette palette, png_structp pp, png_infop pi) * actually been filled in! Note that if the app were to pass the * last, png_color_16p, variable too it couldn't rely on this. */ - if (trans_alpha == 0 || num <= 0 || num > 256) + if (trans_alpha == NULL || num <= 0 || num > 256 || num > *npalette) png_error(pp, "validate: unexpected png_get_tRNS (palette) result"); for (i=0; i<num; ++i) palette[i].alpha = trans_alpha[i]; - for (; i<256; ++i) + for (num=*npalette; i<num; ++i) palette[i].alpha = 255; + for (; i<256; ++i) + palette[i].alpha = 33; /* flag value */ + return 1; /* transparency */ } else { - /* No transparency - just set the alpha channel to opaque. */ + /* No palette transparency - just set the alpha channel to opaque. */ int i; - for (i=0; i<256; ++i) + for (i=0, num=*npalette; i<num; ++i) palette[i].alpha = 255; + for (; i<256; ++i) + palette[i].alpha = 55; /* flag value */ + return 0; /* no transparency */ } } +/* Utility to validate the palette if it should not have changed (the + * non-transform case). + */ +static void +standard_palette_validate(standard_display *dp, png_structp pp, png_infop pi) +{ + int npalette; + store_palette palette; + + if (read_palette(palette, &npalette, pp, pi) != dp->is_transparent) + png_error(pp, "validate: palette transparency changed"); + + if (npalette != dp->npalette) + { + size_t pos = 0; + char msg[64]; + + pos = safecat(msg, sizeof msg, pos, "validate: palette size changed: "); + pos = safecatn(msg, sizeof msg, pos, dp->npalette); + pos = safecat(msg, sizeof msg, pos, " -> "); + pos = safecatn(msg, sizeof msg, pos, npalette); + png_error(pp, msg); + } + + { + int i = npalette; /* npalette is aliased */ + + while (--i >= 0) + if (palette[i].red != dp->palette[i].red || + palette[i].green != dp->palette[i].green || + palette[i].blue != dp->palette[i].blue || + palette[i].alpha != dp->palette[i].alpha) + png_error(pp, "validate: PLTE or tRNS chunk changed"); + } +} + /* By passing a 'standard_display' the progressive callbacks can be used * directly by the sequential code, the functions suffixed "_imp" are the * implementations, the functions without the suffix are the callbacks. @@ -2935,23 +3608,15 @@ standard_info_part1(standard_display *dp, png_structp pp, png_infop pi) if (png_get_rowbytes(pp, pi) != standard_rowsize(pp, dp->id)) png_error(pp, "validate: row size changed"); - /* The palette is never read for non-palette images, even though it is valid - * - this could be changed. + /* Validate the colour type 3 palette (this can be present on other color + * types.) */ - if (dp->colour_type == 3) /* palette */ - { - int i; - - dp->is_transparent = standard_palette_init(dp->palette, pp, pi); - - /* And validate the result. */ - for (i=0; i<256; ++i) - if (dp->palette[i].red != i || dp->palette[i].green != i || - dp->palette[i].blue != i) - png_error(pp, "validate: color type 3 PLTE chunk changed"); - } + standard_palette_validate(dp, pp, pi); - /* In any case always check for a tranparent color: */ + /* In any case always check for a tranparent color (notice that the + * colour type 3 case must not give a successful return on the get_tRNS call + * with these arguments!) + */ { png_color_16p trans_color = 0; @@ -3020,7 +3685,7 @@ standard_info_part2(standard_display *dp, png_structp pp, png_infop pi, png_error(pp, "bad png_get_rowbytes calculation"); /* Then ensure there is enough space for the output image(s). */ - store_ensure_image(dp->ps, pp, nImages * dp->cbRow * dp->h); + store_ensure_image(dp->ps, pp, nImages, dp->cbRow, dp->h); } static void @@ -3072,13 +3737,24 @@ progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass) * us the y in the sub-image: */ if (dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7) + { +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED + /* Use this opportunity to validate the png 'current' APIs: */ + if (y != png_get_current_row_number(pp)) + png_error(pp, "png_get_current_row_number is broken"); + + if (pass != png_get_current_pass_number(pp)) + png_error(pp, "png_get_current_pass_number is broken"); +#endif + y = PNG_ROW_FROM_PASS_ROW(y, pass); + } /* Validate this just in case. */ if (y >= dp->h) png_error(pp, "invalid y to progressive row callback"); - row = dp->ps->image + y * dp->cbRow; + row = store_image_row(dp->ps, pp, 0, y); /* Combine the new row into the old: */ if (dp->do_interlace) @@ -3098,22 +3774,20 @@ progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass) static void sequential_row(standard_display *dp, png_structp pp, png_infop pi, - PNG_CONST png_bytep pImage, PNG_CONST png_bytep pDisplay) + PNG_CONST int iImage, PNG_CONST int iDisplay) { PNG_CONST int npasses = dp->npasses; PNG_CONST int do_interlace = dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7; PNG_CONST png_uint_32 height = standard_height(pp, dp->id); PNG_CONST png_uint_32 width = standard_width(pp, dp->id); - PNG_CONST size_t cbRow = dp->cbRow; + PNG_CONST png_store* ps = dp->ps; int pass; for (pass=0; pass<npasses; ++pass) { png_uint_32 y; png_uint_32 wPass = PNG_PASS_COLS(width, pass); - png_bytep pRow1 = pImage; - png_bytep pRow2 = pDisplay; for (y=0; y<height; ++y) { @@ -3138,21 +3812,19 @@ sequential_row(standard_display *dp, png_structp pp, png_infop pi, png_read_row(pp, row, display); - if (pRow1 != NULL) - deinterlace_row(pRow1, row, dp->pixel_size, dp->w, pass); + if (iImage >= 0) + deinterlace_row(store_image_row(ps, pp, iImage, y), row, + dp->pixel_size, dp->w, pass); - if (pRow2 != NULL) - deinterlace_row(pRow2, display, dp->pixel_size, dp->w, pass); + if (iDisplay >= 0) + deinterlace_row(store_image_row(ps, pp, iDisplay, y), display, + dp->pixel_size, dp->w, pass); } } else - png_read_row(pp, pRow1, pRow2); - - if (pRow1 != NULL) - pRow1 += cbRow; - - if (pRow2 != NULL) - pRow2 += cbRow; + png_read_row(pp, + iImage >= 0 ? store_image_row(ps, pp, iImage, y) : NULL, + iDisplay >= 0 ? store_image_row(ps, pp, iDisplay, y) : NULL); } } @@ -3163,8 +3835,8 @@ sequential_row(standard_display *dp, png_structp pp, png_infop pi, } static void -standard_row_validate(standard_display *dp, png_structp pp, png_const_bytep row, - png_const_bytep display, png_uint_32 y) +standard_row_validate(standard_display *dp, png_structp pp, + int iImage, int iDisplay, png_uint_32 y) { png_byte std[STANDARD_ROWMAX]; @@ -3182,7 +3854,8 @@ standard_row_validate(standard_display *dp, png_structp pp, png_const_bytep row, * row bytes are always trashed, so we always do a pixel_cmp here even though * a memcmp of all cbRow bytes will succeed for the sequential reader. */ - if (row != NULL && pixel_cmp(std, row, dp->bit_width) != 0) + if (iImage >= 0 && pixel_cmp(std, store_image_row(dp->ps, pp, iImage, y), + dp->bit_width) != 0) { char msg[64]; sprintf(msg, "PNG image row %d changed", y); @@ -3193,7 +3866,8 @@ standard_row_validate(standard_display *dp, png_structp pp, png_const_bytep row, * byte at the end of the row if the row is not an exact multiple * of 8 bits wide. */ - if (display != NULL && pixel_cmp(std, display, dp->bit_width) != 0) + if (iDisplay >= 0 && pixel_cmp(std, store_image_row(dp->ps, pp, iDisplay, y), + dp->bit_width) != 0) { char msg[64]; sprintf(msg, "display row %d changed", y); @@ -3202,21 +3876,19 @@ standard_row_validate(standard_display *dp, png_structp pp, png_const_bytep row, } static void -standard_image_validate(standard_display *dp, png_structp pp, - png_const_bytep pImage, png_const_bytep pDisplay) +standard_image_validate(standard_display *dp, png_structp pp, int iImage, + int iDisplay) { png_uint_32 y; - for (y=0; y<dp->h; ++y) - { - standard_row_validate(dp, pp, pImage, pDisplay, y); + if (iImage >= 0) + store_image_check(dp->ps, pp, iImage); - if (pImage != NULL) - pImage += dp->cbRow; + if (iDisplay >= 0) + store_image_check(dp->ps, pp, iDisplay); - if (pDisplay != NULL) - pDisplay += dp->cbRow; - } + for (y=0; y<dp->h; ++y) + standard_row_validate(dp, pp, iImage, iDisplay, y); /* This avoids false positives if the validation code is never called! */ dp->ps->validated = 1; @@ -3232,7 +3904,7 @@ standard_end(png_structp pp, png_infop pi) /* Validate the image - progressive reading only produces one variant for * interlaced images. */ - standard_image_validate(dp, pp, dp->ps->image, NULL); + standard_image_validate(dp, pp, 0, -1); } /* A single test run checking the standard image to ensure it is not damaged. */ @@ -3265,6 +3937,9 @@ standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id, "pngvalid sequential deinterlacer") : (d.ps->progressive ? "progressive reader" : "sequential reader")); + /* Initialize the palette correctly from the png_store_file. */ + standard_palette_init(&d); + /* Introduce the correct read function. */ if (d.ps->progressive) { @@ -3292,15 +3967,13 @@ standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id, * values. */ { - PNG_CONST png_bytep pImage = d.ps->image; - PNG_CONST png_bytep pDisplay = pImage + d.cbRow * d.h; - - sequential_row(&d, pp, pi, pImage, pDisplay); + sequential_row(&d, pp, pi, 0, 1); /* After the last pass loop over the rows again to check that the * image is correct. */ - standard_image_validate(&d, pp, pImage, pDisplay); + if (!d.speed) + standard_image_validate(&d, pp, 0, 1); } } @@ -3329,7 +4002,7 @@ test_standard(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, for (interlace_type = PNG_INTERLACE_NONE; interlace_type < PNG_INTERLACE_LAST; ++interlace_type) { - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, interlace_type, 0, 0, 0), 0/*do_interlace*/); if (fail(pm)) @@ -3388,25 +4061,25 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, * validates the write side of libpng. There are four possibilities * to validate. */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/); if (fail(pm)) return 0; - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/); if (fail(pm)) return 0; - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/); if (fail(pm)) return 0; - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/); if (fail(pm)) @@ -3416,13 +4089,13 @@ test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, * in the progressive case this does actually make a difference * to the code used in the non-interlaced case too. */ - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/); if (fail(pm)) return 0; - standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), + standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo), 0/*palette*/, PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/); if (fail(pm)) @@ -3462,6 +4135,7 @@ perform_size_test(png_modifier *pm) /******************************* TRANSFORM TESTS ******************************/ +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* A set of tests to validate libpng image transforms. The possibilities here * are legion because the transforms can be combined in a combinatorial * fashion. To deal with this some measure of restraint is required, otherwise @@ -3524,7 +4198,7 @@ image_pixel_setf(image_pixel *this, unsigned int max) */ static void image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, - png_byte bit_depth, png_uint_32 x, standard_palette palette) + png_byte bit_depth, png_uint_32 x, store_palette palette) { PNG_CONST png_byte sample_depth = (png_byte)(colour_type == PNG_COLOR_TYPE_PALETTE ? 8 : bit_depth); @@ -3585,44 +4259,33 @@ image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type, } /* Convert a palette image to an rgb image. This necessarily converts the tRNS - * chunk at the same time, because the tRNS will be in palette form. + * chunk at the same time, because the tRNS will be in palette form. The way + * palette validation works means that the original palette is never updated, + * instead the image_pixel value from the row contains the RGB of the + * corresponding palette entry and *this* is updated. Consequently this routine + * only needs to change the colour type information. */ static void -image_pixel_convert_PLTE(image_pixel *this, const standard_display *display) +image_pixel_convert_PLTE(image_pixel *this) { if (this->colour_type == PNG_COLOR_TYPE_PALETTE) { - PNG_CONST unsigned int i = this->palette_index; - - this->bit_depth = this->sample_depth; - this->red = display->palette[i].red; - this->green = display->palette[i].green; - this->blue = display->palette[i].blue; - this->red_sBIT = display->red_sBIT; - this->green_sBIT = display->green_sBIT; - this->blue_sBIT = display->blue_sBIT; - if (this->have_tRNS) { - this->alpha = display->palette[i].alpha; this->colour_type = PNG_COLOR_TYPE_RGB_ALPHA; this->have_tRNS = 0; } else - { - this->alpha = 255; this->colour_type = PNG_COLOR_TYPE_RGB; - } - this->alpha_sBIT = 8; - /* And regenerate the scaled values and all the errors, which are now set - * back to the initial values. + /* The bit depth of the row changes at this point too (notice that this is + * the row format, not the sample depth, which is separate.) */ - image_pixel_setf(this, 255); + this->bit_depth = 8; } } -/* Add an alpha channel, this will glom in the tRNS information because tRNS is +/* Add an alpha channel; this will import the tRNS information because tRNS is * not valid in an alpha image. The bit depth will invariably be set to at * least 8. Palette images will be converted to alpha (using the above API). */ @@ -3630,7 +4293,7 @@ static void image_pixel_add_alpha(image_pixel *this, const standard_display *display) { if (this->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(this, display); + image_pixel_convert_PLTE(this); if ((this->colour_type & PNG_COLOR_MASK_ALPHA) == 0) { @@ -3748,6 +4411,10 @@ typedef struct transform_display /* Local variables */ png_byte output_colour_type; png_byte output_bit_depth; + + /* Variables for the individual transforms. */ + /* png_set_background */ + image_pixel background_colour; } transform_display; /* Two functions to end the list: */ @@ -3996,17 +4663,19 @@ transform_info(png_structp pp, png_infop pi) static void transform_range_check(png_structp pp, unsigned int r, unsigned int g, unsigned int b, unsigned int a, unsigned int in_digitized, double in, - unsigned int out, png_byte sample_depth, double err, PNG_CONST char *name) + unsigned int out, png_byte sample_depth, double err, PNG_CONST char *name, + double digitization_error) { /* Compare the scaled, digitzed, values of our local calculation (in+-err) * with the digitized values libpng produced; 'sample_depth' is the actual * digitization depth of the libpng output colors (the bit depth except for - * palette images where it is always 8.) + * palette images where it is always 8.) The check on 'err' is to detect + * internal errors in pngvalid itself (the threshold is about 1/255.) */ unsigned int max = (1U<<sample_depth)-1; - double in_min = ceil((in-err)*max - .5); - double in_max = floor((in+err)*max + .5); - if (!(out >= in_min && out <= in_max)) + double in_min = ceil((in-err)*max - digitization_error); + double in_max = floor((in+err)*max + digitization_error); + if (err > 4E-3 || !(out >= in_min && out <= in_max)) { char message[256]; size_t pos; @@ -4035,15 +4704,14 @@ transform_range_check(png_structp pp, unsigned int r, unsigned int g, } static void -transform_image_validate(transform_display *dp, png_structp pp, png_infop pi, - png_const_bytep pRow) +transform_image_validate(transform_display *dp, png_structp pp, png_infop pi) { /* Constants for the loop below: */ + PNG_CONST png_store* PNG_CONST ps = dp->this.ps; PNG_CONST png_byte in_ct = dp->this.colour_type; PNG_CONST png_byte in_bd = dp->this.bit_depth; PNG_CONST png_uint_32 w = dp->this.w; PNG_CONST png_uint_32 h = dp->this.h; - PNG_CONST size_t cbRow = dp->this.cbRow; PNG_CONST png_byte out_ct = dp->output_colour_type; PNG_CONST png_byte out_bd = dp->output_bit_depth; PNG_CONST png_byte sample_depth = (png_byte)(out_ct == @@ -4053,22 +4721,63 @@ transform_image_validate(transform_display *dp, png_structp pp, png_infop pi, PNG_CONST png_byte blue_sBIT = dp->this.blue_sBIT; PNG_CONST png_byte alpha_sBIT = dp->this.alpha_sBIT; PNG_CONST int have_tRNS = dp->this.is_transparent; + double digitization_error; - standard_palette out_palette; + store_palette out_palette; png_uint_32 y; UNUSED(pi) + /* Check for row overwrite errors */ + store_image_check(dp->this.ps, pp, 0); + /* Read the palette corresponding to the output if the output colour type * indicates a palette, othewise set out_palette to garbage. */ if (out_ct == PNG_COLOR_TYPE_PALETTE) - (void)standard_palette_init(out_palette, pp, pi); + { + /* Validate that the palette count itself has not changed - this is not + * expected. + */ + int npalette = (-1); + + (void)read_palette(out_palette, &npalette, pp, pi); + if (npalette != dp->this.npalette) + png_error(pp, "unexpected change in palette size"); + + digitization_error = .5; + } else + { + png_byte in_sample_depth; + memset(out_palette, 0x5e, sizeof out_palette); - for (y=0; y<h; ++y, pRow += cbRow) + /* assume-8-bit-calculations means assume that if the input has 8 bit + * (or less) samples and the output has 16 bit samples the calculations + * will be done with 8 bit precision, not 16. + * + * TODO: fix this in libpng; png_set_expand_16 should cause 16 bit + * calculations to be used throughout. + */ + if (in_ct == PNG_COLOR_TYPE_PALETTE || in_bd < 16) + in_sample_depth = 8; + else + in_sample_depth = in_bd; + + if (sample_depth != 16 || in_sample_depth > 8 || + !dp->pm->calculations_use_input_precision) + digitization_error = .5; + + /* Else errors are at 8 bit precision, scale .5 in 8 bits to the 16 bits: + */ + else + digitization_error = .5 * 257; + } + + for (y=0; y<h; ++y) { + png_const_bytep PNG_CONST pRow = store_image_row(ps, pp, 0, y); png_uint_32 x; /* The original, standard, row pre-transforms. */ @@ -4121,24 +4830,26 @@ transform_image_validate(transform_display *dp, png_structp pp, png_infop pi, */ if (in_pixel.red != out_pixel.red) transform_range_check(pp, r, g, b, a, in_pixel.red, in_pixel.redf, - out_pixel.red, sample_depth, in_pixel.rede, "red/gray"); + out_pixel.red, sample_depth, in_pixel.rede, "red/gray", + digitization_error); if ((out_ct & PNG_COLOR_MASK_COLOR) != 0 && in_pixel.green != out_pixel.green) transform_range_check(pp, r, g, b, a, in_pixel.green, in_pixel.greenf, out_pixel.green, sample_depth, in_pixel.greene, - "green"); + "green", digitization_error); if ((out_ct & PNG_COLOR_MASK_COLOR) != 0 && in_pixel.blue != out_pixel.blue) transform_range_check(pp, r, g, b, a, in_pixel.blue, in_pixel.bluef, - out_pixel.blue, sample_depth, in_pixel.bluee, "blue"); + out_pixel.blue, sample_depth, in_pixel.bluee, "blue", + digitization_error); if ((out_ct & PNG_COLOR_MASK_ALPHA) != 0 && in_pixel.alpha != out_pixel.alpha) transform_range_check(pp, r, g, b, a, in_pixel.alpha, in_pixel.alphaf, out_pixel.alpha, sample_depth, in_pixel.alphae, - "alpha"); + "alpha", digitization_error); } /* pixel (x) loop */ } /* row (y) loop */ @@ -4151,7 +4862,7 @@ transform_end(png_structp pp, png_infop pi) { transform_display *dp = png_get_progressive_ptr(pp); - transform_image_validate(dp, pp, pi, dp->this.ps->image); + transform_image_validate(dp, pp, pi); } /* A single test run. */ @@ -4169,8 +4880,9 @@ transform_test(png_modifier *pmIn, PNG_CONST png_uint_32 idIn, png_structp pp; png_infop pi; - /* Get a png_struct for writing the image. */ + /* Get a png_struct for reading the image. */ pp = set_modifier_for_read(d.pm, &pi, d.this.id, name); + standard_palette_init(&d.this); # if 0 /* Logging (debugging only) */ @@ -4205,9 +4917,10 @@ transform_test(png_modifier *pmIn, PNG_CONST png_uint_32 idIn, /* Process the 'info' requirements. Only one image is generated */ transform_info_imp(&d, pp, pi); - sequential_row(&d.this, pp, pi, NULL, d.this.ps->image); + sequential_row(&d.this, pp, pi, -1, 0); - transform_image_validate(&d, pp, pi, d.this.ps->image); + if (!d.this.speed) + transform_image_validate(&d, pp, pi); } modifier_reset(d.pm); @@ -4219,12 +4932,12 @@ transform_test(png_modifier *pmIn, PNG_CONST png_uint_32 idIn, /* The transforms: */ #define ITSTRUCT(name) image_transform_##name -#define IT(name,prev)\ +#define IT(name)\ static image_transform ITSTRUCT(name) =\ {\ #name,\ 1, /*enable*/\ - &ITSTRUCT(prev), /*list*/\ + &PT, /*list*/\ 0, /*global_use*/\ 0, /*local_use*/\ 0, /*next*/\ @@ -4232,6 +4945,7 @@ static image_transform ITSTRUCT(name) =\ image_transform_png_set_##name##_mod,\ image_transform_png_set_##name##_add\ } +#define PT ITSTRUCT(end) /* stores the previous transform */ /* To save code: */ static int @@ -4247,6 +4961,7 @@ image_transform_default_add(image_transform *this, return 1; } +#ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_palette_to_rgb */ static void image_transform_png_set_palette_to_rgb_set(PNG_CONST image_transform *this, @@ -4261,7 +4976,7 @@ image_transform_png_set_palette_to_rgb_mod(PNG_CONST image_transform *this, image_pixel *that, png_structp pp, PNG_CONST transform_display *display) { if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that, &display->this); + image_pixel_convert_PLTE(that); this->next->mod(this->next, that, pp, display); } @@ -4278,9 +4993,12 @@ image_transform_png_set_palette_to_rgb_add(image_transform *this, return colour_type == PNG_COLOR_TYPE_PALETTE; } -IT(palette_to_rgb, end); - +IT(palette_to_rgb); +#undef PT +#define PT ITSTRUCT(palette_to_rgb) +#endif /* PNG_READ_EXPAND_SUPPORTED */ +#ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_tRNS_to_alpha */ static void image_transform_png_set_tRNS_to_alpha_set(PNG_CONST image_transform *this, @@ -4296,10 +5014,10 @@ image_transform_png_set_tRNS_to_alpha_mod(PNG_CONST image_transform *this, { /* LIBPNG BUG: this always forces palette images to RGB. */ if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that, &display->this); + image_pixel_convert_PLTE(that); /* This effectively does an 'expand' only if there is some transparency to - * covert to an alpha channel. + * convert to an alpha channel. */ if (that->have_tRNS) image_pixel_add_alpha(that, &display->this); @@ -4332,8 +5050,12 @@ image_transform_png_set_tRNS_to_alpha_add(image_transform *this, return (colour_type & PNG_COLOR_MASK_ALPHA) == 0; } -IT(tRNS_to_alpha,palette_to_rgb); +IT(tRNS_to_alpha); +#undef PT +#define PT ITSTRUCT(tRNS_to_alpha) +#endif /* PNG_READ_EXPAND_SUPPORTED */ +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED /* png_set_gray_to_rgb */ static void image_transform_png_set_gray_to_rgb_set(PNG_CONST image_transform *this, @@ -4386,8 +5108,12 @@ image_transform_png_set_gray_to_rgb_add(image_transform *this, return (colour_type & PNG_COLOR_MASK_COLOR) == 0; } -IT(gray_to_rgb,tRNS_to_alpha); +IT(gray_to_rgb); +#undef PT +#define PT ITSTRUCT(gray_to_rgb) +#endif /* PNG_READ_GRAY_TO_RGB_SUPPORTED */ +#ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_expand */ static void image_transform_png_set_expand_set(PNG_CONST image_transform *this, @@ -4403,7 +5129,7 @@ image_transform_png_set_expand_mod(PNG_CONST image_transform *this, { /* The general expand case depends on what the colour type is: */ if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that, &display->this); + image_pixel_convert_PLTE(that); else if (that->bit_depth < 8) /* grayscale */ that->sample_depth = that->bit_depth = 8; @@ -4428,8 +5154,12 @@ image_transform_png_set_expand_add(image_transform *this, return (colour_type & PNG_COLOR_MASK_ALPHA) == 0; } -IT(expand,gray_to_rgb); +IT(expand); +#undef PT +#define PT ITSTRUCT(expand) +#endif /* PNG_READ_EXPAND_SUPPORTED */ +#ifdef PNG_READ_EXPAND_SUPPORTED /* png_set_expand_gray_1_2_4_to_8 * LIBPNG BUG: this just does an 'expand' */ @@ -4458,8 +5188,102 @@ image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this, bit_depth); } -IT(expand_gray_1_2_4_to_8, expand); +IT(expand_gray_1_2_4_to_8); +#undef PT +#define PT ITSTRUCT(expand_gray_1_2_4_to_8) +#endif /* PNG_READ_EXPAND_SUPPORTED */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* png_set_expand_16 */ +static void +image_transform_png_set_expand_16_set(PNG_CONST image_transform *this, + transform_display *that, png_structp pp, png_infop pi) +{ + png_set_expand_16(pp); + this->next->set(this->next, that, pp, pi); +} + +static void +image_transform_png_set_expand_16_mod(PNG_CONST image_transform *this, + image_pixel *that, png_structp pp, PNG_CONST transform_display *display) +{ + /* Expect expand_16 to expand everything to 16 bits as a result of also + * causing 'expand' to happen. + */ + if (that->colour_type == PNG_COLOR_TYPE_PALETTE) + image_pixel_convert_PLTE(that); + + if (that->have_tRNS) + image_pixel_add_alpha(that, &display->this); + + if (that->bit_depth < 16) + that->sample_depth = that->bit_depth = 16; + + this->next->mod(this->next, that, pp, display); +} + +static int +image_transform_png_set_expand_16_add(image_transform *this, + PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) +{ + UNUSED(colour_type) + + this->next = *that; + *that = this; + + /* expand_16 does something unless the bit depth is already 16. */ + return bit_depth < 16; +} + +IT(expand_16); +#undef PT +#define PT ITSTRUCT(expand_16) +#endif /* PNG_READ_EXPAND_16_SUPPORTED */ + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED /* API added in 1.5.4 */ +/* png_set_scale_16 */ +static void +image_transform_png_set_scale_16_set(PNG_CONST image_transform *this, + transform_display *that, png_structp pp, png_infop pi) +{ + png_set_scale_16(pp); + this->next->set(this->next, that, pp, pi); +} + +static void +image_transform_png_set_scale_16_mod(PNG_CONST image_transform *this, + image_pixel *that, png_structp pp, PNG_CONST transform_display *display) +{ + if (that->bit_depth == 16) + { + that->sample_depth = that->bit_depth = 8; + if (that->red_sBIT > 8) that->red_sBIT = 8; + if (that->green_sBIT > 8) that->green_sBIT = 8; + if (that->blue_sBIT > 8) that->blue_sBIT = 8; + if (that->alpha_sBIT > 8) that->alpha_sBIT = 8; + } + + this->next->mod(this->next, that, pp, display); +} + +static int +image_transform_png_set_scale_16_add(image_transform *this, + PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth) +{ + UNUSED(colour_type) + + this->next = *that; + *that = this; + + return bit_depth > 8; +} + +IT(scale_16); +#undef PT +#define PT ITSTRUCT(scale_16) +#endif /* PNG_READ_SCALE_16_TO_8_SUPPORTED (1.5.4 on) */ +#ifdef PNG_READ_16_TO_8_SUPPORTED /* the default before 1.5.4 */ /* png_set_strip_16 */ static void image_transform_png_set_strip_16_set(PNG_CONST image_transform *this, @@ -4481,9 +5305,19 @@ image_transform_png_set_strip_16_mod(PNG_CONST image_transform *this, if (that->blue_sBIT > 8) that->blue_sBIT = 8; if (that->alpha_sBIT > 8) that->alpha_sBIT = 8; -# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED - /* The strip 16 algoirithm drops the low 8 bits rather than calculating + /* Prior to 1.5.4 png_set_strip_16 would use an 'accurate' method if this + * configuration option is set. From 1.5.4 the flag is never set and the + * 'scale' API (above) must be used. + */ +# ifdef PNG_READ_ACCURATE_SCALE_SUPPORTED +# if PNG_LIBPNG_VER >= 10504 +# error PNG_READ_ACCURATE_SCALE should not be set +# endif + + /* The strip 16 algorithm drops the low 8 bits rather than calculating * 1/257, so we need to adjust the permitted errors appropriately: + * Notice that this is only relevant prior to the addition of the + * png_set_scale_16 API in 1.5.4 (but 1.5.4+ always defines the above!) */ { PNG_CONST double d = (255-128.5)/65535; @@ -4510,8 +5344,12 @@ image_transform_png_set_strip_16_add(image_transform *this, return bit_depth > 8; } -IT(strip_16, expand_gray_1_2_4_to_8); +IT(strip_16); +#undef PT +#define PT ITSTRUCT(strip_16) +#endif /* PNG_READ_16_TO_8_SUPPORTED */ +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED /* png_set_strip_alpha */ static void image_transform_png_set_strip_alpha_set(PNG_CONST image_transform *this, @@ -4532,7 +5370,6 @@ image_transform_png_set_strip_alpha_mod(PNG_CONST image_transform *this, that->have_tRNS = 0; that->alphaf = 1; - that->alphae = 0; this->next->mod(this->next, that, pp, display); } @@ -4549,8 +5386,12 @@ image_transform_png_set_strip_alpha_add(image_transform *this, return (colour_type & PNG_COLOR_MASK_ALPHA) != 0; } -IT(strip_alpha,strip_16); +IT(strip_alpha); +#undef PT +#define PT ITSTRUCT(strip_alpha) +#endif /* PNG_READ_STRIP_ALPHA_SUPPORTED */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED /* png_set_rgb_to_gray(png_structp, int err_action, double red, double green) * png_set_rgb_to_gray_fixed(png_structp, int err_action, png_fixed_point red, * png_fixed_point green) @@ -4588,7 +5429,7 @@ image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this, if ((that->colour_type & PNG_COLOR_MASK_COLOR) != 0) { if (that->colour_type == PNG_COLOR_TYPE_PALETTE) - image_pixel_convert_PLTE(that, &display->this); + image_pixel_convert_PLTE(that); /* Image now has RGB channels... */ that->bluef = that->greenf = that->redf = (that->redf * 6968 + @@ -4626,8 +5467,12 @@ image_transform_png_set_rgb_to_gray_add(image_transform *this, return (colour_type & PNG_COLOR_MASK_COLOR) != 0; } -IT(rgb_to_gray,strip_alpha); +IT(rgb_to_gray); +#undef PT +#define PT ITSTRUCT(rgb_to_gray) +#endif /* PNG_READ_RGB_TO_GRAY_SUPPORTED */ +#ifdef PNG_READ_BACKGROUND_SUPPORTED /* png_set_background(png_structp, png_const_color_16p background_color, * int background_gamma_code, int need_expand, double background_gamma) * png_set_background_fixed(png_structp, png_const_color_16p background_color, @@ -4640,19 +5485,54 @@ static void image_transform_png_set_background_set(PNG_CONST image_transform *this, transform_display *that, png_structp pp, png_infop pi) { + png_byte colour_type, bit_depth; + png_byte random_bytes[8]; /* 8 bytes - 64 bits - the biggest pixel */ png_color_16 back; - /* Since we don't know the output bit depth at this point we must use the - * input values and ask libpng to expand the chunk as required. + /* We need a background colour, because we don't know exactly what transforms + * have been set we have to supply the colour in the original file format and + * so we need to know what that is! The background colour is stored in the + * transform_display. + */ + RANDOMIZE(random_bytes); + + /* Read the random value, for colour type 3 the background colour is actually + * expressed as a 24bit rgb, not an index. */ - back.index = 255; /* Should not be used */ - back.gray = back.blue = back.green = back.red = - (png_uint_16)((1U << that->this.bit_depth) >> 1); + colour_type = that->this.colour_type; + if (colour_type == 3) + { + colour_type = PNG_COLOR_TYPE_RGB; + bit_depth = 8; + } + + else + bit_depth = that->this.bit_depth; + + image_pixel_init(&that->background_colour, random_bytes, colour_type, + bit_depth, 0/*x*/, 0/*unused: palette*/); + + /* Extract the background colour from this image_pixel, but make sure the + * unused fields of 'back' are garbage. + */ + RANDOMIZE(back); + + if (colour_type & PNG_COLOR_MASK_COLOR) + { + back.red = (png_uint_16)that->background_colour.red; + back.green = (png_uint_16)that->background_colour.green; + back.blue = (png_uint_16)that->background_colour.blue; + } + + else + back.gray = (png_uint_16)that->background_colour.red; # ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_background(pp, &back, PNG_BACKGROUND_GAMMA_FILE, 1, 0); + png_set_background(pp, &back, PNG_BACKGROUND_GAMMA_FILE, 1/*need expand*/, + 0); # else - png_set_background_fixed(pp, &back, PNG_BACKGROUND_GAMMA_FILE, 1, 0); + png_set_background_fixed(pp, &back, PNG_BACKGROUND_GAMMA_FILE, + 1/*need expand*/, 0); # endif this->next->set(this->next, that, pp, pi); @@ -4669,32 +5549,40 @@ image_transform_png_set_background_mod(PNG_CONST image_transform *this, /* This is only necessary if the alpha value is less than 1. */ if (that->alphaf < 1) { - /* Repeat the calculation above and scale the result: */ - unsigned int tmp = (1U << display->this.bit_depth); - double component = (tmp >> 1)/(double)(tmp-1); + PNG_CONST image_pixel *back = &display->background_colour; /* Now we do the background calculation without any gamma correction. */ if (that->alphaf <= 0) { - that->bluef = that->greenf = that->redf = component; - that->bluee = that->greene = that->rede = component * DBL_EPSILON; - that->blue_sBIT = that->green_sBIT = that->red_sBIT = that->bit_depth; + that->redf = back->redf; + that->greenf = back->greenf; + that->bluef = back->bluef; + + that->rede = back->rede; + that->greene = back->greene; + that->bluee = back->bluee; + + that->red_sBIT= back->red_sBIT; + that->green_sBIT= back->green_sBIT; + that->blue_sBIT= back->blue_sBIT; } - else + else /* 0 < alpha < 1 */ { - component *= 1-that->alphaf; - that->redf = that->redf * that->alphaf + component; - that->rede = that->rede * that->alphaf + that->redf * 3 * DBL_EPSILON; - that->greenf = that->greenf * that->alphaf + component; - that->greene = that->greene * that->alphaf + that->greenf * 3 * + double alf = 1 - that->alphaf; + + that->redf = that->redf * that->alphaf + back->redf * alf; + that->rede = that->rede * that->alphaf + back->rede * alf + + DBL_EPSILON; + that->greenf = that->greenf * that->alphaf + back->greenf * alf; + that->greene = that->greene * that->alphaf + back->greene * alf + DBL_EPSILON; - that->bluef = that->bluef * that->alphaf + component; - that->bluee = that->bluee * that->alphaf + that->bluef * 3 * + that->bluef = that->bluef * that->alphaf + back->bluef * alf; + that->bluee = that->bluee * that->alphaf + back->bluee * alf + DBL_EPSILON; } - /* Remove the alpha type and set the alpha. */ + /* Remove the alpha type and set the alpha (not in that order.) */ that->alphaf = 1; that->alphae = 0; @@ -4702,6 +5590,7 @@ image_transform_png_set_background_mod(PNG_CONST image_transform *this, that->colour_type = PNG_COLOR_TYPE_RGB; else if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA) that->colour_type = PNG_COLOR_TYPE_GRAY; + /* PNG_COLOR_TYPE_PALETTE is not changed */ } this->next->mod(this->next, that, pp, display); @@ -4709,9 +5598,13 @@ image_transform_png_set_background_mod(PNG_CONST image_transform *this, #define image_transform_png_set_background_add image_transform_default_add -IT(background,rgb_to_gray); +IT(background); +#undef PT +#define PT ITSTRUCT(background) +#endif /* PNG_READ_BACKGROUND_SUPPORTED */ -static image_transform *PNG_CONST image_transform_first = &ITSTRUCT(background); +/* This may just be 'end' if all the transforms are disabled! */ +static image_transform *PNG_CONST image_transform_first = &PT; static void transform_enable(PNG_CONST char *name) @@ -4963,13 +5856,15 @@ IT(@); /* png_set_shift(png_structp, png_const_color_8p true_bits) */ /*NOTE: TBD NYI */ -static int -test_transform(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, - int bdlo, int PNG_CONST bdhi, png_uint_32 max) +static void +perform_transform_test(png_modifier *pm) { - for (; bdlo <= bdhi; ++bdlo) + png_byte colour_type = 0; + png_byte bit_depth = 0; + int palette_number = 0; + + while (next_format(&colour_type, &bit_depth, &palette_number)) { - PNG_CONST png_byte bit_depth = DEPTH(bdlo); png_uint_32 counter = 0; size_t base_pos; char name[64]; @@ -4981,48 +5876,28 @@ test_transform(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type, size_t pos = base_pos; PNG_CONST image_transform *list = 0; - counter = image_transform_add(&list, max, counter, name, sizeof name, - &pos, colour_type, bit_depth); + /* 'max' is currently hardwired to '1'; this should be settable on the + * command line. + */ + counter = image_transform_add(&list, 1/*max*/, counter, + name, sizeof name, &pos, colour_type, bit_depth); if (counter == 0) break; /* The command line can change this to checking interlaced images. */ - transform_test(pm, FILEID(colour_type, bit_depth, pm->interlace_type, - 0, 0, 0), list, name); + transform_test(pm, FILEID(colour_type, bit_depth, palette_number, + pm->interlace_type, 0, 0, 0), list, name); if (fail(pm)) - return 0; + return; } } - - return 1; /* keep going */ -} - -static void -perform_transform_test(png_modifier *pm) -{ - /* Test each colour type over the valid range of bit depths (expressed as - * log2(bit_depth) in turn, stop as soon as any error is detected. - */ - if (!test_transform(pm, 0, 0, READ_BDHI, 1)) - return; - - if (!test_transform(pm, 2, 3, READ_BDHI, 1)) - return; - - if (!test_transform(pm, 3, 0, 3, 1)) - return; - - if (!test_transform(pm, 4, 3, READ_BDHI, 1)) - return; - - if (!test_transform(pm, 6, 3, READ_BDHI, 1)) - return; } - +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ /********************************* GAMMA TESTS ********************************/ +#ifdef PNG_READ_GAMMA_SUPPORTED /* Gamma test images. */ typedef struct gamma_modification { @@ -5175,12 +6050,14 @@ typedef struct gamma_display png_modifier* pm; double file_gamma; double screen_gamma; + double background_gamma; png_byte sbit; int threshold_test; - PNG_CONST char* name; - int speed; int use_input_precision; - int strip16; + int scale16; + int expand16; + int do_background; + png_color_16 background_color; /* Local variables */ double maxerrout; @@ -5188,10 +6065,14 @@ typedef struct gamma_display double maxerrabs; } gamma_display; +#define ALPHA_MODE_OFFSET 4 + static void gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id, double file_gamma, double screen_gamma, png_byte sbit, int threshold_test, - int speed, int use_input_precision, int strip16) + int use_input_precision, int scale16, int expand16, + int do_background, PNG_CONST png_color_16 *pointer_to_the_background_color, + double background_gamma) { /* Standard fields */ standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/); @@ -5200,11 +6081,17 @@ gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id, dp->pm = pm; dp->file_gamma = file_gamma; dp->screen_gamma = screen_gamma; + dp->background_gamma = background_gamma; dp->sbit = sbit; dp->threshold_test = threshold_test; - dp->speed = speed; dp->use_input_precision = use_input_precision; - dp->strip16 = strip16; + dp->scale16 = scale16; + dp->expand16 = expand16; + dp->do_background = do_background; + if (do_background && pointer_to_the_background_color != 0) + dp->background_color = *pointer_to_the_background_color; + else + memset(&dp->background_color, 0, sizeof dp->background_color); /* Local variable fields */ dp->maxerrout = dp->maxerrpc = dp->maxerrabs = 0; @@ -5221,12 +6108,101 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi) * are interactions with sBIT but, internally, libpng makes sbit at most * PNG_MAX_GAMMA_8 when doing the following. */ - if (dp->strip16) -# ifdef PNG_READ_16_TO_8_SUPPORTED - png_set_strip_16(pp); + if (dp->scale16) +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_set_scale_16(pp); +# else + /* The following works both in 1.5.4 and earlier versions: */ +# ifdef PNG_READ_16_TO_8_SUPPORTED + png_set_strip_16(pp); +# else + png_error(pp, "scale16 (16 to 8 bit conversion) not supported"); +# endif +# endif + + if (dp->expand16) +# ifdef PNG_READ_EXPAND_16_SUPPORTED + png_set_expand_16(pp); +# else + png_error(pp, "expand16 (8 to 16 bit conversion) not supported"); +# endif + + if (dp->do_background >= ALPHA_MODE_OFFSET) + { +# ifdef PNG_READ_ALPHA_MODE_SUPPORTED + { + /* This tests the alpha mode handling, if supported. */ + int mode = dp->do_background - ALPHA_MODE_OFFSET; + + /* The gamma value is the output gamma, and is in the standard, + * non-inverted, represenation. It provides a default for the PNG file + * gamma, but since the file has a gAMA chunk this does not matter. + */ + PNG_CONST double sg = dp->screen_gamma; +# ifndef PNG_FLOATING_POINT_SUPPORTED + PNG_CONST png_fixed_point g = (png_fixed_point)(sg*100000+.5); +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_alpha_mode(pp, mode, sg); +# else + png_set_alpha_mode_fixed(pp, mode, g); +# endif + + /* However, for the standard Porter-Duff algorithm the output defaults + * to be linear, so if the test requires non-linear output it must be + * corrected here. + */ + if (mode == PNG_ALPHA_STANDARD && sg != 1) + { +# ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_gamma(pp, sg, dp->file_gamma); +# else + png_fixed_point f = (png_fixed_point)(dp->file_gamma*100000+.5); + png_set_gamma_fixed(pp, g, f); +# endif + } + } # else - png_error(pp, "strip16 (16 to 8 bit conversion) not supported"); + png_error(pp, "alpha mode handling not supported"); # endif + } + + else + { + /* Set up gamma processing. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_gamma(pp, dp->screen_gamma, dp->file_gamma); +# else + { + png_fixed_point s = (png_fixed_point)(dp->screen_gamma*100000+.5); + png_fixed_point f = (png_fixed_point)(dp->file_gamma*100000+.5); + png_set_gamma_fixed(pp, s, f); + } +# endif + + if (dp->do_background) + { +# ifdef PNG_READ_BACKGROUND_SUPPORTED + /* NOTE: this assumes the caller provided the correct background gamma! + */ + PNG_CONST double bg = dp->background_gamma; +# ifndef PNG_FLOATING_POINT_SUPPORTED + PNG_CONST png_fixed_point g = (png_fixed_point)(bg*100000+.5); +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED + png_set_background(pp, &dp->background_color, dp->do_background, + 0/*need_expand*/, bg); +# else + png_set_background_fixed(pp, &dp->background_color, + dp->do_background, 0/*need_expand*/, g); +# endif +# else + png_error(pp, "png_set_background not supported"); +# endif + } + } png_read_update_info(pp, pi); @@ -5240,16 +6216,759 @@ gamma_info(png_structp pp, png_infop pi) gamma_info_imp(png_get_progressive_ptr(pp), pp, pi); } +/* Validate a single component value - the routine gets the input and output + * sample values as unscaled PNG component values along with a cache of all the + * information required to validate the values. + */ +typedef struct validate_info +{ + png_structp pp; + gamma_display *dp; + png_byte sbit; + int use_input_precision; + int do_background; + int scale16; + unsigned int sbit_max; + unsigned int isbit_shift; + unsigned int outmax; + + double gamma_correction; /* Overall correction required. */ + double file_inverse; /* Inverse of file gamma. */ + double screen_gamma; + double screen_inverse; /* Inverse of screen gamma. */ + + double background_red; /* Linear background value, red or gray. */ + double background_green; + double background_blue; + + double maxabs; + double maxpc; + double maxcalc; + double maxout; + double maxout_total; /* Total including quantization error */ + double outlog; + int outquant; +} +validate_info; + +static void +init_validate_info(validate_info *vi, gamma_display *dp, png_struct *pp, + int in_depth, int out_depth) +{ + PNG_CONST unsigned int outmax = (1U<<out_depth)-1; + + vi->pp = pp; + vi->dp = dp; + + if (dp->sbit > 0 && dp->sbit < in_depth) + { + vi->sbit = dp->sbit; + vi->isbit_shift = in_depth - dp->sbit; + } + + else + { + vi->sbit = (png_byte)in_depth; + vi->isbit_shift = 0; + } + + vi->sbit_max = (1U << vi->sbit)-1; + + /* This mimics the libpng threshold test, '0' is used to prevent gamma + * correction in the validation test. + */ + vi->screen_gamma = dp->screen_gamma; + if (fabs(vi->screen_gamma-1) < PNG_GAMMA_THRESHOLD) + vi->screen_gamma = vi->screen_inverse = 0; + else + vi->screen_inverse = 1/vi->screen_gamma; + + vi->use_input_precision = dp->use_input_precision; + vi->outmax = outmax; + vi->maxabs = abserr(dp->pm, in_depth, out_depth); + vi->maxpc = pcerr(dp->pm, in_depth, out_depth); + vi->maxcalc = calcerr(dp->pm, in_depth, out_depth); + vi->maxout = outerr(dp->pm, in_depth, out_depth); + vi->outquant = output_quantization_factor(dp->pm, in_depth, out_depth); + vi->maxout_total = vi->maxout + vi->outquant * .5; + vi->outlog = outlog(dp->pm, in_depth, out_depth); + + if ((dp->this.colour_type & PNG_COLOR_MASK_ALPHA) != 0 || + (dp->this.colour_type == 3 && dp->this.is_transparent)) + { + vi->do_background = dp->do_background; + + if (vi->do_background != 0) + { + PNG_CONST double bg_inverse = 1/dp->background_gamma; + double r, g, b; + + /* Caller must at least put the gray value into the red channel */ + r = dp->background_color.red; r /= outmax; + g = dp->background_color.green; g /= outmax; + b = dp->background_color.blue; b /= outmax; + +# if 0 + /* libpng doesn't do this optimization, if we do pngvalid will fail. + */ + if (fabs(bg_inverse-1) >= PNG_GAMMA_THRESHOLD) +# endif + { + r = pow(r, bg_inverse); + g = pow(g, bg_inverse); + b = pow(b, bg_inverse); + } + + vi->background_red = r; + vi->background_green = g; + vi->background_blue = b; + } + } + else + vi->do_background = 0; + + if (vi->do_background == 0) + vi->background_red = vi->background_green = vi->background_blue = 0; + + vi->gamma_correction = 1/(dp->file_gamma*dp->screen_gamma); + if (fabs(vi->gamma_correction-1) < PNG_GAMMA_THRESHOLD) + vi->gamma_correction = 0; + + vi->file_inverse = 1/dp->file_gamma; + if (fabs(vi->file_inverse-1) < PNG_GAMMA_THRESHOLD) + vi->file_inverse = 0; + + vi->scale16 = dp->scale16; +} + +/* This function handles composition of a single non-alpha component. The + * argument is the input sample value, in the range 0..1, and the alpha value. + * The result is the composed, linear, input sample. If alpha is less than zero + * this is the alpha component and the function should not be called! + */ +static double +gamma_component_compose(int do_background, double input_sample, double alpha, + double background, int *compose) +{ + switch (do_background) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + case PNG_BACKGROUND_GAMMA_FILE: + case PNG_BACKGROUND_GAMMA_UNIQUE: + /* Standard PNG background processing. */ + if (alpha < 1) + { + if (alpha > 0) + { + input_sample = input_sample * alpha + background * (1-alpha); + if (compose != NULL) + *compose = 1; + } + + else + input_sample = background; + } + break; + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: + case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: + /* The components are premultiplied in either case and the output is + * gamma encoded (to get standard Porter-Duff we expect the output + * gamma to be set to 1.0!) + */ + case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: + /* The optimization is that the partial-alpha entries are linear + * while the opaque pixels are gamma encoded, but this only affects the + * output encoding. + */ + if (alpha < 1) + { + if (alpha > 0) + { + input_sample *= alpha; + if (compose != NULL) + *compose = 1; + } + + else + input_sample = 0; + } + break; +#endif + + default: + /* Standard cases where no compositing is done (so the component + * value is already correct.) + */ + break; + } + + return input_sample; +} + +/* This API returns the encoded *input* component, in the range 0..1 */ +static double +gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi, + PNG_CONST unsigned int id, PNG_CONST unsigned int od, + PNG_CONST double alpha /* <0 for the alpha channel itself */, + PNG_CONST double background /* component background value */) +{ + PNG_CONST unsigned int isbit = id >> vi->isbit_shift; + PNG_CONST unsigned int sbit_max = vi->sbit_max; + PNG_CONST unsigned int outmax = vi->outmax; + PNG_CONST int do_background = vi->do_background; + + double i; + + /* First check on the 'perfect' result obtained from the digitized input + * value, id, and compare this against the actual digitized result, 'od'. + * 'i' is the input result in the range 0..1: + */ + i = isbit; i /= sbit_max; + + /* Check for the fast route: if we don't do any background composition or if + * this is the alpha channel ('alpha' < 0) or if the pixel is opaque then + * just use the gamma_correction field to correct to the final output gamma. + */ + if (alpha == 1 /* opaque pixel component */ || !do_background +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + || do_background == ALPHA_MODE_OFFSET + PNG_ALPHA_PNG +#endif + || (alpha < 0 /* alpha channel */ +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + && do_background != ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN +#endif + )) + { + /* Then get the gamma corrected version of 'i' and compare to 'od', any + * error less than .5 is insignificant - just quantization of the output + * value to the nearest digital value (nevertheless the error is still + * recorded - it's interesting ;-) + */ + double encoded_sample = i; + double encoded_error; + + /* alpha less than 0 indicates the alpha channel, which is always linear + */ + if (alpha >= 0 && vi->gamma_correction > 0) + encoded_sample = pow(encoded_sample, vi->gamma_correction); + encoded_sample *= outmax; + + encoded_error = fabs(od-encoded_sample); + + if (encoded_error > vi->dp->maxerrout) + vi->dp->maxerrout = encoded_error; + + if (encoded_error < vi->maxout_total && encoded_error < vi->outlog) + return i; + } + + /* The slow route - attempt to do linear calculations. */ + /* There may be an error, or background processing is required, so calculate + * the actual sample values - unencoded light intensity values. Note that in + * practice these are not completely unencoded because they include a + * 'viewing correction' to decrease or (normally) increase the perceptual + * contrast of the image. There's nothing we can do about this - we don't + * know what it is - so assume the unencoded value is perceptually linear. + */ + { + double input_sample = i; /* In range 0..1 */ + double output, error, encoded_sample, encoded_error; + double es_lo, es_hi; + int compose = 0; /* Set to one if composition done */ + int output_is_encoded; /* Set if encoded to screen gamma */ + int log_max_error = 1; /* Check maximum error values */ + png_const_charp pass = 0; /* Reason test passes (or 0 for fail) */ + + /* Convert to linear light (with the above caveat.) The alpha channel is + * already linear. + */ + if (alpha >= 0) + { + int tcompose; + + if (vi->file_inverse > 0) + input_sample = pow(input_sample, vi->file_inverse); + + /* Handle the compose processing: */ + tcompose = 0; + input_sample = gamma_component_compose(do_background, input_sample, + alpha, background, &tcompose); + + if (tcompose) + compose = 1; + } + + /* And similarly for the output value, but we need to check the background + * handling to linearize it correctly. + */ + output = od; + output /= outmax; + + output_is_encoded = vi->screen_gamma > 0; + + if (alpha < 0) /* The alpha channel */ + { +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + if (do_background != ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN) +#endif + { + /* In all other cases the output alpha channel is linear already, + * don't log errors here, they are much larger in linear data. + */ + output_is_encoded = 0; + log_max_error = 0; + } + } + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + else /* A component */ + { + if (do_background == ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED && + alpha < 1) /* the optimized case - linear output */ + { + if (alpha > 0) log_max_error = 0; + output_is_encoded = 0; + } + } +#endif + + if (output_is_encoded) + output = pow(output, vi->screen_gamma); + + /* Calculate (or recalculate) the encoded_sample value and repeat the + * check above (unnecessary if we took the fast route, but harmless.) + */ + encoded_sample = input_sample; + if (output_is_encoded) + encoded_sample = pow(encoded_sample, vi->screen_inverse); + encoded_sample *= outmax; + + encoded_error = fabs(od-encoded_sample); + + /* Don't log errors in the alpha channel, or the 'optimized' case, + * neither are significant to the overall perception. + */ + if (log_max_error && encoded_error > vi->dp->maxerrout) + vi->dp->maxerrout = encoded_error; + + if (encoded_error < vi->maxout_total) + { + if (encoded_error < vi->outlog) + return i; + + /* Test passed but error is bigger than the log limit, record why the + * test passed: + */ + pass = "less than maxout:\n"; + } + + /* i: the original input value in the range 0..1 + * + * pngvalid calculations: + * input_sample: linear result; i linearized and composed, range 0..1 + * encoded_sample: encoded result; input_sample scaled to ouput bit depth + * + * libpng calculations: + * output: linear result; od scaled to 0..1 and linearized + * od: encoded result from libpng + */ + + /* Now we have the numbers for real errors, both absolute values as as a + * percentage of the correct value (output): + */ + error = fabs(input_sample-output); + + if (log_max_error && error > vi->dp->maxerrabs) + vi->dp->maxerrabs = error; + + /* The following is an attempt to ignore the tendency of quantization to + * dominate the percentage errors for lower result values: + */ + if (log_max_error && input_sample > .5) + { + double percentage_error = error/input_sample; + if (percentage_error > vi->dp->maxerrpc) + vi->dp->maxerrpc = percentage_error; + } + + /* Now calculate the digitization limits for 'encoded_sample' using the + * 'max' values. Note that maxout is in the encoded space but maxpc and + * maxabs are in linear light space. + * + * First find the maximum error in linear light space, range 0..1: + */ + { + double tmp = input_sample * vi->maxpc; + if (tmp < vi->maxabs) tmp = vi->maxabs; + /* If 'compose' is true the composition was done in linear space using + * integer arithmetic. This introduces an extra error of +/- 0.5 (at + * least) in the integer space used. 'maxcalc' records this, taking + * into account the possibility that even for 16 bit output 8 bit space + * may have been used. + */ + if (compose && tmp < vi->maxcalc) tmp = vi->maxcalc; + + /* The 'maxout' value refers to the encoded result, to compare with + * this encode input_sample adjusted by the maximum error (tmp) above. + */ + es_lo = encoded_sample - vi->maxout; + + if (es_lo > 0 && input_sample-tmp > 0) + { + double low_value = input_sample-tmp; + if (output_is_encoded) + low_value = pow(low_value, vi->screen_inverse); + low_value *= outmax; + if (low_value < es_lo) es_lo = low_value; + + /* Quantize this appropriately: */ + es_lo = ceil(es_lo / vi->outquant - .5) * vi->outquant; + } + + else + es_lo = 0; + + es_hi = encoded_sample + vi->maxout; + + if (es_hi < outmax && input_sample+tmp < 1) + { + double high_value = input_sample+tmp; + if (output_is_encoded) + high_value = pow(high_value, vi->screen_inverse); + high_value *= outmax; + if (high_value > es_hi) es_hi = high_value; + + es_hi = floor(es_hi / vi->outquant + .5) * vi->outquant; + } + + else + es_hi = outmax; + } + + /* The primary test is that the final encoded value returned by the + * library should be between the two limits (inclusive) that were + * calculated above. + */ + if (od >= es_lo && od <= es_hi) + { + /* The value passes, but we may need to log the information anyway. */ + if (encoded_error < vi->outlog) + return i; + + if (pass == 0) + pass = "within digitization limits:\n"; + } + + { + /* There has been an error in processing, or we need to log this + * value. + */ + double is_lo, is_hi; + + /* pass is set at this point if either of the tests above would have + * passed. Don't do these additional tests here - just log the + * original [es_lo..es_hi] values. + */ + if (pass == 0 && vi->use_input_precision) + { + /* Ok, something is wrong - this actually happens in current libpng + * 16-to-8 processing. Assume that the input value (id, adjusted + * for sbit) can be anywhere between value-.5 and value+.5 - quite a + * large range if sbit is low. + */ + double tmp = (isbit - .5)/sbit_max; + + if (tmp <= 0) + tmp = 0; + + else if (alpha >= 0 && vi->file_inverse > 0 && tmp < 1) + tmp = pow(tmp, vi->file_inverse); + + tmp = gamma_component_compose(do_background, tmp, alpha, background, + NULL); + + if (output_is_encoded && tmp > 0 && tmp < 1) + tmp = pow(tmp, vi->screen_inverse); + + is_lo = ceil(outmax * tmp - vi->maxout_total); + + if (is_lo < 0) + is_lo = 0; + + tmp = (isbit + .5)/sbit_max; + + if (tmp <= 0) + tmp = 0; + + else if (alpha >= 0 && vi->file_inverse > 0 && tmp < 1) + tmp = pow(tmp, vi->file_inverse); + + tmp = gamma_component_compose(do_background, tmp, alpha, background, + NULL); + + if (output_is_encoded && tmp > 0 && tmp < 1) + tmp = pow(tmp, vi->screen_inverse); + + is_hi = floor(outmax * tmp + vi->maxout_total); + + if (is_hi > outmax) + is_hi = outmax; + + if (!(od < is_lo || od > is_hi)) + { + if (encoded_error < vi->outlog) + return i; + + pass = "within input precision limits:\n"; + } + + /* One last chance. If this is an alpha channel and the 16to8 + * option has been used and 'inaccurate' scaling is used then the + * bit reduction is obtained by simply using the top 8 bits of the + * value. + * + * This is only done for older libpng versions when the 'inaccurate' + * (chop) method of scaling was used. + */ +# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED +# if PNG_LIBPNG_VER < 10504 + /* This may be required for other components in the future, + * but at present the presence of gamma correction effectively + * prevents the errors in the component scaling (I don't quite + * understand why, but since it's better this way I care not + * to ask, JB 20110419.) + */ + if (pass == 0 && alpha < 0 && vi->scale16 && vi->sbit > 8 && + vi->sbit + vi->isbit_shift == 16) + { + tmp = ((id >> 8) - .5)/255; + + if (tmp > 0) + { + is_lo = ceil(outmax * tmp - vi->maxout_total); + if (is_lo < 0) is_lo = 0; + } + + else + is_lo = 0; + + tmp = ((id >> 8) + .5)/255; + + if (tmp < 1) + { + is_hi = floor(outmax * tmp + vi->maxout_total); + if (is_hi > outmax) is_hi = outmax; + } + + else + is_hi = outmax; + + if (!(od < is_lo || od > is_hi)) + { + if (encoded_error < vi->outlog) + return i; + + pass = "within 8 bit limits:\n"; + } + } +# endif +# endif + } + else /* !use_input_precision */ + is_lo = es_lo, is_hi = es_hi; + + /* Attempt to output a meaningful error/warning message: the message + * output depends on the background/composite operation being performed + * because this changes what parameters were actually used above. + */ + { + size_t pos = 0; + /* Need either 1/255 or 1/65535 precision here; 3 or 6 decimal + * places. Just use outmax to work out which. + */ + int precision = (outmax >= 1000 ? 6 : 3); + int use_input=1, use_background=0, do_compose=0; + char msg[256]; + + if (pass != 0) + pos = safecat(msg, sizeof msg, pos, "\n\t"); + + /* Set up the various flags, the output_is_encoded flag above + * is also used below. do_compose is just a double check. + */ + switch (do_background) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + case PNG_BACKGROUND_GAMMA_FILE: + case PNG_BACKGROUND_GAMMA_UNIQUE: + use_background = (alpha >= 0 && alpha < 1); + /*FALL THROUGH*/ +# ifdef PNG_READ_ALPHA_MODE_SUPPORTED + case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: + case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: + case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: +# endif /* ALPHA_MODE_SUPPORTED */ + do_compose = (alpha >= 0 && alpha < 1); + use_input = (alpha != 0); + break; + + default: + break; + } + + /* Check the 'compose' flag */ + if (compose != do_compose) + png_error(vi->pp, "internal error (compose)"); + + /* 'name' is the component name */ + pos = safecat(msg, sizeof msg, pos, name); + pos = safecat(msg, sizeof msg, pos, "("); + pos = safecatn(msg, sizeof msg, pos, id); + if (use_input || pass != 0/*logging*/) + { + if (isbit != id) + { + /* sBIT has reduced the precision of the input: */ + pos = safecat(msg, sizeof msg, pos, ", sbit("); + pos = safecatn(msg, sizeof msg, pos, vi->sbit); + pos = safecat(msg, sizeof msg, pos, "): "); + pos = safecatn(msg, sizeof msg, pos, isbit); + } + pos = safecat(msg, sizeof msg, pos, "/"); + /* The output is either "id/max" or "id sbit(sbit): isbit/max" */ + pos = safecatn(msg, sizeof msg, pos, vi->sbit_max); + } + pos = safecat(msg, sizeof msg, pos, ")"); + + /* A component may have been multiplied (in linear space) by the + * alpha value, 'compose' says whether this is relevant. + */ + if (compose || pass != 0) + { + /* If any form of composition is being done report our + * calculated linear value here (the code above doesn't record + * the input value before composition is performed, so what + * gets reported is the value after composition.) + */ + if (use_input || pass != 0) + { + if (vi->file_inverse > 0) + { + pos = safecat(msg, sizeof msg, pos, "^"); + pos = safecatd(msg, sizeof msg, pos, vi->file_inverse, 2); + } + + else + pos = safecat(msg, sizeof msg, pos, "[linear]"); + + pos = safecat(msg, sizeof msg, pos, "*(alpha)"); + pos = safecatd(msg, sizeof msg, pos, alpha, precision); + } + + /* Now record the *linear* background value if it was used + * (this function is not passed the original, non-linear, + * value but it is contained in the test name.) + */ + if (use_background) + { + pos = safecat(msg, sizeof msg, pos, use_input ? "+" : " "); + pos = safecat(msg, sizeof msg, pos, "(background)"); + pos = safecatd(msg, sizeof msg, pos, background, precision); + pos = safecat(msg, sizeof msg, pos, "*"); + pos = safecatd(msg, sizeof msg, pos, 1-alpha, precision); + } + } + + /* Report the calculated value (input_sample) and the linearized + * libpng value (output) unless this is just a component gamma + * correction. + */ + if (compose || alpha < 0 || pass != 0) + { + pos = safecat(msg, sizeof msg, pos, + pass != 0 ? " =\n\t" : " = "); + pos = safecatd(msg, sizeof msg, pos, input_sample, precision); + pos = safecat(msg, sizeof msg, pos, " (libpng: "); + pos = safecatd(msg, sizeof msg, pos, output, precision); + pos = safecat(msg, sizeof msg, pos, ")"); + + /* Finally report the output gamma encoding, if any. */ + if (output_is_encoded) + { + pos = safecat(msg, sizeof msg, pos, " ^"); + pos = safecatd(msg, sizeof msg, pos, vi->screen_inverse, 2); + pos = safecat(msg, sizeof msg, pos, "(to screen) ="); + } + + else + pos = safecat(msg, sizeof msg, pos, " [screen is linear] ="); + } + + if ((!compose && alpha >= 0) || pass != 0) + { + if (pass != 0) /* logging */ + pos = safecat(msg, sizeof msg, pos, "\n\t[overall:"); + + /* This is the non-composition case, the internal linear + * values are irrelevant (though the log below will reveal + * them.) Output a much shorter warning/error message and report + * the overall gamma correction. + */ + if (vi->gamma_correction > 0) + { + pos = safecat(msg, sizeof msg, pos, " ^"); + pos = safecatd(msg, sizeof msg, pos, vi->gamma_correction, 2); + pos = safecat(msg, sizeof msg, pos, "(gamma correction) ="); + } + + else + pos = safecat(msg, sizeof msg, pos, + " [no gamma correction] ="); + + if (pass != 0) + pos = safecat(msg, sizeof msg, pos, "]"); + } + + /* This is our calculated encoded_sample which should (but does + * not) match od: + */ + pos = safecat(msg, sizeof msg, pos, pass != 0 ? "\n\t" : " "); + pos = safecatd(msg, sizeof msg, pos, is_lo, 1); + pos = safecat(msg, sizeof msg, pos, " < "); + pos = safecatd(msg, sizeof msg, pos, encoded_sample, 1); + pos = safecat(msg, sizeof msg, pos, " (libpng: "); + pos = safecatn(msg, sizeof msg, pos, od); + pos = safecat(msg, sizeof msg, pos, ")"); + pos = safecat(msg, sizeof msg, pos, "/"); + pos = safecatn(msg, sizeof msg, pos, outmax); + pos = safecat(msg, sizeof msg, pos, " < "); + pos = safecatd(msg, sizeof msg, pos, is_hi, 1); + + if (pass == 0) /* The error condition */ + { +# ifdef PNG_WARNINGS_SUPPORTED + png_warning(vi->pp, msg); +# else + store_warning(vi->pp, msg); +# endif + } + + else /* logging this value */ + store_verbose(&vi->dp->pm->this, vi->pp, pass, msg); + } + } + } + + return i; +} + static void -gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi, - png_const_bytep pRow) +gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi) { /* Get some constants derived from the input and output file formats: */ - PNG_CONST png_byte sbit = dp->sbit; - PNG_CONST double file_gamma = dp->file_gamma; - PNG_CONST double screen_gamma = dp->screen_gamma; - PNG_CONST int use_input_precision = dp->use_input_precision; - PNG_CONST int speed = dp->speed; + PNG_CONST png_store* PNG_CONST ps = dp->this.ps; PNG_CONST png_byte in_ct = dp->this.colour_type; PNG_CONST png_byte in_bd = dp->this.bit_depth; PNG_CONST png_uint_32 w = dp->this.w; @@ -5257,10 +6976,6 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi, PNG_CONST size_t cbRow = dp->this.cbRow; PNG_CONST png_byte out_ct = png_get_color_type(pp, pi); PNG_CONST png_byte out_bd = png_get_bit_depth(pp, pi); - PNG_CONST unsigned int outmax = (1U<<out_bd)-1; - PNG_CONST double maxabs = abserr(dp->pm, out_bd); - PNG_CONST double maxout = outerr(dp->pm, out_bd); - PNG_CONST double maxpc = pcerr(dp->pm, out_bd); /* There are three sources of error, firstly the quantization in the * file encoding, determined by sbit and/or the file depth, secondly @@ -5298,201 +7013,133 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi, * * Because there is limited precision in the input it is arguable that * an acceptable result is any valid result from input-.5 to input+.5. - * The basic tests below do not do this, however if - * 'use_input_precision' is set a subsequent test is performed below. + * The basic tests below do not do this, however if 'use_input_precision' + * is set a subsequent test is performed below. */ - PNG_CONST int processing = (fabs(screen_gamma*file_gamma-1) >= - PNG_GAMMA_THRESHOLD && !dp->threshold_test && !speed && in_ct != 3) || - in_bd != out_bd; - PNG_CONST unsigned int samples_per_pixel = (out_ct & 2U) ? 3U : 1U; + int processing; + png_uint_32 y; + PNG_CONST store_palette_entry *in_palette = dp->this.palette; + PNG_CONST int in_is_transparent = dp->this.is_transparent; + int out_npalette = -1; + int out_is_transparent = 0; /* Just refers to the palette case */ + store_palette out_palette; + validate_info vi; + + /* Check for row overwrite errors */ + store_image_check(dp->this.ps, pp, 0); + + /* Supply the input and output sample depths here - 8 for an indexed image, + * otherwise the bit depth. + */ + init_validate_info(&vi, dp, pp, in_ct==3?8:in_bd, out_ct==3?8:out_bd); - PNG_CONST double gamma_correction = 1/(file_gamma*screen_gamma);/* Overall */ + processing = (vi.gamma_correction > 0 && !dp->threshold_test) + || in_bd != out_bd || in_ct != out_ct || vi.do_background; - double maxerrout = 0, maxerrabs = 0, maxerrpc = 0; - png_uint_32 y; + /* TODO: FIX THIS: MAJOR BUG! If the transformations all happen inside + * the palette there is no way of finding out, because libpng fails to + * update the palette on png_read_update_info. Indeed, libpng doesn't + * even do the required work until much later, when it doesn't have any + * info pointer. Oops. For the moment 'processing' is turned off if + * out_ct is palette. + */ + if (in_ct == 3 && out_ct == 3) + processing = 0; - for (y=0; y<h; ++y, pRow += cbRow) + if (processing && out_ct == 3) + out_is_transparent = read_palette(out_palette, &out_npalette, pp, pi); + + for (y=0; y<h; ++y) { - unsigned int s, x; + png_const_bytep pRow = store_image_row(ps, pp, 0, y); png_byte std[STANDARD_ROWMAX]; transform_row(pp, std, in_ct, in_bd, y); if (processing) { - for (x=0; x<w; ++x) for (s=0; s<samples_per_pixel; ++s) - { - /* Input sample values: */ - PNG_CONST unsigned int - id = sample(std, in_ct, in_bd, x, s); + unsigned int x; - PNG_CONST unsigned int - od = sample(pRow, out_ct, out_bd, x, s); - - PNG_CONST unsigned int - isbit = id >> (in_bd-sbit); - - double i, input_sample, encoded_sample, output; - double encoded_error, error; - double es_lo, es_hi; - - /* First check on the 'perfect' result obtained from the - * digitized input value, id, and compare this against the - * actual digitized result, 'od'. 'i' is the input result - * in the range 0..1: - * - * NOTE: sBIT should be taken into account here but isn't, - * as described above. - */ - i = isbit; i /= (1U<<sbit)-1; - - /* Then get the gamma corrected version of 'i' and compare - * to 'od', any error less than .5 is insignificant - just - * quantization of the output value to the nearest digital - * value (nevertheless the error is still recorded - it's - * interesting ;-) - */ - encoded_sample = pow(i, gamma_correction) * outmax; - encoded_error = fabs(od-encoded_sample); - - if (encoded_error > maxerrout) - maxerrout = encoded_error; - - if (encoded_error < .5+maxout) - continue; - - /* There may be an error, so calculate the actual sample - * values - unencoded light intensity values. Note that - * in practice these are not unencoded because they - * include a 'viewing correction' to decrease or - * (normally) increase the perceptual contrast of the - * image. There's nothing we can do about this - we don't - * know what it is - so assume the unencoded value is - * perceptually linear. - */ - input_sample = pow(i, 1/file_gamma); /* In range 0..1 */ - output = od; - output /= outmax; - output = pow(output, screen_gamma); - - /* Now we have the numbers for real errors, both absolute - * values as as a percentage of the correct value (output): - */ - error = fabs(input_sample-output); - - if (error > maxerrabs) - maxerrabs = error; + for (x=0; x<w; ++x) + { + double alpha = 1; /* serves as a flag value */ - /* The following is an attempt to ignore the tendency of - * quantization to dominate the percentage errors for low - * output sample values: - */ - if (input_sample*maxpc > .5+maxabs) - { - double percentage_error = error/input_sample; - if (percentage_error > maxerrpc) maxerrpc = percentage_error; - } + /* Record the palette index for index images. */ + PNG_CONST unsigned int in_index = + in_ct == 3 ? sample(std, 3, in_bd, x, 0) : 256; + PNG_CONST unsigned int out_index = + out_ct == 3 ? sample(std, 3, out_bd, x, 0) : 256; - /* Now calculate the digitization limits for - * 'encoded_sample' using the 'max' values. Note that - * maxout is in the encoded space but maxpc and maxabs are - * in linear light space. - * - * First find the maximum error in linear light space, - * range 0..1: + /* Handle input alpha - png_set_background will cause the output + * alpha to disappear so there is nothing to check. */ + if ((in_ct & PNG_COLOR_MASK_ALPHA) != 0 || (in_ct == 3 && + in_is_transparent)) { - double tmp = input_sample * maxpc; - if (tmp < maxabs) tmp = maxabs; + PNG_CONST unsigned int input_alpha = in_ct == 3 ? + dp->this.palette[in_index].alpha : + sample(std, in_ct, in_bd, x, samples_per_pixel); - /* Low bound - the minimum of the three: */ - es_lo = encoded_sample - maxout; + unsigned int output_alpha = 65536 /* as a flag value */; - if (es_lo > 0 && input_sample-tmp > 0) + if (out_ct == 3) { - double low_value = outmax * pow(input_sample-tmp, - 1/screen_gamma); - if (low_value < es_lo) es_lo = low_value; + if (out_is_transparent) + output_alpha = out_palette[out_index].alpha; } - else - es_lo = 0; + else if ((out_ct & PNG_COLOR_MASK_ALPHA) != 0) + output_alpha = sample(pRow, out_ct, out_bd, x, + samples_per_pixel); - es_hi = encoded_sample + maxout; + if (output_alpha != 65536) + alpha = gamma_component_validate("alpha", &vi, input_alpha, + output_alpha, -1/*alpha*/, 0/*background*/); - if (es_hi < outmax && input_sample+tmp < 1) + else /* no alpha in output */ { - double high_value = outmax * pow(input_sample+tmp, - 1/screen_gamma); - if (high_value > es_hi) es_hi = high_value; + /* This is a copy of the calculation of 'i' above in order to + * have the alpha value to use in the background calculation. + */ + alpha = input_alpha >> vi.isbit_shift; + alpha /= vi.sbit_max; } - - else - es_hi = outmax; } - /* The primary test is that the final encoded value - * returned by the library should be between the two limits - * (inclusive) that were calculated above. At this point - * quantization of the output must be taken into account. - */ - if (od+.5 < es_lo || od-.5 > es_hi) + /* Handle greyscale or RGB components. */ + if ((in_ct & PNG_COLOR_MASK_COLOR) == 0) /* greyscale */ + (void)gamma_component_validate("gray", &vi, + sample(std, in_ct, in_bd, x, 0), + sample(pRow, out_ct, out_bd, x, 0), alpha/*component*/, + vi.background_red); + else /* RGB or palette */ { - /* There has been an error in processing. */ - double is_lo, is_hi; - - if (use_input_precision) - { - /* Ok, something is wrong - this actually happens in - * current libpng sbit processing. Assume that the - * input value (id, adjusted for sbit) can be - * anywhere between value-.5 and value+.5 - quite a - * large range if sbit is low. - */ - double tmp = (isbit - .5)/((1U<<sbit)-1); - - if (tmp > 0) - { - is_lo = outmax * pow(tmp, gamma_correction) - maxout; - if (is_lo < 0) is_lo = 0; - } - - else - is_lo = 0; - - tmp = (isbit + .5)/((1U<<sbit)-1); - - if (tmp < 1) - { - is_hi = outmax * pow(tmp, gamma_correction) + maxout; - if (is_hi > outmax) is_hi = outmax; - } - - else - is_hi = outmax; - - if (!(od+.5 < is_lo || od-.5 > is_hi)) - continue; - } - else - is_lo = es_lo, is_hi = es_hi; - - { - char msg[256]; - - sprintf(msg, - "error: %.3f; %u{%u;%u} -> %u not %.2f (%.1f-%.1f)", - od-encoded_sample, id, sbit, isbit, od, - encoded_sample, is_lo, is_hi); - - png_warning(pp, msg); - } + (void)gamma_component_validate("red", &vi, + in_ct == 3 ? in_palette[in_index].red : + sample(std, in_ct, in_bd, x, 0), + out_ct == 3 ? out_palette[out_index].red : + sample(pRow, out_ct, out_bd, x, 0), + alpha/*component*/, vi.background_red); + + (void)gamma_component_validate("green", &vi, + in_ct == 3 ? in_palette[in_index].green : + sample(std, in_ct, in_bd, x, 1), + out_ct == 3 ? out_palette[out_index].green : + sample(pRow, out_ct, out_bd, x, 1), + alpha/*component*/, vi.background_green); + + (void)gamma_component_validate("blue", &vi, + in_ct == 3 ? in_palette[in_index].blue : + sample(std, in_ct, in_bd, x, 2), + out_ct == 3 ? out_palette[out_index].blue : + sample(pRow, out_ct, out_bd, x, 2), + alpha/*component*/, vi.background_blue); } } } - else if (!speed && memcmp(std, pRow, cbRow) != 0) + else if (memcmp(std, pRow, cbRow) != 0) { char msg[64]; @@ -5503,9 +7150,6 @@ gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi, } } /* row (y) loop */ - dp->maxerrout = maxerrout; - dp->maxerrabs = maxerrabs; - dp->maxerrpc = maxerrpc; dp->this.ps->validated = 1; } @@ -5514,7 +7158,8 @@ gamma_end(png_structp pp, png_infop pi) { gamma_display *dp = png_get_progressive_ptr(pp); - gamma_image_validate(dp, pp, pi, dp->this.ps->image); + if (!dp->this.speed) + gamma_image_validate(dp, pp, pi); } /* A single test run checking a gamma transformation. @@ -5525,18 +7170,23 @@ gamma_end(png_structp pp, png_infop pi) */ static void gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, - PNG_CONST png_byte bit_depthIn, PNG_CONST int interlace_typeIn, + PNG_CONST png_byte bit_depthIn, PNG_CONST int palette_numberIn, + PNG_CONST int interlace_typeIn, PNG_CONST double file_gammaIn, PNG_CONST double screen_gammaIn, PNG_CONST png_byte sbitIn, PNG_CONST int threshold_testIn, - PNG_CONST char *name, PNG_CONST int speedIn, - PNG_CONST int use_input_precisionIn, PNG_CONST int strip16In) + PNG_CONST char *name, + PNG_CONST int use_input_precisionIn, PNG_CONST int scale16In, + PNG_CONST int expand16In, PNG_CONST int do_backgroundIn, + PNG_CONST png_color_16 *bkgd_colorIn, double bkgd_gammaIn) { gamma_display d; context(&pmIn->this, fault); gamma_display_init(&d, pmIn, FILEID(colour_typeIn, bit_depthIn, - interlace_typeIn, 0, 0, 0), file_gammaIn, screen_gammaIn, sbitIn, - threshold_testIn, speedIn, use_input_precisionIn, strip16In); + palette_numberIn, interlace_typeIn, 0, 0, 0), + file_gammaIn, screen_gammaIn, sbitIn, + threshold_testIn, use_input_precisionIn, scale16In, + expand16In, do_backgroundIn, bkgd_colorIn, bkgd_gammaIn); Try { @@ -5552,23 +7202,14 @@ gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, d.pm->modifications = NULL; gamma_modification_init(&gamma_mod, d.pm, d.file_gamma); srgb_modification_init(&srgb_mod, d.pm, 127 /*delete*/); - sbit_modification_init(&sbit_mod, d.pm, d.sbit); + if (d.sbit > 0) + sbit_modification_init(&sbit_mod, d.pm, d.sbit); modification_reset(d.pm->modifications); /* Get a png_struct for writing the image. */ pp = set_modifier_for_read(d.pm, &pi, d.this.id, name); - - /* Set up gamma processing. */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - png_set_gamma(pp, d.screen_gamma, d.file_gamma); -#else - { - png_fixed_point s = floor(d.screen_gamma*100000+.5); - png_fixed_point f = floor(d.file_gamma*100000+.5); - png_set_gamma_fixed(pp, s, f); - } -#endif + standard_palette_init(&d.this); /* Introduce the correct read function. */ if (d.pm->this.progressive) @@ -5591,16 +7232,17 @@ gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, /* Process the 'info' requirements. Only one image is generated */ gamma_info_imp(&d, pp, pi); - sequential_row(&d.this, pp, pi, NULL, d.this.ps->image); + sequential_row(&d.this, pp, pi, -1, 0); - gamma_image_validate(&d, pp, pi, d.this.ps->image); + if (!d.this.speed) + gamma_image_validate(&d, pp, pi); } modifier_reset(d.pm); - if (d.pm->log && !d.threshold_test && !d.speed) + if (d.pm->log && !d.threshold_test && !d.this.speed) fprintf(stderr, "%d bit %s %s: max error %f (%.2g, %2g%%)\n", - d.this.bit_depth, colour_types[d.this.colour_type], d.name, + d.this.bit_depth, colour_types[d.this.colour_type], name, d.maxerrout, d.maxerrabs, 100*d.maxerrpc); /* Log the summary values too. */ @@ -5662,6 +7304,12 @@ gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn, png_error(pp, "bad bit depth (internal: 2)"); } } + + else if (d.this.colour_type == 3) + { + if (d.maxerrout > d.pm->error_indexed) + d.pm->error_indexed = d.maxerrout; + } } Catch(fault) @@ -5679,9 +7327,11 @@ static void gamma_threshold_test(png_modifier *pm, png_byte colour_type, pos = safecat(name, sizeof name, pos, "/"); pos = safecatd(name, sizeof name, pos, screen_gamma, 3); - (void)gamma_test(pm, colour_type, bit_depth, interlace_type, file_gamma, - screen_gamma, bit_depth, 1, name, 0 /*speed*/, 0 /*no input precision*/, - 0 /*no strip16*/); + (void)gamma_test(pm, colour_type, bit_depth, 0/*palette*/, interlace_type, + file_gamma, screen_gamma, 0/*sBIT*/, 1/*threshold test*/, name, + 0 /*no input precision*/, + 0 /*no scale16*/, 0 /*no expand16*/, 0 /*no background*/, 0 /*hence*/, + 0 /*no background gamma*/); } static void @@ -5689,8 +7339,14 @@ perform_gamma_threshold_tests(png_modifier *pm) { png_byte colour_type = 0; png_byte bit_depth = 0; + int palette_number = 0; - while (next_format(&colour_type, &bit_depth)) + /* Don't test more than one instance of each palette - it's pointless, in + * fact this test is somewhat excessive since libpng doesn't make this + * decision based on colour type or bit depth! + */ + while (next_format(&colour_type, &bit_depth, &palette_number)) + if (palette_number == 0) { double test_gamma = 1.0; while (test_gamma >= .4) @@ -5714,14 +7370,15 @@ perform_gamma_threshold_tests(png_modifier *pm) static void gamma_transform_test(png_modifier *pm, PNG_CONST png_byte colour_type, PNG_CONST png_byte bit_depth, + PNG_CONST int palette_number, PNG_CONST int interlace_type, PNG_CONST double file_gamma, - PNG_CONST double screen_gamma, PNG_CONST png_byte sbit, PNG_CONST int speed, - PNG_CONST int use_input_precision, PNG_CONST int strip16) + PNG_CONST double screen_gamma, PNG_CONST png_byte sbit, + PNG_CONST int use_input_precision, PNG_CONST int scale16) { size_t pos = 0; char name[64]; - if (sbit != bit_depth) + if (sbit != bit_depth && sbit != 0) { pos = safecat(name, sizeof name, pos, "sbit("); pos = safecatn(name, sizeof name, pos, sbit); @@ -5731,34 +7388,33 @@ static void gamma_transform_test(png_modifier *pm, else pos = safecat(name, sizeof name, pos, "gamma "); - if (strip16) + if (scale16) pos = safecat(name, sizeof name, pos, "16to8 "); pos = safecatd(name, sizeof name, pos, file_gamma, 3); pos = safecat(name, sizeof name, pos, "->"); pos = safecatd(name, sizeof name, pos, screen_gamma, 3); - gamma_test(pm, colour_type, bit_depth, interlace_type, file_gamma, - screen_gamma, sbit, 0, name, speed, use_input_precision, strip16); + gamma_test(pm, colour_type, bit_depth, palette_number, interlace_type, + file_gamma, screen_gamma, sbit, 0, name, use_input_precision, + scale16, pm->test_gamma_expand16, 0 , 0, 0); } -static void perform_gamma_transform_tests(png_modifier *pm, int speed) +static void perform_gamma_transform_tests(png_modifier *pm) { png_byte colour_type = 0; png_byte bit_depth = 0; + int palette_number = 0; - /* Ignore palette images - the gamma correction happens on the palette entry, - * haven't got the tests for this yet. - */ - while (next_format(&colour_type, &bit_depth)) if (colour_type != 3) + while (next_format(&colour_type, &bit_depth, &palette_number)) { unsigned int i, j; for (i=0; i<pm->ngammas; ++i) for (j=0; j<pm->ngammas; ++j) if (i != j) { - gamma_transform_test(pm, colour_type, bit_depth, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], bit_depth, speed, - pm->use_input_precision, 0 /*do not strip16*/); + gamma_transform_test(pm, colour_type, bit_depth, palette_number, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], 0/*sBIT*/, + pm->use_input_precision, 0 /*do not scale16*/); if (fail(pm)) return; @@ -5766,55 +7422,41 @@ static void perform_gamma_transform_tests(png_modifier *pm, int speed) } } -static void perform_gamma_sbit_tests(png_modifier *pm, int speed) +static void perform_gamma_sbit_tests(png_modifier *pm) { png_byte sbit; /* The only interesting cases are colour and grayscale, alpha is ignored here - * for overall speed. Only bit depths 8 and 16 are tested. + * for overall speed. Only bit depths where sbit is less than the bit depth + * are tested. */ for (sbit=pm->sbitlow; sbit<(1<<READ_BDHI); ++sbit) { - unsigned int i, j; - - for (i=0; i<pm->ngammas; ++i) - { - for (j=0; j<pm->ngammas; ++j) - { - if (i != j) - { - if (sbit < 8) - { - gamma_transform_test(pm, 0, 8, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], sbit, speed, - pm->use_input_precision_sbit, 0 /*strip16*/); - - if (fail(pm)) - return; + png_byte colour_type, bit_depth; + int npalette; - gamma_transform_test(pm, 2, 8, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], sbit, speed, - pm->use_input_precision_sbit, 0 /*strip16*/); + colour_type = bit_depth = 0; + npalette = 0; - if (fail(pm)) - return; - } - -#ifdef DO_16BIT - gamma_transform_test(pm, 0, 16, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], sbit, speed, - pm->use_input_precision_sbit, 0 /*strip16*/); + while (next_format(&colour_type, &bit_depth, &npalette)) + if ((colour_type & PNG_COLOR_MASK_ALPHA) == 0 && + ((colour_type == 3 && sbit < 8) || + (colour_type != 3 && sbit < bit_depth))) + { + unsigned int i; - if (fail(pm)) - return; + for (i=0; i<pm->ngammas; ++i) + { + unsigned int j; - gamma_transform_test(pm, 2, 16, pm->interlace_type, - 1/pm->gammas[i], pm->gammas[j], sbit, speed, - pm->use_input_precision_sbit, 0 /*strip16*/); + for (j=0; j<pm->ngammas; ++j) if (i != j) + { + gamma_transform_test(pm, colour_type, bit_depth, npalette, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], + sbit, pm->use_input_precision_sbit, 0 /*scale16*/); if (fail(pm)) return; -#endif } } } @@ -5822,10 +7464,11 @@ static void perform_gamma_sbit_tests(png_modifier *pm, int speed) } /* Note that this requires a 16 bit source image but produces 8 bit output, so - * we only need the 16bit write support. + * we only need the 16bit write support, but the 16 bit images are only + * generated if DO_16BIT is defined. */ -#ifdef PNG_READ_16_TO_8_SUPPORTED -static void perform_gamma_strip16_tests(png_modifier *pm, int speed) +#ifdef DO_16BIT +static void perform_gamma_scale16_tests(png_modifier *pm) { # ifndef PNG_MAX_GAMMA_8 # define PNG_MAX_GAMMA_8 11 @@ -5846,30 +7489,30 @@ static void perform_gamma_strip16_tests(png_modifier *pm, int speed) if (i != j && fabs(pm->gammas[j]/pm->gammas[i]-1) >= PNG_GAMMA_THRESHOLD) { - gamma_transform_test(pm, 0, 16, pm->interlace_type, 1/pm->gammas[i], - pm->gammas[j], PNG_MAX_GAMMA_8, speed, - pm->use_input_precision_16to8, 1 /*strip16*/); + gamma_transform_test(pm, 0, 16, 0, pm->interlace_type, + 1/pm->gammas[i], pm->gammas[j], PNG_MAX_GAMMA_8, + pm->use_input_precision_16to8, 1 /*scale16*/); if (fail(pm)) return; - gamma_transform_test(pm, 2, 16, pm->interlace_type, 1/pm->gammas[i], - pm->gammas[j], PNG_MAX_GAMMA_8, speed, - pm->use_input_precision_16to8, 1 /*strip16*/); + gamma_transform_test(pm, 2, 16, 0, pm->interlace_type, + 1/pm->gammas[i], pm->gammas[j], PNG_MAX_GAMMA_8, + pm->use_input_precision_16to8, 1 /*scale16*/); if (fail(pm)) return; - gamma_transform_test(pm, 4, 16, pm->interlace_type, 1/pm->gammas[i], - pm->gammas[j], PNG_MAX_GAMMA_8, speed, - pm->use_input_precision_16to8, 1 /*strip16*/); + gamma_transform_test(pm, 4, 16, 0, pm->interlace_type, + 1/pm->gammas[i], pm->gammas[j], PNG_MAX_GAMMA_8, + pm->use_input_precision_16to8, 1 /*scale16*/); if (fail(pm)) return; - gamma_transform_test(pm, 6, 16, pm->interlace_type, 1/pm->gammas[i], - pm->gammas[j], PNG_MAX_GAMMA_8, speed, - pm->use_input_precision_16to8, 1 /*strip16*/); + gamma_transform_test(pm, 6, 16, 0, pm->interlace_type, + 1/pm->gammas[i], pm->gammas[j], PNG_MAX_GAMMA_8, + pm->use_input_precision_16to8, 1 /*scale16*/); if (fail(pm)) return; @@ -5879,11 +7522,201 @@ static void perform_gamma_strip16_tests(png_modifier *pm, int speed) } #endif /* 16 to 8 bit conversion */ +#if defined PNG_READ_BACKGROUND_SUPPORTED ||\ + defined PNG_READ_ALPHA_MODE_SUPPORTED +static void gamma_composition_test(png_modifier *pm, + PNG_CONST png_byte colour_type, PNG_CONST png_byte bit_depth, + PNG_CONST int palette_number, + PNG_CONST int interlace_type, PNG_CONST double file_gamma, + PNG_CONST double screen_gamma, + PNG_CONST int use_input_precision, PNG_CONST int do_background, + PNG_CONST int expand_16) +{ + size_t pos = 0; + png_const_charp base; + double bg; + char name[128]; + png_color_16 background; + + /* Make up a name and get an appropriate background gamma value. */ + switch (do_background) + { + default: + base = ""; + bg = 4; /* should not be used */ + break; + case PNG_BACKGROUND_GAMMA_SCREEN: + base = " bckg(Screen):"; + bg = 1/screen_gamma; + break; + case PNG_BACKGROUND_GAMMA_FILE: + base = " bckg(File):"; + bg = file_gamma; + break; + case PNG_BACKGROUND_GAMMA_UNIQUE: + base = " bckg(Unique):"; + /* This tests the handling of a unique value, the math is such that the + * value tends to be <1, but is neither screen nor file (even if they + * match!) + */ + bg = (file_gamma + screen_gamma) / 3; + break; +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + case ALPHA_MODE_OFFSET + PNG_ALPHA_PNG: + base = " alpha(PNG)"; + bg = 4; /* should not be used */ + break; + case ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD: + base = " alpha(Porter-Duff)"; + bg = 4; /* should not be used */ + break; + case ALPHA_MODE_OFFSET + PNG_ALPHA_OPTIMIZED: + base = " alpha(Optimized)"; + bg = 4; /* should not be used */ + break; + case ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN: + base = " alpha(Broken)"; + bg = 4; /* should not be used */ + break; +#endif + } + + /* Use random background values - the background is always presented in the + * output space (8 or 16 bit components). + */ + if (expand_16 || bit_depth == 16) + { + png_uint_32 r = random_32(); + + background.red = (png_uint_16)r; + background.green = (png_uint_16)(r >> 16); + r = random_32(); + background.blue = (png_uint_16)r; + background.gray = (png_uint_16)(r >> 16); + } + + else /* 8 bit colors */ + { + png_uint_32 r = random_32(); + + background.red = (png_byte)r; + background.green = (png_byte)(r >> 8); + background.blue = (png_byte)(r >> 16); + background.gray = (png_byte)(r >> 24); + } + + background.index = 193; /* rgb(193,193,193) to detect errors */ + if (!(colour_type & PNG_COLOR_MASK_COLOR)) + { + /* Grayscale input, we do not convert to RGB (TBD), so we must set the + * background to gray - else libpng seems to fail. + */ + background.red = background.green = background.blue = background.gray; + } + + pos = safecat(name, sizeof name, pos, "gamma "); + pos = safecatd(name, sizeof name, pos, file_gamma, 3); + pos = safecat(name, sizeof name, pos, "->"); + pos = safecatd(name, sizeof name, pos, screen_gamma, 3); + + pos = safecat(name, sizeof name, pos, base); + if (do_background < ALPHA_MODE_OFFSET) + { + /* Include the background color and gamma in the name: */ + pos = safecat(name, sizeof name, pos, "("); + /* This assumes no expand gray->rgb - the current code won't handle that! + */ + if (colour_type & PNG_COLOR_MASK_COLOR) + { + pos = safecatn(name, sizeof name, pos, background.red); + pos = safecat(name, sizeof name, pos, ","); + pos = safecatn(name, sizeof name, pos, background.green); + pos = safecat(name, sizeof name, pos, ","); + pos = safecatn(name, sizeof name, pos, background.blue); + } + else + pos = safecatn(name, sizeof name, pos, background.gray); + pos = safecat(name, sizeof name, pos, ")^"); + pos = safecatd(name, sizeof name, pos, bg, 3); + } + + gamma_test(pm, colour_type, bit_depth, palette_number, interlace_type, + file_gamma, screen_gamma, 0/*sBIT*/, 0, name, use_input_precision, + 0/*strip 16*/, expand_16, do_background, &background, bg); +} + + +static void +perform_gamma_composition_tests(png_modifier *pm, int do_background, + int expand_16) +{ + png_byte colour_type = 0; + png_byte bit_depth = 0; + int palette_number = 0; + + /* Skip the non-alpha cases - there is no setting of a transparency colour at + * present. + */ + while (next_format(&colour_type, &bit_depth, &palette_number)) + if ((colour_type & PNG_COLOR_MASK_ALPHA) != 0) + { + unsigned int i, j; + + /* Don't skip the i==j case here - it's relevant. */ + for (i=0; i<pm->ngammas; ++i) for (j=0; j<pm->ngammas; ++j) + { + gamma_composition_test(pm, colour_type, bit_depth, palette_number, + pm->interlace_type, 1/pm->gammas[i], pm->gammas[j], + pm->use_input_precision, do_background, expand_16); + + if (fail(pm)) + return; + } + } +} +#endif /* READ_BACKGROUND || READ_ALPHA_MODE */ + +static void +init_gamma_errors(png_modifier *pm) +{ + pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0; + pm->error_color_8 = 0; + pm->error_indexed = 0; + pm->error_gray_16 = pm->error_color_16 = 0; +} + +static void +summarize_gamma_errors(png_modifier *pm, png_const_charp who, int low_bit_depth) +{ + if (who) + printf("Gamma correction with %s:\n", who); + + if (low_bit_depth) + { + printf(" 2 bit gray: %.5f\n", pm->error_gray_2); + printf(" 4 bit gray: %.5f\n", pm->error_gray_4); + printf(" 8 bit gray: %.5f\n", pm->error_gray_8); + printf(" 8 bit color: %.5f\n", pm->error_color_8); + printf(" indexed: %.5f\n", pm->error_indexed); + } + +#ifdef DO_16BIT + printf(" 16 bit gray: %.5f\n", pm->error_gray_16); + printf(" 16 bit color: %.5f\n", pm->error_color_16); +#endif +} + static void -perform_gamma_test(png_modifier *pm, int speed, int summary) +perform_gamma_test(png_modifier *pm, int summary) { + /*TODO: remove this*/ + /* Save certain values for the temporary overrides below. */ + unsigned int calculations_use_input_precision = + pm->calculations_use_input_precision; + double maxout8 = pm->maxout8; + /* First some arbitrary no-transform tests: */ - if (!speed && pm->test_gamma_threshold) + if (!pm->this.speed && pm->test_gamma_threshold) { perform_gamma_threshold_tests(pm); @@ -5894,7 +7727,15 @@ perform_gamma_test(png_modifier *pm, int speed, int summary) /* Now some real transforms. */ if (pm->test_gamma_transform) { - perform_gamma_transform_tests(pm, speed); + init_gamma_errors(pm); + /*TODO: remove this. Necessary because the current libpng + * implementation works in 8 bits: + */ + if (pm->test_gamma_expand16) + pm->calculations_use_input_precision = 1; + perform_gamma_transform_tests(pm); + if (!calculations_use_input_precision) + pm->calculations_use_input_precision = 0; if (summary) { @@ -5911,50 +7752,26 @@ perform_gamma_test(png_modifier *pm, int speed, int summary) printf("For performance reasons the value for 16 bit formats\n"); printf("increases when the image file includes an sBIT chunk.\n\n"); - printf(" 2 bit gray: %.5f\n", pm->error_gray_2); - printf(" 4 bit gray: %.5f\n", pm->error_gray_4); - printf(" 8 bit gray: %.5f\n", pm->error_gray_8); - printf(" 8 bit color: %.5f\n", pm->error_color_8); -#ifdef DO_16BIT - printf(" 16 bit gray: %.5f\n", pm->error_gray_16); - printf(" 16 bit color: %.5f\n", pm->error_color_16); -#endif + summarize_gamma_errors(pm, 0/*who*/, 1); } } /* The sbit tests produce much larger errors: */ if (pm->test_gamma_sbit) { - pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = - pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0; - perform_gamma_sbit_tests(pm, speed); + init_gamma_errors(pm); + perform_gamma_sbit_tests(pm); if (summary) - { - printf("Gamma correction with sBIT:\n"); - - if (pm->sbitlow < 8U) - { - printf(" 2 bit gray: %.5f\n", pm->error_gray_2); - printf(" 4 bit gray: %.5f\n", pm->error_gray_4); - printf(" 8 bit gray: %.5f\n", pm->error_gray_8); - printf(" 8 bit color: %.5f\n", pm->error_color_8); - } - - #ifdef DO_16BIT - printf(" 16 bit gray: %.5f\n", pm->error_gray_16); - printf(" 16 bit color: %.5f\n", pm->error_color_16); - #endif - } + summarize_gamma_errors(pm, "sBIT", pm->sbitlow < 8U); } -#ifdef PNG_READ_16_TO_8_SUPPORTED - if (pm->test_gamma_strip16) +#ifdef DO_16BIT /* Should be READ_16BIT_SUPPORTED */ + if (pm->test_gamma_scale16) { /* The 16 to 8 bit strip operations: */ - pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = - pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0; - perform_gamma_strip16_tests(pm, speed); + init_gamma_errors(pm); + perform_gamma_scale16_tests(pm); if (summary) { @@ -5964,7 +7781,57 @@ perform_gamma_test(png_modifier *pm, int speed, int summary) } } #endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED + if (pm->test_gamma_background) + { + init_gamma_errors(pm); + + /*TODO: remove this. Necessary because the current libpng + * implementation works in 8 bits: + */ + if (pm->test_gamma_expand16) + { + pm->calculations_use_input_precision = 1; + pm->maxout8 = .499; /* because the 16 bit background is smashed */ + } + perform_gamma_composition_tests(pm, PNG_BACKGROUND_GAMMA_UNIQUE, + pm->test_gamma_expand16); + if (!calculations_use_input_precision) + pm->calculations_use_input_precision = 0; + pm->maxout8 = maxout8; + + if (summary) + summarize_gamma_errors(pm, "background", 1); + } +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + if (pm->test_gamma_alpha_mode) + { + int do_background; + + init_gamma_errors(pm); + + /*TODO: remove this. Necessary because the current libpng + * implementation works in 8 bits: + */ + if (pm->test_gamma_expand16) + pm->calculations_use_input_precision = 1; + for (do_background = ALPHA_MODE_OFFSET + PNG_ALPHA_STANDARD; + do_background <= ALPHA_MODE_OFFSET + PNG_ALPHA_BROKEN && !fail(pm); + ++do_background) + perform_gamma_composition_tests(pm, do_background, + pm->test_gamma_expand16); + if (!calculations_use_input_precision) + pm->calculations_use_input_precision = 0; + + if (summary) + summarize_gamma_errors(pm, "alpha mode", 1); + } +#endif } +#endif /* PNG_READ_GAMMA_SUPPORTED */ /* INTERLACE MACRO VALIDATION */ /* This is copied verbatim from the specification, it is simply the pass @@ -6316,6 +8183,7 @@ perform_interlace_macro_validation(void) int main(int argc, PNG_CONST char **argv) { volatile int summary = 1; /* Print the error summary at the end */ + volatile int memstats = 0; /* Print memory statistics at the end */ /* Create the given output file on success: */ PNG_CONST char *volatile touch = NULL; @@ -6328,24 +8196,24 @@ int main(int argc, PNG_CONST char **argv) static double gammas[]={2.2, 1.0, 2.2/1.45, 1.8, 1.5, 2.4, 2.5, 2.62, 2.9}; + /* This records the command and arguments: */ + size_t cp = 0; + char command[1024]; + png_modifier pm; context(&pm.this, fault); modifier_init(&pm); /* Preallocate the image buffer, because we know how big it needs to be, - * note that, for testing purposes, it is deliberately mis-aligned. + * note that, for testing purposes, it is deliberately mis-aligned by tag + * bytes either side. All rows have an additional five bytes of padding for + * overwrite checking. */ - pm.this.image = malloc(2*TRANSFORM_IMAGEMAX+1); + store_ensure_image(&pm.this, NULL, 2, TRANSFORM_ROWMAX, TRANSFORM_HEIGHTMAX); - if (pm.this.image != NULL) - { - /* Ignore OOM at this point - the 'ensure' routine above will allocate - * the array appropriately. - */ - ++(pm.this.image); - pm.this.cb_image = 2*TRANSFORM_IMAGEMAX; - } + /* Don't give argv[0], it's normally some horrible libtool string: */ + cp = safecat(command, sizeof command, cp, "pngvalid"); /* Default to error on warning: */ pm.this.treat_warnings_as_errors = 1; @@ -6354,7 +8222,13 @@ int main(int argc, PNG_CONST char **argv) pm.gammas = gammas; pm.ngammas = 0; /* default to off */ pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */ - pm.use_input_precision_16to8 = 1U; /* Because of the way libpng does it */ + /* The following allows results to pass if they correspond to anything in the + * transformed range [input-.5,input+.5]; this is is required because of the + * way libpng treates the 16_TO_8 flag when building the gamma tables. + * + * TODO: review this + */ + pm.use_input_precision_16to8 = 1U; /* Some default values (set the behavior for 'make check' here). * These values simply control the maximum error permitted in the gamma @@ -6365,9 +8239,11 @@ int main(int argc, PNG_CONST char **argv) */ pm.maxout8 = .1; /* Arithmetic error in *encoded* value */ pm.maxabs8 = .00005; /* 1/20000 */ + pm.maxcalc8 = .004; /* +/-1 in 8 bits for compose errors */ pm.maxpc8 = .499; /* I.e., .499% fractional error */ pm.maxout16 = .499; /* Error in *encoded* value */ pm.maxabs16 = .00005;/* 1/20000 */ + pm.maxcalc16 =.000015;/* +/-1 in 16 bits for compose errors */ /* NOTE: this is a reasonable perceptual limit. We assume that humans can * perceive light level differences of 1% over a 100:1 range, so we need to @@ -6382,7 +8258,13 @@ int main(int argc, PNG_CONST char **argv) /* Now parse the command line options. */ while (--argc >= 1) { - if (strcmp(*++argv, "-v") == 0) + int catmore = 0; /* Set if the argument has an argument. */ + + /* Record each argument for posterity: */ + cp = safecat(command, sizeof command, cp, " "); + cp = safecat(command, sizeof command, cp, *++argv); + + if (strcmp(*argv, "-v") == 0) pm.this.verbose = 1; else if (strcmp(*argv, "-l") == 0) @@ -6396,7 +8278,10 @@ int main(int argc, PNG_CONST char **argv) else if (strcmp(*argv, "--speed") == 0) pm.this.speed = 1, pm.ngammas = (sizeof gammas)/(sizeof gammas[0]), - pm.test_standard = 0; + pm.test_standard = 0, summary = 0; + + else if (strcmp(*argv, "--memory") == 0) + memstats = 1; else if (strcmp(*argv, "--size") == 0) pm.test_size = 1; @@ -6416,6 +8301,7 @@ int main(int argc, PNG_CONST char **argv) else if (strcmp(*argv, "--notransform") == 0) pm.test_transform = 0; +#ifdef PNG_READ_TRANSFORMS_SUPPORTED else if (strncmp(*argv, "--transform-disable=", sizeof "--transform-disable") == 0) { @@ -6429,6 +8315,7 @@ int main(int argc, PNG_CONST char **argv) pm.test_transform = 1; transform_enable(*argv + sizeof "--transform-enable"); } +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ else if (strcmp(*argv, "--gamma") == 0) { @@ -6437,7 +8324,9 @@ int main(int argc, PNG_CONST char **argv) pm.test_gamma_threshold = 1; pm.test_gamma_transform = 1; pm.test_gamma_sbit = 1; - pm.test_gamma_strip16 = 1; + pm.test_gamma_scale16 = 1; + pm.test_gamma_background = 1; + pm.test_gamma_alpha_mode = 1; } else if (strcmp(*argv, "--nogamma") == 0) @@ -6462,10 +8351,31 @@ int main(int argc, PNG_CONST char **argv) pm.test_gamma_sbit = 0; else if (strcmp(*argv, "--gamma-16-to-8") == 0) - pm.ngammas = 2U, pm.test_gamma_strip16 = 1; + pm.ngammas = 2U, pm.test_gamma_scale16 = 1; else if (strcmp(*argv, "--nogamma-16-to-8") == 0) - pm.test_gamma_strip16 = 0; + pm.test_gamma_scale16 = 0; + + else if (strcmp(*argv, "--gamma-background") == 0) + pm.ngammas = 2U, pm.test_gamma_background = 1; + + else if (strcmp(*argv, "--nogamma-background") == 0) + pm.test_gamma_background = 0; + + else if (strcmp(*argv, "--gamma-alpha-mode") == 0) + pm.ngammas = 2U, pm.test_gamma_alpha_mode = 1; + + else if (strcmp(*argv, "--nogamma-alpha-mode") == 0) + pm.test_gamma_alpha_mode = 0; + + else if (strcmp(*argv, "--expand16") == 0) + pm.test_gamma_expand16 = 1; + + else if (strcmp(*argv, "--noexpand16") == 0) + pm.test_gamma_expand16 = 0; + + else if (strcmp(*argv, "--more-gammas") == 0) + pm.ngammas = 3U; else if (strcmp(*argv, "--all-gammas") == 0) pm.ngammas = (sizeof gammas)/(sizeof gammas[0]); @@ -6476,32 +8386,51 @@ int main(int argc, PNG_CONST char **argv) else if (strcmp(*argv, "--interlace") == 0) pm.interlace_type = PNG_INTERLACE_ADAM7; - else if (argc >= 1 && strcmp(*argv, "--sbitlow") == 0) - --argc, pm.sbitlow = (png_byte)atoi(*++argv); + else if (strcmp(*argv, "--use-input-precision") == 0) + pm.use_input_precision = 1; + + else if (strcmp(*argv, "--calculations-use-input-precision") == 0) + pm.calculations_use_input_precision = 1; + + else if (strcmp(*argv, "--assume-16-bit-calculations") == 0) + pm.assume_16_bit_calculations = 1; - else if (argc >= 1 && strcmp(*argv, "--touch") == 0) - --argc, touch = *++argv; + else if (strcmp(*argv, "--calculations-follow-bit-depth") == 0) + pm.calculations_use_input_precision = + pm.assume_16_bit_calculations = 0; - else if (argc >= 1 && strncmp(*argv, "--max", 4) == 0) + else if (argc > 1 && strcmp(*argv, "--sbitlow") == 0) + --argc, pm.sbitlow = (png_byte)atoi(*++argv), catmore = 1; + + else if (argc > 1 && strcmp(*argv, "--touch") == 0) + --argc, touch = *++argv, catmore = 1; + + else if (argc > 1 && strncmp(*argv, "--max", 5) == 0) { --argc; - if (strcmp(4+*argv, "abs8") == 0) + if (strcmp(5+*argv, "abs8") == 0) pm.maxabs8 = atof(*++argv); - else if (strcmp(4+*argv, "abs16") == 0) + else if (strcmp(5+*argv, "abs16") == 0) pm.maxabs16 = atof(*++argv); - else if (strcmp(4+*argv, "out8") == 0) + else if (strcmp(5+*argv, "calc8") == 0) + pm.maxcalc8 = atof(*++argv); + + else if (strcmp(5+*argv, "calc16") == 0) + pm.maxcalc16 = atof(*++argv); + + else if (strcmp(5+*argv, "out8") == 0) pm.maxout8 = atof(*++argv); - else if (strcmp(4+*argv, "out16") == 0) + else if (strcmp(5+*argv, "out16") == 0) pm.maxout16 = atof(*++argv); - else if (strcmp(4+*argv, "pc8") == 0) + else if (strcmp(5+*argv, "pc8") == 0) pm.maxpc8 = atof(*++argv); - else if (strcmp(4+*argv, "pc16") == 0) + else if (strcmp(5+*argv, "pc16") == 0) pm.maxpc16 = atof(*++argv); else @@ -6509,13 +8438,27 @@ int main(int argc, PNG_CONST char **argv) fprintf(stderr, "pngvalid: %s: unknown 'max' option\n", *argv); exit(1); } + + catmore = 1; } + else if (strcmp(*argv, "--log8") == 0) + --argc, pm.log8 = atof(*++argv), catmore = 1; + + else if (strcmp(*argv, "--log16") == 0) + --argc, pm.log16 = atof(*++argv), catmore = 1; + else { fprintf(stderr, "pngvalid: %s: unknown argument\n", *argv); exit(1); } + + if (catmore) /* consumed an extra *argv */ + { + cp = safecat(command, sizeof command, cp, " "); + cp = safecat(command, sizeof command, cp, *argv); + } } /* If pngvalid is run with no arguments default to a reasonable set of the @@ -6524,29 +8467,39 @@ int main(int argc, PNG_CONST char **argv) if (pm.test_standard == 0 && pm.test_size == 0 && pm.test_transform == 0 && pm.ngammas == 0) { + /* Make this do all the tests done in the test shell scripts with the same + * parameters, where possible. The limitation is that all the progressive + * read and interlace stuff has to be done in separate runs, so only the + * basic 'standard' and 'size' tests are done. + */ pm.test_standard = 1; pm.test_size = 1; pm.test_transform = 1; - pm.ngammas = 3U; + pm.ngammas = 2U; } if (pm.ngammas > 0 && pm.test_gamma_threshold == 0 && pm.test_gamma_transform == 0 && - pm.test_gamma_sbit == 0 && pm.test_gamma_strip16 == 0) + pm.test_gamma_sbit == 0 && pm.test_gamma_scale16 == 0 && + pm.test_gamma_background == 0 && pm.test_gamma_alpha_mode == 0) { pm.test_gamma_threshold = 1; pm.test_gamma_transform = 1; pm.test_gamma_sbit = 1; - pm.test_gamma_strip16 = 1; + pm.test_gamma_scale16 = 1; + pm.test_gamma_background = 1; + pm.test_gamma_alpha_mode = 1; } - + else if (pm.ngammas == 0) { /* Nothing to test so turn everything off: */ pm.test_gamma_threshold = 0; pm.test_gamma_transform = 0; pm.test_gamma_sbit = 0; - pm.test_gamma_strip16 = 0; + pm.test_gamma_scale16 = 0; + pm.test_gamma_background = 0; + pm.test_gamma_alpha_mode = 0; } Try @@ -6558,6 +8511,7 @@ int main(int argc, PNG_CONST char **argv) if (pm.test_standard) { perform_interlace_macro_validation(); + perform_formatting_test(&pm.this); perform_standard_test(&pm); perform_error_test(&pm); } @@ -6569,13 +8523,16 @@ int main(int argc, PNG_CONST char **argv) perform_size_test(&pm); } +#ifdef PNG_READ_TRANSFORMS_SUPPORTED /* Combinatorial transforms: */ if (pm.test_transform) perform_transform_test(&pm); +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ +#ifdef PNG_READ_GAMMA_SUPPORTED if (pm.ngammas > 0) - perform_gamma_test(&pm, pm.this.speed != 0, - summary && !pm.this.speed); + perform_gamma_test(&pm, summary); +#endif } Catch(fault) @@ -6591,18 +8548,22 @@ int main(int argc, PNG_CONST char **argv) exit(1); } - if (summary && !pm.this.speed) + if (summary) { - printf("Results using %s point arithmetic %s\n", + printf("%s: %s (%s point arithmetic)\n", + (pm.this.nerrors || (pm.this.treat_warnings_as_errors && + pm.this.nwarnings)) ? "FAIL" : "PASS", + command, #if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || PNG_LIBPNG_VER < 10500 - "floating", + "floating" #else - "fixed", + "fixed" #endif - (pm.this.nerrors || (pm.this.treat_warnings_as_errors && - pm.this.nwarnings)) ? "(errors)" : (pm.this.nwarnings ? - "(warnings)" : "(no errors or warnings)") - ); + ); + } + + if (memstats) + { printf("Allocated memory statistics (in bytes):\n" "\tread %lu maximum single, %lu peak, %lu total\n" "\twrite %lu maximum single, %lu peak, %lu total\n", diff --git a/src/3rdparty/libpng/pngwrite.c b/src/3rdparty/libpng/pngwrite.c index d90f449..d1af9e8 100644 --- a/src/3rdparty/libpng/pngwrite.c +++ b/src/3rdparty/libpng/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.5.1 [February 3, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -99,8 +99,10 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr) int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && !(up->location & PNG_HAVE_PLTE) && + up->location && + !(up->location & PNG_HAVE_PLTE) && !(up->location & PNG_HAVE_IDAT) && + !(up->location & PNG_AFTER_IDAT) && ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { @@ -273,8 +275,10 @@ png_write_info(png_structp png_ptr, png_infop info_ptr) { int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_HAVE_PLTE) && + up->location && + (up->location & PNG_HAVE_PLTE) && !(up->location & PNG_HAVE_IDAT) && + !(up->location & PNG_AFTER_IDAT) && ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { @@ -380,7 +384,8 @@ png_write_end(png_structp png_ptr, png_infop info_ptr) { int keep = png_handle_as_unknown(png_ptr, up->name); if (keep != PNG_HANDLE_CHUNK_NEVER && - up->location && (up->location & PNG_AFTER_IDAT) && + up->location && + (up->location & PNG_AFTER_IDAT) && ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS || (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS))) { @@ -462,10 +467,9 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, png_structp png_ptr; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD - jmp_buf png_jmpbuf; + jmp_buf tmp_jmpbuf; #endif #endif - int i; png_debug(1, "in png_create_write_struct"); @@ -489,12 +493,12 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, encounter a png_error() will longjmp here. Since the jmpbuf is then meaningless we abort instead of returning. */ #ifdef USE_FAR_KEYWORD - if (setjmp(png_jmpbuf)) + if (setjmp(tmp_jmpbuf)) #else if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */ #endif #ifdef USE_FAR_KEYWORD - png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(png_jmpbuf(png_ptr), tmp_jmpbuf, png_sizeof(jmp_buf)); #endif PNG_ABORT(); #endif @@ -504,49 +508,8 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, #endif /* PNG_USER_MEM_SUPPORTED */ png_set_error_fn(png_ptr, error_ptr, error_fn, warn_fn); - if (user_png_ver) - { - i = 0; - do - { - if (user_png_ver[i] != png_libpng_ver[i]) - png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; - } while (png_libpng_ver[i++]); - } - - if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) - { - /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so - * we must recompile any applications that use any older library version. - * For versions after libpng 1.0, we will be compatible, so we need - * only check the first digit. - */ - if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] || - (user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) || - (user_png_ver[0] == '0' && user_png_ver[2] < '9')) - { -#ifdef PNG_CONSOLE_IO_SUPPORTED - char msg[80]; - - if (user_png_ver) - { - png_snprintf2(msg, 80, - "Application built with libpng-%.20s" - " but running with %.20s", - user_png_ver, - png_libpng_ver); - png_warning(png_ptr, msg); - } -#else - png_warning(png_ptr, - "Incompatible libpng version in application and library"); -#endif -#ifdef PNG_ERROR_NUMBERS_SUPPORTED - png_ptr->flags = 0; -#endif - png_cleanup_needed = 1; - } - } + if (!png_user_version_check(png_ptr, user_png_ver)) + png_cleanup_needed = 1; /* Initialize zbuf - compression buffer */ png_ptr->zbuf_size = PNG_ZBUF_SIZE; @@ -805,9 +768,11 @@ png_write_row(png_structp png_ptr, png_const_bytep row) } #endif +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED /* Handle other transformations */ if (png_ptr->transformations) png_do_write_transformations(png_ptr); +#endif #ifdef PNG_MNG_FEATURES_SUPPORTED /* Write filter_method 64 (intrapixel differencing) only if @@ -884,8 +849,6 @@ png_write_flush(png_structp png_ptr) { /* Write the IDAT and reset the zlib output buffer */ png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; wrote_IDAT = 1; } } while (wrote_IDAT == 1); @@ -896,8 +859,6 @@ png_write_flush(png_structp png_ptr) /* Write the IDAT and reset the zlib output buffer */ png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size - png_ptr->zstream.avail_out); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } png_ptr->flush_rows = 0; png_flush(png_ptr); @@ -983,7 +944,9 @@ png_write_destroy(png_structp png_ptr) jmp_buf tmp_jmp; /* Save jump buffer */ #endif png_error_ptr error_fn; +#ifdef PNG_WARNINGS_SUPPORTED png_error_ptr warning_fn; +#endif png_voidp error_ptr; #ifdef PNG_USER_MEM_SUPPORTED png_free_ptr free_fn; @@ -992,7 +955,8 @@ png_write_destroy(png_structp png_ptr) png_debug(1, "in png_write_destroy"); /* Free any memory zlib uses */ - deflateEnd(&png_ptr->zstream); + if (png_ptr->zlib_state != PNG_ZLIB_UNINITIALIZED) + deflateEnd(&png_ptr->zstream); /* Free our memory. png_free checks NULL for us. */ png_free(png_ptr, png_ptr->zbuf); @@ -1005,10 +969,6 @@ png_write_destroy(png_structp png_ptr) png_free(png_ptr, png_ptr->paeth_row); #endif -#ifdef PNG_TIME_RFC1123_SUPPORTED - png_free(png_ptr, png_ptr->time_buffer); -#endif - #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* Use this to save a little code space, it doesn't free the filter_costs */ png_reset_filter_heuristics(png_ptr); @@ -1018,11 +978,13 @@ png_write_destroy(png_structp png_ptr) #ifdef PNG_SETJMP_SUPPORTED /* Reset structure */ - png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf)); + png_memcpy(tmp_jmp, png_ptr->longjmp_buffer, png_sizeof(jmp_buf)); #endif error_fn = png_ptr->error_fn; +#ifdef PNG_WARNINGS_SUPPORTED warning_fn = png_ptr->warning_fn; +#endif error_ptr = png_ptr->error_ptr; #ifdef PNG_USER_MEM_SUPPORTED free_fn = png_ptr->free_fn; @@ -1031,14 +993,16 @@ png_write_destroy(png_structp png_ptr) png_memset(png_ptr, 0, png_sizeof(png_struct)); png_ptr->error_fn = error_fn; +#ifdef PNG_WARNINGS_SUPPORTED png_ptr->warning_fn = warning_fn; +#endif png_ptr->error_ptr = error_ptr; #ifdef PNG_USER_MEM_SUPPORTED png_ptr->free_fn = free_fn; #endif #ifdef PNG_SETJMP_SUPPORTED - png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf)); + png_memcpy(png_ptr->longjmp_buffer, tmp_jmp, png_sizeof(jmp_buf)); #endif } @@ -1177,7 +1141,7 @@ png_set_filter(png_structp png_ptr, int method, int filters) * better compression. */ #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ -/* Conveneince reset API. */ +/* Convenience reset API. */ static void png_reset_filter_heuristics(png_structp png_ptr) { @@ -1451,6 +1415,9 @@ png_set_compression_strategy(png_structp png_ptr, int strategy) png_ptr->zlib_strategy = strategy; } +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ void PNGAPI png_set_compression_window_bits(png_structp png_ptr, int window_bits) { @@ -1491,6 +1458,89 @@ png_set_compression_method(png_structp png_ptr, int method) png_ptr->zlib_method = method; } +/* The following were added to libpng-1.5.4 */ +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +void PNGAPI +png_set_text_compression_level(png_structp png_ptr, int level) +{ + png_debug(1, "in png_set_text_compression_level"); + + if (png_ptr == NULL) + return; + + png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_LEVEL; + png_ptr->zlib_text_level = level; +} + +void PNGAPI +png_set_text_compression_mem_level(png_structp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_text_compression_mem_level"); + + if (png_ptr == NULL) + return; + + png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL; + png_ptr->zlib_text_mem_level = mem_level; +} + +void PNGAPI +png_set_text_compression_strategy(png_structp png_ptr, int strategy) +{ + png_debug(1, "in png_set_text_compression_strategy"); + + if (png_ptr == NULL) + return; + + png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_STRATEGY; + png_ptr->zlib_text_strategy = strategy; +} + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +void PNGAPI +png_set_text_compression_window_bits(png_structp png_ptr, int window_bits) +{ + if (png_ptr == NULL) + return; + + if (window_bits > 15) + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + + else if (window_bits < 8) + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + +#ifndef WBITS_8_OK + /* Avoid libpng bug with 256-byte windows */ + if (window_bits == 8) + { + png_warning(png_ptr, "Text compression window is being reset to 512"); + window_bits = 9; + } + +#endif + png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS; + png_ptr->zlib_text_window_bits = window_bits; +} + +void PNGAPI +png_set_text_compression_method(png_structp png_ptr, int method) +{ + png_debug(1, "in png_set_text_compression_method"); + + if (png_ptr == NULL) + return; + + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + + png_ptr->flags |= PNG_FLAG_ZTXT_CUSTOM_METHOD; + png_ptr->zlib_text_method = method; +} +#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ +/* end of API added to libpng-1.5.4 */ + void PNGAPI png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn) { @@ -1557,7 +1607,7 @@ png_write_png(png_structp png_ptr, png_infop info_ptr, #endif #ifdef PNG_WRITE_FILLER_SUPPORTED - /* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */ + /* Pack XRGB/RGBX/ARGB/RGBA into RGB (4 channels -> 3 channels) */ if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); diff --git a/src/3rdparty/libpng/pngwtran.c b/src/3rdparty/libpng/pngwtran.c index 115ca37..124d708 100644 --- a/src/3rdparty/libpng/pngwtran.c +++ b/src/3rdparty/libpng/pngwtran.c @@ -1,7 +1,7 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -15,6 +15,7 @@ #ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED /* Transform the data according to the user's wishes. The order of * transformations is significant. */ @@ -44,8 +45,8 @@ png_do_write_transformations(png_structp png_ptr) #ifdef PNG_WRITE_FILLER_SUPPORTED if (png_ptr->transformations & PNG_FILLER) - png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1, - png_ptr->flags); + png_do_strip_channel(&(png_ptr->row_info), png_ptr->row_buf + 1, + !(png_ptr->flags & PNG_FLAG_FILLER_AFTER)); #endif #ifdef PNG_WRITE_PACKSWAP_SUPPORTED @@ -563,6 +564,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) } } #endif +#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ #ifdef PNG_MNG_FEATURES_SUPPORTED /* Undoes intrapixel differencing */ diff --git a/src/3rdparty/libpng/pngwutil.c b/src/3rdparty/libpng/pngwutil.c index 2c35785..3ae5ed4 100644 --- a/src/3rdparty/libpng/pngwutil.c +++ b/src/3rdparty/libpng/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * Copyright (c) 1998-2011 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -192,7 +192,149 @@ png_write_chunk_end(png_structp png_ptr) png_write_data(png_ptr, buf, (png_size_t)4); } -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED) +/* Initialize the compressor for the appropriate type of compression. */ +static void +png_zlib_claim(png_structp png_ptr, png_uint_32 state) +{ + if (!(png_ptr->zlib_state & PNG_ZLIB_IN_USE)) + { + /* If already initialized for 'state' do not re-init. */ + if (png_ptr->zlib_state != state) + { + int ret = Z_OK; + png_const_charp who = "-"; + + /* If actually initialized for another state do a deflateEnd. */ + if (png_ptr->zlib_state != PNG_ZLIB_UNINITIALIZED) + { + ret = deflateEnd(&png_ptr->zstream); + who = "end"; + png_ptr->zlib_state = PNG_ZLIB_UNINITIALIZED; + } + + /* zlib itself detects an incomplete state on deflateEnd */ + if (ret == Z_OK) switch (state) + { +# ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED + case PNG_ZLIB_FOR_TEXT: + ret = deflateInit2(&png_ptr->zstream, + png_ptr->zlib_text_level, png_ptr->zlib_text_method, + png_ptr->zlib_text_window_bits, + png_ptr->zlib_text_mem_level, png_ptr->zlib_text_strategy); + who = "text"; + break; +# endif + + case PNG_ZLIB_FOR_IDAT: + ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, + png_ptr->zlib_method, png_ptr->zlib_window_bits, + png_ptr->zlib_mem_level, png_ptr->zlib_strategy); + who = "IDAT"; + break; + + default: + png_error(png_ptr, "invalid zlib state"); + } + + if (ret == Z_OK) + png_ptr->zlib_state = state; + + else /* an error in deflateEnd or deflateInit2 */ + { + size_t pos = 0; + char msg[64]; + + pos = png_safecat(msg, sizeof msg, pos, + "zlib failed to initialize compressor ("); + pos = png_safecat(msg, sizeof msg, pos, who); + + switch (ret) + { + case Z_VERSION_ERROR: + pos = png_safecat(msg, sizeof msg, pos, ") version error"); + break; + + case Z_STREAM_ERROR: + pos = png_safecat(msg, sizeof msg, pos, ") stream error"); + break; + + case Z_MEM_ERROR: + pos = png_safecat(msg, sizeof msg, pos, ") memory error"); + break; + + default: + pos = png_safecat(msg, sizeof msg, pos, ") unknown error"); + break; + } + + png_error(png_ptr, msg); + } + } + + /* Here on success, claim the zstream: */ + png_ptr->zlib_state |= PNG_ZLIB_IN_USE; + } + + else + png_error(png_ptr, "zstream already in use (internal error)"); +} + +/* The opposite: release the stream. It is also reset, this API will warn on + * error but will not fail. + */ +static void +png_zlib_release(png_structp png_ptr) +{ + if (png_ptr->zlib_state & PNG_ZLIB_IN_USE) + { + int ret = deflateReset(&png_ptr->zstream); + + png_ptr->zlib_state &= ~PNG_ZLIB_IN_USE; + + if (ret != Z_OK) + { + png_const_charp err; + PNG_WARNING_PARAMETERS(p) + + switch (ret) + { + case Z_VERSION_ERROR: + err = "version"; + break; + + case Z_STREAM_ERROR: + err = "stream"; + break; + + case Z_MEM_ERROR: + err = "memory"; + break; + + default: + err = "unknown"; + break; + } + + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, ret); + png_warning_parameter(p, 2, err); + + if (png_ptr->zstream.msg) + err = png_ptr->zstream.msg; + else + err = "[no zlib message]"; + + png_warning_parameter(p, 3, err); + + png_formatted_warning(png_ptr, p, + "zlib failed to reset compressor: @1(@2): @3"); + } + } + + else + png_warning(png_ptr, "zstream not in use (internal error)"); +} + +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED /* This pair of functions encapsulates the operation of (a) compressing a * text string, and (b) issuing it later as a series of chunk data writes. * The compression_state structure is shared context for these functions @@ -220,25 +362,22 @@ png_text_compress(png_structp png_ptr, comp->max_output_ptr = 0; comp->output_ptr = NULL; comp->input = NULL; - comp->input_len = 0; + comp->input_len = text_len; /* We may just want to pass the text right through */ if (compression == PNG_TEXT_COMPRESSION_NONE) { comp->input = (png_const_bytep)text; - comp->input_len = text_len; return((int)text_len); } if (compression >= PNG_TEXT_COMPRESSION_LAST) { -#ifdef PNG_CONSOLE_IO_SUPPORTED - char msg[50]; - png_snprintf(msg, 50, "Unknown compression type %d", compression); - png_warning(png_ptr, msg); -#else - png_warning(png_ptr, "Unknown compression type"); -#endif + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter_signed(p, 1, PNG_NUMBER_FORMAT_d, + compression); + png_formatted_warning(png_ptr, p, "Unknown compression type @1"); } /* We can't write the chunk until we find out how much data we have, @@ -255,10 +394,12 @@ png_text_compress(png_structp png_ptr, * data, or if the input string is incredibly large (although this * wouldn't cause a failure, just a slowdown due to swapping). */ + png_zlib_claim(png_ptr, PNG_ZLIB_FOR_TEXT); /* Set up the compression buffers */ /* TODO: the following cast hides a potential overflow problem. */ png_ptr->zstream.avail_in = (uInt)text_len; + /* NOTE: assume zlib doesn't overwrite the input */ png_ptr->zstream.next_in = (Bytef *)text; png_ptr->zstream.avail_out = png_ptr->zbuf_size; @@ -418,6 +559,68 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) return; } +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + if (comp->input_len >= 2 && comp->input_len < 16384) + { + unsigned int z_cmf; /* zlib compression method and flags */ + + /* Optimize the CMF field in the zlib stream. This hack of the zlib + * stream is compliant to the stream specification. + */ + + if (comp->num_output_ptr) + z_cmf = comp->output_ptr[0][0]; + else + z_cmf = png_ptr->zbuf[0]; + + if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) + { + unsigned int z_cinfo; + unsigned int half_z_window_size; + png_size_t uncompressed_text_size = comp->input_len; + + z_cinfo = z_cmf >> 4; + half_z_window_size = 1 << (z_cinfo + 7); + + while (uncompressed_text_size <= half_z_window_size && + half_z_window_size >= 256) + { + z_cinfo--; + half_z_window_size >>= 1; + } + + z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); + + if (comp->num_output_ptr) + { + + if (comp->output_ptr[0][0] != z_cmf) + { + int tmp; + + comp->output_ptr[0][0] = (png_byte)z_cmf; + tmp = comp->output_ptr[0][1] & 0xe0; + tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; + comp->output_ptr[0][1] = (png_byte)tmp; + } + } + else + { + int tmp; + + png_ptr->zbuf[0] = (png_byte)z_cmf; + tmp = png_ptr->zbuf[1] & 0xe0; + tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; + png_ptr->zbuf[1] = (png_byte)tmp; + } + } + + else + png_error(png_ptr, + "Invalid zlib compression method or flags in non-IDAT chunk"); + } +#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ + /* Write saved output buffers, if any */ for (i = 0; i < comp->num_output_ptr; i++) { @@ -436,10 +639,9 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp) (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out)); /* Reset zlib for another zTXt/iTXt or image data */ - deflateReset(&png_ptr->zstream); - png_ptr->zstream.data_type = Z_BINARY; + png_zlib_release(png_ptr); } -#endif +#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ /* Write the IHDR chunk, and update the png_struct with the necessary * information. Note that the rest of this code depends upon this @@ -451,7 +653,6 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, int interlace_type) { PNG_IHDR; - int ret; png_byte buf[13]; /* Buffer to store the IHDR info */ @@ -632,35 +833,35 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height, if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD)) png_ptr->zlib_method = 8; - ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level, - png_ptr->zlib_method, png_ptr->zlib_window_bits, - png_ptr->zlib_mem_level, png_ptr->zlib_strategy); - - if (ret != Z_OK) - { - if (ret == Z_VERSION_ERROR) - png_error(png_ptr, - "zlib failed to initialize compressor -- version error"); - - if (ret == Z_STREAM_ERROR) - png_error(png_ptr, - "zlib failed to initialize compressor -- stream error"); +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_STRATEGY)) + png_ptr->zlib_text_strategy = Z_DEFAULT_STRATEGY; - if (ret == Z_MEM_ERROR) - png_error(png_ptr, - "zlib failed to initialize compressor -- mem error"); + if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_LEVEL)) + png_ptr->zlib_text_level = png_ptr->zlib_level; - png_error(png_ptr, "zlib failed to initialize compressor"); - } + if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL)) + png_ptr->zlib_text_mem_level = png_ptr->zlib_mem_level; - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; - /* libpng is not interested in zstream.data_type, so set it - * to a predefined value, to avoid its evaluation inside zlib - */ - png_ptr->zstream.data_type = Z_BINARY; + if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS)) + png_ptr->zlib_text_window_bits = png_ptr->zlib_window_bits; - png_ptr->mode = PNG_HAVE_IHDR; + if (!(png_ptr->flags & PNG_FLAG_ZTXT_CUSTOM_METHOD)) + png_ptr->zlib_text_method = png_ptr->zlib_method; +#else + png_ptr->zlib_text_strategy = Z_DEFAULT_STRATEGY; + png_ptr->zlib_text_level = png_ptr->zlib_level; + png_ptr->zlib_text_mem_level = png_ptr->zlib_mem_level; + png_ptr->zlib_text_window_bits = png_ptr->zlib_window_bits; + png_ptr->zlib_text_method = png_ptr->zlib_method; +#endif /* PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED */ +#endif /* PNG_WRITE_COMPRESSED_TEXT_SUPPORTED */ + + /* Record that the compressor has not yet been initialized. */ + png_ptr->zlib_state = PNG_ZLIB_UNINITIALIZED; + + png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */ } /* Write the palette. We are careful not to trust png_color to be in the @@ -745,12 +946,15 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) png_debug(1, "in png_write_IDAT"); - /* Optimize the CMF field in the zlib stream. */ - /* This hack of the zlib stream is compliant to the stream specification. */ +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED if (!(png_ptr->mode & PNG_HAVE_IDAT) && png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) { + /* Optimize the CMF field in the zlib stream. This hack of the zlib + * stream is compliant to the stream specification. + */ unsigned int z_cmf = data[0]; /* zlib compression method and flags */ + if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) { /* Avoid memory underflows and multiplication overflows. @@ -761,11 +965,29 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) if (length >= 2 && png_ptr->height < 16384 && png_ptr->width < 16384) { + /* Compute the maximum possible length of the datastream */ + + /* Number of pixels, plus for each row a filter byte + * and possibly a padding byte, so increase the maximum + * size to account for these. + */ + unsigned int z_cinfo; + unsigned int half_z_window_size; png_uint_32 uncompressed_idat_size = png_ptr->height * ((png_ptr->width * png_ptr->channels * png_ptr->bit_depth + 15) >> 3); - unsigned int z_cinfo = z_cmf >> 4; - unsigned int half_z_window_size = 1 << (z_cinfo + 7); + + /* If it's interlaced, each block of 8 rows is sent as up to + * 14 rows, i.e., 6 additional rows, each with a filter byte + * and possibly a padding byte + */ + if (png_ptr->interlaced) + uncompressed_idat_size += ((png_ptr->height + 7)/8) * + (png_ptr->bit_depth < 8 ? 12 : 6); + + z_cinfo = z_cmf >> 4; + half_z_window_size = 1 << (z_cinfo + 7); + while (uncompressed_idat_size <= half_z_window_size && half_z_window_size >= 256) { @@ -790,9 +1012,17 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length) png_error(png_ptr, "Invalid zlib compression method or flags in IDAT"); } +#endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ png_write_chunk(png_ptr, png_IDAT, data, length); png_ptr->mode |= PNG_HAVE_IDAT; + + /* Prior to 1.5.4 this code was replicated in every caller (except at the + * end, where it isn't technically necessary). Since this function has + * flushed the data we can safely reset the zlib output buffer here. + */ + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } /* Write an IEND chunk */ @@ -918,7 +1148,10 @@ png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type, (png_size_t)(name_len + 2)); if (profile_len) + { + comp.input_len = profile_len; png_write_compressed_data_out(png_ptr, &comp); + } png_write_chunk_end(png_ptr); png_free(png_ptr, new_name); @@ -1313,15 +1546,11 @@ png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key) if ((png_byte)*ikp < 0x20 || ((png_byte)*ikp > 0x7E && (png_byte)*ikp < 0xA1)) { -#ifdef PNG_CONSOLE_IO_SUPPORTED - char msg[40]; + PNG_WARNING_PARAMETERS(p) - png_snprintf(msg, 40, - "invalid keyword character 0x%02X", (png_byte)*ikp); - png_warning(png_ptr, msg); -#else - png_warning(png_ptr, "invalid character in keyword"); -#endif + png_warning_parameter_unsigned(p, 1, PNG_NUMBER_FORMAT_02x, + (png_byte)*ikp); + png_formatted_warning(png_ptr, p, "invalid keyword character 0x@1"); *dp = ' '; } @@ -1499,6 +1728,7 @@ png_write_zTXt(png_structp png_ptr, png_const_charp key, png_const_charp text, png_write_chunk_data(png_ptr, &buf, (png_size_t)1); /* Write the compressed data */ + comp.input_len = text_len; png_write_compressed_data_out(png_ptr, &comp); /* Close the chunk */ @@ -1871,6 +2101,7 @@ png_write_start_row(png_structp png_ptr) png_ptr->usr_width = png_ptr->width; } + png_zlib_claim(png_ptr, PNG_ZLIB_FOR_IDAT); png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; png_ptr->zstream.next_out = png_ptr->zbuf; } @@ -1992,7 +2223,7 @@ png_write_finish_row(png_structp png_ptr) png_ptr->zstream.avail_out); } - deflateReset(&png_ptr->zstream); + png_zlib_release(png_ptr); png_ptr->zstream.data_type = Z_BINARY; } @@ -2181,6 +2412,8 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) * been specified by the application, and then writes the row out with the * chosen filter. */ +static void png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row); + #define PNG_MAXSUM (((png_uint_32)(-1)) >> 1) #define PNG_HISHIFT 10 #define PNG_LOMASK ((png_uint_32)0xffffL) @@ -2856,7 +3089,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info) /* Do the actual writing of a previously filtered row. */ -void /* PRIVATE */ +static void png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) { png_size_t avail; @@ -2916,8 +3149,6 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row) { /* Write the IDAT and reset the zlib output buffer */ png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size); - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } /* Repeat until all data has been compressed */ } while (avail > 0 || png_ptr->zstream.avail_in > 0); diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index f786b78..a560e52 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -a52dbae362a295e0adfb7ee4fdc21734ae4b7b45 +dda59e50379214c098f365a39c4d64b39ced427e diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 96ef591..5f97e57 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,39 @@ +2011-08-26 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + [Qt] libwebcore.a source is compiled without -fvisibility=hidden + -fvisibility-inlines-hidden + https://bugs.webkit.org/show_bug.cgi?id=65470 + + Patch by Holger Freyther <zecke@selfish.org> + Rubberstamped by Andreas Kling. + + (qtwebkit-2.2 only by now) + + WTF_USE_EXPORT_MACROS is still not enabled on trunk because there are + pending issues with WebKit2, but it appears to be safe to enable this + on QtWebKit, so this change is being added to the qtwebkit-2.2 branch. + + The patch also adds CONFIG += hide_symbols and on Unix, += + bsymbolic_functions, which should help reduce the library binary size. + + Testing this is quite easy, so if there's any problem we'll soon + know. :-) + + * Source/WebKit.pri: + +2011-08-06 Aron Rosenberg <arosenberg@logitech.com> + + Reviewed by Benjamin Poulain. + + [Qt] Fix build with Intel compiler on Windows + https://bugs.webkit.org/show_bug.cgi?id=65088 + + Disable Intel Compiler warning 873 - function "" has no corresponding operator + delete (to be called if an exception is thrown during initialization of an + allocated object). + + * Source/WebKit.pri: + 2011-06-27 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog index ae7ef60..010e66a 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,210 @@ +2011-08-26 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + [Qt] libwebcore.a source is compiled without -fvisibility=hidden + -fvisibility-inlines-hidden + https://bugs.webkit.org/show_bug.cgi?id=65470 + + Patch by Holger Freyther <zecke@selfish.org> + Rubberstamped by Andreas Kling. + + (qtwebkit-2.2 only by now) + + WTF_USE_EXPORT_MACROS is still not enabled on trunk because there are + pending issues with WebKit2, but it appears to be safe to enable this + on QtWebKit, so this change is being added to the qtwebkit-2.2 branch. + + The patch also adds CONFIG += hide_symbols and on Unix, += + bsymbolic_functions, which should help reduce the library binary size. + + Testing this is quite easy, so if there's any problem we'll soon + know. :-) + + * wtf/Platform.h: + +2011-07-08 Chang Shu <cshu@webkit.org> + + Rename "makeSecure" to "fill" and remove the support for displaying last character + to avoid layering violatation. + https://bugs.webkit.org/show_bug.cgi?id=59114 + + Reviewed by Alexey Proskuryakov. + + * JavaScriptCore.exp: + * JavaScriptCore.order: + * wtf/text/StringImpl.cpp: + (WTF::StringImpl::fill): + * wtf/text/StringImpl.h: + * wtf/text/WTFString.h: + (WTF::String::fill): + +2011-08-15 Gavin Barraclough <barraclough@apple.com> + + Crash accessing static property on sealed object + https://bugs.webkit.org/show_bug.cgi?id=66242 + + Reviewed by Sam Weinig. + + * runtime/JSObject.h: + (JSC::JSObject::putDirectInternal): + - should only check isExtensible if checkReadOnly. + +2011-08-06 Aron Rosenberg <arosenberg@logitech.com> + + Reviewed by Benjamin Poulain. + + [Qt] Fix build with Intel compiler on Windows + https://bugs.webkit.org/show_bug.cgi?id=65088 + + Intel compiler needs .lib suffixes instead of .a + Intel compiler doesn't support nullptr + Intel compiler supports unsized arrays + + * JavaScriptCore.pri: + * jsc.cpp: + * wtf/ByteArray.h: + * wtf/NullPtr.h: + +2011-05-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by Geoff Garen & Michael Saboff. + + https://bugs.webkit.org/show_bug.cgi?id=60860 + Simplify backtracking in YARR JIT + + YARR JIT currently performs a single pass of code generation over the pattern, + with special handling to allow the code generation for some backtracking code + out of line. We can simplify things by moving to a common mechanism whereby all + forwards matching code is generated in one pass, and all backtracking code is + generated in another. Backtracking code can be generated in reverse order, to + optimized the common fall-through case. + + To make it easier to walk over the pattern, we can first convert to a more + byte-code like format before JIT generating. In time we should unify this with + the YARR interpreter to more closely unify the two. + + * yarr/YarrJIT.cpp: + (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput): + (JSC::Yarr::YarrGenerator::YarrOp::YarrOp): + (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState): + (JSC::Yarr::YarrGenerator::BacktrackingState::append): + (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough): + (JSC::Yarr::YarrGenerator::BacktrackingState::link): + (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo): + (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList): + (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty): + (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels): + (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord): + (JSC::Yarr::YarrGenerator::generateAssertionBOL): + (JSC::Yarr::YarrGenerator::backtrackAssertionBOL): + (JSC::Yarr::YarrGenerator::generateAssertionEOL): + (JSC::Yarr::YarrGenerator::backtrackAssertionEOL): + (JSC::Yarr::YarrGenerator::matchAssertionWordchar): + (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary): + (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary): + (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce): + (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce): + (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed): + (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed): + (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy): + (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy): + (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy): + (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassOnce): + (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce): + (JSC::Yarr::YarrGenerator::generateCharacterClassFixed): + (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed): + (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy): + (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy): + (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy): + (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy): + (JSC::Yarr::YarrGenerator::generateTerm): + (JSC::Yarr::YarrGenerator::backtrackTerm): + (JSC::Yarr::YarrGenerator::generate): + (JSC::Yarr::YarrGenerator::backtrack): + (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern): + (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion): + (JSC::Yarr::YarrGenerator::opCompileAlternative): + (JSC::Yarr::YarrGenerator::opCompileBody): + (JSC::Yarr::YarrGenerator::YarrGenerator): + (JSC::Yarr::YarrGenerator::compile): + +2011-06-08 Mikołaj Małecki <m.malecki@samsung.com> + + Reviewed by Pavel Feldman. + + Web Inspector: Crash by buffer overrun crash when serializing inspector object tree. + https://bugs.webkit.org/show_bug.cgi?id=52791 + + No new tests. The problem can be reproduced by trying to create InspectorValue + from 1.0e-100 and call ->toJSONString() on this. + + * JavaScriptCore.exp: + * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: + export 2 functions DecimalNumber::bufferLengthForStringExponential and + DecimalNumber::toStringExponential. + +2011-07-26 Alexis Menard <alexis.menard@openbossa.org> + + Unreviewed build fix for Qt/Linux. + + On platforms with no glib and gstreamer we should not build javascriptcore + with the Glib support. This is related to http://trac.webkit.org/changeset/91752. + + * wtf/wtf.pri: + +2011-07-26 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] Change default backend to use GStreamer on Linux and QuickTime on Mac. + https://bugs.webkit.org/show_bug.cgi?id=63472 + + Enable the bits needed for GStreamer only when QtMultimedia is not used. + + * wtf/wtf.pri: + +2011-07-12 Hui Huang <Hui.2.Huang@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix compiling errors with QtWebkit 2.2 WINSCW build. + https://bugs.webkit.org/show_bug.cgi?id=64391 + + (QtWebKit-2.2 only, patch not in webkit trunk) + + * parser/JSParser.cpp: + * runtime/JSONObject.cpp: + * wtf/PageAllocatorSymbian.h: + * wtf/Platform.h: + * wtf/text/AtomicString.h: + * wtf/text/StringStatics.cpp: + + +2011-07-13 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + Reviewed by Andreas Kling. + + Broken build on QNX + https://bugs.webkit.org/show_bug.cgi?id=63717 + + QNX doesn't support pthread's SA_RESTART (required by + JSC_MULTIPLE_THREADS), JIT is broken at runtime and there a + few minor compilation errors here and there. + + Original patch by Ritt Konstantin <ritt.ks@gmail.com>, also + tested by him on QNX v6.5 (x86) + + * wtf/DateMath.cpp: fix usage of abs/labs + * wtf/Platform.h: Disable JIT and JSC_MULTIPLE_THREADS + * wtf/StackBounds.cpp: Add a couple of missing includes (and sort them) + +2011-07-09 Thouraya Andolsi <thouraya.andolsi@st.com> + + Fix unaligned userspace access for SH4 platforms. + https://bugs.webkit.org/show_bug.cgi?id=62993 + + * wtf/Platform.h: + 2011-05-23 Matthew Delaney <mdelaney@apple.com> Reviewed by Simon Fraser. diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri index f6d064f..d8290cf 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri @@ -73,7 +73,7 @@ defineTest(prependJavaScriptCoreLib) { # Argument is the relative path to JavaScriptCore.pro's qmake output pathToJavaScriptCoreOutput = $$ARGS/$$JAVASCRIPTCORE_DESTDIR - win32-msvc*|wince* { + win32-msvc*|wince*|win32-icc { LIBS = -l$$JAVASCRIPTCORE_TARGET $$LIBS LIBS = -L$$pathToJavaScriptCoreOutput $$LIBS POST_TARGETDEPS += $${pathToJavaScriptCoreOutput}$${QMAKE_DIR_SEP}$${JAVASCRIPTCORE_TARGET}.lib diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/jsc.cpp index 6ef8e18..5f63749 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/jsc.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/jsc.cpp @@ -312,7 +312,7 @@ EncodedJSValue JSC_HOST_CALL functionQuit(ExecState* exec) // be in a separate main function because the jscmain function requires object // unwinding. -#if COMPILER(MSVC) && !defined(_DEBUG) && !OS(WINCE) +#if COMPILER(MSVC) && !COMPILER(INTEL) && !defined(_DEBUG) && !OS(WINCE) #define TRY __try { #define EXCEPT(x) } __except (EXCEPTION_EXECUTE_HANDLER) { x; } #else diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp index f36c668..5f6d8cf 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/parser/JSParser.cpp @@ -215,13 +215,21 @@ private: template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseObjectLiteral(TreeBuilder&); template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseStrictObjectLiteral(TreeBuilder&); template <class TreeBuilder> ALWAYS_INLINE TreeArguments parseArguments(TreeBuilder&); +#if COMPILER(WINSCW) + template <bool strict, class TreeBuilder> ALWAYS_INLINE TreeProperty parseProperty(bool, TreeBuilder&); +#else template <bool strict, class TreeBuilder> ALWAYS_INLINE TreeProperty parseProperty(TreeBuilder&); +#endif template <class TreeBuilder> ALWAYS_INLINE TreeFunctionBody parseFunctionBody(TreeBuilder&); template <class TreeBuilder> ALWAYS_INLINE TreeFormalParameterList parseFormalParameters(TreeBuilder&); template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseVarDeclarationList(TreeBuilder&, int& declarations, const Identifier*& lastIdent, TreeExpression& lastInitializer, int& identStart, int& initStart, int& initEnd); template <class TreeBuilder> ALWAYS_INLINE TreeConstDeclList parseConstDeclarationList(TreeBuilder& context); enum FunctionRequirements { FunctionNoRequirements, FunctionNeedsName }; +#if COMPILER(WINSCW) + template <FunctionRequirements, bool nameIsInContainingScope, class TreeBuilder> bool parseFunctionInfo(FunctionRequirements, bool, TreeBuilder&, const Identifier*&, TreeFormalParameterList&, TreeFunctionBody&, int& openBrace, int& closeBrace, int& bodyStartLine); +#else template <FunctionRequirements, bool nameIsInContainingScope, class TreeBuilder> bool parseFunctionInfo(TreeBuilder&, const Identifier*&, TreeFormalParameterList&, TreeFunctionBody&, int& openBrace, int& closeBrace, int& bodyStartLine); +#endif ALWAYS_INLINE int isBinaryOperator(JSTokenType token); bool allowAutomaticSemicolon(); @@ -1290,7 +1298,11 @@ template <class TreeBuilder> TreeFunctionBody JSParser::parseFunctionBody(TreeBu return context.createFunctionBody(strictMode()); } +#if COMPILER(WINSCW) +template <JSParser::FunctionRequirements, bool, class TreeBuilder> bool JSParser::parseFunctionInfo(JSParser::FunctionRequirements requirements, bool nameIsInContainingScope, TreeBuilder& context, const Identifier*& name, TreeFormalParameterList& parameters, TreeFunctionBody& body, int& openBracePos, int& closeBracePos, int& bodyStartLine) +#else template <JSParser::FunctionRequirements requirements, bool nameIsInContainingScope, class TreeBuilder> bool JSParser::parseFunctionInfo(TreeBuilder& context, const Identifier*& name, TreeFormalParameterList& parameters, TreeFunctionBody& body, int& openBracePos, int& closeBracePos, int& bodyStartLine) +#endif { AutoPopScopeRef functionScope(this, pushScope()); functionScope->setIsFunction(); @@ -1371,7 +1383,11 @@ template <class TreeBuilder> TreeStatement JSParser::parseFunctionDeclaration(Tr int openBracePos = 0; int closeBracePos = 0; int bodyStartLine = 0; +#if COMPILER(WINSCW) + failIfFalse((parseFunctionInfo<FunctionNeedsName, true>(FunctionNeedsName, true, context, name, parameters, body, openBracePos, closeBracePos, bodyStartLine))); +#else failIfFalse((parseFunctionInfo<FunctionNeedsName, true>(context, name, parameters, body, openBracePos, closeBracePos, bodyStartLine))); +#endif failIfFalse(name); failIfFalseIfStrict(declareVariable(name)); return context.createFuncDeclStatement(name, body, parameters, openBracePos, closeBracePos, bodyStartLine, m_lastLine); @@ -1695,8 +1711,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseBinaryExpression(Tree return context.popOperandStack(operandStackDepth); } - +#if COMPILER(WINSCW) +template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty(bool complete, TreeBuilder& context) +#else template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty(TreeBuilder& context) +#endif { bool wasIdent = false; switch (m_token.m_type) { @@ -1710,7 +1729,14 @@ template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty next(); TreeExpression node = parseAssignmentExpression(context); failIfFalse(node); +#if COMPILER(WINSCW) + if (complete) + return context.template createProperty<true>(ident, node, PropertyNode::Constant); + else + return context.template createProperty<false>(ident, node, PropertyNode::Constant); +#else return context.template createProperty<complete>(ident, node, PropertyNode::Constant); +#endif } failIfFalse(wasIdent); matchOrFail(IDENT); @@ -1727,8 +1753,16 @@ template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty type = PropertyNode::Setter; else fail(); +#if COMPILER(WINSCW) + failIfFalse((parseFunctionInfo<FunctionNeedsName, false>(FunctionNeedsName, false, context, accessorName, parameters, body, openBracePos, closeBracePos, bodyStartLine))); + if (complete) + return context.template createGetterOrSetterProperty<true>(type, accessorName, parameters, body, openBracePos, closeBracePos, bodyStartLine, m_lastLine); + else + return context.template createGetterOrSetterProperty<false>(type, accessorName, parameters, body, openBracePos, closeBracePos, bodyStartLine, m_lastLine); +#else failIfFalse((parseFunctionInfo<FunctionNeedsName, false>(context, accessorName, parameters, body, openBracePos, closeBracePos, bodyStartLine))); return context.template createGetterOrSetterProperty<complete>(type, accessorName, parameters, body, openBracePos, closeBracePos, bodyStartLine, m_lastLine); +#endif } case NUMBER: { double propertyName = m_token.m_data.doubleValue; @@ -1736,7 +1770,14 @@ template <bool complete, class TreeBuilder> TreeProperty JSParser::parseProperty consumeOrFail(COLON); TreeExpression node = parseAssignmentExpression(context); failIfFalse(node); +#if COMPILER(WINSCW) + if (complete) + return context.template createProperty<true>(m_globalData, propertyName, node, PropertyNode::Constant); + else + return context.template createProperty<false>(m_globalData, propertyName, node, PropertyNode::Constant); +#else return context.template createProperty<complete>(m_globalData, propertyName, node, PropertyNode::Constant); +#endif } default: failIfFalse(m_token.m_type & KeywordTokenFlag); @@ -1754,7 +1795,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseObjectLiteral(TreeBui return context.createObjectLiteral(); } +#if COMPILER(WINSCW) + TreeProperty property = parseProperty<false>(false, context); +#else TreeProperty property = parseProperty<false>(context); +#endif failIfFalse(property); if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) { m_lexer->setOffset(startOffset); @@ -1768,7 +1813,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseObjectLiteral(TreeBui // allow extra comma, see http://bugs.webkit.org/show_bug.cgi?id=5939 if (match(CLOSEBRACE)) break; +#if COMPILER(WINSCW) + property = parseProperty<false>(false, context); +#else property = parseProperty<false>(context); +#endif failIfFalse(property); if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) { m_lexer->setOffset(startOffset); @@ -1792,7 +1841,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseStrictObjectLiteral(T return context.createObjectLiteral(); } +#if COMPILER(WINSCW) + TreeProperty property = parseProperty<true>(true, context); +#else TreeProperty property = parseProperty<true>(context); +#endif failIfFalse(property); typedef HashMap<RefPtr<StringImpl>, unsigned, IdentifierRepHash> ObjectValidationMap; @@ -1808,7 +1861,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseStrictObjectLiteral(T // allow extra comma, see http://bugs.webkit.org/show_bug.cgi?id=5939 if (match(CLOSEBRACE)) break; +#if COMPILER(WINSCW) + property = parseProperty<true>(true, context); +#else property = parseProperty<true>(context); +#endif failIfFalse(property); if (!m_syntaxAlreadyValidated) { std::pair<ObjectValidationMap::iterator, bool> propertyEntryIter = objectValidator.add(context.getName(property).impl(), context.getType(property)); @@ -1987,7 +2044,11 @@ template <class TreeBuilder> TreeExpression JSParser::parseMemberExpression(Tree int closeBracePos = 0; int bodyStartLine = 0; next(); +#if COMPILER(WINSCW) + failIfFalse((parseFunctionInfo<FunctionNoRequirements, false>(FunctionNoRequirements, false, context, name, parameters, body, openBracePos, closeBracePos, bodyStartLine))); +#else failIfFalse((parseFunctionInfo<FunctionNoRequirements, false>(context, name, parameters, body, openBracePos, closeBracePos, bodyStartLine))); +#endif base = context.createFunctionExpr(name, body, parameters, openBracePos, closeBracePos, bodyStartLine, m_lastLine); } else base = parsePrimaryExpression(context); diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp index 8742fdc..27a508a 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp @@ -76,8 +76,13 @@ private: class Stringifier { WTF_MAKE_NONCOPYABLE(Stringifier); public: +#if COMPILER(WINSCW) + Stringifier(ExecState*, const Local<Unknown>* replacer, const Local<Unknown>* space); + Local<Unknown> stringify(Handle<Unknown>*); +#else Stringifier(ExecState*, const Local<Unknown>& replacer, const Local<Unknown>& space); Local<Unknown> stringify(Handle<Unknown>); +#endif void visitAggregate(SlotVisitor&); @@ -197,6 +202,15 @@ JSValue PropertyNameForFunctionCall::value(ExecState* exec) const // ------------------------------ Stringifier -------------------------------- +#if COMPILER(WINSCW) +Stringifier::Stringifier(ExecState* exec, const Local<Unknown>* replacer, const Local<Unknown>* space) + : m_exec(exec) + , m_replacer(*replacer) + , m_usingArrayReplacer(false) + , m_arrayReplacerPropertyNames(exec) + , m_replacerCallType(CallTypeNone) + , m_gap(gap(exec, space->get())) +#else Stringifier::Stringifier(ExecState* exec, const Local<Unknown>& replacer, const Local<Unknown>& space) : m_exec(exec) , m_replacer(replacer) @@ -204,6 +218,7 @@ Stringifier::Stringifier(ExecState* exec, const Local<Unknown>& replacer, const , m_arrayReplacerPropertyNames(exec) , m_replacerCallType(CallTypeNone) , m_gap(gap(exec, space.get())) +#endif { if (!m_replacer.isObject()) return; @@ -244,17 +259,29 @@ Stringifier::Stringifier(ExecState* exec, const Local<Unknown>& replacer, const m_replacerCallType = m_replacer.asObject()->getCallData(m_replacerCallData); } +#if COMPILER(WINSCW) +Local<Unknown> Stringifier::stringify(Handle<Unknown>* value) +#else Local<Unknown> Stringifier::stringify(Handle<Unknown> value) +#endif { JSObject* object = constructEmptyObject(m_exec); if (m_exec->hadException()) return Local<Unknown>(m_exec->globalData(), jsNull()); PropertyNameForFunctionCall emptyPropertyName(m_exec->globalData().propertyNames->emptyIdentifier); +#if COMPILER(WINSCW) + object->putDirect(m_exec->globalData(), m_exec->globalData().propertyNames->emptyIdentifier, value->get()); +#else object->putDirect(m_exec->globalData(), m_exec->globalData().propertyNames->emptyIdentifier, value.get()); +#endif UStringBuilder result; +#if COMPILER(WINSCW) + if (appendStringifiedValue(result, value->get(), object, emptyPropertyName) != StringifySucceeded) +#else if (appendStringifiedValue(result, value.get(), object, emptyPropertyName) != StringifySucceeded) +#endif return Local<Unknown>(m_exec->globalData(), jsUndefined()); if (m_exec->hadException()) return Local<Unknown>(m_exec->globalData(), jsNull()); @@ -606,6 +633,15 @@ bool JSONObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier& pro class Walker { public: +#if COMPILER(WINSCW) + Walker(ExecState* exec, Handle<JSObject>* function, CallType callType, CallData callData) + : m_exec(exec) + , m_function(exec->globalData(), *function) + , m_callType(callType) + , m_callData(callData) + { + } +#else Walker(ExecState* exec, Handle<JSObject> function, CallType callType, CallData callData) : m_exec(exec) , m_function(exec->globalData(), function) @@ -613,6 +649,7 @@ public: , m_callData(callData) { } +#endif JSValue walk(JSValue unfiltered); private: JSValue callReviver(JSObject* thisObj, JSValue property, JSValue unfiltered) @@ -829,7 +866,12 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncParse(ExecState* exec) CallType callType = getCallData(function, callData); if (callType == CallTypeNone) return JSValue::encode(unfiltered); +#if COMPILER(WINSCW) + Local<JSObject> handle(exec->globalData(), asObject(function)); + return JSValue::encode(Walker(exec, &handle, callType, callData).walk(unfiltered)); +#else return JSValue::encode(Walker(exec, Local<JSObject>(exec->globalData(), asObject(function)), callType, callData).walk(unfiltered)); +#endif } // ECMA-262 v5 15.12.3 @@ -841,13 +883,24 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncStringify(ExecState* exec) Local<Unknown> value(exec->globalData(), exec->argument(0)); Local<Unknown> replacer(exec->globalData(), exec->argument(1)); Local<Unknown> space(exec->globalData(), exec->argument(2)); +#if COMPILER(WINSCW) + return JSValue::encode(Stringifier(exec, &replacer, &space).stringify(&value).get()); +#else return JSValue::encode(Stringifier(exec, replacer, space).stringify(value).get()); +#endif } UString JSONStringify(ExecState* exec, JSValue value, unsigned indent) { LocalScope scope(exec->globalData()); +#if COMPILER(WINSCW) + Local<Unknown> replacer(exec->globalData(), jsNull()); + Local<Unknown> space(exec->globalData(), jsNumber(indent)); + Local<Unknown> valueHandle(exec->globalData(), value); + Local<Unknown> result = Stringifier(exec, &replacer, &space).stringify(&valueHandle); +#else Local<Unknown> result = Stringifier(exec, Local<Unknown>(exec->globalData(), jsNull()), Local<Unknown>(exec->globalData(), jsNumber(indent))).stringify(Local<Unknown>(exec->globalData(), value)); +#endif if (result.isUndefinedOrNull()) return UString(); return result.getString(exec); diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSObject.h b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSObject.h index 768c457..1d7d2f7 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSObject.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSObject.h @@ -587,7 +587,7 @@ inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifi return true; } - if (!isExtensible()) + if (checkReadOnly && !isExtensible()) return false; size_t currentCapacity = m_structure->propertyStorageCapacity(); @@ -651,7 +651,7 @@ inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifi return true; } - if (!isExtensible()) + if (checkReadOnly && !isExtensible()) return false; Structure* structure = Structure::addPropertyTransition(globalData, m_structure.get(), propertyName, attributes, specificFunction, offset); diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ByteArray.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ByteArray.h index bdec630..47b1cff 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ByteArray.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/ByteArray.h @@ -91,7 +91,7 @@ namespace WTF { // MSVC can't handle correctly unsized array. // warning C4200: nonstandard extension used : zero-sized array in struct/union // Cannot generate copy-ctor or copy-assignment operator when UDT contains a zero-sized array -#if COMPILER(MSVC) +#if COMPILER(MSVC) && !COMPILER(INTEL) unsigned char m_data[INT_MAX]; #else unsigned char m_data[]; diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/DateMath.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/DateMath.cpp index d414eae..b181ee2 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/DateMath.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/DateMath.cpp @@ -692,7 +692,7 @@ double parseES5DateFromNullTerminatedCharacters(const char* dateString) return NaN; if (*postParsePosition != ':' || (postParsePosition - currentPosition) != 2) return NaN; - tzHoursAbs = abs(tzHours); + tzHoursAbs = labs(tzHours); currentPosition = postParsePosition + 1; if (!isASCIIDigit(*currentPosition)) diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h index c0e7bd3..9c4319d 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h @@ -35,7 +35,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define __has_feature(feature) 0 #endif -#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600) +#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL)) #define HAVE_NULLPTR 1 diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h index eba5b03..d396379 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/PageAllocatorSymbian.h @@ -68,7 +68,7 @@ public: // Size of the large up-front reservation #if defined(__WINS__) // Emulator has limited virtual address space -const size_t largeReservationSize = 96*1024*1024; +const size_t largeReservationSize = 64*1024*1024; #else // HW has plenty of virtual addresses const size_t largeReservationSize = 256*1024*1024; diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h index 716d9e1..8309acc 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h @@ -365,7 +365,7 @@ #endif /* ARM */ -#if CPU(ARM) || CPU(MIPS) +#if CPU(ARM) || CPU(MIPS) || CPU(SH4) #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 #endif @@ -581,7 +581,7 @@ #define WTF_USE_PTHREAD_BASED_QT 1 #endif -#if (PLATFORM(GTK) || PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && (OS(DARWIN) || USE(PTHREAD_BASED_QT)) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS) +#if (PLATFORM(GTK) || PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && (OS(DARWIN) || USE(PTHREAD_BASED_QT)) && !ENABLE(SINGLE_THREADED))) && !OS(QNX) && !defined(ENABLE_JSC_MULTIPLE_THREADS) #define ENABLE_JSC_MULTIPLE_THREADS 1 #endif @@ -1019,11 +1019,17 @@ #define ENABLE_JIT 0 #endif +/* Disable JIT for WINSCW Symbian Emulator */ +#if !defined(ENABLE_JIT) && COMPILER(WINSCW) +#define ENABLE_JIT 0 +#endif + /* The JIT is enabled by default on all x86, x64-64, ARM & MIPS platforms. */ #if !defined(ENABLE_JIT) \ && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \ && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \ - && !OS(WINCE) + && !OS(WINCE) \ + && !OS(QNX) #define ENABLE_JIT 1 #endif @@ -1215,7 +1221,11 @@ since most ports try to support sub-project independence, adding new headers to WTF causes many ports to break, and so this way we can address the build breakages one port at a time. */ +#if PLATFORM(QT) +#define WTF_USE_EXPORT_MACROS 1 +#else #define WTF_USE_EXPORT_MACROS 0 +#endif #if PLATFORM(QT) || PLATFORM(GTK) #define WTF_USE_UNIX_DOMAIN_SOCKETS 1 diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/StackBounds.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/StackBounds.cpp index 41e0d60..6b61270 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/StackBounds.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/StackBounds.cpp @@ -41,10 +41,12 @@ #elif OS(QNX) +#include <errno.h> #include <fcntl.h> -#include <sys/procfs.h> +#include <pthread.h> #include <stdio.h> -#include <errno.h> +#include <string.h> +#include <sys/procfs.h> #elif OS(UNIX) diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.h index 440700c..cc451e8 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.h @@ -113,6 +113,16 @@ public: static AtomicString fromUTF8(const char*, size_t); static AtomicString fromUTF8(const char*); +#if COMPILER(WINSCW) + static const AtomicString& nullAtom2(); + static const AtomicString& emptyAtom2(); + static const AtomicString& textAtom2(); + static const AtomicString& commentAtom2(); + static const AtomicString& starAtom2(); + static const AtomicString& xmlAtom2(); + static const AtomicString& xmlnsAtom2(); +#endif + private: String m_string; @@ -155,6 +165,24 @@ inline bool equalIgnoringCase(const String& a, const AtomicString& b) { return e // Define external global variables for the commonly used atomic strings. // These are only usable from the main thread. #ifndef ATOMICSTRING_HIDE_GLOBALS + +#if COMPILER(WINSCW) +extern const JS_EXPORTDATA AtomicString nullAtom1; +extern const JS_EXPORTDATA AtomicString emptyAtom1; +extern const JS_EXPORTDATA AtomicString textAtom1; +extern const JS_EXPORTDATA AtomicString commentAtom1; +extern const JS_EXPORTDATA AtomicString starAtom1; +extern const JS_EXPORTDATA AtomicString xmlAtom1; +extern const JS_EXPORTDATA AtomicString xmlnsAtom1; + +#define nullAtom AtomicString::nullAtom2() +#define emptyAtom AtomicString::emptyAtom2() +#define textAtom AtomicString::textAtom2() +#define commentAtom AtomicString::commentAtom2() +#define starAtom AtomicString::starAtom2() +#define xmlAtom AtomicString::xmlAtom2() +#define xmlnsAtom AtomicString::xmlnsAtom2() +#else extern const JS_EXPORTDATA AtomicString nullAtom; extern const JS_EXPORTDATA AtomicString emptyAtom; extern const JS_EXPORTDATA AtomicString textAtom; @@ -162,6 +190,7 @@ extern const JS_EXPORTDATA AtomicString commentAtom; extern const JS_EXPORTDATA AtomicString starAtom; extern const JS_EXPORTDATA AtomicString xmlAtom; extern const JS_EXPORTDATA AtomicString xmlnsAtom; +#endif inline AtomicString AtomicString::fromUTF8(const char* characters, size_t length) { @@ -190,6 +219,7 @@ template<> struct DefaultHash<AtomicString> { } // namespace WTF +#if !COMPILER(WINSCW) #ifndef ATOMICSTRING_HIDE_GLOBALS using WTF::AtomicString; using WTF::nullAtom; @@ -200,5 +230,6 @@ using WTF::starAtom; using WTF::xmlAtom; using WTF::xmlnsAtom; #endif +#endif #endif // AtomicString_h diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.cpp index 17b4d7d..ea8770a 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.cpp @@ -270,17 +270,15 @@ PassRefPtr<StringImpl> StringImpl::upper() return newImpl.release(); } -PassRefPtr<StringImpl> StringImpl::secure(UChar character, LastCharacterBehavior behavior) +PassRefPtr<StringImpl> StringImpl::fill(UChar character) { if (!m_length) return this; UChar* data; RefPtr<StringImpl> newImpl = createUninitialized(m_length, data); - unsigned lastCharacterIndex = m_length - 1; - for (unsigned i = 0; i < lastCharacterIndex; ++i) + for (unsigned i = 0; i < m_length; ++i) data[i] = character; - data[lastCharacterIndex] = (behavior == ObscureLastCharacter) ? character : m_data[lastCharacterIndex]; return newImpl.release(); } diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.h index 81911b3..b0ec163 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringImpl.h @@ -284,9 +284,7 @@ public: PassRefPtr<StringImpl> lower(); PassRefPtr<StringImpl> upper(); - enum LastCharacterBehavior { ObscureLastCharacter, DisplayLastCharacter }; - - PassRefPtr<StringImpl> secure(UChar, LastCharacterBehavior = ObscureLastCharacter); + PassRefPtr<StringImpl> fill(UChar); PassRefPtr<StringImpl> foldCase(); PassRefPtr<StringImpl> stripWhiteSpace(); diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringStatics.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringStatics.cpp index ce08728..c5a8b43 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringStatics.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringStatics.cpp @@ -51,6 +51,15 @@ StringImpl* StringImpl::empty() return &emptyString; } +#if COMPILER(WINSCW) +static AtomicString nullAtom1; +static AtomicString emptyAtom1; +static AtomicString textAtom1; +static AtomicString commentAtom1; +static AtomicString starAtom1; +static AtomicString xmlAtom1; +static AtomicString xmlnsAtom1; +#else JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, nullAtom) JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, emptyAtom, "") JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, textAtom, "#text") @@ -58,6 +67,7 @@ JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, commentAtom, "#comment") JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, starAtom, "*") JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, xmlAtom, "xml") JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, xmlnsAtom, "xmlns") +#endif void AtomicString::init() { @@ -67,6 +77,15 @@ void AtomicString::init() ASSERT(isMainThread()); // Use placement new to initialize the globals. +#if COMPILER(WINSCW) + new ((void*)&nullAtom1) AtomicString; + new ((void*)&emptyAtom1) AtomicString(""); + new ((void*)&textAtom1) AtomicString("#text"); + new ((void*)&commentAtom1) AtomicString("#comment"); + new ((void*)&starAtom1) AtomicString("*"); + new ((void*)&xmlAtom1) AtomicString("xml"); + new ((void*)&xmlnsAtom1) AtomicString("xmlns"); +#else new ((void*)&nullAtom) AtomicString; new ((void*)&emptyAtom) AtomicString(""); new ((void*)&textAtom) AtomicString("#text"); @@ -74,9 +93,19 @@ void AtomicString::init() new ((void*)&starAtom) AtomicString("*"); new ((void*)&xmlAtom) AtomicString("xml"); new ((void*)&xmlnsAtom) AtomicString("xmlns"); - +#endif initialized = true; } } +#if COMPILER(WINSCW) +const AtomicString& AtomicString::nullAtom2() { return nullAtom1;} +const AtomicString& AtomicString::emptyAtom2() { return emptyAtom1;} +const AtomicString& AtomicString::textAtom2() { return textAtom1;} +const AtomicString& AtomicString::commentAtom2() { return commentAtom1;} +const AtomicString& AtomicString::starAtom2() { return starAtom1;} +const AtomicString& AtomicString::xmlAtom2() { return xmlAtom1;} +const AtomicString& AtomicString::xmlnsAtom2() { return xmlnsAtom1;} +#endif + } diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/WTFString.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/WTFString.h index b593d20..f29228b 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/WTFString.h +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/WTFString.h @@ -219,7 +219,7 @@ public: void makeLower() { if (m_impl) m_impl = m_impl->lower(); } void makeUpper() { if (m_impl) m_impl = m_impl->upper(); } - void makeSecure(UChar aChar) { if (m_impl) m_impl = m_impl->secure(aChar); } + void fill(UChar c) { if (m_impl) m_impl = m_impl->fill(c); } void truncate(unsigned len); void remove(unsigned pos, int len = 1); diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri index 10b41e4..5af613e 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri +++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/wtf.pri @@ -41,10 +41,12 @@ SOURCES += \ wtf/unicode/icu/CollatorICU.cpp \ wtf/unicode/UTF8.cpp -contains(DEFINES, USE_GSTREAMER=1) { - DEFINES += ENABLE_GLIB_SUPPORT=1 - PKGCONFIG += glib-2.0 gio-2.0 - CONFIG += link_pkgconfig +linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) { + !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) { + DEFINES += ENABLE_GLIB_SUPPORT=1 + PKGCONFIG += glib-2.0 gio-2.0 + CONFIG += link_pkgconfig + } } unix:!symbian: SOURCES += wtf/OSAllocatorPosix.cpp diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/yarr/YarrJIT.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/yarr/YarrJIT.cpp index ece2379..f3356b1 100644 --- a/src/3rdparty/webkit/Source/JavaScriptCore/yarr/YarrJIT.cpp +++ b/src/3rdparty/webkit/Source/JavaScriptCore/yarr/YarrJIT.cpp @@ -228,9 +228,10 @@ class YarrGenerator : private MacroAssembler { } // Jumps if input not available; will have (incorrectly) incremented already! - Jump jumpIfNoAvailableInput(unsigned countToCheck) + Jump jumpIfNoAvailableInput(unsigned countToCheck = 0) { - add32(Imm32(countToCheck), index); + if (countToCheck) + add32(Imm32(countToCheck), index); return branch32(Above, index, length); } @@ -295,1056 +296,455 @@ class YarrGenerator : private MacroAssembler { jump(Address(stackPointerRegister, frameLocation * sizeof(void*))); } - struct IndirectJumpEntry { - IndirectJumpEntry(int32_t stackOffset) - : m_stackOffset(stackOffset) - { - } - - IndirectJumpEntry(int32_t stackOffset, Jump jump) - : m_stackOffset(stackOffset) - { - addJump(jump); - } - - IndirectJumpEntry(int32_t stackOffset, DataLabelPtr dataLabel) - : m_stackOffset(stackOffset) - { - addDataLabel(dataLabel); - } - - void addJump(Jump jump) - { - m_relJumps.append(jump); - } - - void addDataLabel(DataLabelPtr dataLabel) - { - m_dataLabelPtrVector.append(dataLabel); - } - - int32_t m_stackOffset; - JumpList m_relJumps; - Vector<DataLabelPtr, 16> m_dataLabelPtrVector; + enum YarrOpCode { + // These nodes wrap body alternatives - those in the main disjunction, + // rather than subpatterns or assertions. These are chained together in + // a doubly linked list, with a 'begin' node for the first alternative, + // a 'next' node for each subsequent alternative, and an 'end' node at + // the end. In the case of repeating alternatives, the 'end' node also + // has a reference back to 'begin'. + OpBodyAlternativeBegin, + OpBodyAlternativeNext, + OpBodyAlternativeEnd, + // Similar to the body alternatives, but used for subpatterns with two + // or more alternatives. + OpNestedAlternativeBegin, + OpNestedAlternativeNext, + OpNestedAlternativeEnd, + // Used for alternatives in subpatterns where there is only a single + // alternative (backtrackingis easier in these cases), or for alternatives + // which never need to be backtracked (those in parenthetical assertions, + // terminal subpatterns). + OpSimpleNestedAlternativeBegin, + OpSimpleNestedAlternativeNext, + OpSimpleNestedAlternativeEnd, + // Used to wrap 'Once' subpattern matches (quantityCount == 1). + OpParenthesesSubpatternOnceBegin, + OpParenthesesSubpatternOnceEnd, + // Used to wrap 'Terminal' subpattern matches (at the end of the regexp). + OpParenthesesSubpatternTerminalBegin, + OpParenthesesSubpatternTerminalEnd, + // Used to wrap parenthetical assertions. + OpParentheticalAssertionBegin, + OpParentheticalAssertionEnd, + // Wraps all simple terms (pattern characters, character classes). + OpTerm, + // Where an expression contains only 'once through' body alternatives + // and no repeating ones, this op is used to return match failure. + OpMatchFailed }; - struct AlternativeBacktrackRecord { - DataLabelPtr dataLabel; - Label backtrackLocation; - - AlternativeBacktrackRecord(DataLabelPtr dataLabel, Label backtrackLocation) - : dataLabel(dataLabel) - , backtrackLocation(backtrackLocation) - { - } - }; - - struct ParenthesesTail; - struct TermGenerationState; - - struct GenerationState { - typedef HashMap<int, IndirectJumpEntry*, WTF::IntHash<uint32_t>, UnsignedWithZeroKeyHashTraits<uint32_t> > IndirectJumpHashMap; - - GenerationState() - : m_parenNestingLevel(0) - { - } - - void addIndirectJumpEntry(int32_t stackOffset, Jump jump) - { - IndirectJumpHashMap::iterator result = m_indirectJumpMap.find(stackOffset); - - ASSERT(stackOffset >= 0); - - uint32_t offset = static_cast<uint32_t>(stackOffset); - - if (result == m_indirectJumpMap.end()) - m_indirectJumpMap.add(offset, new IndirectJumpEntry(stackOffset, jump)); - else - result->second->addJump(jump); - } - - void addIndirectJumpEntry(int32_t stackOffset, JumpList jumps) - { - JumpList::JumpVector jumpVector = jumps.jumps(); - size_t size = jumpVector.size(); - for (size_t i = 0; i < size; ++i) - addIndirectJumpEntry(stackOffset, jumpVector[i]); - - jumps.empty(); - } - - void addIndirectJumpEntry(int32_t stackOffset, DataLabelPtr dataLabel) - { - IndirectJumpHashMap::iterator result = m_indirectJumpMap.find(stackOffset); - - ASSERT(stackOffset >= 0); - - uint32_t offset = static_cast<uint32_t>(stackOffset); - - if (result == m_indirectJumpMap.end()) - m_indirectJumpMap.add(offset, new IndirectJumpEntry(stackOffset, dataLabel)); - else - result->second->addDataLabel(dataLabel); - } - - void emitIndirectJumpTable(MacroAssembler* masm) + // This structure is used to hold the compiled opcode information, + // including reference back to the original PatternTerm/PatternAlternatives, + // and JIT compilation data structures. + struct YarrOp { + explicit YarrOp(PatternTerm* term) + : m_op(OpTerm) + , m_term(term) + , m_isDeadCode(false) { - for (IndirectJumpHashMap::iterator iter = m_indirectJumpMap.begin(); iter != m_indirectJumpMap.end(); ++iter) { - IndirectJumpEntry* indJumpEntry = iter->second; - size_t size = indJumpEntry->m_dataLabelPtrVector.size(); - if (size) { - // Link any associated DataLabelPtr's with indirect jump via label - Label hereLabel = masm->label(); - for (size_t i = 0; i < size; ++i) - m_backtrackRecords.append(AlternativeBacktrackRecord(indJumpEntry->m_dataLabelPtrVector[i], hereLabel)); - } - indJumpEntry->m_relJumps.link(masm); - masm->jump(Address(stackPointerRegister, indJumpEntry->m_stackOffset)); - delete indJumpEntry; - } - } - - void incrementParenNestingLevel() - { - ++m_parenNestingLevel; - } - - void decrementParenNestingLevel() - { - --m_parenNestingLevel; - } - - ParenthesesTail* addParenthesesTail(PatternTerm& term, JumpList* jumpListToPriorParen) - { - OwnPtr<ParenthesesTail> tail = adoptPtr(new ParenthesesTail(term, m_parenNestingLevel, jumpListToPriorParen)); - ParenthesesTail* rawTail = tail.get(); - - m_parenTails.append(tail.release()); - m_parenTailsForIteration.append(rawTail); - - return rawTail; } - void emitParenthesesTail(YarrGenerator* generator) + explicit YarrOp(YarrOpCode op) + : m_op(op) + , m_isDeadCode(false) { - unsigned vectorSize = m_parenTails.size(); - bool priorBacktrackFallThrough = false; - - // Emit in reverse order so parentTail N can fall through to N-1 - for (unsigned index = vectorSize; index > 0; --index) { - JumpList jumpsToNext; - priorBacktrackFallThrough = m_parenTails[index-1].get()->generateCode(generator, jumpsToNext, priorBacktrackFallThrough, index > 1); - if (index > 1) - jumpsToNext.linkTo(generator->label(), generator); - else - addJumpsToNextInteration(jumpsToNext); - } - m_parenTails.clear(); } - void addJumpToNextInteration(Jump jump) - { - m_jumpsToNextInteration.append(jump); - } + // The operation, as a YarrOpCode, and also a reference to the PatternTerm. + YarrOpCode m_op; + PatternTerm* m_term; - void addJumpsToNextInteration(JumpList jumps) - { - m_jumpsToNextInteration.append(jumps); - } + // For alternatives, this holds the PatternAlternative and doubly linked + // references to this alternative's siblings. In the case of the + // OpBodyAlternativeEnd node at the end of a section of repeating nodes, + // m_nextOp will reference the OpBodyAlternativeBegin node of the first + // repeating alternative. + PatternAlternative* m_alternative; + size_t m_previousOp; + size_t m_nextOp; - void addDataLabelToNextIteration(DataLabelPtr dataLabel) - { - m_dataPtrsToNextIteration.append(dataLabel); - } + // Used to record a set of Jumps out of the generated code, typically + // used for jumps out to backtracking code, and a single reentry back + // into the code for a node (likely where a backtrack will trigger + // rematching). + Label m_reentry; + JumpList m_jumps; - void linkToNextIteration(Label label) - { - m_nextIteration = label; + // This flag is used to null out the second pattern character, when + // two are fused to match a pair together. + bool m_isDeadCode; - for (unsigned i = 0; i < m_dataPtrsToNextIteration.size(); ++i) - m_backtrackRecords.append(AlternativeBacktrackRecord(m_dataPtrsToNextIteration[i], m_nextIteration)); + // Currently used in the case of some of the more complex management of + // 'm_checked', to cache the offset used in this alternative, to avoid + // recalculating it. + int m_checkAdjust; - m_dataPtrsToNextIteration.clear(); - - for (unsigned i = 0; i < m_parenTailsForIteration.size(); ++i) - m_parenTailsForIteration[i]->setNextIteration(m_nextIteration); - - m_parenTailsForIteration.clear(); - } - - void linkToNextIteration(YarrGenerator* generator) - { - m_jumpsToNextInteration.linkTo(m_nextIteration, generator); - } - - int m_parenNestingLevel; - Vector<AlternativeBacktrackRecord> m_backtrackRecords; - IndirectJumpHashMap m_indirectJumpMap; - Label m_nextIteration; - Vector<OwnPtr<ParenthesesTail> > m_parenTails; - JumpList m_jumpsToNextInteration; - Vector<DataLabelPtr> m_dataPtrsToNextIteration; - Vector<ParenthesesTail*> m_parenTailsForIteration; + // Used by OpNestedAlternativeNext/End to hold the pointer to the + // value that will be pushed into the pattern's frame to return to, + // upon backtracking back into the disjunction. + DataLabelPtr m_returnAddress; }; - struct BacktrackDestination { - typedef enum { - NoBacktrack, - BacktrackLabel, - BacktrackStackOffset, - BacktrackJumpList, - BacktrackLinked - } BacktrackType; - - BacktrackDestination() - : m_backtrackType(NoBacktrack) - , m_backtrackToLabel(0) - , m_subDataLabelPtr(0) - , m_nextBacktrack(0) - , m_backtrackSourceLabel(0) - , m_backtrackSourceJumps(0) + // BacktrackingState + // This class encapsulates information about the state of code generation + // whilst generating the code for backtracking, when a term fails to match. + // Upon entry to code generation of the backtracking code for a given node, + // the Backtracking state will hold references to all control flow sources + // that are outputs in need of further backtracking from the prior node + // generated (which is the subsequent operation in the regular expression, + // and in the m_ops Vector, since we generated backtracking backwards). + // These references to control flow take the form of: + // - A jump list of jumps, to be linked to code that will backtrack them + // further. + // - A set of DataLabelPtr values, to be populated with values to be + // treated effectively as return addresses backtracking into complex + // subpatterns. + // - A flag indicating that the current sequence of generated code up to + // this point requires backtracking. + class BacktrackingState { + public: + BacktrackingState() + : m_pendingFallthrough(false) { } - BacktrackDestination(int32_t stackOffset) - : m_backtrackType(BacktrackStackOffset) - , m_backtrackStackOffset(stackOffset) - , m_backtrackToLabel(0) - , m_subDataLabelPtr(0) - , m_nextBacktrack(0) - , m_backtrackSourceLabel(0) - , m_backtrackSourceJumps(0) + // Add a jump or jumps, a return address, or set the flag indicating + // that the current 'fallthrough' control flow requires backtracking. + void append(const Jump& jump) { + m_laterFailures.append(jump); } - - BacktrackDestination(Label label) - : m_backtrackType(BacktrackLabel) - , m_backtrackLabel(label) - , m_backtrackToLabel(0) - , m_subDataLabelPtr(0) - , m_nextBacktrack(0) - , m_backtrackSourceLabel(0) - , m_backtrackSourceJumps(0) + void append(JumpList& jumpList) { + m_laterFailures.append(jumpList); } - - void clear(bool doDataLabelClear = true) + void append(const DataLabelPtr& returnAddress) { - m_backtrackType = NoBacktrack; - if (doDataLabelClear) - clearDataLabel(); - m_nextBacktrack = 0; + m_pendingReturns.append(returnAddress); } - - void clearDataLabel() + void fallthrough() { - m_dataLabelPtr = DataLabelPtr(); + ASSERT(!m_pendingFallthrough); + m_pendingFallthrough = true; } - bool hasDestination() + // These methods clear the backtracking state, either linking to the + // current location, a provided label, or copying the backtracking out + // to a JumpList. All actions may require code generation to take place, + // and as such are passed a pointer to the assembler. + void link(MacroAssembler* assembler) { - return (m_backtrackType != NoBacktrack); - } - - bool isStackOffset() - { - return (m_backtrackType == BacktrackStackOffset); - } - - bool isLabel() - { - return (m_backtrackType == BacktrackLabel); - } - - bool isJumpList() - { - return (m_backtrackType == BacktrackJumpList); - } - - bool hasDataLabel() - { - return m_dataLabelPtr.isSet(); - } - - void copyTarget(BacktrackDestination& rhs, bool copyDataLabel = true) - { - m_backtrackType = rhs.m_backtrackType; - if (m_backtrackType == BacktrackStackOffset) - m_backtrackStackOffset = rhs.m_backtrackStackOffset; - else if (m_backtrackType == BacktrackLabel) - m_backtrackLabel = rhs.m_backtrackLabel; - if (copyDataLabel) - m_dataLabelPtr = rhs.m_dataLabelPtr; - m_backtrackSourceJumps = rhs.m_backtrackSourceJumps; - m_backtrackSourceLabel = rhs.m_backtrackSourceLabel; - } - - void copyTo(BacktrackDestination& lhs) - { - lhs.m_backtrackType = m_backtrackType; - if (m_backtrackType == BacktrackStackOffset) - lhs.m_backtrackStackOffset = m_backtrackStackOffset; - else if (m_backtrackType == BacktrackLabel) - lhs.m_backtrackLabel = m_backtrackLabel; - lhs.m_backtrackSourceJumps = m_backtrackSourceJumps; - lhs.m_backtrackSourceLabel = m_backtrackSourceLabel; - lhs.m_dataLabelPtr = m_dataLabelPtr; - lhs.m_backTrackJumps = m_backTrackJumps; - } - - void addBacktrackJump(Jump jump) - { - m_backTrackJumps.append(jump); - } - - void setStackOffset(int32_t stackOffset) - { - m_backtrackType = BacktrackStackOffset; - m_backtrackStackOffset = stackOffset; - } - - void setLabel(Label label) - { - m_backtrackType = BacktrackLabel; - m_backtrackLabel = label; - } - - void setNextBacktrackLabel(Label label) - { - if (m_nextBacktrack) - m_nextBacktrack->setLabel(label); - } - - void propagateBacktrackToLabel(const BacktrackDestination& rhs) - { - if (!m_backtrackToLabel && rhs.m_backtrackToLabel) - m_backtrackToLabel = rhs.m_backtrackToLabel; - } - - void setBacktrackToLabel(Label* backtrackToLabel) - { - if (!m_backtrackToLabel) - m_backtrackToLabel = backtrackToLabel; - } - - bool hasBacktrackToLabel() - { - return m_backtrackToLabel; - } - - void setBacktrackJumpList(JumpList* jumpList) - { - m_backtrackType = BacktrackJumpList; - m_backtrackSourceJumps = jumpList; - } - - void setBacktrackSourceLabel(Label* backtrackSourceLabel) - { - m_backtrackSourceLabel = backtrackSourceLabel; - } - - void setDataLabel(DataLabelPtr dp) - { - if (m_subDataLabelPtr) { - *m_subDataLabelPtr = dp; - m_subDataLabelPtr = 0; - } else { - ASSERT(!hasDataLabel()); - m_dataLabelPtr = dp; + if (m_pendingReturns.size()) { + Label here(assembler); + for (unsigned i = 0; i < m_pendingReturns.size(); ++i) + m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); + m_pendingReturns.clear(); } + m_laterFailures.link(assembler); + m_laterFailures.clear(); + m_pendingFallthrough = false; } - - void clearSubDataLabelPtr() - { - m_subDataLabelPtr = 0; - } - - void setSubDataLabelPtr(DataLabelPtr* subDataLabelPtr) + void linkTo(Label label, MacroAssembler* assembler) { - m_subDataLabelPtr = subDataLabelPtr; - } - - void linkToNextBacktrack(BacktrackDestination* nextBacktrack) - { - m_nextBacktrack = nextBacktrack; - } - - int32_t getStackOffset() - { - ASSERT(m_backtrackType == BacktrackStackOffset); - return m_backtrackStackOffset; - } - - Label getLabel() - { - ASSERT(m_backtrackType == BacktrackLabel); - return m_backtrackLabel; - } - - JumpList& getBacktrackJumps() - { - return m_backTrackJumps; - } - - DataLabelPtr& getDataLabel() - { - return m_dataLabelPtr; - } - - void jumpToBacktrack(MacroAssembler* masm) - { - if (isJumpList()) { - if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet())) - masm->jump().linkTo(*m_backtrackSourceLabel, masm); - else - m_backtrackSourceJumps->append(masm->jump()); - } else if (isStackOffset()) - masm->jump(Address(stackPointerRegister, m_backtrackStackOffset)); - else if (isLabel()) - masm->jump().linkTo(m_backtrackLabel, masm); - else - m_backTrackJumps.append(masm->jump()); - } - - void jumpToBacktrack(YarrGenerator* generator, Jump jump) - { - if (isJumpList()) { - if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet())) - jump.linkTo(*m_backtrackSourceLabel, generator); - else - m_backtrackSourceJumps->append(jump); - } else if (isStackOffset()) - generator->m_expressionState.addIndirectJumpEntry(getStackOffset(), jump); - else if (isLabel()) - jump.linkTo(getLabel(), generator); - else - m_backTrackJumps.append(jump); - } - - void jumpToBacktrack(YarrGenerator* generator, JumpList& jumps) - { - if (isJumpList()) { - if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet())) - jumps.linkTo(*m_backtrackSourceLabel, generator); - else - m_backtrackSourceJumps->append(jumps); - } else if (isStackOffset()) - generator->m_expressionState.addIndirectJumpEntry(getStackOffset(), jumps); - else if (isLabel()) - jumps.linkTo(getLabel(), generator); - else - m_backTrackJumps.append(jumps); - } - - bool plantJumpToBacktrackIfExists(YarrGenerator* generator) - { - if (isJumpList()) { - if (m_backtrackSourceLabel && (m_backtrackSourceLabel->isSet())) - generator->jump(*m_backtrackSourceLabel); - else - m_backtrackSourceJumps->append(generator->jump()); - - return true; - } - - if (isStackOffset()) { - generator->jump(Address(stackPointerRegister, getStackOffset())); - return true; + if (m_pendingReturns.size()) { + for (unsigned i = 0; i < m_pendingReturns.size(); ++i) + m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], label)); + m_pendingReturns.clear(); } - - if (isLabel()) { - generator->jump(getLabel()); - if (hasDataLabel()) { - generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(getDataLabel(), getLabel())); - clearDataLabel(); - } - return true; + if (m_pendingFallthrough) + assembler->jump(label); + m_laterFailures.linkTo(label, assembler); + m_laterFailures.clear(); + m_pendingFallthrough = false; + } + void takeBacktracksToJumpList(JumpList& jumpList, MacroAssembler* assembler) + { + if (m_pendingReturns.size()) { + Label here(assembler); + for (unsigned i = 0; i < m_pendingReturns.size(); ++i) + m_backtrackRecords.append(ReturnAddressRecord(m_pendingReturns[i], here)); + m_pendingReturns.clear(); + m_pendingFallthrough = true; } - - return false; + if (m_pendingFallthrough) + jumpList.append(assembler->jump()); + jumpList.append(m_laterFailures); + m_laterFailures.clear(); + m_pendingFallthrough = false; } - void linkBacktrackToLabel(Label backtrackLabel) + bool isEmpty() { - if (m_backtrackToLabel) - *m_backtrackToLabel = backtrackLabel; + return m_laterFailures.empty() && m_pendingReturns.isEmpty() && !m_pendingFallthrough; } - void linkAlternativeBacktracks(YarrGenerator* generator, bool nextIteration = false) + // Called at the end of code generation to link all return addresses. + void linkDataLabels(LinkBuffer& linkBuffer) { - Label hereLabel = generator->label(); - - if (m_backtrackToLabel) { - *m_backtrackToLabel = hereLabel; - m_backtrackToLabel = 0; - } - - m_backTrackJumps.link(generator); - - if (nextIteration) - generator->m_expressionState.linkToNextIteration(hereLabel); - - if (hasDataLabel()) { - generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(getDataLabel(), hereLabel)); - // data label cleared as a result of the clear() below - } - - clear(); - } - - void linkAlternativeBacktracksTo(YarrGenerator* generator, Label label, bool nextIteration = false) - { - m_backTrackJumps.linkTo(label, generator); - - if (nextIteration) - generator->m_expressionState.linkToNextIteration(label); - - if (hasDataLabel()) { - generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(getDataLabel(), label)); - clearDataLabel(); - } + ASSERT(isEmpty()); + for (unsigned i = 0; i < m_backtrackRecords.size(); ++i) + linkBuffer.patch(m_backtrackRecords[i].m_dataLabel, linkBuffer.locationOf(m_backtrackRecords[i].m_backtrackLocation)); } private: - BacktrackType m_backtrackType; - int32_t m_backtrackStackOffset; - Label m_backtrackLabel; - DataLabelPtr m_dataLabelPtr; - Label* m_backtrackToLabel; - DataLabelPtr* m_subDataLabelPtr; - BacktrackDestination* m_nextBacktrack; - Label* m_backtrackSourceLabel; - JumpList* m_backtrackSourceJumps; - JumpList m_backTrackJumps; - }; - - struct TermGenerationState { - TermGenerationState(PatternDisjunction* disjunction, unsigned checkedTotal) - : disjunction(disjunction) - , checkedTotal(checkedTotal) - , m_subParenNum(0) - , m_linkedBacktrack(0) - , m_jumpList(0) - { - } - - void resetAlternative() - { - m_backtrack.clear(); - alt = 0; - } - bool alternativeValid() - { - return alt < disjunction->m_alternatives.size(); - } - void nextAlternative() - { - ++alt; - } - PatternAlternative* alternative() - { - return disjunction->m_alternatives[alt]; - } - bool isLastAlternative() - { - return (alt + 1) == disjunction->m_alternatives.size(); - } - - void resetTerm() - { - ASSERT(alternativeValid()); - t = 0; - m_subParenNum = 0; - } - bool termValid() - { - ASSERT(alternativeValid()); - return t < alternative()->m_terms.size(); - } - void nextTerm() - { - ASSERT(alternativeValid()); - ++t; - } - PatternTerm& term() - { - ASSERT(alternativeValid()); - return alternative()->m_terms[t]; - } - bool isLastTerm() - { - ASSERT(alternativeValid()); - return (t + 1) == alternative()->m_terms.size(); - } - unsigned getSubParenNum() - { - return m_subParenNum++; - } - bool isMainDisjunction() - { - return !disjunction->m_parent; - } - - void setJumpListToPriorParen(JumpList* jumpList) - { - m_jumpList = jumpList; - } - - JumpList* getJumpListToPriorParen() - { - return m_jumpList; - } - - PatternTerm& lookaheadTerm() - { - ASSERT(alternativeValid()); - ASSERT((t + 1) < alternative()->m_terms.size()); - return alternative()->m_terms[t + 1]; - } - bool isSinglePatternCharacterLookaheadTerm() - { - ASSERT(alternativeValid()); - return ((t + 1) < alternative()->m_terms.size()) - && (lookaheadTerm().type == PatternTerm::TypePatternCharacter) - && (lookaheadTerm().quantityType == QuantifierFixedCount) - && (lookaheadTerm().quantityCount == 1); - } - - int inputOffset() - { - return term().inputPosition - checkedTotal; - } - - void clearBacktrack() - { - m_backtrack.clear(false); - m_linkedBacktrack = 0; - } - - void jumpToBacktrack(MacroAssembler* masm) - { - m_backtrack.jumpToBacktrack(masm); - } - - void jumpToBacktrack(YarrGenerator* generator, Jump jump) - { - m_backtrack.jumpToBacktrack(generator, jump); - } - - void jumpToBacktrack(YarrGenerator* generator, JumpList& jumps) - { - m_backtrack.jumpToBacktrack(generator, jumps); - } - - bool plantJumpToBacktrackIfExists(YarrGenerator* generator) - { - return m_backtrack.plantJumpToBacktrackIfExists(generator); - } - - void linkDataLabelToBacktrackIfExists(YarrGenerator* generator, DataLabelPtr dataLabel) - { - // If we have a stack offset backtrack destination, use it directly - if (m_backtrack.isStackOffset()) { - generator->m_expressionState.addIndirectJumpEntry(m_backtrack.getStackOffset(), dataLabel); - m_backtrack.clearSubDataLabelPtr(); - } else { - // If we have a backtrack label, connect the datalabel to it directly. - if (m_backtrack.isLabel()) { - generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(dataLabel, m_backtrack.getLabel())); - m_backtrack.clearSubDataLabelPtr(); - } else - setBacktrackDataLabel(dataLabel); + struct ReturnAddressRecord { + ReturnAddressRecord(DataLabelPtr dataLabel, Label backtrackLocation) + : m_dataLabel(dataLabel) + , m_backtrackLocation(backtrackLocation) + { } - } - - void addBacktrackJump(Jump jump) - { - m_backtrack.addBacktrackJump(jump); - } - - void setBacktrackDataLabel(DataLabelPtr dp) - { - m_backtrack.setDataLabel(dp); - } - - void setBackTrackStackOffset(int32_t stackOffset) - { - m_backtrack.setStackOffset(stackOffset); - } - - void setBacktrackLabel(Label label) - { - m_backtrack.setLabel(label); - } - - void linkAlternativeBacktracks(YarrGenerator* generator, bool nextIteration = false) - { - m_backtrack.linkAlternativeBacktracks(generator, nextIteration); - m_linkedBacktrack = 0; - } - - void linkAlternativeBacktracksTo(YarrGenerator* generator, Label label, bool nextIteration = false) - { - m_backtrack.linkAlternativeBacktracksTo(generator, label, nextIteration); - } - - void setBacktrackLink(BacktrackDestination* linkedBacktrack) - { - m_linkedBacktrack = linkedBacktrack; - } - - void chainBacktracks(BacktrackDestination* followonBacktrack) - { - if (m_linkedBacktrack) - m_linkedBacktrack->linkToNextBacktrack(followonBacktrack); - } - BacktrackDestination& getBacktrackDestination() - { - return m_backtrack; - } - - void propagateBacktrackingFrom(YarrGenerator* generator, BacktrackDestination& backtrack, bool doJump = true) - { - if (doJump) - m_backtrack.jumpToBacktrack(generator, backtrack.getBacktrackJumps()); - - if (m_backtrack.isLabel() && backtrack.hasBacktrackToLabel()) - backtrack.linkBacktrackToLabel(m_backtrack.getLabel()); - - if (backtrack.hasDestination()) { - if (m_backtrack.hasDataLabel()) - generator->m_expressionState.addDataLabelToNextIteration(m_backtrack.getDataLabel()); + DataLabelPtr m_dataLabel; + Label m_backtrackLocation; + }; - m_backtrack.copyTarget(backtrack, doJump); - } - } - - PatternDisjunction* disjunction; - int checkedTotal; - private: - unsigned alt; - unsigned t; - unsigned m_subParenNum; - BacktrackDestination m_backtrack; - BacktrackDestination* m_linkedBacktrack; - JumpList* m_jumpList; + JumpList m_laterFailures; + bool m_pendingFallthrough; + Vector<DataLabelPtr, 4> m_pendingReturns; + Vector<ReturnAddressRecord, 4> m_backtrackRecords; }; - struct ParenthesesTail { - ParenthesesTail(PatternTerm& term, int nestingLevel, JumpList* jumpListToPriorParen) - : m_term(term) - , m_nestingLevel(nestingLevel) - , m_subParenIndex(0) - , m_jumpListToPriorParen(jumpListToPriorParen) - { - } - - void processBacktracks(YarrGenerator* generator, TermGenerationState& state, TermGenerationState& parenthesesState, Label nonGreedyTryParentheses, Label fallThrough) - { - m_nonGreedyTryParentheses = nonGreedyTryParentheses; - m_fallThrough = fallThrough; - - m_subParenIndex = state.getSubParenNum(); - parenthesesState.getBacktrackDestination().copyTo(m_parenBacktrack); - state.chainBacktracks(&m_backtrack); - BacktrackDestination& stateBacktrack = state.getBacktrackDestination(); - stateBacktrack.copyTo(m_backtrack); - stateBacktrack.setBacktrackToLabel(&m_backtrackToLabel); - state.setBacktrackLink(&m_backtrack); - stateBacktrack.setSubDataLabelPtr(&m_dataAfterLabelPtr); - - m_doDirectBacktrack = m_parenBacktrack.hasDestination(); - - if ((m_term.quantityType == QuantifierGreedy) || (m_term.quantityType == QuantifierNonGreedy)) - m_doDirectBacktrack = false; - - if (m_doDirectBacktrack) - state.propagateBacktrackingFrom(generator, m_parenBacktrack, false); - else { - stateBacktrack.setBacktrackJumpList(&m_afterBacktrackJumps); - stateBacktrack.setBacktrackSourceLabel(&m_backtrackFromAfterParens); - } - } - - void setNextIteration(Label nextIteration) - { - if (!m_nestingLevel && !m_backtrackToLabel.isSet()) - m_backtrackToLabel = nextIteration; - } - - void addAfterParenJump(Jump jump) - { - m_afterBacktrackJumps.append(jump); - } + // Generation methods: + // =================== - bool generateCode(YarrGenerator* generator, JumpList& jumpsToNext, bool priorBackTrackFallThrough, bool nextBacktrackFallThrough) - { - const RegisterID indexTemporary = regT0; - unsigned parenthesesFrameLocation = m_term.frameLocation; - Jump fromPriorBacktrack; - bool needJumpForPriorParenTail = false; - - if (priorBackTrackFallThrough - && ((m_term.quantityType == QuantifierGreedy) - || (m_term.quantityType == QuantifierNonGreedy) - || (!m_doDirectBacktrack && m_parenBacktrack.hasDestination()))) { - // If the prior paren tail code assumed that it could fall through, - // but we need to generate after paren backtrack code, then provide - // a jump around that code for the prior paren tail code. - // A regular expressing like ((xxx)...)? needs this. - fromPriorBacktrack = generator->jump(); - needJumpForPriorParenTail = true; - } - - if (!m_backtrack.hasDestination()) { - if (m_backtrackToLabel.isSet()) { - m_backtrack.setLabel(m_backtrackToLabel); - nextBacktrackFallThrough = false; - } else if (m_jumpListToPriorParen) { - // If we don't have a destination, go back to either the prior paren or the next outer paren. - m_backtrack.setBacktrackJumpList(m_jumpListToPriorParen); - nextBacktrackFallThrough = false; - } else - m_backtrack.setBacktrackJumpList(&jumpsToNext); - } else - nextBacktrackFallThrough = false; - - // A failure AFTER the parens jumps here - Backtrack to this paren - m_backtrackFromAfterParens = generator->label(); - - if (m_dataAfterLabelPtr.isSet()) - generator->m_expressionState.m_backtrackRecords.append(AlternativeBacktrackRecord(m_dataAfterLabelPtr, m_backtrackFromAfterParens)); - - m_afterBacktrackJumps.link(generator); - - if (m_term.quantityType == QuantifierGreedy) { - // If this is -1 we have now tested with both with and without the parens. - generator->loadFromFrame(parenthesesFrameLocation, indexTemporary); - m_backtrack.jumpToBacktrack(generator, generator->branch32(Equal, indexTemporary, TrustedImm32(-1))); - } else if (m_term.quantityType == QuantifierNonGreedy) { - // If this is -1 we have now tested with both with and without the parens. - generator->loadFromFrame(parenthesesFrameLocation, indexTemporary); - generator->branch32(Equal, indexTemporary, TrustedImm32(-1)).linkTo(m_nonGreedyTryParentheses, generator); - } - - if (!m_doDirectBacktrack) - m_parenBacktrack.plantJumpToBacktrackIfExists(generator); - - // A failure WITHIN the parens jumps here - if (needJumpForPriorParenTail) - fromPriorBacktrack.link(generator); - m_parenBacktrack.linkAlternativeBacktracks(generator); - m_withinBacktrackJumps.link(generator); - - if (m_term.capture()) - generator->store32(TrustedImm32(-1), Address(output, (m_term.parentheses.subpatternId << 1) * sizeof(int))); - - if (m_term.quantityType == QuantifierGreedy) { - generator->storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); - generator->jump().linkTo(m_fallThrough, generator); - nextBacktrackFallThrough = false; - } else if (!nextBacktrackFallThrough) - m_backtrack.jumpToBacktrack(generator); - - if (!m_doDirectBacktrack) - m_backtrack.setNextBacktrackLabel(m_backtrackFromAfterParens); - - return nextBacktrackFallThrough; - } - - PatternTerm& m_term; - int m_nestingLevel; - unsigned m_subParenIndex; - JumpList* m_jumpListToPriorParen; - Label m_nonGreedyTryParentheses; - Label m_fallThrough; - Label m_backtrackToLabel; - Label m_backtrackFromAfterParens; - DataLabelPtr m_dataAfterLabelPtr; - JumpList m_withinBacktrackJumps; - JumpList m_afterBacktrackJumps; - BacktrackDestination m_parenBacktrack; - BacktrackDestination m_backtrack; - bool m_doDirectBacktrack; - }; + // This method provides a default implementation of backtracking common + // to many terms; terms commonly jump out of the forwards matching path + // on any failed conditions, and add these jumps to the m_jumps list. If + // no special handling is required we can often just backtrack to m_jumps. + void backtrackTermDefault(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + m_backtrackingState.append(op.m_jumps); + } - void generateAssertionBOL(TermGenerationState& state) + void generateAssertionBOL(size_t opIndex) { - PatternTerm& term = state.term(); + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; if (m_pattern.m_multiline) { const RegisterID character = regT0; JumpList matchDest; - if (!term.inputPosition) - matchDest.append(branch32(Equal, index, Imm32(state.checkedTotal))); + if (!term->inputPosition) + matchDest.append(branch32(Equal, index, Imm32(m_checked))); - readCharacter(state.inputOffset() - 1, character); + readCharacter((term->inputPosition - m_checked) - 1, character); matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass()); - state.jumpToBacktrack(this); + op.m_jumps.append(jump()); matchDest.link(this); } else { // Erk, really should poison out these alternatives early. :-/ - if (term.inputPosition) - state.jumpToBacktrack(this); + if (term->inputPosition) + op.m_jumps.append(jump()); else - state.jumpToBacktrack(this, branch32(NotEqual, index, Imm32(state.checkedTotal))); + op.m_jumps.append(branch32(NotEqual, index, Imm32(m_checked))); } } + void backtrackAssertionBOL(size_t opIndex) + { + backtrackTermDefault(opIndex); + } - void generateAssertionEOL(TermGenerationState& state) + void generateAssertionEOL(size_t opIndex) { - PatternTerm& term = state.term(); + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; if (m_pattern.m_multiline) { const RegisterID character = regT0; JumpList matchDest; - if (term.inputPosition == state.checkedTotal) + if (term->inputPosition == m_checked) matchDest.append(atEndOfInput()); - readCharacter(state.inputOffset(), character); + readCharacter((term->inputPosition - m_checked), character); matchCharacterClass(character, matchDest, m_pattern.newlineCharacterClass()); - state.jumpToBacktrack(this); + op.m_jumps.append(jump()); matchDest.link(this); } else { - if (term.inputPosition == state.checkedTotal) - state.jumpToBacktrack(this, notAtEndOfInput()); + if (term->inputPosition == m_checked) + op.m_jumps.append(notAtEndOfInput()); // Erk, really should poison out these alternatives early. :-/ else - state.jumpToBacktrack(this); + op.m_jumps.append(jump()); } } + void backtrackAssertionEOL(size_t opIndex) + { + backtrackTermDefault(opIndex); + } // Also falls though on nextIsNotWordChar. - void matchAssertionWordchar(TermGenerationState& state, JumpList& nextIsWordChar, JumpList& nextIsNotWordChar) + void matchAssertionWordchar(size_t opIndex, JumpList& nextIsWordChar, JumpList& nextIsNotWordChar) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID character = regT0; - PatternTerm& term = state.term(); - if (term.inputPosition == state.checkedTotal) + if (term->inputPosition == m_checked) nextIsNotWordChar.append(atEndOfInput()); - readCharacter(state.inputOffset(), character); + readCharacter((term->inputPosition - m_checked), character); matchCharacterClass(character, nextIsWordChar, m_pattern.wordcharCharacterClass()); } - void generateAssertionWordBoundary(TermGenerationState& state) + void generateAssertionWordBoundary(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID character = regT0; - PatternTerm& term = state.term(); Jump atBegin; JumpList matchDest; - if (!term.inputPosition) - atBegin = branch32(Equal, index, Imm32(state.checkedTotal)); - readCharacter(state.inputOffset() - 1, character); + if (!term->inputPosition) + atBegin = branch32(Equal, index, Imm32(m_checked)); + readCharacter((term->inputPosition - m_checked) - 1, character); matchCharacterClass(character, matchDest, m_pattern.wordcharCharacterClass()); - if (!term.inputPosition) + if (!term->inputPosition) atBegin.link(this); // We fall through to here if the last character was not a wordchar. JumpList nonWordCharThenWordChar; JumpList nonWordCharThenNonWordChar; - if (term.invert()) { - matchAssertionWordchar(state, nonWordCharThenNonWordChar, nonWordCharThenWordChar); + if (term->invert()) { + matchAssertionWordchar(opIndex, nonWordCharThenNonWordChar, nonWordCharThenWordChar); nonWordCharThenWordChar.append(jump()); } else { - matchAssertionWordchar(state, nonWordCharThenWordChar, nonWordCharThenNonWordChar); + matchAssertionWordchar(opIndex, nonWordCharThenWordChar, nonWordCharThenNonWordChar); nonWordCharThenNonWordChar.append(jump()); } - state.jumpToBacktrack(this, nonWordCharThenNonWordChar); + op.m_jumps.append(nonWordCharThenNonWordChar); // We jump here if the last character was a wordchar. matchDest.link(this); JumpList wordCharThenWordChar; JumpList wordCharThenNonWordChar; - if (term.invert()) { - matchAssertionWordchar(state, wordCharThenNonWordChar, wordCharThenWordChar); + if (term->invert()) { + matchAssertionWordchar(opIndex, wordCharThenNonWordChar, wordCharThenWordChar); wordCharThenWordChar.append(jump()); } else { - matchAssertionWordchar(state, wordCharThenWordChar, wordCharThenNonWordChar); + matchAssertionWordchar(opIndex, wordCharThenWordChar, wordCharThenNonWordChar); // This can fall-though! } - state.jumpToBacktrack(this, wordCharThenWordChar); + op.m_jumps.append(wordCharThenWordChar); nonWordCharThenWordChar.link(this); wordCharThenNonWordChar.link(this); } + void backtrackAssertionWordBoundary(size_t opIndex) + { + backtrackTermDefault(opIndex); + } - void generatePatternCharacterSingle(TermGenerationState& state) + void generatePatternCharacterOnce(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + + // m_ops always ends with a OpBodyAlternativeEnd or OpMatchFailed + // node, so there must always be at least one more node. + ASSERT(opIndex + 1 < m_ops.size()); + YarrOp& nextOp = m_ops[opIndex + 1]; + + if (op.m_isDeadCode) + return; + + PatternTerm* term = op.m_term; + UChar ch = term->patternCharacter; + const RegisterID character = regT0; - UChar ch = state.term().patternCharacter; + + if (nextOp.m_op == OpTerm) { + PatternTerm* nextTerm = nextOp.m_term; + if (nextTerm->type == PatternTerm::TypePatternCharacter + && nextTerm->quantityType == QuantifierFixedCount + && nextTerm->quantityCount == 1 + && nextTerm->inputPosition == (term->inputPosition + 1)) { + + UChar ch2 = nextTerm->patternCharacter; + + int mask = 0; + int chPair = ch | (ch2 << 16); + + if (m_pattern.m_ignoreCase) { + if (isASCIIAlpha(ch)) + mask |= 32; + if (isASCIIAlpha(ch2)) + mask |= 32 << 16; + } + + BaseIndex address(input, index, TimesTwo, (term->inputPosition - m_checked) * sizeof(UChar)); + if (mask) { + load32WithUnalignedHalfWords(address, character); + or32(Imm32(mask), character); + op.m_jumps.append(branch32(NotEqual, character, Imm32(chPair | mask))); + } else + op.m_jumps.append(branch32WithUnalignedHalfWords(NotEqual, address, Imm32(chPair))); + + nextOp.m_isDeadCode = true; + return; + } + } if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { - readCharacter(state.inputOffset(), character); + readCharacter(term->inputPosition - m_checked, character); or32(TrustedImm32(32), character); - state.jumpToBacktrack(this, branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); + op.m_jumps.append(branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); } else { ASSERT(!m_pattern.m_ignoreCase || (Unicode::toLower(ch) == Unicode::toUpper(ch))); - state.jumpToBacktrack(this, jumpIfCharNotEquals(ch, state.inputOffset())); + op.m_jumps.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked)); } } - - void generatePatternCharacterPair(TermGenerationState& state) + void backtrackPatternCharacterOnce(size_t opIndex) { - const RegisterID character = regT0; - UChar ch1 = state.term().patternCharacter; - UChar ch2 = state.lookaheadTerm().patternCharacter; - - int mask = 0; - int chPair = ch1 | (ch2 << 16); - - if (m_pattern.m_ignoreCase) { - if (isASCIIAlpha(ch1)) - mask |= 32; - if (isASCIIAlpha(ch2)) - mask |= 32 << 16; - } - - if (mask) { - load32WithUnalignedHalfWords(BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), character); - or32(Imm32(mask), character); - state.jumpToBacktrack(this, branch32(NotEqual, character, Imm32(chPair | mask))); - } else - state.jumpToBacktrack(this, branch32WithUnalignedHalfWords(NotEqual, BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), Imm32(chPair))); + backtrackTermDefault(opIndex); } - void generatePatternCharacterFixed(TermGenerationState& state) + void generatePatternCharacterFixed(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + UChar ch = term->patternCharacter; + const RegisterID character = regT0; const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); - UChar ch = term.patternCharacter; move(index, countRegister); - sub32(Imm32(term.quantityCount), countRegister); + sub32(Imm32(term->quantityCount), countRegister); Label loop(this); + BaseIndex address(input, countRegister, TimesTwo, (term->inputPosition - m_checked + term->quantityCount) * sizeof(UChar)); + if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { - load16(BaseIndex(input, countRegister, TimesTwo, (state.inputOffset() + term.quantityCount) * sizeof(UChar)), character); + load16(address, character); or32(TrustedImm32(32), character); - state.jumpToBacktrack(this, branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); + op.m_jumps.append(branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); } else { ASSERT(!m_pattern.m_ignoreCase || (Unicode::toLower(ch) == Unicode::toUpper(ch))); - state.jumpToBacktrack(this, branch16(NotEqual, BaseIndex(input, countRegister, TimesTwo, (state.inputOffset() + term.quantityCount) * sizeof(UChar)), Imm32(ch))); + op.m_jumps.append(branch16(NotEqual, address, Imm32(ch))); } add32(TrustedImm32(1), countRegister); branch32(NotEqual, countRegister, index).linkTo(loop, this); } + void backtrackPatternCharacterFixed(size_t opIndex) + { + backtrackTermDefault(opIndex); + } - void generatePatternCharacterGreedy(TermGenerationState& state) + void generatePatternCharacterGreedy(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + UChar ch = term->patternCharacter; + const RegisterID character = regT0; const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); - UChar ch = term.patternCharacter; move(TrustedImm32(0), countRegister); @@ -1352,121 +752,152 @@ class YarrGenerator : private MacroAssembler { Label loop(this); failures.append(atEndOfInput()); if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { - readCharacter(state.inputOffset(), character); + readCharacter(term->inputPosition - m_checked, character); or32(TrustedImm32(32), character); failures.append(branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); } else { ASSERT(!m_pattern.m_ignoreCase || (Unicode::toLower(ch) == Unicode::toUpper(ch))); - failures.append(jumpIfCharNotEquals(ch, state.inputOffset())); + failures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked)); } add32(TrustedImm32(1), countRegister); add32(TrustedImm32(1), index); - if (term.quantityCount != quantifyInfinite) { - branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); - failures.append(jump()); - } else + if (term->quantityCount == quantifyInfinite) jump(loop); - - Label backtrackBegin(this); - loadFromFrame(term.frameLocation, countRegister); - state.jumpToBacktrack(this, branchTest32(Zero, countRegister)); - sub32(TrustedImm32(1), countRegister); - sub32(TrustedImm32(1), index); + else + branch32(NotEqual, countRegister, Imm32(term->quantityCount)).linkTo(loop, this); failures.link(this); + op.m_reentry = label(); - storeToFrame(countRegister, term.frameLocation); + storeToFrame(countRegister, term->frameLocation); - state.setBacktrackLabel(backtrackBegin); } + void backtrackPatternCharacterGreedy(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + + const RegisterID countRegister = regT1; - void generatePatternCharacterNonGreedy(TermGenerationState& state) + m_backtrackingState.link(this); + + loadFromFrame(term->frameLocation, countRegister); + m_backtrackingState.append(branchTest32(Zero, countRegister)); + sub32(TrustedImm32(1), countRegister); + sub32(TrustedImm32(1), index); + jump(op.m_reentry); + } + + void generatePatternCharacterNonGreedy(size_t opIndex) { - const RegisterID character = regT0; + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); - UChar ch = term.patternCharacter; move(TrustedImm32(0), countRegister); + op.m_reentry = label(); + storeToFrame(countRegister, term->frameLocation); + } + void backtrackPatternCharacterNonGreedy(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + UChar ch = term->patternCharacter; + + const RegisterID character = regT0; + const RegisterID countRegister = regT1; - Jump firstTimeDoNothing = jump(); + JumpList nonGreedyFailures; - Label hardFail(this); - sub32(countRegister, index); - state.jumpToBacktrack(this); + m_backtrackingState.link(this); - Label backtrackBegin(this); - loadFromFrame(term.frameLocation, countRegister); + loadFromFrame(term->frameLocation, countRegister); - atEndOfInput().linkTo(hardFail, this); - if (term.quantityCount != quantifyInfinite) - branch32(Equal, countRegister, Imm32(term.quantityCount), hardFail); + nonGreedyFailures.append(atEndOfInput()); + if (term->quantityCount != quantifyInfinite) + nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount))); if (m_pattern.m_ignoreCase && isASCIIAlpha(ch)) { - readCharacter(state.inputOffset(), character); + readCharacter(term->inputPosition - m_checked, character); or32(TrustedImm32(32), character); - branch32(NotEqual, character, Imm32(Unicode::toLower(ch))).linkTo(hardFail, this); + nonGreedyFailures.append(branch32(NotEqual, character, Imm32(Unicode::toLower(ch)))); } else { ASSERT(!m_pattern.m_ignoreCase || (Unicode::toLower(ch) == Unicode::toUpper(ch))); - jumpIfCharNotEquals(ch, state.inputOffset()).linkTo(hardFail, this); + nonGreedyFailures.append(jumpIfCharNotEquals(ch, term->inputPosition - m_checked)); } add32(TrustedImm32(1), countRegister); add32(TrustedImm32(1), index); - firstTimeDoNothing.link(this); - storeToFrame(countRegister, term.frameLocation); + jump(op.m_reentry); - state.setBacktrackLabel(backtrackBegin); + nonGreedyFailures.link(this); + sub32(countRegister, index); + m_backtrackingState.fallthrough(); } - void generateCharacterClassSingle(TermGenerationState& state) + void generateCharacterClassOnce(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID character = regT0; - PatternTerm& term = state.term(); JumpList matchDest; - readCharacter(state.inputOffset(), character); - matchCharacterClass(character, matchDest, term.characterClass); + readCharacter((term->inputPosition - m_checked), character); + matchCharacterClass(character, matchDest, term->characterClass); - if (term.invert()) - state.jumpToBacktrack(this, matchDest); + if (term->invert()) + op.m_jumps.append(matchDest); else { - state.jumpToBacktrack(this); + op.m_jumps.append(jump()); matchDest.link(this); } } + void backtrackCharacterClassOnce(size_t opIndex) + { + backtrackTermDefault(opIndex); + } - void generateCharacterClassFixed(TermGenerationState& state) + void generateCharacterClassFixed(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID character = regT0; const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); move(index, countRegister); - sub32(Imm32(term.quantityCount), countRegister); + sub32(Imm32(term->quantityCount), countRegister); Label loop(this); JumpList matchDest; - load16(BaseIndex(input, countRegister, TimesTwo, (state.inputOffset() + term.quantityCount) * sizeof(UChar)), character); - matchCharacterClass(character, matchDest, term.characterClass); + load16(BaseIndex(input, countRegister, TimesTwo, (term->inputPosition - m_checked + term->quantityCount) * sizeof(UChar)), character); + matchCharacterClass(character, matchDest, term->characterClass); - if (term.invert()) - state.jumpToBacktrack(this, matchDest); + if (term->invert()) + op.m_jumps.append(matchDest); else { - state.jumpToBacktrack(this); + op.m_jumps.append(jump()); matchDest.link(this); } add32(TrustedImm32(1), countRegister); branch32(NotEqual, countRegister, index).linkTo(loop, this); } + void backtrackCharacterClassFixed(size_t opIndex) + { + backtrackTermDefault(opIndex); + } - void generateCharacterClassGreedy(TermGenerationState& state) + void generateCharacterClassGreedy(size_t opIndex) { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID character = regT0; const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); move(TrustedImm32(0), countRegister); @@ -1474,692 +905,1356 @@ class YarrGenerator : private MacroAssembler { Label loop(this); failures.append(atEndOfInput()); - if (term.invert()) { - readCharacter(state.inputOffset(), character); - matchCharacterClass(character, failures, term.characterClass); + if (term->invert()) { + readCharacter(term->inputPosition - m_checked, character); + matchCharacterClass(character, failures, term->characterClass); } else { JumpList matchDest; - readCharacter(state.inputOffset(), character); - matchCharacterClass(character, matchDest, term.characterClass); + readCharacter(term->inputPosition - m_checked, character); + matchCharacterClass(character, matchDest, term->characterClass); failures.append(jump()); matchDest.link(this); } add32(TrustedImm32(1), countRegister); add32(TrustedImm32(1), index); - if (term.quantityCount != quantifyInfinite) { - branch32(NotEqual, countRegister, Imm32(term.quantityCount)).linkTo(loop, this); + if (term->quantityCount != quantifyInfinite) { + branch32(NotEqual, countRegister, Imm32(term->quantityCount)).linkTo(loop, this); failures.append(jump()); } else jump(loop); - Label backtrackBegin(this); - loadFromFrame(term.frameLocation, countRegister); - state.jumpToBacktrack(this, branchTest32(Zero, countRegister)); - sub32(TrustedImm32(1), countRegister); - sub32(TrustedImm32(1), index); - failures.link(this); + op.m_reentry = label(); + + storeToFrame(countRegister, term->frameLocation); + } + void backtrackCharacterClassGreedy(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; - storeToFrame(countRegister, term.frameLocation); + const RegisterID countRegister = regT1; + + m_backtrackingState.link(this); - state.setBacktrackLabel(backtrackBegin); + loadFromFrame(term->frameLocation, countRegister); + m_backtrackingState.append(branchTest32(Zero, countRegister)); + sub32(TrustedImm32(1), countRegister); + sub32(TrustedImm32(1), index); + jump(op.m_reentry); } - void generateCharacterClassNonGreedy(TermGenerationState& state) + void generateCharacterClassNonGreedy(size_t opIndex) { - const RegisterID character = regT0; + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; + const RegisterID countRegister = regT1; - PatternTerm& term = state.term(); move(TrustedImm32(0), countRegister); + op.m_reentry = label(); + storeToFrame(countRegister, term->frameLocation); + } + void backtrackCharacterClassNonGreedy(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; - Jump firstTimeDoNothing = jump(); + const RegisterID character = regT0; + const RegisterID countRegister = regT1; - Label hardFail(this); - sub32(countRegister, index); - state.jumpToBacktrack(this); + JumpList nonGreedyFailures; + + m_backtrackingState.link(this); Label backtrackBegin(this); - loadFromFrame(term.frameLocation, countRegister); + loadFromFrame(term->frameLocation, countRegister); - atEndOfInput().linkTo(hardFail, this); - branch32(Equal, countRegister, Imm32(term.quantityCount), hardFail); + nonGreedyFailures.append(atEndOfInput()); + nonGreedyFailures.append(branch32(Equal, countRegister, Imm32(term->quantityCount))); JumpList matchDest; - readCharacter(state.inputOffset(), character); - matchCharacterClass(character, matchDest, term.characterClass); + readCharacter(term->inputPosition - m_checked, character); + matchCharacterClass(character, matchDest, term->characterClass); - if (term.invert()) - matchDest.linkTo(hardFail, this); + if (term->invert()) + nonGreedyFailures.append(matchDest); else { - jump(hardFail); + nonGreedyFailures.append(jump()); matchDest.link(this); } add32(TrustedImm32(1), countRegister); add32(TrustedImm32(1), index); - firstTimeDoNothing.link(this); - storeToFrame(countRegister, term.frameLocation); + jump(op.m_reentry); - state.setBacktrackLabel(backtrackBegin); + nonGreedyFailures.link(this); + sub32(countRegister, index); + m_backtrackingState.fallthrough(); } - void generateParenthesesDisjunction(PatternTerm& parenthesesTerm, TermGenerationState& state, unsigned alternativeFrameLocation) + // Code generation/backtracking for simple terms + // (pattern characters, character classes, and assertions). + // These methods farm out work to the set of functions above. + void generateTerm(size_t opIndex) { - ASSERT((parenthesesTerm.type == PatternTerm::TypeParenthesesSubpattern) || (parenthesesTerm.type == PatternTerm::TypeParentheticalAssertion)); - ASSERT(parenthesesTerm.quantityCount == 1); + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; - PatternDisjunction* disjunction = parenthesesTerm.parentheses.disjunction; - unsigned preCheckedCount = ((parenthesesTerm.quantityType == QuantifierFixedCount) && (parenthesesTerm.type != PatternTerm::TypeParentheticalAssertion)) ? disjunction->m_minimumSize : 0; + switch (term->type) { + case PatternTerm::TypePatternCharacter: + switch (term->quantityType) { + case QuantifierFixedCount: + if (term->quantityCount == 1) + generatePatternCharacterOnce(opIndex); + else + generatePatternCharacterFixed(opIndex); + break; + case QuantifierGreedy: + generatePatternCharacterGreedy(opIndex); + break; + case QuantifierNonGreedy: + generatePatternCharacterNonGreedy(opIndex); + break; + } + break; - if (disjunction->m_alternatives.size() == 1) { - state.resetAlternative(); - ASSERT(state.alternativeValid()); - PatternAlternative* alternative = state.alternative(); - optimizeAlternative(alternative); + case PatternTerm::TypeCharacterClass: + switch (term->quantityType) { + case QuantifierFixedCount: + if (term->quantityCount == 1) + generateCharacterClassOnce(opIndex); + else + generateCharacterClassFixed(opIndex); + break; + case QuantifierGreedy: + generateCharacterClassGreedy(opIndex); + break; + case QuantifierNonGreedy: + generateCharacterClassNonGreedy(opIndex); + break; + } + break; - int countToCheck = alternative->m_minimumSize - preCheckedCount; - if (countToCheck) { - ASSERT((parenthesesTerm.type == PatternTerm::TypeParentheticalAssertion) || (parenthesesTerm.quantityType != QuantifierFixedCount)); + case PatternTerm::TypeAssertionBOL: + generateAssertionBOL(opIndex); + break; - // FIXME: This is quite horrible. The call to 'plantJumpToBacktrackIfExists' - // will be forced to always trampoline into here, just to decrement the index. - // Ick. - Jump skip = jump(); + case PatternTerm::TypeAssertionEOL: + generateAssertionEOL(opIndex); + break; - Label backtrackBegin(this); - sub32(Imm32(countToCheck), index); - state.addBacktrackJump(jump()); + case PatternTerm::TypeAssertionWordBoundary: + generateAssertionWordBoundary(opIndex); + break; - skip.link(this); + case PatternTerm::TypeForwardReference: + break; - state.setBacktrackLabel(backtrackBegin); + case PatternTerm::TypeParenthesesSubpattern: + case PatternTerm::TypeParentheticalAssertion: + ASSERT_NOT_REACHED(); + case PatternTerm::TypeBackReference: + m_shouldFallBack = true; + break; + } + } + void backtrackTerm(size_t opIndex) + { + YarrOp& op = m_ops[opIndex]; + PatternTerm* term = op.m_term; - state.jumpToBacktrack(this, jumpIfNoAvailableInput(countToCheck)); - state.checkedTotal += countToCheck; + switch (term->type) { + case PatternTerm::TypePatternCharacter: + switch (term->quantityType) { + case QuantifierFixedCount: + if (term->quantityCount == 1) + backtrackPatternCharacterOnce(opIndex); + else + backtrackPatternCharacterFixed(opIndex); + break; + case QuantifierGreedy: + backtrackPatternCharacterGreedy(opIndex); + break; + case QuantifierNonGreedy: + backtrackPatternCharacterNonGreedy(opIndex); + break; } + break; - for (state.resetTerm(); state.termValid(); state.nextTerm()) - generateTerm(state); - - state.checkedTotal -= countToCheck; - } else { - JumpList successes; - bool propogateBacktrack = false; - - // Save current state's paren jump list for use with each alternative - JumpList* outerJumpList = state.getJumpListToPriorParen(); + case PatternTerm::TypeCharacterClass: + switch (term->quantityType) { + case QuantifierFixedCount: + if (term->quantityCount == 1) + backtrackCharacterClassOnce(opIndex); + else + backtrackCharacterClassFixed(opIndex); + break; + case QuantifierGreedy: + backtrackCharacterClassGreedy(opIndex); + break; + case QuantifierNonGreedy: + backtrackCharacterClassNonGreedy(opIndex); + break; + } + break; - for (state.resetAlternative(); state.alternativeValid(); state.nextAlternative(), state.setJumpListToPriorParen(outerJumpList)) { - PatternAlternative* alternative = state.alternative(); - optimizeAlternative(alternative); + case PatternTerm::TypeAssertionBOL: + backtrackAssertionBOL(opIndex); + break; - ASSERT(alternative->m_minimumSize >= preCheckedCount); - int countToCheck = alternative->m_minimumSize - preCheckedCount; - if (countToCheck) { - state.addBacktrackJump(jumpIfNoAvailableInput(countToCheck)); - state.checkedTotal += countToCheck; - } + case PatternTerm::TypeAssertionEOL: + backtrackAssertionEOL(opIndex); + break; - for (state.resetTerm(); state.termValid(); state.nextTerm()) - generateTerm(state); + case PatternTerm::TypeAssertionWordBoundary: + backtrackAssertionWordBoundary(opIndex); + break; - // Matched an alternative. - DataLabelPtr dataLabel = storeToFrameWithPatch(alternativeFrameLocation); + case PatternTerm::TypeForwardReference: + break; - if (!state.isLastAlternative() || countToCheck) - successes.append(jump()); + case PatternTerm::TypeParenthesesSubpattern: + case PatternTerm::TypeParentheticalAssertion: + ASSERT_NOT_REACHED(); + case PatternTerm::TypeBackReference: + m_shouldFallBack = true; + break; + } + } - // Alternative did not match. + void generate() + { + // Forwards generate the matching code. + ASSERT(m_ops.size()); + size_t opIndex = 0; - // Do we have a backtrack destination? - // if so, link the data label to it. - state.linkDataLabelToBacktrackIfExists(this, dataLabel); + do { + YarrOp& op = m_ops[opIndex]; + switch (op.m_op) { - if (!state.isLastAlternative() || countToCheck) - state.linkAlternativeBacktracks(this); + case OpTerm: + generateTerm(opIndex); + break; - if (countToCheck) { - sub32(Imm32(countToCheck), index); - state.checkedTotal -= countToCheck; - } else if (state.isLastAlternative()) - propogateBacktrack = true; + // OpBodyAlternativeBegin/Next/End + // + // These nodes wrap the set of alternatives in the body of the regular expression. + // There may be either one or two chains of OpBodyAlternative nodes, one representing + // the 'once through' sequence of alternatives (if any exist), and one representing + // the repeating alternatives (again, if any exist). + // + // Upon normal entry to the Begin alternative, we will check that input is available. + // Reentry to the Begin alternative will take place after the check has taken place, + // and will assume that the input position has already been progressed as appropriate. + // + // Entry to subsequent Next/End alternatives occurs when the prior alternative has + // successfully completed a match - return a success state from JIT code. + // + // Next alternatives allow for reentry optimized to suit backtracking from its + // preceding alternative. It expects the input position to still be set to a position + // appropriate to its predecessor, and it will only perform an input check if the + // predecessor had a minimum size less than its own. + // + // In the case 'once through' expressions, the End node will also have a reentry + // point to jump to when the last alternative fails. Again, this expects the input + // position to still reflect that expected by the prior alternative. + case OpBodyAlternativeBegin: { + PatternAlternative* alternative = op.m_alternative; + + // Upon entry at the head of the set of alternatives, check if input is available + // to run the first alternative. (This progresses the input position). + op.m_jumps.append(jumpIfNoAvailableInput(alternative->m_minimumSize)); + // We will reenter after the check, and assume the input position to have been + // set as appropriate to this alternative. + op.m_reentry = label(); + + m_checked += alternative->m_minimumSize; + break; } - // We fall through to here when the last alternative fails. - // Add a backtrack out of here for the parenthese handling code to link up. - if (!propogateBacktrack) - state.addBacktrackJump(jump()); - - // Save address on stack for the parens code to backtrack to, to retry the - // next alternative. - state.setBackTrackStackOffset(alternativeFrameLocation * sizeof(void*)); - - successes.link(this); - } - } + case OpBodyAlternativeNext: + case OpBodyAlternativeEnd: { + PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; + PatternAlternative* alternative = op.m_alternative; + + // If we get here, the prior alternative matched - return success. + + // Adjust the stack pointer to remove the pattern's frame. + if (m_pattern.m_body->m_callFrameSize) + addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); + + // Load appropriate values into the return register and the first output + // slot, and return. In the case of pattern with a fixed size, we will + // not have yet set the value in the first + ASSERT(index != returnRegister); + if (m_pattern.m_body->m_hasFixedSize) { + move(index, returnRegister); + if (priorAlternative->m_minimumSize) + sub32(Imm32(priorAlternative->m_minimumSize), returnRegister); + store32(returnRegister, output); + } else + load32(Address(output), returnRegister); + store32(index, Address(output, 4)); + generateReturn(); + + // This is the divide between the tail of the prior alternative, above, and + // the head of the subsequent alternative, below. + + if (op.m_op == OpBodyAlternativeNext) { + // This is the reentry point for the Next alternative. We expect any code + // that jumps here to do so with the input position matching that of the + // PRIOR alteranative, and we will only check input availability if we + // need to progress it forwards. + op.m_reentry = label(); + if (int delta = alternative->m_minimumSize - priorAlternative->m_minimumSize) { + add32(Imm32(delta), index); + if (delta > 0) + op.m_jumps.append(jumpIfNoAvailableInput()); + } + } else if (op.m_nextOp == notFound) { + // This is the reentry point for the End of 'once through' alternatives, + // jumped to when the las alternative fails to match. + op.m_reentry = label(); + sub32(Imm32(priorAlternative->m_minimumSize), index); + } - void generateParenthesesSingle(TermGenerationState& state) - { - const RegisterID indexTemporary = regT0; - PatternTerm& term = state.term(); - PatternDisjunction* disjunction = term.parentheses.disjunction; - ASSERT(term.quantityCount == 1); + if (op.m_op == OpBodyAlternativeNext) + m_checked += alternative->m_minimumSize; + m_checked -= priorAlternative->m_minimumSize; + break; + } - unsigned preCheckedCount = (term.quantityType == QuantifierFixedCount) ? disjunction->m_minimumSize : 0; + // OpSimpleNestedAlternativeBegin/Next/End + // OpNestedAlternativeBegin/Next/End + // + // These nodes are used to handle sets of alternatives that are nested within + // subpatterns and parenthetical assertions. The 'simple' forms are used where + // we do not need to be able to backtrack back into any alternative other than + // the last, the normal forms allow backtracking into any alternative. + // + // Each Begin/Next node is responsible for planting an input check to ensure + // sufficient input is available on entry. Next nodes additionally need to + // jump to the end - Next nodes use the End node's m_jumps list to hold this + // set of jumps. + // + // In the non-simple forms, successful alternative matches must store a + // 'return address' using a DataLabelPtr, used to store the address to jump + // to when backtracking, to get to the code for the appropriate alternative. + case OpSimpleNestedAlternativeBegin: + case OpNestedAlternativeBegin: { + PatternTerm* term = op.m_term; + PatternAlternative* alternative = op.m_alternative; + PatternDisjunction* disjunction = term->parentheses.disjunction; + + // Calculate how much input we need to check for, and if non-zero check. + op.m_checkAdjust = alternative->m_minimumSize; + if ((term->quantityType == QuantifierFixedCount) && (term->type != PatternTerm::TypeParentheticalAssertion)) + op.m_checkAdjust -= disjunction->m_minimumSize; + if (op.m_checkAdjust) + op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); + + m_checked += op.m_checkAdjust; + break; + } + case OpSimpleNestedAlternativeNext: + case OpNestedAlternativeNext: { + PatternTerm* term = op.m_term; + PatternAlternative* alternative = op.m_alternative; + PatternDisjunction* disjunction = term->parentheses.disjunction; + + // In the non-simple case, store a 'return address' so we can backtrack correctly. + if (op.m_op == OpNestedAlternativeNext) { + unsigned parenthesesFrameLocation = term->frameLocation; + unsigned alternativeFrameLocation = parenthesesFrameLocation; + if (term->quantityType != QuantifierFixedCount) + alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce; + op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation); + } - unsigned parenthesesFrameLocation = term.frameLocation; - unsigned alternativeFrameLocation = parenthesesFrameLocation; - if (term.quantityType != QuantifierFixedCount) - alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce; + // If we reach here then the last alternative has matched - jump to the + // End node, to skip over any further alternatives. + // + // FIXME: this is logically O(N^2) (though N can be expected to be very + // small). We could avoid this either by adding an extra jump to the JIT + // data structures, or by making backtracking code that jumps to Next + // alternatives are responsible for checking that input is available (if + // we didn't need to plant the input checks, then m_jumps would be free). + YarrOp* endOp = &m_ops[op.m_nextOp]; + while (endOp->m_nextOp != notFound) { + ASSERT(endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext); + endOp = &m_ops[endOp->m_nextOp]; + } + ASSERT(endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd); + endOp->m_jumps.append(jump()); + + // This is the entry point for the next alternative. + op.m_reentry = label(); + + // Calculate how much input we need to check for, and if non-zero check. + op.m_checkAdjust = alternative->m_minimumSize; + if ((term->quantityType == QuantifierFixedCount) && (term->type != PatternTerm::TypeParentheticalAssertion)) + op.m_checkAdjust -= disjunction->m_minimumSize; + if (op.m_checkAdjust) + op.m_jumps.append(jumpIfNoAvailableInput(op.m_checkAdjust)); + + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked -= lastOp.m_checkAdjust; + m_checked += op.m_checkAdjust; + break; + } + case OpSimpleNestedAlternativeEnd: + case OpNestedAlternativeEnd: { + PatternTerm* term = op.m_term; + + // In the non-simple case, store a 'return address' so we can backtrack correctly. + if (op.m_op == OpNestedAlternativeEnd) { + unsigned parenthesesFrameLocation = term->frameLocation; + unsigned alternativeFrameLocation = parenthesesFrameLocation; + if (term->quantityType != QuantifierFixedCount) + alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce; + op.m_returnAddress = storeToFrameWithPatch(alternativeFrameLocation); + } - // optimized case - no capture & no quantifier can be handled in a light-weight manner. - if (!term.capture() && (term.quantityType == QuantifierFixedCount)) { - m_expressionState.incrementParenNestingLevel(); + // If this set of alternatives contains more than one alternative, + // then the Next nodes will have planted jumps to the End, and added + // them to this node's m_jumps list. + op.m_jumps.link(this); + op.m_jumps.clear(); - TermGenerationState parenthesesState(disjunction, state.checkedTotal); + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked -= lastOp.m_checkAdjust; + break; + } - // Use the current state's jump list for the nested parentheses. - parenthesesState.setJumpListToPriorParen(state.getJumpListToPriorParen()); + // OpParenthesesSubpatternOnceBegin/End + // + // These nodes support (optionally) capturing subpatterns, that have a + // quantity count of 1 (this covers fixed once, and ?/?? quantifiers). + case OpParenthesesSubpatternOnceBegin: { + PatternTerm* term = op.m_term; + unsigned parenthesesFrameLocation = term->frameLocation; + const RegisterID indexTemporary = regT0; + ASSERT(term->quantityCount == 1); + + // Upon entry to a Greedy quantified set of parenthese store the index. + // We'll use this for two purposes: + // - To indicate which iteration we are on of mathing the remainder of + // the expression after the parentheses - the first, including the + // match within the parentheses, or the second having skipped over them. + // - To check for empty matches, which must be rejected. + // + // At the head of a NonGreedy set of parentheses we'll immediately set the + // value on the stack to -1 (indicating a match skipping the subpattern), + // and plant a jump to the end. We'll also plant a label to backtrack to + // to reenter the subpattern later, with a store to set up index on the + // second iteration. + // + // FIXME: for capturing parens, could use the index in the capture array? + if (term->quantityType == QuantifierGreedy) + storeToFrame(index, parenthesesFrameLocation); + else if (term->quantityType == QuantifierNonGreedy) { + storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); + op.m_jumps.append(jump()); + op.m_reentry = label(); + storeToFrame(index, parenthesesFrameLocation); + } - generateParenthesesDisjunction(state.term(), parenthesesState, alternativeFrameLocation); - // this expects that any backtracks back out of the parentheses will be in the - // parenthesesState's m_backTrackJumps vector, and that if they need backtracking - // they will have set an entry point on the parenthesesState's m_backtrackLabel. - BacktrackDestination& parenthesesBacktrack = parenthesesState.getBacktrackDestination(); - BacktrackDestination& stateBacktrack = state.getBacktrackDestination(); + // If the parenthese are capturing, store the starting index value to the + // captures array, offsetting as necessary. + // + // FIXME: could avoid offsetting this value in JIT code, apply + // offsets only afterwards, at the point the results array is + // being accessed. + if (term->capture()) { + int offsetId = term->parentheses.subpatternId << 1; + int inputOffset = term->inputPosition - m_checked; + if (term->quantityType == QuantifierFixedCount) + inputOffset -= term->parentheses.disjunction->m_minimumSize; + if (inputOffset) { + move(index, indexTemporary); + add32(Imm32(inputOffset), indexTemporary); + store32(indexTemporary, Address(output, offsetId * sizeof(int))); + } else + store32(index, Address(output, offsetId * sizeof(int))); + } + break; + } + case OpParenthesesSubpatternOnceEnd: { + PatternTerm* term = op.m_term; + unsigned parenthesesFrameLocation = term->frameLocation; + const RegisterID indexTemporary = regT0; + ASSERT(term->quantityCount == 1); + + // For Greedy/NonGreedy quantified parentheses, we must reject zero length + // matches. If the minimum size is know to be non-zero we need not check. + if (term->quantityType != QuantifierFixedCount && !term->parentheses.disjunction->m_minimumSize) + op.m_jumps.append(branch32(Equal, index, Address(stackPointerRegister, parenthesesFrameLocation * sizeof(void*)))); + + // If the parenthese are capturing, store the ending index value to the + // captures array, offsetting as necessary. + // + // FIXME: could avoid offsetting this value in JIT code, apply + // offsets only afterwards, at the point the results array is + // being accessed. + if (term->capture()) { + int offsetId = (term->parentheses.subpatternId << 1) + 1; + int inputOffset = term->inputPosition - m_checked; + if (inputOffset) { + move(index, indexTemporary); + add32(Imm32(inputOffset), indexTemporary); + store32(indexTemporary, Address(output, offsetId * sizeof(int))); + } else + store32(index, Address(output, offsetId * sizeof(int))); + } - state.propagateBacktrackingFrom(this, parenthesesBacktrack); - stateBacktrack.propagateBacktrackToLabel(parenthesesBacktrack); + // If the parentheses are quantified Greedy then add a label to jump back + // to if get a failed match from after the parentheses. For NonGreedy + // parentheses, link the jump from before the subpattern to here. + if (term->quantityType == QuantifierGreedy) + op.m_reentry = label(); + else if (term->quantityType == QuantifierNonGreedy) { + YarrOp& beginOp = m_ops[op.m_previousOp]; + beginOp.m_jumps.link(this); + } + break; + } - state.setJumpListToPriorParen(parenthesesState.getJumpListToPriorParen()); + // OpParenthesesSubpatternTerminalBegin/End + case OpParenthesesSubpatternTerminalBegin: { + PatternTerm* term = op.m_term; + ASSERT(term->quantityType == QuantifierGreedy); + ASSERT(term->quantityCount == quantifyInfinite); + ASSERT(!term->capture()); - m_expressionState.decrementParenNestingLevel(); - } else { - Jump nonGreedySkipParentheses; - Label nonGreedyTryParentheses; - if (term.quantityType == QuantifierGreedy) - storeToFrame(index, parenthesesFrameLocation); - else if (term.quantityType == QuantifierNonGreedy) { - storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); - nonGreedySkipParentheses = jump(); - nonGreedyTryParentheses = label(); - storeToFrame(index, parenthesesFrameLocation); - } + // Upon entry set a label to loop back to. + op.m_reentry = label(); - // store the match start index - if (term.capture()) { - int inputOffset = state.inputOffset() - preCheckedCount; - if (inputOffset) { - move(index, indexTemporary); - add32(Imm32(inputOffset), indexTemporary); - store32(indexTemporary, Address(output, (term.parentheses.subpatternId << 1) * sizeof(int))); - } else - store32(index, Address(output, (term.parentheses.subpatternId << 1) * sizeof(int))); + // Store the start index of the current match; we need to reject zero + // length matches. + storeToFrame(index, term->frameLocation); + break; } + case OpParenthesesSubpatternTerminalEnd: { + PatternTerm* term = op.m_term; - ParenthesesTail* parenthesesTail = m_expressionState.addParenthesesTail(term, state.getJumpListToPriorParen()); + // Check for zero length matches - if the match is non-zero, then we + // can accept it & loop back up to the head of the subpattern. + YarrOp& beginOp = m_ops[op.m_previousOp]; + branch32(NotEqual, index, Address(stackPointerRegister, term->frameLocation * sizeof(void*)), beginOp.m_reentry); - m_expressionState.incrementParenNestingLevel(); + // Reject the match - backtrack back into the subpattern. + op.m_jumps.append(jump()); - TermGenerationState parenthesesState(disjunction, state.checkedTotal); + // This is the entry point to jump to when we stop matching - we will + // do so once the subpattern cannot match any more. + op.m_reentry = label(); + break; + } - // Save the parenthesesTail for backtracking from nested parens to this one. - parenthesesState.setJumpListToPriorParen(&parenthesesTail->m_withinBacktrackJumps); + // OpParentheticalAssertionBegin/End + case OpParentheticalAssertionBegin: { + PatternTerm* term = op.m_term; - // generate the body of the parentheses - generateParenthesesDisjunction(state.term(), parenthesesState, alternativeFrameLocation); + // Store the current index - assertions should not update index, so + // we will need to restore it upon a successful match. + unsigned parenthesesFrameLocation = term->frameLocation; + storeToFrame(index, parenthesesFrameLocation); - // For non-fixed counts, backtrack if we didn't match anything. - if (term.quantityType != QuantifierFixedCount) - parenthesesTail->addAfterParenJump(branch32(Equal, index, Address(stackPointerRegister, (parenthesesFrameLocation * sizeof(void*))))); + // Check + op.m_checkAdjust = m_checked - term->inputPosition; + if (op.m_checkAdjust) + sub32(Imm32(op.m_checkAdjust), index); - // store the match end index - if (term.capture()) { - int inputOffset = state.inputOffset(); - if (inputOffset) { - move(index, indexTemporary); - add32(Imm32(state.inputOffset()), indexTemporary); - store32(indexTemporary, Address(output, ((term.parentheses.subpatternId << 1) + 1) * sizeof(int))); - } else - store32(index, Address(output, ((term.parentheses.subpatternId << 1) + 1) * sizeof(int))); + m_checked -= op.m_checkAdjust; + break; } + case OpParentheticalAssertionEnd: { + PatternTerm* term = op.m_term; + + // Restore the input index value. + unsigned parenthesesFrameLocation = term->frameLocation; + loadFromFrame(parenthesesFrameLocation, index); + + // If inverted, a successful match of the assertion must be treated + // as a failure, so jump to backtracking. + if (term->invert()) { + op.m_jumps.append(jump()); + op.m_reentry = label(); + } - m_expressionState.decrementParenNestingLevel(); - - parenthesesTail->processBacktracks(this, state, parenthesesState, nonGreedyTryParentheses, label()); + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked += lastOp.m_checkAdjust; + break; + } - state.setJumpListToPriorParen(&parenthesesTail->m_afterBacktrackJumps); - - parenthesesState.getBacktrackDestination().clear(); + case OpMatchFailed: + if (m_pattern.m_body->m_callFrameSize) + addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); + move(TrustedImm32(-1), returnRegister); + generateReturn(); + break; + } - if (term.quantityType == QuantifierNonGreedy) - nonGreedySkipParentheses.link(this); - } + ++opIndex; + } while (opIndex < m_ops.size()); } - void generateParenthesesGreedyNoBacktrack(TermGenerationState& state) + void backtrack() { - PatternTerm& parenthesesTerm = state.term(); - PatternDisjunction* disjunction = parenthesesTerm.parentheses.disjunction; - ASSERT(parenthesesTerm.type == PatternTerm::TypeParenthesesSubpattern); - ASSERT(parenthesesTerm.quantityCount != 1); // Handled by generateParenthesesSingle. + // Backwards generate the backtracking code. + size_t opIndex = m_ops.size(); + ASSERT(opIndex); - TermGenerationState parenthesesState(disjunction, state.checkedTotal); + do { + --opIndex; + YarrOp& op = m_ops[opIndex]; + switch (op.m_op) { - Label matchAgain(this); + case OpTerm: + backtrackTerm(opIndex); + break; - storeToFrame(index, parenthesesTerm.frameLocation); // Save the current index to check for zero len matches later. + // OpBodyAlternativeBegin/Next/End + // + // For each Begin/Next node representing an alternative, we need to decide what to do + // in two circumstances: + // - If we backtrack back into this node, from within the alternative. + // - If the input check at the head of the alternative fails (if this exists). + // + // We treat these two cases differently since in the former case we have slightly + // more information - since we are backtracking out of a prior alternative we know + // that at least enough input was available to run it. For example, given the regular + // expression /a|b/, if we backtrack out of the first alternative (a failed pattern + // character match of 'a'), then we need not perform an additional input availability + // check before running the second alternative. + // + // Backtracking required differs for the last alternative, which in the case of the + // repeating set of alternatives must loop. The code generated for the last alternative + // will also be used to handle all input check failures from any prior alternatives - + // these require similar functionality, in seeking the next available alternative for + // which there is sufficient input. + // + // Since backtracking of all other alternatives simply requires us to link backtracks + // to the reentry point for the subsequent alternative, we will only be generating any + // code when backtracking the last alternative. + case OpBodyAlternativeBegin: + case OpBodyAlternativeNext: { + PatternAlternative* alternative = op.m_alternative; + + if (op.m_op == OpBodyAlternativeNext) { + PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; + m_checked += priorAlternative->m_minimumSize; + } + m_checked -= alternative->m_minimumSize; - for (parenthesesState.resetAlternative(); parenthesesState.alternativeValid(); parenthesesState.nextAlternative()) { + // Is this the last alternative? If not, then if we backtrack to this point we just + // need to jump to try to match the next alternative. + if (m_ops[op.m_nextOp].m_op != OpBodyAlternativeEnd) { + m_backtrackingState.linkTo(m_ops[op.m_nextOp].m_reentry, this); + break; + } + YarrOp& endOp = m_ops[op.m_nextOp]; - PatternAlternative* alternative = parenthesesState.alternative(); - optimizeAlternative(alternative); + YarrOp* beginOp = &op; + while (beginOp->m_op != OpBodyAlternativeBegin) { + ASSERT(beginOp->m_op == OpBodyAlternativeNext); + beginOp = &m_ops[beginOp->m_previousOp]; + } - int countToCheck = alternative->m_minimumSize; - if (countToCheck) { - parenthesesState.addBacktrackJump(jumpIfNoAvailableInput(countToCheck)); - parenthesesState.checkedTotal += countToCheck; - } + bool onceThrough = endOp.m_nextOp == notFound; + + // First, generate code to handle cases where we backtrack out of an attempted match + // of the last alternative. If this is a 'once through' set of alternatives then we + // have nothing to do - link this straight through to the End. + if (onceThrough) + m_backtrackingState.linkTo(endOp.m_reentry, this); + else { + // Okay, we're going to need to loop. Calculate the delta between where the input + // position was, and where we want it to be allowing for the fact that we need to + // increment by 1. E.g. for the regexp /a|x/ we need to increment the position by + // 1 between loop iterations, but for /abcd|xyz/ we need to increment by two when + // looping from the last alternative to the first, for /a|xyz/ we need to decrement + // by 1, and for /a|xy/ we don't need to move the input position at all. + int deltaLastAlternativeToFirstAlternativePlusOne = (beginOp->m_alternative->m_minimumSize - alternative->m_minimumSize) + 1; + + // If we don't need to move the input poistion, and the pattern has a fixed size + // (in which case we omit the store of the start index until the pattern has matched) + // then we can just link the backtrack out of the last alternative straight to the + // head of the first alternative. + if (!deltaLastAlternativeToFirstAlternativePlusOne && m_pattern.m_body->m_hasFixedSize) + m_backtrackingState.linkTo(beginOp->m_reentry, this); + else { + // We need to generate a trampoline of code to execute before looping back + // around to the first alternative. + m_backtrackingState.link(this); + + // If the pattern size is not fixed, then store the start index, for use if we match. + if (!m_pattern.m_body->m_hasFixedSize) { + if (alternative->m_minimumSize == 1) + store32(index, Address(output)); + else { + move(index, regT0); + if (alternative->m_minimumSize) + sub32(Imm32(alternative->m_minimumSize - 1), regT0); + else + add32(Imm32(1), regT0); + store32(regT0, Address(output)); + } + } + + if (deltaLastAlternativeToFirstAlternativePlusOne) + add32(Imm32(deltaLastAlternativeToFirstAlternativePlusOne), index); + + // Loop. Since this code is only reached when we backtrack out of the last + // alternative (and NOT linked to from the input check upon entry to the + // last alternative) we know that there must be at least enough input as + // required by the last alternative. As such, we only need to check if the + // first will require more to run - if the same or less is required we can + // unconditionally jump. + if (deltaLastAlternativeToFirstAlternativePlusOne > 0) + checkInput().linkTo(beginOp->m_reentry, this); + else + jump(beginOp->m_reentry); + } + } - for (parenthesesState.resetTerm(); parenthesesState.termValid(); parenthesesState.nextTerm()) - generateTerm(parenthesesState); + // We can reach this point in the code in two ways: + // - Fallthrough from the code above (a repeating alternative backtracked out of its + // last alternative, and did not have sufficent input to run the first). + // - We will loop back up to the following label when a releating alternative loops, + // following a failed input check. + // + // Either way, we have just failed the input check for the first alternative. + Label firstInputCheckFailed(this); + + // Generate code to handle input check failures from alternatives except the last. + // prevOp is the alternative we're handling a bail out from (initially Begin), and + // nextOp is the alternative we will be attempting to reenter into. + // + // We will link input check failures from the forwards matching path back to the code + // that can handle them. + YarrOp* prevOp = beginOp; + YarrOp* nextOp = &m_ops[beginOp->m_nextOp]; + while (nextOp->m_op != OpBodyAlternativeEnd) { + prevOp->m_jumps.link(this); + + int delta = nextOp->m_alternative->m_minimumSize - prevOp->m_alternative->m_minimumSize; + if (delta) + add32(Imm32(delta), index); + + // We only get here if an input check fails, it is only worth checking again + // if the next alternative has a minimum size less than the last. + if (delta < 0) { + // FIXME: if we added an extra label to YarrOp, we could avoid needing to + // subtract delta back out, and reduce this code. Should performance test + // the benefit of this. + Jump fail = jumpIfNoAvailableInput(); + sub32(Imm32(delta), index); + jump(nextOp->m_reentry); + fail.link(this); + } + prevOp = nextOp; + nextOp = &m_ops[nextOp->m_nextOp]; + } - // If we get here, we matched! If the index advanced then try to match more since limit isn't supported yet. - branch32(NotEqual, index, Address(stackPointerRegister, (parenthesesTerm.frameLocation * sizeof(void*))), matchAgain); + // We fall through to here if there is insufficient input to run the last alternative. - // If we get here we matched, but we matched "" - cannot accept this alternative as is, so either backtrack, - // or fall through to try the next alternative if no backtrack is available. - parenthesesState.plantJumpToBacktrackIfExists(this); + // If there is insufficient input to run the last alternative, then for 'once through' + // alternatives we are done - just jump back up into the forwards matching path at the End. + if (onceThrough) { + op.m_jumps.linkTo(endOp.m_reentry, this); + jump(endOp.m_reentry); + break; + } - parenthesesState.linkAlternativeBacktracks(this); + // For repeating alternatives, link any input check failure from the last alternative to + // this point. + op.m_jumps.link(this); - // We get here if the alternative fails to match - fall through to the next iteration, or out of the loop. + bool needsToUpdateMatchStart = !m_pattern.m_body->m_hasFixedSize; - if (countToCheck) { - sub32(Imm32(countToCheck), index); - parenthesesState.checkedTotal -= countToCheck; - } - } + // Check for cases where input position is already incremented by 1 for the last + // alternative (this is particularly useful where the minimum size of the body + // disjunction is 0, e.g. /a*|b/). + if (needsToUpdateMatchStart && alternative->m_minimumSize == 1) { + // index is already incremented by 1, so just store it now! + store32(index, Address(output)); + needsToUpdateMatchStart = false; + } - // If the last alternative falls through to here, we have a failed match... - // Which means that we match whatever we have matched up to this point (even if nothing). - } + // Check whether there is sufficient input to loop. Increment the input position by + // one, and check. Also add in the minimum disjunction size before checking - there + // is no point in looping if we're just going to fail all the input checks around + // the next iteration. + int deltaLastAlternativeToBodyMinimumPlusOne = (m_pattern.m_body->m_minimumSize + 1) - alternative->m_minimumSize; + if (deltaLastAlternativeToBodyMinimumPlusOne) + add32(Imm32(deltaLastAlternativeToBodyMinimumPlusOne), index); + Jump matchFailed = jumpIfNoAvailableInput(); + + if (needsToUpdateMatchStart) { + if (!m_pattern.m_body->m_minimumSize) + store32(index, Address(output)); + else { + move(index, regT0); + sub32(Imm32(m_pattern.m_body->m_minimumSize), regT0); + store32(regT0, Address(output)); + } + } - void generateParentheticalAssertion(TermGenerationState& state) - { - PatternTerm& term = state.term(); - PatternDisjunction* disjunction = term.parentheses.disjunction; - ASSERT(term.quantityCount == 1); - ASSERT(term.quantityType == QuantifierFixedCount); + // Calculate how much more input the first alternative requires than the minimum + // for the body as a whole. If no more is needed then we dont need an additional + // input check here - jump straight back up to the start of the first alternative. + int deltaBodyMinimumToFirstAlternative = beginOp->m_alternative->m_minimumSize - m_pattern.m_body->m_minimumSize; + if (!deltaBodyMinimumToFirstAlternative) + jump(beginOp->m_reentry); + else { + add32(Imm32(deltaBodyMinimumToFirstAlternative), index); + checkInput().linkTo(beginOp->m_reentry, this); + jump(firstInputCheckFailed); + } - unsigned parenthesesFrameLocation = term.frameLocation; - unsigned alternativeFrameLocation = parenthesesFrameLocation + YarrStackSpaceForBackTrackInfoParentheticalAssertion; + // We jump to here if we iterate to the point that there is insufficient input to + // run any matches, and need to return a failure state from JIT code. + matchFailed.link(this); - int countCheckedAfterAssertion = state.checkedTotal - term.inputPosition; + if (m_pattern.m_body->m_callFrameSize) + addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); + move(TrustedImm32(-1), returnRegister); + generateReturn(); + break; + } + case OpBodyAlternativeEnd: { + // We should never backtrack back into a body disjunction. + ASSERT(m_backtrackingState.isEmpty()); - if (term.invert()) { - // Inverted case - storeToFrame(index, parenthesesFrameLocation); + PatternAlternative* priorAlternative = m_ops[op.m_previousOp].m_alternative; + m_checked += priorAlternative->m_minimumSize; + break; + } - state.checkedTotal -= countCheckedAfterAssertion; - if (countCheckedAfterAssertion) - sub32(Imm32(countCheckedAfterAssertion), index); + // OpSimpleNestedAlternativeBegin/Next/End + // OpNestedAlternativeBegin/Next/End + // + // Generate code for when we backtrack back out of an alternative into + // a Begin or Next node, or when the entry input count check fails. If + // there are more alternatives we need to jump to the next alternative, + // if not we backtrack back out of the current set of parentheses. + // + // In the case of non-simple nested assertions we need to also link the + // 'return address' appropriately to backtrack back out into the correct + // alternative. + case OpSimpleNestedAlternativeBegin: + case OpSimpleNestedAlternativeNext: + case OpNestedAlternativeBegin: + case OpNestedAlternativeNext: { + YarrOp& nextOp = m_ops[op.m_nextOp]; + bool isBegin = op.m_previousOp == notFound; + bool isLastAlternative = nextOp.m_nextOp == notFound; + ASSERT(isBegin == (op.m_op == OpSimpleNestedAlternativeBegin || op.m_op == OpNestedAlternativeBegin)); + ASSERT(isLastAlternative == (nextOp.m_op == OpSimpleNestedAlternativeEnd || nextOp.m_op == OpNestedAlternativeEnd)); + + // Treat an input check failure the same as a failed match. + m_backtrackingState.append(op.m_jumps); + + // Set the backtracks to jump to the appropriate place. We may need + // to link the backtracks in one of three different way depending on + // the type of alternative we are dealing with: + // - A single alternative, with no simplings. + // - The last alternative of a set of two or more. + // - An alternative other than the last of a set of two or more. + // + // In the case of a single alternative on its own, we don't need to + // jump anywhere - if the alternative fails to match we can just + // continue to backtrack out of the parentheses without jumping. + // + // In the case of the last alternative in a set of more than one, we + // need to jump to return back out to the beginning. We'll do so by + // adding a jump to the End node's m_jumps list, and linking this + // when we come to generate the Begin node. For alternatives other + // than the last, we need to jump to the next alternative. + // + // If the alternative had adjusted the input position we must link + // backtracking to here, correct, and then jump on. If not we can + // link the backtracks directly to their destination. + if (op.m_checkAdjust) { + // Handle the cases where we need to link the backtracks here. + m_backtrackingState.link(this); + sub32(Imm32(op.m_checkAdjust), index); + if (!isLastAlternative) { + // An alternative that is not the last should jump to its successor. + jump(nextOp.m_reentry); + } else if (!isBegin) { + // The last of more than one alternatives must jump back to the begnning. + nextOp.m_jumps.append(jump()); + } else { + // A single alternative on its own can fall through. + m_backtrackingState.fallthrough(); + } + } else { + // Handle the cases where we can link the backtracks directly to their destinations. + if (!isLastAlternative) { + // An alternative that is not the last should jump to its successor. + m_backtrackingState.linkTo(nextOp.m_reentry, this); + } else if (!isBegin) { + // The last of more than one alternatives must jump back to the begnning. + m_backtrackingState.takeBacktracksToJumpList(nextOp.m_jumps, this); + } + // In the case of a single alternative on its own do nothing - it can fall through. + } - TermGenerationState parenthesesState(disjunction, state.checkedTotal); - generateParenthesesDisjunction(state.term(), parenthesesState, alternativeFrameLocation); - // Success! - which means - Fail! - loadFromFrame(parenthesesFrameLocation, index); - state.jumpToBacktrack(this); + // At this point we've handled the backtracking back into this node. + // Now link any backtracks that need to jump to here. + + // For non-simple alternatives, link the alternative's 'return address' + // so that we backtrack back out into the previous alternative. + if (op.m_op == OpNestedAlternativeNext) + m_backtrackingState.append(op.m_returnAddress); + + // If there is more than one alternative, then the last alternative will + // have planted a jump to be linked to the end. This jump was added to the + // End node's m_jumps list. If we are back at the beginning, link it here. + if (isBegin) { + YarrOp* endOp = &m_ops[op.m_nextOp]; + while (endOp->m_nextOp != notFound) { + ASSERT(endOp->m_op == OpSimpleNestedAlternativeNext || endOp->m_op == OpNestedAlternativeNext); + endOp = &m_ops[endOp->m_nextOp]; + } + ASSERT(endOp->m_op == OpSimpleNestedAlternativeEnd || endOp->m_op == OpNestedAlternativeEnd); + m_backtrackingState.append(endOp->m_jumps); + } - // And fail means success. - parenthesesState.linkAlternativeBacktracks(this); + if (!isBegin) { + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked += lastOp.m_checkAdjust; + } + m_checked -= op.m_checkAdjust; + break; + } + case OpSimpleNestedAlternativeEnd: + case OpNestedAlternativeEnd: { + PatternTerm* term = op.m_term; + + // If we backtrack into the end of a simple subpattern do nothing; + // just continue through into the last alternative. If we backtrack + // into the end of a non-simple set of alterntives we need to jump + // to the backtracking return address set up during generation. + if (op.m_op == OpNestedAlternativeEnd) { + m_backtrackingState.link(this); + + // Plant a jump to the return address. + unsigned parenthesesFrameLocation = term->frameLocation; + unsigned alternativeFrameLocation = parenthesesFrameLocation; + if (term->quantityType != QuantifierFixedCount) + alternativeFrameLocation += YarrStackSpaceForBackTrackInfoParenthesesOnce; + loadFromFrameAndJump(alternativeFrameLocation); + + // Link the DataLabelPtr associated with the end of the last + // alternative to this point. + m_backtrackingState.append(op.m_returnAddress); + } - loadFromFrame(parenthesesFrameLocation, index); + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked += lastOp.m_checkAdjust; + break; + } - state.checkedTotal += countCheckedAfterAssertion; - } else { - // Normal case - storeToFrame(index, parenthesesFrameLocation); + // OpParenthesesSubpatternOnceBegin/End + // + // When we are backtracking back out of a capturing subpattern we need + // to clear the start index in the matches output array, to record that + // this subpattern has not been captured. + // + // When backtracking back out of a Greedy quantified subpattern we need + // to catch this, and try running the remainder of the alternative after + // the subpattern again, skipping the parentheses. + // + // Upon backtracking back into a quantified set of parentheses we need to + // check whether we were currently skipping the subpattern. If not, we + // can backtrack into them, if we were we need to either backtrack back + // out of the start of the parentheses, or jump back to the forwards + // matching start, depending of whether the match is Greedy or NonGreedy. + case OpParenthesesSubpatternOnceBegin: { + PatternTerm* term = op.m_term; + ASSERT(term->quantityCount == 1); + + // We only need to backtrack to thispoint if capturing or greedy. + if (term->capture() || term->quantityType == QuantifierGreedy) { + m_backtrackingState.link(this); + + // If capturing, clear the capture (we only need to reset start). + if (term->capture()) + store32(TrustedImm32(-1), Address(output, (term->parentheses.subpatternId << 1) * sizeof(int))); + + // If Greedy, jump to the end. + if (term->quantityType == QuantifierGreedy) { + // Clear the flag in the stackframe indicating we ran through the subpattern. + unsigned parenthesesFrameLocation = term->frameLocation; + storeToFrame(TrustedImm32(-1), parenthesesFrameLocation); + // Jump to after the parentheses, skipping the subpattern. + jump(m_ops[op.m_nextOp].m_reentry); + // A backtrack from after the parentheses, when skipping the subpattern, + // will jump back to here. + op.m_jumps.link(this); + } - state.checkedTotal -= countCheckedAfterAssertion; - if (countCheckedAfterAssertion) - sub32(Imm32(countCheckedAfterAssertion), index); + m_backtrackingState.fallthrough(); + } + break; + } + case OpParenthesesSubpatternOnceEnd: { + PatternTerm* term = op.m_term; + + if (term->quantityType != QuantifierFixedCount) { + m_backtrackingState.link(this); + + // Check whether we should backtrack back into the parentheses, or if we + // are currently in a state where we had skipped over the subpattern + // (in which case the flag value on the stack will be -1). + unsigned parenthesesFrameLocation = term->frameLocation; + Jump hadSkipped = branch32(Equal, Address(stackPointerRegister, parenthesesFrameLocation * sizeof(void*)), TrustedImm32(-1)); + + if (term->quantityType == QuantifierGreedy) { + // For Greedy parentheses, we skip after having already tried going + // through the subpattern, so if we get here we're done. + YarrOp& beginOp = m_ops[op.m_previousOp]; + beginOp.m_jumps.append(hadSkipped); + } else { + // For NonGreedy parentheses, we try skipping the subpattern first, + // so if we get here we need to try running through the subpattern + // next. Jump back to the start of the parentheses in the forwards + // matching path. + ASSERT(term->quantityType == QuantifierNonGreedy); + YarrOp& beginOp = m_ops[op.m_previousOp]; + hadSkipped.linkTo(beginOp.m_reentry, this); + } - TermGenerationState parenthesesState(disjunction, state.checkedTotal); - generateParenthesesDisjunction(state.term(), parenthesesState, alternativeFrameLocation); - // Success! - which means - Success! - loadFromFrame(parenthesesFrameLocation, index); - Jump success = jump(); + m_backtrackingState.fallthrough(); + } - parenthesesState.linkAlternativeBacktracks(this); + m_backtrackingState.append(op.m_jumps); + break; + } - loadFromFrame(parenthesesFrameLocation, index); - state.jumpToBacktrack(this); + // OpParenthesesSubpatternTerminalBegin/End + // + // Terminal subpatterns will always match - there is nothing after them to + // force a backtrack, and they have a minimum count of 0, and as such will + // always produce an acceptable result. + case OpParenthesesSubpatternTerminalBegin: { + // We will backtrack to this point once the subpattern cannot match any + // more. Since no match is accepted as a successful match (we are Greedy + // quantified with a minimum of zero) jump back to the forwards matching + // path at the end. + YarrOp& endOp = m_ops[op.m_nextOp]; + m_backtrackingState.linkTo(endOp.m_reentry, this); + break; + } + case OpParenthesesSubpatternTerminalEnd: + // We should never be backtracking to here (hence the 'terminal' in the name). + ASSERT(m_backtrackingState.isEmpty()); + m_backtrackingState.append(op.m_jumps); + break; - success.link(this); + // OpParentheticalAssertionBegin/End + case OpParentheticalAssertionBegin: { + PatternTerm* term = op.m_term; + YarrOp& endOp = m_ops[op.m_nextOp]; - state.checkedTotal += countCheckedAfterAssertion; - } - } + // We need to handle the backtracks upon backtracking back out + // of a parenthetical assertion if either we need to correct + // the input index, or the assertion was inverted. + if (op.m_checkAdjust || term->invert()) { + m_backtrackingState.link(this); - void generateTerm(TermGenerationState& state) - { - PatternTerm& term = state.term(); + if (op.m_checkAdjust) + add32(Imm32(op.m_checkAdjust), index); - switch (term.type) { - case PatternTerm::TypeAssertionBOL: - generateAssertionBOL(state); - break; + // In an inverted assertion failure to match the subpattern + // is treated as a successful match - jump to the end of the + // subpattern. We already have adjusted the input position + // back to that before the assertion, which is correct. + if (term->invert()) + jump(endOp.m_reentry); - case PatternTerm::TypeAssertionEOL: - generateAssertionEOL(state); - break; + m_backtrackingState.fallthrough(); + } - case PatternTerm::TypeAssertionWordBoundary: - generateAssertionWordBoundary(state); - break; + // The End node's jump list will contain any backtracks into + // the end of the assertion. Also, if inverted, we will have + // added the failure caused by a successful match to this. + m_backtrackingState.append(endOp.m_jumps); - case PatternTerm::TypePatternCharacter: - switch (term.quantityType) { - case QuantifierFixedCount: - if (term.quantityCount == 1) { - if (state.isSinglePatternCharacterLookaheadTerm() && (state.lookaheadTerm().inputPosition == (term.inputPosition + 1))) { - generatePatternCharacterPair(state); - state.nextTerm(); - } else - generatePatternCharacterSingle(state); - } else - generatePatternCharacterFixed(state); - break; - case QuantifierGreedy: - generatePatternCharacterGreedy(state); - break; - case QuantifierNonGreedy: - generatePatternCharacterNonGreedy(state); + m_checked += op.m_checkAdjust; break; } - break; + case OpParentheticalAssertionEnd: { + // FIXME: We should really be clearing any nested subpattern + // matches on bailing out from after the pattern. Firefox has + // this bug too (presumably because they use YARR!) - case PatternTerm::TypeCharacterClass: - switch (term.quantityType) { - case QuantifierFixedCount: - if (term.quantityCount == 1) - generateCharacterClassSingle(state); - else - generateCharacterClassFixed(state); - break; - case QuantifierGreedy: - generateCharacterClassGreedy(state); - break; - case QuantifierNonGreedy: - generateCharacterClassNonGreedy(state); + // Never backtrack into an assertion; later failures bail to before the begin. + m_backtrackingState.takeBacktracksToJumpList(op.m_jumps, this); + + YarrOp& lastOp = m_ops[op.m_previousOp]; + m_checked -= lastOp.m_checkAdjust; break; } - break; - case PatternTerm::TypeBackReference: - m_shouldFallBack = true; - break; - - case PatternTerm::TypeForwardReference: - break; - - case PatternTerm::TypeParenthesesSubpattern: - if (term.quantityCount == 1 && !term.parentheses.isCopy) - generateParenthesesSingle(state); - else if (term.parentheses.isTerminal) - generateParenthesesGreedyNoBacktrack(state); - else - m_shouldFallBack = true; - break; + case OpMatchFailed: + break; + } - case PatternTerm::TypeParentheticalAssertion: - generateParentheticalAssertion(state); - break; - } + } while (opIndex); } - void generateDisjunction(PatternDisjunction* disjunction) + // Compilation methods: + // ==================== + + // opCompileParenthesesSubpattern + // Emits ops for a subpattern (set of parentheses). These consist + // of a set of alternatives wrapped in an outer set of nodes for + // the parentheses. + // Supported types of parentheses are 'Once' (quantityCount == 1) + // and 'Terminal' (non-capturing parentheses quantified as greedy + // and infinite). + // Alternatives will use the 'Simple' set of ops if either the + // subpattern is terminal (in which case we will never need to + // backtrack), or if the subpattern only contains one alternative. + void opCompileParenthesesSubpattern(PatternTerm* term) { - TermGenerationState state(disjunction, 0); - state.resetAlternative(); - - // check availability for the next alternative - int countCheckedForCurrentAlternative = 0; - int countToCheckForFirstAlternative = 0; - bool hasShorterAlternatives = false; - bool setRepeatAlternativeLabels = false; - JumpList notEnoughInputForPreviousAlternative; - Label firstAlternative; - Label firstAlternativeInputChecked; - - // The label 'firstAlternative' is used to plant a check to see if there is - // sufficient input available to run the first repeating alternative. - // The label 'firstAlternativeInputChecked' will jump directly to matching - // the first repeating alternative having skipped this check. - - if (state.alternativeValid()) { - PatternAlternative* alternative = state.alternative(); - if (!alternative->onceThrough()) { - firstAlternative = Label(this); - setRepeatAlternativeLabels = true; + YarrOpCode parenthesesBeginOpCode; + YarrOpCode parenthesesEndOpCode; + YarrOpCode alternativeBeginOpCode = OpSimpleNestedAlternativeBegin; + YarrOpCode alternativeNextOpCode = OpSimpleNestedAlternativeNext; + YarrOpCode alternativeEndOpCode = OpSimpleNestedAlternativeEnd; + + // We can currently only compile quantity 1 subpatterns that are + // not copies. We generate a copy in the case of a range quantifier, + // e.g. /(?:x){3,9}/, or /(?:x)+/ (These are effectively expanded to + // /(?:x){3,3}(?:x){0,6}/ and /(?:x)(?:x)*/ repectively). The problem + // comes where the subpattern is capturing, in which case we would + // need to restore the capture from the first subpattern upon a + // failure in the second. + if (term->quantityCount == 1 && !term->parentheses.isCopy) { + // Select the 'Once' nodes. + parenthesesBeginOpCode = OpParenthesesSubpatternOnceBegin; + parenthesesEndOpCode = OpParenthesesSubpatternOnceEnd; + + // If there is more than one alternative we cannot use the 'simple' nodes. + if (term->parentheses.disjunction->m_alternatives.size() != 1) { + alternativeBeginOpCode = OpNestedAlternativeBegin; + alternativeNextOpCode = OpNestedAlternativeNext; + alternativeEndOpCode = OpNestedAlternativeEnd; } - countToCheckForFirstAlternative = alternative->m_minimumSize; - state.checkedTotal += countToCheckForFirstAlternative; - if (countToCheckForFirstAlternative) - notEnoughInputForPreviousAlternative.append(jumpIfNoAvailableInput(countToCheckForFirstAlternative)); - countCheckedForCurrentAlternative = countToCheckForFirstAlternative; + } else if (term->parentheses.isTerminal) { + // Select the 'Terminal' nodes. + parenthesesBeginOpCode = OpParenthesesSubpatternTerminalBegin; + parenthesesEndOpCode = OpParenthesesSubpatternTerminalEnd; + } else { + // This subpattern is not supported by the JIT. + m_shouldFallBack = true; + return; } - if (setRepeatAlternativeLabels) - firstAlternativeInputChecked = Label(this); - - while (state.alternativeValid()) { - PatternAlternative* alternative = state.alternative(); - optimizeAlternative(alternative); + size_t parenBegin = m_ops.size(); + m_ops.append(parenthesesBeginOpCode); - // Track whether any alternatives are shorter than the first one. - if (!alternative->onceThrough()) - hasShorterAlternatives = hasShorterAlternatives || (countCheckedForCurrentAlternative < countToCheckForFirstAlternative); + m_ops.append(alternativeBeginOpCode); + m_ops.last().m_previousOp = notFound; + m_ops.last().m_term = term; + Vector<PatternAlternative*>& alternatives = term->parentheses.disjunction->m_alternatives; + for (unsigned i = 0; i < alternatives.size(); ++i) { + size_t lastOpIndex = m_ops.size() - 1; - for (state.resetTerm(); state.termValid(); state.nextTerm()) - generateTerm(state); + PatternAlternative* nestedAlternative = alternatives[i]; + opCompileAlternative(nestedAlternative); - // If we get here, the alternative matched. - if (m_pattern.m_body->m_callFrameSize) - addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); + size_t thisOpIndex = m_ops.size(); + m_ops.append(YarrOp(alternativeNextOpCode)); - ASSERT(index != returnRegister); - if (m_pattern.m_body->m_hasFixedSize) { - move(index, returnRegister); - if (alternative->m_minimumSize) - sub32(Imm32(alternative->m_minimumSize), returnRegister); - - store32(returnRegister, output); - } else - load32(Address(output), returnRegister); + YarrOp& lastOp = m_ops[lastOpIndex]; + YarrOp& thisOp = m_ops[thisOpIndex]; - store32(index, Address(output, 4)); - - generateReturn(); - - state.nextAlternative(); - if (alternative->onceThrough() && state.alternativeValid()) - state.clearBacktrack(); - - // if there are any more alternatives, plant the check for input before looping. - if (state.alternativeValid()) { - state.setJumpListToPriorParen(0); - PatternAlternative* nextAlternative = state.alternative(); - if (!setRepeatAlternativeLabels && !nextAlternative->onceThrough()) { - // We have handled non-repeating alternatives, jump to next iteration - // and loop over repeating alternatives. - state.jumpToBacktrack(this); - - countToCheckForFirstAlternative = nextAlternative->m_minimumSize; + lastOp.m_alternative = nestedAlternative; + lastOp.m_nextOp = thisOpIndex; + thisOp.m_previousOp = lastOpIndex; + thisOp.m_term = term; + } + YarrOp& lastOp = m_ops.last(); + ASSERT(lastOp.m_op == alternativeNextOpCode); + lastOp.m_op = alternativeEndOpCode; + lastOp.m_alternative = 0; + lastOp.m_nextOp = notFound; - // If we get here, there the last input checked failed. - notEnoughInputForPreviousAlternative.link(this); + size_t parenEnd = m_ops.size(); + m_ops.append(parenthesesEndOpCode); - state.linkAlternativeBacktracks(this); + m_ops[parenBegin].m_term = term; + m_ops[parenBegin].m_previousOp = notFound; + m_ops[parenBegin].m_nextOp = parenEnd; + m_ops[parenEnd].m_term = term; + m_ops[parenEnd].m_previousOp = parenBegin; + m_ops[parenEnd].m_nextOp = notFound; + } - // Back up to start the looping alternatives. - if (countCheckedForCurrentAlternative) - sub32(Imm32(countCheckedForCurrentAlternative), index); + // opCompileParentheticalAssertion + // Emits ops for a parenthetical assertion. These consist of an + // OpSimpleNestedAlternativeBegin/Next/End set of nodes wrapping + // the alternatives, with these wrapped by an outer pair of + // OpParentheticalAssertionBegin/End nodes. + // We can always use the OpSimpleNestedAlternative nodes in the + // case of parenthetical assertions since these only ever match + // once, and will never backtrack back into the assertion. + void opCompileParentheticalAssertion(PatternTerm* term) + { + size_t parenBegin = m_ops.size(); + m_ops.append(OpParentheticalAssertionBegin); + + m_ops.append(OpSimpleNestedAlternativeBegin); + m_ops.last().m_previousOp = notFound; + m_ops.last().m_term = term; + Vector<PatternAlternative*>& alternatives = term->parentheses.disjunction->m_alternatives; + for (unsigned i = 0; i < alternatives.size(); ++i) { + size_t lastOpIndex = m_ops.size() - 1; + + PatternAlternative* nestedAlternative = alternatives[i]; + opCompileAlternative(nestedAlternative); + + size_t thisOpIndex = m_ops.size(); + m_ops.append(YarrOp(OpSimpleNestedAlternativeNext)); + + YarrOp& lastOp = m_ops[lastOpIndex]; + YarrOp& thisOp = m_ops[thisOpIndex]; + + lastOp.m_alternative = nestedAlternative; + lastOp.m_nextOp = thisOpIndex; + thisOp.m_previousOp = lastOpIndex; + thisOp.m_term = term; + } + YarrOp& lastOp = m_ops.last(); + ASSERT(lastOp.m_op == OpSimpleNestedAlternativeNext); + lastOp.m_op = OpSimpleNestedAlternativeEnd; + lastOp.m_alternative = 0; + lastOp.m_nextOp = notFound; + + size_t parenEnd = m_ops.size(); + m_ops.append(OpParentheticalAssertionEnd); + + m_ops[parenBegin].m_term = term; + m_ops[parenBegin].m_previousOp = notFound; + m_ops[parenBegin].m_nextOp = parenEnd; + m_ops[parenEnd].m_term = term; + m_ops[parenEnd].m_previousOp = parenBegin; + m_ops[parenEnd].m_nextOp = notFound; + } - firstAlternative = Label(this); + // opCompileAlternative + // Called to emit nodes for all terms in an alternative. + void opCompileAlternative(PatternAlternative* alternative) + { + optimizeAlternative(alternative); - state.checkedTotal = countToCheckForFirstAlternative; - if (countToCheckForFirstAlternative) - notEnoughInputForPreviousAlternative.append(jumpIfNoAvailableInput(countToCheckForFirstAlternative)); + for (unsigned i = 0; i < alternative->m_terms.size(); ++i) { + PatternTerm* term = &alternative->m_terms[i]; - countCheckedForCurrentAlternative = countToCheckForFirstAlternative; + switch (term->type) { + case PatternTerm::TypeParenthesesSubpattern: + opCompileParenthesesSubpattern(term); + break; - firstAlternativeInputChecked = Label(this); + case PatternTerm::TypeParentheticalAssertion: + opCompileParentheticalAssertion(term); + break; - setRepeatAlternativeLabels = true; - } else { - int countToCheckForNextAlternative = nextAlternative->m_minimumSize; - - if (countCheckedForCurrentAlternative > countToCheckForNextAlternative) { // CASE 1: current alternative was longer than the next one. - // If we get here, then the last input checked failed. - notEnoughInputForPreviousAlternative.link(this); - - // Check if sufficent input available to run the next alternative - notEnoughInputForPreviousAlternative.append(jumpIfNoAvailableInput(countToCheckForNextAlternative - countCheckedForCurrentAlternative)); - // We are now in the correct state to enter the next alternative; this add is only required - // to mirror and revert operation of the sub32, just below. - add32(Imm32(countCheckedForCurrentAlternative - countToCheckForNextAlternative), index); - - // If we get here, then the last input checked passed. - state.linkAlternativeBacktracks(this); - - // No need to check if we can run the next alternative, since it is shorter - - // just update index. - sub32(Imm32(countCheckedForCurrentAlternative - countToCheckForNextAlternative), index); - } else if (countCheckedForCurrentAlternative < countToCheckForNextAlternative) { // CASE 2: next alternative is longer than the current one. - // If we get here, then the last input checked failed. - // If there is insufficient input to run the current alternative, and the next alternative is longer, - // then there is definitely not enough input to run it - don't even check. Just adjust index, as if - // we had checked. - notEnoughInputForPreviousAlternative.link(this); - add32(Imm32(countToCheckForNextAlternative - countCheckedForCurrentAlternative), index); - notEnoughInputForPreviousAlternative.append(jump()); - - // The next alternative is longer than the current one; check the difference. - state.linkAlternativeBacktracks(this); - - notEnoughInputForPreviousAlternative.append(jumpIfNoAvailableInput(countToCheckForNextAlternative - countCheckedForCurrentAlternative)); - } else { // CASE 3: Both alternatives are the same length. - ASSERT(countCheckedForCurrentAlternative == countToCheckForNextAlternative); - - // If the next alterative is the same length as this one, then no need to check the input - - // if there was sufficent input to run the current alternative then there is sufficient - // input to run the next one; if not, there isn't. - state.linkAlternativeBacktracks(this); - } - state.checkedTotal -= countCheckedForCurrentAlternative; - countCheckedForCurrentAlternative = countToCheckForNextAlternative; - state.checkedTotal += countCheckedForCurrentAlternative; - } + default: + m_ops.append(term); } } + } - // If we get here, all Alternatives failed... + // opCompileBody + // This method compiles the body disjunction of the regular expression. + // The body consists of two sets of alternatives - zero or more 'once + // through' (BOL anchored) alternatives, followed by zero or more + // repeated alternatives. + // For each of these two sets of alteratives, if not empty they will be + // wrapped in a set of OpBodyAlternativeBegin/Next/End nodes (with the + // 'begin' node referencing the first alternative, and 'next' nodes + // referencing any further alternatives. The begin/next/end nodes are + // linked together in a doubly linked list. In the case of repeating + // alternatives, the end node is also linked back to the beginning. + // If no repeating alternatives exist, then a OpMatchFailed node exists + // to return the failing result. + void opCompileBody(PatternDisjunction* disjunction) + { + Vector<PatternAlternative*>& alternatives = disjunction->m_alternatives; + size_t currentAlternativeIndex = 0; - state.checkedTotal -= countCheckedForCurrentAlternative; + // Emit the 'once through' alternatives. + if (alternatives.size() && alternatives[0]->onceThrough()) { + m_ops.append(YarrOp(OpBodyAlternativeBegin)); + m_ops.last().m_previousOp = notFound; - if (!setRepeatAlternativeLabels) { - // If there are no alternatives that need repeating (all are marked 'onceThrough') then just link - // the match failures to this point, and fall through to the return below. - state.linkAlternativeBacktracks(this, true); + do { + size_t lastOpIndex = m_ops.size() - 1; + PatternAlternative* alternative = alternatives[currentAlternativeIndex]; + opCompileAlternative(alternative); - notEnoughInputForPreviousAlternative.link(this); - } else { - // How much more input need there be to be able to retry from the first alternative? - // examples: - // /yarr_jit/ or /wrec|pcre/ - // In these examples we need check for one more input before looping. - // /yarr_jit|pcre/ - // In this case we need check for 5 more input to loop (+4 to allow for the first alterative - // being four longer than the last alternative checked, and another +1 to effectively move - // the start position along by one). - // /yarr|rules/ or /wrec|notsomuch/ - // In these examples, provided that there was sufficient input to have just been matching for - // the second alternative we can loop without checking for available input (since the second - // alternative is longer than the first). In the latter example we need to decrement index - // (by 4) so the start position is only progressed by 1 from the last iteration. - int incrementForNextIter = (countToCheckForFirstAlternative - countCheckedForCurrentAlternative) + 1; - - // First, deal with the cases where there was sufficient input to try the last alternative. - if (incrementForNextIter > 0) // We need to check for more input anyway, fall through to the checking below. - state.linkAlternativeBacktracks(this, true); - else if (m_pattern.m_body->m_hasFixedSize && !incrementForNextIter) // No need to update anything, link these backtracks straight to the to pof the loop! - state.linkAlternativeBacktracksTo(this, firstAlternativeInputChecked, true); - else { // no need to check the input, but we do have some bookkeeping to do first. - state.linkAlternativeBacktracks(this, true); - - // Where necessary update our preserved start position. - if (!m_pattern.m_body->m_hasFixedSize) { - move(index, regT0); - sub32(Imm32(countCheckedForCurrentAlternative - 1), regT0); - store32(regT0, Address(output)); - } + size_t thisOpIndex = m_ops.size(); + m_ops.append(YarrOp(OpBodyAlternativeNext)); - // Update index if necessary, and loop (without checking). - if (incrementForNextIter) - add32(Imm32(incrementForNextIter), index); - jump().linkTo(firstAlternativeInputChecked, this); - } + YarrOp& lastOp = m_ops[lastOpIndex]; + YarrOp& thisOp = m_ops[thisOpIndex]; - notEnoughInputForPreviousAlternative.link(this); - // Update our idea of the start position, if we're tracking this. - if (!m_pattern.m_body->m_hasFixedSize) { - if (countCheckedForCurrentAlternative - 1) { - move(index, regT0); - sub32(Imm32(countCheckedForCurrentAlternative - 1), regT0); - store32(regT0, Address(output)); - } else - store32(index, Address(output)); - } + lastOp.m_alternative = alternative; + lastOp.m_nextOp = thisOpIndex; + thisOp.m_previousOp = lastOpIndex; + + ++currentAlternativeIndex; + } while (currentAlternativeIndex < alternatives.size() && alternatives[currentAlternativeIndex]->onceThrough()); - // Check if there is sufficent input to run the first alternative again. - jumpIfAvailableInput(incrementForNextIter).linkTo(firstAlternativeInputChecked, this); - // No - insufficent input to run the first alteranative, are there any other alternatives we - // might need to check? If so, the last check will have left the index incremented by - // (countToCheckForFirstAlternative + 1), so we need test whether countToCheckForFirstAlternative - // LESS input is available, to have the effect of just progressing the start position by 1 - // from the last iteration. If this check passes we can just jump up to the check associated - // with the first alternative in the loop. This is a bit sad, since we'll end up trying the - // first alternative again, and this check will fail (otherwise the check planted just above - // here would have passed). This is a bit sad, however it saves trying to do something more - // complex here in compilation, and in the common case we should end up coallescing the checks. - // - // FIXME: a nice improvement here may be to stop trying to match sooner, based on the least - // of the minimum-alternative-lengths. E.g. if I have two alternatives of length 200 and 150, - // and a string of length 100, we'll end up looping index from 0 to 100, checking whether there - // is sufficient input to run either alternative (constantly failing). If there had been only - // one alternative, or if the shorter alternative had come first, we would have terminated - // immediately. :-/ - if (hasShorterAlternatives) - jumpIfAvailableInput(-countToCheckForFirstAlternative).linkTo(firstAlternative, this); - // index will now be a bit garbled (depending on whether 'hasShorterAlternatives' is true, - // it has either been incremented by 1 or by (countToCheckForFirstAlternative + 1) ... - // but since we're about to return a failure this doesn't really matter!) + YarrOp& lastOp = m_ops.last(); + + ASSERT(lastOp.m_op == OpBodyAlternativeNext); + lastOp.m_op = OpBodyAlternativeEnd; + lastOp.m_alternative = 0; + lastOp.m_nextOp = notFound; } - if (m_pattern.m_body->m_callFrameSize) - addPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); + if (currentAlternativeIndex == alternatives.size()) { + m_ops.append(YarrOp(OpMatchFailed)); + return; + } - move(TrustedImm32(-1), returnRegister); + // Emit the repeated alternatives. + size_t repeatLoop = m_ops.size(); + m_ops.append(YarrOp(OpBodyAlternativeBegin)); + m_ops.last().m_previousOp = notFound; + do { + size_t lastOpIndex = m_ops.size() - 1; + PatternAlternative* alternative = alternatives[currentAlternativeIndex]; + ASSERT(!alternative->onceThrough()); + opCompileAlternative(alternative); + + size_t thisOpIndex = m_ops.size(); + m_ops.append(YarrOp(OpBodyAlternativeNext)); - generateReturn(); + YarrOp& lastOp = m_ops[lastOpIndex]; + YarrOp& thisOp = m_ops[thisOpIndex]; - m_expressionState.emitParenthesesTail(this); - m_expressionState.emitIndirectJumpTable(this); - m_expressionState.linkToNextIteration(this); + lastOp.m_alternative = alternative; + lastOp.m_nextOp = thisOpIndex; + thisOp.m_previousOp = lastOpIndex; + + ++currentAlternativeIndex; + } while (currentAlternativeIndex < alternatives.size()); + YarrOp& lastOp = m_ops.last(); + ASSERT(lastOp.m_op == OpBodyAlternativeNext); + lastOp.m_op = OpBodyAlternativeEnd; + lastOp.m_alternative = 0; + lastOp.m_nextOp = repeatLoop; } void generateEnter() @@ -2230,10 +2325,11 @@ public: YarrGenerator(YarrPattern& pattern) : m_pattern(pattern) , m_shouldFallBack(false) + , m_checked(0) { } - void generate() + void compile(JSGlobalData* globalData, YarrCodeBlock& jitObject) { generateEnter(); @@ -2243,26 +2339,50 @@ public: if (m_pattern.m_body->m_callFrameSize) subPtr(Imm32(m_pattern.m_body->m_callFrameSize * sizeof(void*)), stackPointerRegister); - generateDisjunction(m_pattern.m_body); - } - - void compile(JSGlobalData* globalData, YarrCodeBlock& jitObject) - { - generate(); + // Compile the pattern to the internal 'YarrOp' representation. + opCompileBody(m_pattern.m_body); - LinkBuffer patchBuffer(this, globalData->regexAllocator); + // If we encountered anything we can't handle in the JIT code + // (e.g. backreferences) then return early. + if (m_shouldFallBack) { + jitObject.setFallBack(true); + return; + } - for (unsigned i = 0; i < m_expressionState.m_backtrackRecords.size(); ++i) - patchBuffer.patch(m_expressionState.m_backtrackRecords[i].dataLabel, patchBuffer.locationOf(m_expressionState.m_backtrackRecords[i].backtrackLocation)); + generate(); + backtrack(); - jitObject.set(patchBuffer.finalizeCode()); + // Link & finalize the code. + LinkBuffer linkBuffer(this, globalData->regexAllocator); + m_backtrackingState.linkDataLabels(linkBuffer); + jitObject.set(linkBuffer.finalizeCode()); jitObject.setFallBack(m_shouldFallBack); } private: YarrPattern& m_pattern; + + // Used to detect regular expression constructs that are not currently + // supported in the JIT; fall back to the interpreter when this is detected. bool m_shouldFallBack; - GenerationState m_expressionState; + + // The regular expression expressed as a linear sequence of operations. + Vector<YarrOp, 128> m_ops; + + // This records the current input offset being applied due to the current + // set of alternatives we are nested within. E.g. when matching the + // character 'b' within the regular expression /abc/, we will know that + // the minimum size for the alternative is 3, checked upon entry to the + // alternative, and that 'b' is at offset 1 from the start, and as such + // when matching 'b' we need to apply an offset of -2 to the load. + // + // FIXME: This should go away. Rather than tracking this value throughout + // code generation, we should gather this information up front & store it + // on the YarrOp structure. + int m_checked; + + // This class records state whilst generating the backtracking path of code. + BacktrackingState m_backtrackingState; }; void jitCompile(YarrPattern& pattern, JSGlobalData* globalData, YarrCodeBlock& jitObject) diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.cbproj b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.cbproj index 285bb2a..95c3054 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.cbproj +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.cbproj @@ -1,138 +1,138 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid> - <Config Condition="'$(Config)'==''">Release</Config> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> - <Base>true</Base> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''"> - <Base>true</Base> - <Cfg_1>true</Cfg_1> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''"> - <Base>true</Base> - <Cfg_2>true</Cfg_2> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Base)'!=''"> - <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed> - <OutputExt>lib</OutputExt> - <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput> - <Defines>NO_STRICT</Defines> - <DynamicRTL>true</DynamicRTL> - <UsePackages>true</UsePackages> - <ProjectType>CppStaticLibrary</ProjectType> - <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways> - <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports> - <BCC_wpar>false</BCC_wpar> - <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath> - <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs> - <TLIB_PageSize>32</TLIB_PageSize> - <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_1)'!=''"> - <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed> - <DCC_Optimize>false</DCC_Optimize> - <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe> - <Defines>_DEBUG;$(Defines)</Defines> - <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo> - <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion> - <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking> - <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables> - <DCC_Define>DEBUG</DCC_Define> - <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers> - <IntermediateOutputDir>Debug</IntermediateOutputDir> - <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines> - <BCC_StackFrames>true</BCC_StackFrames> - <BCC_DisableOptimizations>true</BCC_DisableOptimizations> - <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>Full</TASM_Debugging> - <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_2)'!=''"> - <Defines>NDEBUG;$(Defines)</Defines> - <IntermediateOutputDir>Release</IntermediateOutputDir> - <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>None</TASM_Debugging> - </PropertyGroup> - <ProjectExtensions> - <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality> - <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType> - <BorlandProject> -<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages> - - - <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages> - <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages> - </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject> - </ProjectExtensions> - <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" /> - <ItemGroup> - <None Include="..\include\gtest\gtest-death-test.h"> - <BuildOrder>3</BuildOrder> - </None> - <None Include="..\include\gtest\gtest-message.h"> - <BuildOrder>4</BuildOrder> - </None> - <None Include="..\include\gtest\gtest-param-test.h"> - <BuildOrder>5</BuildOrder> - </None> - <None Include="..\include\gtest\gtest-spi.h"> - <BuildOrder>6</BuildOrder> - </None> - <None Include="..\include\gtest\gtest-test-part.h"> - <BuildOrder>7</BuildOrder> - </None> - <None Include="..\include\gtest\gtest-typed-test.h"> - <BuildOrder>8</BuildOrder> - </None> - <None Include="..\include\gtest\gtest.h"> - <BuildOrder>0</BuildOrder> - </None> - <None Include="..\include\gtest\gtest_pred_impl.h"> - <BuildOrder>1</BuildOrder> - </None> - <None Include="..\include\gtest\gtest_prod.h"> - <BuildOrder>2</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-death-test-internal.h"> - <BuildOrder>9</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-filepath.h"> - <BuildOrder>10</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-internal.h"> - <BuildOrder>11</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-linked_ptr.h"> - <BuildOrder>12</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-param-util-generated.h"> - <BuildOrder>14</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-param-util.h"> - <BuildOrder>13</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-port.h"> - <BuildOrder>15</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-string.h"> - <BuildOrder>16</BuildOrder> - </None> - <None Include="..\include\gtest\internal\gtest-type-util.h"> - <BuildOrder>17</BuildOrder> - </None> - <CppCompile Include="gtest_all.cc"> - <BuildOrder>18</BuildOrder> - </CppCompile> - <BuildConfiguration Include="Debug"> - <Key>Cfg_1</Key> - </BuildConfiguration> - <BuildConfiguration Include="Release"> - <Key>Cfg_2</Key> - </BuildConfiguration> - </ItemGroup> +<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid>
+ <Config Condition="'$(Config)'==''">Release</Config>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+ <Base>true</Base>
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+ <Base>true</Base>
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
+ <OutputExt>lib</OutputExt>
+ <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
+ <Defines>NO_STRICT</Defines>
+ <DynamicRTL>true</DynamicRTL>
+ <UsePackages>true</UsePackages>
+ <ProjectType>CppStaticLibrary</ProjectType>
+ <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
+ <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports>
+ <BCC_wpar>false</BCC_wpar>
+ <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath>
+ <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
+ <TLIB_PageSize>32</TLIB_PageSize>
+ <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
+ <Defines>_DEBUG;$(Defines)</Defines>
+ <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
+ <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
+ <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
+ <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
+ <DCC_Define>DEBUG</DCC_Define>
+ <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
+ <IntermediateOutputDir>Debug</IntermediateOutputDir>
+ <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
+ <BCC_StackFrames>true</BCC_StackFrames>
+ <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
+ <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>Full</TASM_Debugging>
+ <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <Defines>NDEBUG;$(Defines)</Defines>
+ <IntermediateOutputDir>Release</IntermediateOutputDir>
+ <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>None</TASM_Debugging>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
+ <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType>
+ <BorlandProject>
+<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
+
+
+ <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
+ </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
+ </ProjectExtensions>
+ <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
+ <ItemGroup>
+ <None Include="..\include\gtest\gtest-death-test.h">
+ <BuildOrder>3</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest-message.h">
+ <BuildOrder>4</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest-param-test.h">
+ <BuildOrder>5</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest-spi.h">
+ <BuildOrder>6</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest-test-part.h">
+ <BuildOrder>7</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest-typed-test.h">
+ <BuildOrder>8</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest.h">
+ <BuildOrder>0</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest_pred_impl.h">
+ <BuildOrder>1</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\gtest_prod.h">
+ <BuildOrder>2</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-death-test-internal.h">
+ <BuildOrder>9</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-filepath.h">
+ <BuildOrder>10</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-internal.h">
+ <BuildOrder>11</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-linked_ptr.h">
+ <BuildOrder>12</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-param-util-generated.h">
+ <BuildOrder>14</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-param-util.h">
+ <BuildOrder>13</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-port.h">
+ <BuildOrder>15</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-string.h">
+ <BuildOrder>16</BuildOrder>
+ </None>
+ <None Include="..\include\gtest\internal\gtest-type-util.h">
+ <BuildOrder>17</BuildOrder>
+ </None>
+ <CppCompile Include="gtest_all.cc">
+ <BuildOrder>18</BuildOrder>
+ </CppCompile>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_1</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_2</Key>
+ </BuildConfiguration>
+ </ItemGroup>
</Project>
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.groupproj b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.groupproj index 849f4c4..faf31ca 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.groupproj +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest.groupproj @@ -1,54 +1,54 @@ -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectGuid>{c1d923e0-6cba-4332-9b6f-3420acbf5091}</ProjectGuid> - </PropertyGroup> - <ItemGroup /> - <ItemGroup> - <Projects Include="gtest.cbproj" /> - <Projects Include="gtest_main.cbproj" /> - <Projects Include="gtest_unittest.cbproj" /> - </ItemGroup> - <ProjectExtensions> - <Borland.Personality>Default.Personality</Borland.Personality> - <Borland.ProjectType /> - <BorlandProject> -<BorlandProject xmlns=""><Default.Personality></Default.Personality></BorlandProject></BorlandProject> - </ProjectExtensions> - <Target Name="gtest"> - <MSBuild Projects="gtest.cbproj" Targets="" /> - </Target> - <Target Name="gtest:Clean"> - <MSBuild Projects="gtest.cbproj" Targets="Clean" /> - </Target> - <Target Name="gtest:Make"> - <MSBuild Projects="gtest.cbproj" Targets="Make" /> - </Target> - <Target Name="gtest_main"> - <MSBuild Projects="gtest_main.cbproj" Targets="" /> - </Target> - <Target Name="gtest_main:Clean"> - <MSBuild Projects="gtest_main.cbproj" Targets="Clean" /> - </Target> - <Target Name="gtest_main:Make"> - <MSBuild Projects="gtest_main.cbproj" Targets="Make" /> - </Target> - <Target Name="gtest_unittest"> - <MSBuild Projects="gtest_unittest.cbproj" Targets="" /> - </Target> - <Target Name="gtest_unittest:Clean"> - <MSBuild Projects="gtest_unittest.cbproj" Targets="Clean" /> - </Target> - <Target Name="gtest_unittest:Make"> - <MSBuild Projects="gtest_unittest.cbproj" Targets="Make" /> - </Target> - <Target Name="Build"> - <CallTarget Targets="gtest;gtest_main;gtest_unittest" /> - </Target> - <Target Name="Clean"> - <CallTarget Targets="gtest:Clean;gtest_main:Clean;gtest_unittest:Clean" /> - </Target> - <Target Name="Make"> - <CallTarget Targets="gtest:Make;gtest_main:Make;gtest_unittest:Make" /> - </Target> - <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" /> +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{c1d923e0-6cba-4332-9b6f-3420acbf5091}</ProjectGuid>
+ </PropertyGroup>
+ <ItemGroup />
+ <ItemGroup>
+ <Projects Include="gtest.cbproj" />
+ <Projects Include="gtest_main.cbproj" />
+ <Projects Include="gtest_unittest.cbproj" />
+ </ItemGroup>
+ <ProjectExtensions>
+ <Borland.Personality>Default.Personality</Borland.Personality>
+ <Borland.ProjectType />
+ <BorlandProject>
+<BorlandProject xmlns=""><Default.Personality></Default.Personality></BorlandProject></BorlandProject>
+ </ProjectExtensions>
+ <Target Name="gtest">
+ <MSBuild Projects="gtest.cbproj" Targets="" />
+ </Target>
+ <Target Name="gtest:Clean">
+ <MSBuild Projects="gtest.cbproj" Targets="Clean" />
+ </Target>
+ <Target Name="gtest:Make">
+ <MSBuild Projects="gtest.cbproj" Targets="Make" />
+ </Target>
+ <Target Name="gtest_main">
+ <MSBuild Projects="gtest_main.cbproj" Targets="" />
+ </Target>
+ <Target Name="gtest_main:Clean">
+ <MSBuild Projects="gtest_main.cbproj" Targets="Clean" />
+ </Target>
+ <Target Name="gtest_main:Make">
+ <MSBuild Projects="gtest_main.cbproj" Targets="Make" />
+ </Target>
+ <Target Name="gtest_unittest">
+ <MSBuild Projects="gtest_unittest.cbproj" Targets="" />
+ </Target>
+ <Target Name="gtest_unittest:Clean">
+ <MSBuild Projects="gtest_unittest.cbproj" Targets="Clean" />
+ </Target>
+ <Target Name="gtest_unittest:Make">
+ <MSBuild Projects="gtest_unittest.cbproj" Targets="Make" />
+ </Target>
+ <Target Name="Build">
+ <CallTarget Targets="gtest;gtest_main;gtest_unittest" />
+ </Target>
+ <Target Name="Clean">
+ <CallTarget Targets="gtest:Clean;gtest_main:Clean;gtest_unittest:Clean" />
+ </Target>
+ <Target Name="Make">
+ <CallTarget Targets="gtest:Make;gtest_main:Make;gtest_unittest:Make" />
+ </Target>
+ <Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
</Project>
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_all.cc b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_all.cc index ba7ad68..121b2d8 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_all.cc +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_all.cc @@ -1,38 +1,38 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// C++Builder's IDE cannot build a static library from files with hyphens -// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 . -// This file serves as a workaround. - -#include "src/gtest-all.cc" +// Copyright 2009, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: Josh Kelley (joshkel@gmail.com)
+//
+// Google C++ Testing Framework (Google Test)
+//
+// C++Builder's IDE cannot build a static library from files with hyphens
+// in their name. See http://qc.codegear.com/wc/qcmain.aspx?d=70977 .
+// This file serves as a workaround.
+
+#include "src/gtest-all.cc"
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_link.cc b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_link.cc index b955ebf..918eccd 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_link.cc +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_link.cc @@ -1,40 +1,40 @@ -// Copyright 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Author: Josh Kelley (joshkel@gmail.com) -// -// Google C++ Testing Framework (Google Test) -// -// Links gtest.lib and gtest_main.lib into the current project in C++Builder. -// This means that these libraries can't be renamed, but it's the only way to -// ensure that Debug versus Release test builds are linked against the -// appropriate Debug or Release build of the libraries. - -#pragma link "gtest.lib" -#pragma link "gtest_main.lib" +// Copyright 2009, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Author: Josh Kelley (joshkel@gmail.com)
+//
+// Google C++ Testing Framework (Google Test)
+//
+// Links gtest.lib and gtest_main.lib into the current project in C++Builder.
+// This means that these libraries can't be renamed, but it's the only way to
+// ensure that Debug versus Release test builds are linked against the
+// appropriate Debug or Release build of the libraries.
+
+#pragma link "gtest.lib"
+#pragma link "gtest_main.lib"
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_main.cbproj b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_main.cbproj index fae32cb..d76ce13 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_main.cbproj +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_main.cbproj @@ -1,82 +1,82 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid> - <Config Condition="'$(Config)'==''">Release</Config> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> - <Base>true</Base> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''"> - <Base>true</Base> - <Cfg_1>true</Cfg_1> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''"> - <Base>true</Base> - <Cfg_2>true</Cfg_2> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Base)'!=''"> - <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed> - <OutputExt>lib</OutputExt> - <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput> - <Defines>NO_STRICT</Defines> - <DynamicRTL>true</DynamicRTL> - <UsePackages>true</UsePackages> - <ProjectType>CppStaticLibrary</ProjectType> - <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways> - <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports> - <BCC_wpar>false</BCC_wpar> - <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath> - <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs> - <TLIB_PageSize>32</TLIB_PageSize> - <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_1)'!=''"> - <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed> - <DCC_Optimize>false</DCC_Optimize> - <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe> - <Defines>_DEBUG;$(Defines)</Defines> - <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo> - <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion> - <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking> - <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables> - <DCC_Define>DEBUG</DCC_Define> - <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers> - <IntermediateOutputDir>Debug</IntermediateOutputDir> - <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines> - <BCC_StackFrames>true</BCC_StackFrames> - <BCC_DisableOptimizations>true</BCC_DisableOptimizations> - <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>Full</TASM_Debugging> - <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_2)'!=''"> - <Defines>NDEBUG;$(Defines)</Defines> - <IntermediateOutputDir>Release</IntermediateOutputDir> - <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>None</TASM_Debugging> - </PropertyGroup> - <ProjectExtensions> - <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality> - <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType> - <BorlandProject> -<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages> - <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages> - <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages> - </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject> - </ProjectExtensions> - <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" /> - <ItemGroup> - <CppCompile Include="..\src\gtest_main.cc"> - <BuildOrder>0</BuildOrder> - </CppCompile> - <BuildConfiguration Include="Debug"> - <Key>Cfg_1</Key> - </BuildConfiguration> - <BuildConfiguration Include="Release"> - <Key>Cfg_2</Key> - </BuildConfiguration> - </ItemGroup> -</Project> +<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{bca37a72-5b07-46cf-b44e-89f8e06451a2}</ProjectGuid>
+ <Config Condition="'$(Config)'==''">Release</Config>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+ <Base>true</Base>
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+ <Base>true</Base>
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
+ <OutputExt>lib</OutputExt>
+ <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
+ <Defines>NO_STRICT</Defines>
+ <DynamicRTL>true</DynamicRTL>
+ <UsePackages>true</UsePackages>
+ <ProjectType>CppStaticLibrary</ProjectType>
+ <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
+ <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;dclZipForged11.bpi;vclZipForged11.bpi;GR32_BDS2006.bpi;GR32_DSGN_BDS2006.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi;CExceptionExpert11.bpi</PackageImports>
+ <BCC_wpar>false</BCC_wpar>
+ <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</IncludePath>
+ <AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
+ <TLIB_PageSize>32</TLIB_PageSize>
+ <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</ILINK_LibraryPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
+ <Defines>_DEBUG;$(Defines)</Defines>
+ <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
+ <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
+ <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
+ <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
+ <DCC_Define>DEBUG</DCC_Define>
+ <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
+ <IntermediateOutputDir>Debug</IntermediateOutputDir>
+ <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
+ <BCC_StackFrames>true</BCC_StackFrames>
+ <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
+ <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>Full</TASM_Debugging>
+ <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <Defines>NDEBUG;$(Defines)</Defines>
+ <IntermediateOutputDir>Release</IntermediateOutputDir>
+ <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>None</TASM_Debugging>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
+ <Borland.ProjectType>CppStaticLibrary</Borland.ProjectType>
+ <BorlandProject>
+<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
+ </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\include;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\src;..\src;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">1</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines><HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Count">1</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item0">32</HistoryLists_hlTLIB_PageSize><HistoryLists_hlTLIB_PageSize Name="Item1">16</HistoryLists_hlTLIB_PageSize></HistoryLists_hlTLIB_PageSize></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
+ </ProjectExtensions>
+ <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
+ <ItemGroup>
+ <CppCompile Include="..\src\gtest_main.cc">
+ <BuildOrder>0</BuildOrder>
+ </CppCompile>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_1</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_2</Key>
+ </BuildConfiguration>
+ </ItemGroup>
+</Project>
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_unittest.cbproj b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_unittest.cbproj index 33f7056..dc5db8e 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_unittest.cbproj +++ b/src/3rdparty/webkit/Source/ThirdParty/gtest/codegear/gtest_unittest.cbproj @@ -1,88 +1,88 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectGuid>{eea63393-5ac5-4b9c-8909-d75fef2daa41}</ProjectGuid> - <Config Condition="'$(Config)'==''">Release</Config> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''"> - <Base>true</Base> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''"> - <Base>true</Base> - <Cfg_1>true</Cfg_1> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''"> - <Base>true</Base> - <Cfg_2>true</Cfg_2> - <CfgParent>Base</CfgParent> - </PropertyGroup> - <PropertyGroup Condition="'$(Base)'!=''"> - <OutputExt>exe</OutputExt> - <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed> - <Defines>NO_STRICT</Defines> - <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput> - <DynamicRTL>true</DynamicRTL> - <ILINK_ObjectSearchPath>..\test</ILINK_ObjectSearchPath> - <UsePackages>true</UsePackages> - <ProjectType>CppConsoleApplication</ProjectType> - <NoVCL>true</NoVCL> - <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways> - <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi</PackageImports> - <BCC_wpar>false</BCC_wpar> - <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</IncludePath> - <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</ILINK_LibraryPath> - <Multithreaded>true</Multithreaded> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_1)'!=''"> - <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed> - <DCC_Optimize>false</DCC_Optimize> - <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe> - <Defines>_DEBUG;$(Defines)</Defines> - <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo> - <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion> - <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking> - <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables> - <DCC_Define>DEBUG</DCC_Define> - <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers> - <IntermediateOutputDir>Debug</IntermediateOutputDir> - <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines> - <BCC_StackFrames>true</BCC_StackFrames> - <BCC_DisableOptimizations>true</BCC_DisableOptimizations> - <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>Full</TASM_Debugging> - <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn> - </PropertyGroup> - <PropertyGroup Condition="'$(Cfg_2)'!=''"> - <Defines>NDEBUG;$(Defines)</Defines> - <IntermediateOutputDir>Release</IntermediateOutputDir> - <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath> - <TASM_Debugging>None</TASM_Debugging> - </PropertyGroup> - <ProjectExtensions> - <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality> - <Borland.ProjectType>CppConsoleApplication</Borland.ProjectType> - <BorlandProject> -<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages> - - - <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages> - <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages> - </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item1">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item2">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">2</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item1">STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject> - </ProjectExtensions> - <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" /> - <ItemGroup> - <CppCompile Include="..\test\gtest_unittest.cc"> - <BuildOrder>0</BuildOrder> - </CppCompile> - <CppCompile Include="gtest_link.cc"> - <BuildOrder>1</BuildOrder> - </CppCompile> - <BuildConfiguration Include="Debug"> - <Key>Cfg_1</Key> - </BuildConfiguration> - <BuildConfiguration Include="Release"> - <Key>Cfg_2</Key> - </BuildConfiguration> - </ItemGroup> +<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{eea63393-5ac5-4b9c-8909-d75fef2daa41}</ProjectGuid>
+ <Config Condition="'$(Config)'==''">Release</Config>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+ <Base>true</Base>
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+ <Base>true</Base>
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <OutputExt>exe</OutputExt>
+ <BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
+ <Defines>NO_STRICT</Defines>
+ <DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
+ <DynamicRTL>true</DynamicRTL>
+ <ILINK_ObjectSearchPath>..\test</ILINK_ObjectSearchPath>
+ <UsePackages>true</UsePackages>
+ <ProjectType>CppConsoleApplication</ProjectType>
+ <NoVCL>true</NoVCL>
+ <BCC_CPPCompileAlways>true</BCC_CPPCompileAlways>
+ <PackageImports>rtl.bpi;vcl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;dsnap.bpi;dsnapcon.bpi;vclib.bpi;ibxpress.bpi;adortl.bpi;dbxcds.bpi;dbexpress.bpi;DbxCommonDriver.bpi;websnap.bpi;vclie.bpi;webdsnap.bpi;inet.bpi;inetdbbde.bpi;inetdbxpress.bpi;soaprtl.bpi;Rave75VCL.bpi;teeUI.bpi;tee.bpi;teedb.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;IntrawebDB_90_100.bpi;Intraweb_90_100.bpi;Jcl.bpi;JclVcl.bpi;JvCoreD11R.bpi;JvSystemD11R.bpi;JvStdCtrlsD11R.bpi;JvAppFrmD11R.bpi;JvBandsD11R.bpi;JvDBD11R.bpi;JvDlgsD11R.bpi;JvBDED11R.bpi;JvCmpD11R.bpi;JvCryptD11R.bpi;JvCtrlsD11R.bpi;JvCustomD11R.bpi;JvDockingD11R.bpi;JvDotNetCtrlsD11R.bpi;JvEDID11R.bpi;JvGlobusD11R.bpi;JvHMID11R.bpi;JvInterpreterD11R.bpi;JvJansD11R.bpi;JvManagedThreadsD11R.bpi;JvMMD11R.bpi;JvNetD11R.bpi;JvPageCompsD11R.bpi;JvPluginD11R.bpi;JvPrintPreviewD11R.bpi;JvRuntimeDesignD11R.bpi;JvTimeFrameworkD11R.bpi;JvValidatorsD11R.bpi;JvWizardD11R.bpi;JvXPCtrlsD11R.bpi;VclSmp.bpi</PackageImports>
+ <BCC_wpar>false</BCC_wpar>
+ <IncludePath>$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</IncludePath>
+ <ILINK_LibraryPath>$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</ILINK_LibraryPath>
+ <Multithreaded>true</Multithreaded>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
+ <Defines>_DEBUG;$(Defines)</Defines>
+ <ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
+ <BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
+ <ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
+ <BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
+ <DCC_Define>DEBUG</DCC_Define>
+ <BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
+ <IntermediateOutputDir>Debug</IntermediateOutputDir>
+ <TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
+ <BCC_StackFrames>true</BCC_StackFrames>
+ <BCC_DisableOptimizations>true</BCC_DisableOptimizations>
+ <ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>Full</TASM_Debugging>
+ <BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <Defines>NDEBUG;$(Defines)</Defines>
+ <IntermediateOutputDir>Release</IntermediateOutputDir>
+ <ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
+ <TASM_Debugging>None</TASM_Debugging>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>CPlusPlusBuilder.Personality</Borland.Personality>
+ <Borland.ProjectType>CppConsoleApplication</Borland.ProjectType>
+ <BorlandProject>
+<BorlandProject><CPlusPlusBuilder.Personality><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1033</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Debugging><Debugging Name="DebugSourceDirs"></Debugging></Debugging><Parameters><Parameters Name="RunParams"></Parameters><Parameters Name="Launcher"></Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="DebugCWD"></Parameters><Parameters Name="HostApplication"></Parameters><Parameters Name="RemoteHost"></Parameters><Parameters Name="RemotePath"></Parameters><Parameters Name="RemoteParams"></Parameters><Parameters Name="RemoteLauncher"></Parameters><Parameters Name="UseRemoteLauncher">False</Parameters><Parameters Name="RemoteCWD"></Parameters><Parameters Name="RemoteDebug">False</Parameters><Parameters Name="Debug Symbols Search Path"></Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Excluded_Packages>
+
+
+ <Excluded_Packages Name="$(BDS)\bin\bcboffice2k100.bpl">CodeGear C++Builder Office 2000 Servers Package</Excluded_Packages>
+ <Excluded_Packages Name="$(BDS)\bin\bcbofficexp100.bpl">CodeGear C++Builder Office XP Servers Package</Excluded_Packages>
+ </Excluded_Packages><Linker><Linker Name="LibPrefix"></Linker><Linker Name="LibSuffix"></Linker><Linker Name="LibVersion"></Linker></Linker><ProjectProperties><ProjectProperties Name="AutoShowDeps">False</ProjectProperties><ProjectProperties Name="ManagePaths">True</ProjectProperties><ProjectProperties Name="VerifyPackages">True</ProjectProperties></ProjectProperties><HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Count">3</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item0">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test;..</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item1">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include;..\test</HistoryLists_hlIncludePath><HistoryLists_hlIncludePath Name="Item2">$(BDS)\include;$(BDS)\include\dinkumware;$(BDS)\include\vcl;..\include</HistoryLists_hlIncludePath></HistoryLists_hlIncludePath><HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Count">1</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item0">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item1">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\test</HistoryLists_hlILINK_LibraryPath><HistoryLists_hlILINK_LibraryPath Name="Item2">$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(OUTPUTDIR);..\test</HistoryLists_hlILINK_LibraryPath></HistoryLists_hlILINK_LibraryPath><HistoryLists_hlDefines><HistoryLists_hlDefines Name="Count">2</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item0">NO_STRICT</HistoryLists_hlDefines><HistoryLists_hlDefines Name="Item1">STRICT</HistoryLists_hlDefines></HistoryLists_hlDefines></CPlusPlusBuilder.Personality></BorlandProject></BorlandProject>
+ </ProjectExtensions>
+ <Import Project="$(MSBuildBinPath)\Borland.Cpp.Targets" />
+ <ItemGroup>
+ <CppCompile Include="..\test\gtest_unittest.cc">
+ <BuildOrder>0</BuildOrder>
+ </CppCompile>
+ <CppCompile Include="gtest_link.cc">
+ <BuildOrder>1</BuildOrder>
+ </CppCompile>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_1</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_2</Key>
+ </BuildConfiguration>
+ </ItemGroup>
</Project>
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat b/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat index 91ebf1e..90fbc6d 100755 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/gyp.bat @@ -1,5 +1,5 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python "%~dp0/gyp" %* +@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python "%~dp0/gyp" %*
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat b/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat index 5683255..778d9c9 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/samples/samples.bat @@ -1,5 +1,5 @@ -@rem Copyright (c) 2009 Google Inc. All rights reserved. -@rem Use of this source code is governed by a BSD-style license that can be -@rem found in the LICENSE file. - -@python %~dp0/samples %* +@rem Copyright (c) 2009 Google Inc. All rights reserved.
+@rem Use of this source code is governed by a BSD-style license that can be
+@rem found in the LICENSE file.
+
+@python %~dp0/samples %*
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py index 4a2aa07..ca41487 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/gyptest-errors.py @@ -1,24 +1,24 @@ -#!/usr/bin/env python +#!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - -""" -Verifies behavior for different action configuration errors: -exit status of 1, and the expected error message must be in stderr. -""" - -import TestGyp - -test = TestGyp.TestGyp() - - -test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None) -expect = [ - "Anonymous action in target broken_actions2. An action must have an 'action_name' field.", -] -test.must_contain_all_lines(test.stderr(), expect) - - -test.pass_test() +
+"""
+Verifies behavior for different action configuration errors:
+exit status of 1, and the expected error message must be in stderr.
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp()
+
+
+test.run_gyp('action_missing_name.gyp', chdir='src', status=1, stderr=None)
+expect = [
+ "Anonymous action in target broken_actions2. An action must have an 'action_name' field.",
+]
+test.must_contain_all_lines(test.stderr(), expect)
+
+
+test.pass_test()
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c index f155939..d5f661d 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/actions/src/subdir1/program.c @@ -1,12 +1,12 @@ -#include <stdio.h> - -extern void prog1(void); -extern void prog2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - prog1(); - prog2(); - return 0; -} +#include <stdio.h>
+
+extern void prog1(void);
+extern void prog2(void);
+
+int main(int argc, char *argv[])
+{
+ printf("Hello from program.c\n");
+ prog1();
+ prog2();
+ return 0;
+}
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt index 90ef886..1b052c9 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/actions-out/README.txt @@ -1,4 +1,4 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. +A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c index f155939..d5f661d 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir1/program.c @@ -1,12 +1,12 @@ -#include <stdio.h> - -extern void prog1(void); -extern void prog2(void); - -int main(int argc, char *argv[]) -{ - printf("Hello from program.c\n"); - prog1(); - prog2(); - return 0; -} +#include <stdio.h>
+
+extern void prog1(void);
+extern void prog2(void);
+
+int main(int argc, char *argv[])
+{
+ printf("Hello from program.c\n");
+ prog1();
+ prog2();
+ return 0;
+}
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt index 90ef886..1b052c9 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/actions/subdir2/actions-out/README.txt @@ -1,4 +1,4 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. +A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt index 90ef886..1b052c9 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/test/generator-output/rules/subdir2/rules-out/README.txt @@ -1,4 +1,4 @@ -A place-holder for this Xcode build output directory, so that the -test script can verify that .xcodeproj files are not created in -their normal location by making the src/ read-only, and then -selectively making this build directory writable. +A place-holder for this Xcode build output directory, so that the
+test script can verify that .xcodeproj files are not created in
+their normal location by making the src/ read-only, and then
+selectively making this build directory writable.
diff --git a/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py b/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py index 128c2e3..04c7901 100644 --- a/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py +++ b/src/3rdparty/webkit/Source/ThirdParty/gyp/tools/pretty_gyp.py @@ -1,142 +1,142 @@ -#!/usr/bin/env python -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This file pretty-prints the contents of a GYP file. - -import sys -import re - -input = [] -if len(sys.argv) > 1: - input_file = open(sys.argv[1]) - input = input_file.read().splitlines() - input_file.close() -else: - input = sys.stdin.read().splitlines() - -# This is used to remove comments when we're counting braces. -comment_re = re.compile(r'\s*#.*') - -# This is used to remove quoted strings when we're counting braces. -# It takes into account quoted quotes, and makes sure that the quotes -# match. -# NOTE: It does not handle quotes that span more than one line, or -# cases where an escaped quote is preceeded by an escaped backslash. -quote_re_str = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)' -quote_re = re.compile(quote_re_str) - -def comment_replace(matchobj): - return matchobj.group(1) + matchobj.group(2) + '#' * len(matchobj.group(3)) - -def mask_comments(input): - # This is used to mask the quoted strings so we skip braces inside - # quoted strings. - search_re = re.compile(r'(.*?)(#)(.*)') - return [search_re.sub(comment_replace, line) for line in input] - -def quote_replace(matchobj): - return "%s%s%s%s" % (matchobj.group(1), - matchobj.group(2), - 'x'*len(matchobj.group(3)), - matchobj.group(2)) - -def mask_quotes(input): - # This is used to mask the quoted strings so we skip braces inside - # quoted strings. - search_re = re.compile(r'(.*?)' + quote_re_str) - return [search_re.sub(quote_replace, line) for line in input] - -def do_split(input, masked_input, search_re): - output = [] - mask_output = [] - for (line, masked_line) in zip(input, masked_input): - m = search_re.match(masked_line) - while m: - split = len(m.group(1)) - line = line[:split] + r'\n' + line[split:] - masked_line = masked_line[:split] + r'\n' + masked_line[split:] - m = search_re.match(masked_line) - output.extend(line.split(r'\n')) - mask_output.extend(masked_line.split(r'\n')) - return (output, mask_output) - -# This masks out the quotes and comments, and then splits appropriate -# lines (lines that matche the double_*_brace re's above) before -# indenting them below. -def split_double_braces(input): - # These are used to split lines which have multiple braces on them, so - # that the indentation looks prettier when all laid out (e.g. closing - # braces make a nice diagonal line). - double_open_brace_re = re.compile(r'(.*?[\[\{\(,])(\s*)([\[\{\(])') - double_close_brace_re = re.compile(r'(.*?[\]\}\)],?)(\s*)([\]\}\)])') - - masked_input = mask_quotes(input) - masked_input = mask_comments(masked_input) - - (output, mask_output) = do_split(input, masked_input, double_open_brace_re) - (output, mask_output) = do_split(output, mask_output, double_close_brace_re) - - return output - -# This keeps track of the number of braces on a given line and returns -# the result. It starts at zero and subtracts for closed braces, and -# adds for open braces. -def count_braces(line): - open_braces = ['[', '(', '{'] - close_braces = [']', ')', '}'] - closing_prefix_re = re.compile(r'(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$') - cnt = 0 - stripline = comment_re.sub(r'', line) - stripline = quote_re.sub(r"''", stripline) - for char in stripline: - for brace in open_braces: - if char == brace: - cnt += 1 - for brace in close_braces: - if char == brace: - cnt -= 1 - - after = False - if cnt > 0: - after = True - - # This catches the special case of a closing brace having something - # other than just whitespace ahead of it -- we don't want to - # unindent that until after this line is printed so it stays with - # the previous indentation level. - if cnt < 0 and closing_prefix_re.match(stripline): - after = True - return (cnt, after) - -# This does the main work of indenting the input based on the brace counts. -def prettyprint_input(lines): - indent = 0 - basic_offset = 2 - last_line = "" - for line in lines: - if comment_re.match(line): - print line - else: - line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix. - if len(line) > 0: - (brace_diff, after) = count_braces(line) - if brace_diff != 0: - if after: - print " " * (basic_offset * indent) + line - indent += brace_diff - else: - indent += brace_diff - print " " * (basic_offset * indent) + line - else: - print " " * (basic_offset * indent) + line - else: - print "" - last_line = line - -# Split up the double braces. -lines = split_double_braces(input) - -# Indent and print the output. -prettyprint_input(lines) +#!/usr/bin/env python
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file pretty-prints the contents of a GYP file.
+
+import sys
+import re
+
+input = []
+if len(sys.argv) > 1:
+ input_file = open(sys.argv[1])
+ input = input_file.read().splitlines()
+ input_file.close()
+else:
+ input = sys.stdin.read().splitlines()
+
+# This is used to remove comments when we're counting braces.
+comment_re = re.compile(r'\s*#.*')
+
+# This is used to remove quoted strings when we're counting braces.
+# It takes into account quoted quotes, and makes sure that the quotes
+# match.
+# NOTE: It does not handle quotes that span more than one line, or
+# cases where an escaped quote is preceeded by an escaped backslash.
+quote_re_str = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
+quote_re = re.compile(quote_re_str)
+
+def comment_replace(matchobj):
+ return matchobj.group(1) + matchobj.group(2) + '#' * len(matchobj.group(3))
+
+def mask_comments(input):
+ # This is used to mask the quoted strings so we skip braces inside
+ # quoted strings.
+ search_re = re.compile(r'(.*?)(#)(.*)')
+ return [search_re.sub(comment_replace, line) for line in input]
+
+def quote_replace(matchobj):
+ return "%s%s%s%s" % (matchobj.group(1),
+ matchobj.group(2),
+ 'x'*len(matchobj.group(3)),
+ matchobj.group(2))
+
+def mask_quotes(input):
+ # This is used to mask the quoted strings so we skip braces inside
+ # quoted strings.
+ search_re = re.compile(r'(.*?)' + quote_re_str)
+ return [search_re.sub(quote_replace, line) for line in input]
+
+def do_split(input, masked_input, search_re):
+ output = []
+ mask_output = []
+ for (line, masked_line) in zip(input, masked_input):
+ m = search_re.match(masked_line)
+ while m:
+ split = len(m.group(1))
+ line = line[:split] + r'\n' + line[split:]
+ masked_line = masked_line[:split] + r'\n' + masked_line[split:]
+ m = search_re.match(masked_line)
+ output.extend(line.split(r'\n'))
+ mask_output.extend(masked_line.split(r'\n'))
+ return (output, mask_output)
+
+# This masks out the quotes and comments, and then splits appropriate
+# lines (lines that matche the double_*_brace re's above) before
+# indenting them below.
+def split_double_braces(input):
+ # These are used to split lines which have multiple braces on them, so
+ # that the indentation looks prettier when all laid out (e.g. closing
+ # braces make a nice diagonal line).
+ double_open_brace_re = re.compile(r'(.*?[\[\{\(,])(\s*)([\[\{\(])')
+ double_close_brace_re = re.compile(r'(.*?[\]\}\)],?)(\s*)([\]\}\)])')
+
+ masked_input = mask_quotes(input)
+ masked_input = mask_comments(masked_input)
+
+ (output, mask_output) = do_split(input, masked_input, double_open_brace_re)
+ (output, mask_output) = do_split(output, mask_output, double_close_brace_re)
+
+ return output
+
+# This keeps track of the number of braces on a given line and returns
+# the result. It starts at zero and subtracts for closed braces, and
+# adds for open braces.
+def count_braces(line):
+ open_braces = ['[', '(', '{']
+ close_braces = [']', ')', '}']
+ closing_prefix_re = re.compile(r'(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$')
+ cnt = 0
+ stripline = comment_re.sub(r'', line)
+ stripline = quote_re.sub(r"''", stripline)
+ for char in stripline:
+ for brace in open_braces:
+ if char == brace:
+ cnt += 1
+ for brace in close_braces:
+ if char == brace:
+ cnt -= 1
+
+ after = False
+ if cnt > 0:
+ after = True
+
+ # This catches the special case of a closing brace having something
+ # other than just whitespace ahead of it -- we don't want to
+ # unindent that until after this line is printed so it stays with
+ # the previous indentation level.
+ if cnt < 0 and closing_prefix_re.match(stripline):
+ after = True
+ return (cnt, after)
+
+# This does the main work of indenting the input based on the brace counts.
+def prettyprint_input(lines):
+ indent = 0
+ basic_offset = 2
+ last_line = ""
+ for line in lines:
+ if comment_re.match(line):
+ print line
+ else:
+ line = line.strip('\r\n\t ') # Otherwise doesn't strip \r on Unix.
+ if len(line) > 0:
+ (brace_diff, after) = count_braces(line)
+ if brace_diff != 0:
+ if after:
+ print " " * (basic_offset * indent) + line
+ indent += brace_diff
+ else:
+ indent += brace_diff
+ print " " * (basic_offset * indent) + line
+ else:
+ print " " * (basic_offset * indent) + line
+ else:
+ print ""
+ last_line = line
+
+# Split up the double braces.
+lines = split_double_braces(input)
+
+# Indent and print the output.
+prettyprint_input(lines)
diff --git a/src/3rdparty/webkit/Source/WebCore/ChangeLog b/src/3rdparty/webkit/Source/WebCore/ChangeLog index f112cba..41d2ba7 100644 --- a/src/3rdparty/webkit/Source/WebCore/ChangeLog +++ b/src/3rdparty/webkit/Source/WebCore/ChangeLog @@ -1,3 +1,1047 @@ +2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + [Qt] Enable password echo on Symbian builds + https://bugs.webkit.org/show_bug.cgi?id=66954 + + Reviewed by Chang Shu. + + No tests, as this is just a build change. + + * config.h: + +2011-08-23 Chang Shu <cshu@webkit.org> + + Added support for momentarily revealing last typed character in password input. + Code change was partially based on Apple's iOS code and Samuel Nevala's work. + https://bugs.webkit.org/show_bug.cgi?id=32509 + + Reviewed by Alexey Proskuryakov. + + * editing/InsertIntoTextNodeCommand.cpp: + (WebCore::InsertIntoTextNodeCommand::doApply): + * rendering/RenderText.cpp: + (WebCore::SecureTextTimer::SecureTextTimer): + (WebCore::SecureTextTimer::restartWithNewText): + (WebCore::SecureTextTimer::invalidate): + (WebCore::SecureTextTimer::lastTypedCharacterOffset): + (WebCore::SecureTextTimer::fired): + (WebCore::RenderText::willBeDestroyed): + (WebCore::RenderText::setTextInternal): + (WebCore::RenderText::secureText): + (WebCore::RenderText::momentarilyRevealLastTypedCharacter): + * rendering/RenderText.h: + (WebCore::RenderText::isSecure): + * testing/Internals.cpp: + (WebCore::Internals::setPasswordEchoEnabled): Fixed some silly coding in Internals. + (WebCore::Internals::setPasswordEchoDurationInSeconds): + (WebCore::Internals::reset): + +2011-07-08 Chang Shu <cshu@webkit.org> + + Update calling sites after function renamed. + https://bugs.webkit.org/show_bug.cgi?id=59114 + + Reviewed by Alexey Proskuryakov. + + No new tests, just refactoring. + + * editing/visible_units.cpp: + (WebCore::previousBoundary): + (WebCore::nextBoundary): + * rendering/RenderText.cpp: + (WebCore::RenderText::setTextInternal): + +2011-08-18 Chang Shu <cshu@webkit.org> + + Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature + https://bugs.webkit.org/show_bug.cgi?id=66052 + + Reviewed by Alexey Proskuryakov. + + Added runtime settings in WebCore. + Added support in window.internals for testing. + + Tests: editing/input/password-echo-passnode.html + editing/input/password-echo-passnode2.html + editing/input/password-echo-passnode3.html + editing/input/password-echo-textnode.html + + * page/Settings.cpp: + (WebCore::Settings::Settings): + * page/Settings.h: + (WebCore::Settings::setPasswordEchoEnabled): + (WebCore::Settings::passwordEchoEnabled): + (WebCore::Settings::setPasswordEchoDurationInSeconds): + (WebCore::Settings::passwordEchoDurationInSeconds): + * testing/Internals.cpp: + (WebCore::Internals::Internals): + (WebCore::Internals::setPasswordEchoEnabled): + (WebCore::Internals::setPasswordEchoDurationInSeconds): + (WebCore::Internals::reset): + * testing/Internals.h: + * testing/Internals.idl: + +2011-08-16 Chang Shu <cshu@webkit.org> + + Support reset in WebCore::Internals + https://bugs.webkit.org/show_bug.cgi?id=66307 + + Reviewed by Dimitri Glazkov. + + New tests will be added when function reset is implemented. + + Added framework code in WebCoreTestSupport. The real implementation of + Internals::reset() depends on the need from the settings that require a reset. + + * testing/Internals.cpp: + (WebCore::Internals::reset): + * testing/Internals.h: + * testing/js/WebCoreTestSupport.cpp: + (WebCoreTestSupport::resetInternalsObject): + * testing/js/WebCoreTestSupport.h: + * testing/v8/WebCoreTestSupport.cpp: + (WebCoreTestSupport::resetInternalsObject): + * testing/v8/WebCoreTestSupport.h: + +2011-06-09 Robert Hogan <robert@webkit.org> + + Reviewed by Andreas Kling. + + Teach Qt about window.internals + https://bugs.webkit.org/show_bug.cgi?id=61074 + + A weakness of the Qt DRT setup is that things like JSContextRef are abstracted + away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals. + Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt + where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it + is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing. + Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame + and others. The only alternative seems like a compile time guard which we would have to teach the bots about. + + * CodeGenerators.pri: + * WebCore.pri: + * WebCore.pro: + +2011-06-02 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Adler. + + Add build logistics and plumbing for window.internals object. + https://bugs.webkit.org/show_bug.cgi?id=60313 + + Test: fast/harness/internals-object.html + + * Configurations/WebCoreTestSupport.xcconfig: Added. + * DerivedSources.make: Added support for generating from Internals.idl. + * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library. + * WebCore.gypi: Ditto. + * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library. + * testing/Internals.cpp: Added. + * testing/Internals.h: Added. + * testing/Internals.idl: Added. + * testing/js/WebCoreTestSupport.cpp: Added. + * testing/js/WebCoreTestSupport.h: Added. + * testing/v8/WebCoreTestSupport.cpp: Added. + * testing/v8/WebCoreTestSupport.h: Added. + +2011-08-22 Abhishek Arya <inferno@chromium.org> + + Crash in FocusController::advanceFocusInDocumentOrder + https://bugs.webkit.org/show_bug.cgi?id=66678 + + RefPtr the focusable node to prevent getting deleted by mutation + event. + + Reviewed by Dave Hyatt. + + Test: fast/frames/focus-controller-crash-change-event.html + + * page/FocusController.cpp: + (WebCore::FocusController::advanceFocusInDocumentOrder): + +2011-08-18 Ryosuke Niwa <rniwa@webkit.org> + + SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule + https://bugs.webkit.org/show_bug.cgi?id=66086 + + Reviewed by Darin Adler. + + The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all. + Fixing the bug by detecting RenderTextFragment in handleTextNode. + + Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not + the next call to handleTextNode needs to process the first-letter part of the text fragment. + + Test: editing/text-iterator/backward-textiterator-first-letter-crash.html + + * editing/TextIterator.cpp: + (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter. + (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter. + (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): + (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): + (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added. + * editing/TextIterator.h: + +2011-08-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Fix build on Lion + + https://bugs.webkit.org/show_bug.cgi?id=66770 + + Reviewed by Andreas Kling. + + We were mistakenly picking up mac/WebCoreSystemInterface.h instead of + the Qt one, and building on Lion revealed this when a typedef for + IOSurfaceRef was wrapped in PLATFORM(MAC). + + For now we fix this by including WebCoreSystemInterface using + brackets, so that we'll pick up the right file based on the + include paths. This also means exposing a few missing enums + in our own version of the file, so those were added. + + Lasty, we need to link against the right system interface library + on Lion. + + * platform/mac/WebVideoFullscreenHUDWindowController.mm: + * platform/qt/WebCoreSystemInterface.h: + +2011-08-08 Cris Neckar <cdn@chromium.org> + + Remove counter nodes from the tree and fix-up children when they are removed from the counter map. + https://bugs.webkit.org/show_bug.cgi?id=65346 + + Reviewed by Adam Barth. + + Covered by existing CSS counter tests. + + * rendering/CounterNode.cpp: + (WebCore::CounterNode::~CounterNode): + +2011-08-17 Oliver Hunt <oliver@apple.com> + + Move towards supporting user controlled prototypes on CanvasPixelArray + https://bugs.webkit.org/show_bug.cgi?id=66429 + + Reviewed by Gavin Barraclough. + + Start using a per-global object structure for canvas pixel array. + + * bindings/js/JSImageDataCustom.cpp: + (WebCore::toJS): + +2011-08-17 Abhishek Arya <inferno@chromium.org> + + Crash in Document::recalcStyleSelector + https://bugs.webkit.org/show_bug.cgi?id=66335 + + Reviewed by Simon Fraser. + + When node is getting destroyed and its removedFromDocument + is not called due to entire document structure torn down(using + removeAllChildren), make sure to clear out the stylesheet + candidate node from document's structures in its destructor. + + Test: svg/dom/stylesheet-candidate-node-crash-main.html + + * dom/ProcessingInstruction.cpp: + (WebCore::ProcessingInstruction::~ProcessingInstruction): + * html/HTMLLinkElement.cpp: + (WebCore::HTMLLinkElement::~HTMLLinkElement): + * html/HTMLStyleElement.cpp: + (WebCore::HTMLStyleElement::~HTMLStyleElement): + * svg/SVGStyleElement.cpp: + (WebCore::SVGStyleElement::~SVGStyleElement): + +2011-08-12 Abhishek Arya <inferno@chromium.org> + + Crash in WebCore::editingIgnoresContent + https://bugs.webkit.org/show_bug.cgi?id=66125 + + Reviewed by Ryosuke Niwa. + + RefPtr a few nodes in case they get blown away in + dispatchEvent calls. + + Test: editing/selection/select-start-remove-root-crash.html + + * editing/FrameSelection.cpp: + (WebCore::FrameSelection::selectAll): + * editing/ReplaceSelectionCommand.cpp: + (WebCore::ReplacementFragment::ReplacementFragment): + +2011-08-13 Abhishek Arya <inferno@chromium.org> + + Crash in HTMLTreeBuilder::processAnyOtherEndTagForInBody + https://bugs.webkit.org/show_bug.cgi?id=66187 + + Reviewed by Adam Barth. + + RefPtr a few ContainerNodes to prevent premature deletion. + + Test: fast/html/process-end-tag-for-inbody-crash.html + + * html/parser/HTMLTreeBuilder.cpp: + (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): + (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): + (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): + +2011-08-10 Abhishek Arya <inferno@chromium.org> + + Check that we do not need layout before trying to dirty + m_originatingLine for our floats. + https://bugs.webkit.org/show_bug.cgi?id=65938 + + Reviewed by Dave Hyatt. + + Test: fast/block/float/float-originating-line-deleted-crash.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::removeFloatingObject): + (WebCore::RenderBlock::clearFloats): + +2011-08-11 Alexis Menard <alexis.menard@openbossa.org> + + Unreviewed build fix for Qt. + + Make sure we build when Qt is namespaced. + + * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: + +2011-08-06 Aron Rosenberg <arosenberg@logitech.com> + + Reviewed by Benjamin Poulain. + + [Qt] Fix build with Intel compiler on Windows + https://bugs.webkit.org/show_bug.cgi?id=65088 + + Intel compiler needs .lib suffixes instead of .a + + * WebCore.pri: + +2011-08-03 Kent Tamura <tkent@chromium.org> + + Fix incorrect checks for HTMLMediaElement + https://bugs.webkit.org/show_bug.cgi?id=65590 + + Reviewed by Dimitri Glazkov. + + <video> and <audio> can be an HTMLElement instance instead of + HTMLMediaElement if MediaPlayer::isAvailable() returns false or + the media feature is disabled at runtime. + + * html/HTMLSourceElement.cpp: + (WebCore::HTMLSourceElement::insertedIntoTree): + (WebCore::HTMLSourceElement::willRemove): + * html/HTMLTrackElement.cpp: + (WebCore::HTMLTrackElement::insertedIntoTree): + (WebCore::HTMLTrackElement::willRemove): + * html/shadow/MediaControlElements.cpp: + (WebCore::toParentMediaElement): + * page/FrameView.cpp: + (WebCore::FrameView::updateWidget): + * platform/efl/RenderThemeEfl.cpp: + (WebCore::RenderThemeEfl::paintMediaMuteButton): + * platform/gtk/RenderThemeGtk.cpp: + (WebCore::getMediaElementFromRenderObject): + * rendering/RenderThemeMac.mm: + (WebCore::RenderThemeMac::paintMediaSliderTrack): + * rendering/RenderThemeWinCE.cpp: + (WebCore::mediaElementParent): + +2011-07-28 Abhishek Arya <inferno@chromium.org> + + Regression(82144): Crash in TrailingObjects::updateMidpointsForTrailingBoxes + https://bugs.webkit.org/show_bug.cgi?id=65137 + + Fix the looping condition to prevent trailingSpaceMidpoint from becoming negative. + + Reviewed by Dave Hyatt. + + Test: fast/block/update-midpoints-for-trailing-boxes-crash.html + + * rendering/RenderBlockLineLayout.cpp: + (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): + +2011-08-01 Jochen Eisinger <jochen@chromium.org> + + Never override the policy URL on form submissions. + https://bugs.webkit.org/show_bug.cgi?id=61809 + + Reviewed by Adam Barth. + + Tests: http/tests/security/cookies/third-party-cookie-blocking-main-frame.html + http/tests/security/cookies/third-party-cookie-blocking-user-action.html + http/tests/security/cookies/third-party-cookie-blocking.html + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::loadURL): + (WebCore::FrameLoader::addExtraFieldsToSubresourceRequest): + (WebCore::FrameLoader::addExtraFieldsToMainResourceRequest): + (WebCore::FrameLoader::addExtraFieldsToRequest): + (WebCore::FrameLoader::loadPostRequest): + (WebCore::FrameLoader::loadDifferentDocumentItem): + * loader/FrameLoader.h: + + +2011-07-27 Alexis Menard <alexis.menard@openbossa.org> + + [Qt] Unreviewed build fix for mac. + + QtKit is now our default media player, the define is WTF_USE_QTKIT and it's not part + of the options passed to build-webkit, therefore DerivedSources should now generate the + includes when it's mac. + + * DerivedSources.pro: + * WebCore.pro: + +2011-07-07 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by David Hyatt. + + Partial layout when a flex-box has visibility: collapse + https://bugs.webkit.org/show_bug.cgi?id=63776 + + Tests: fast/flexbox/crash-button-input-autofocus.html + fast/flexbox/crash-button-keygen.html + fast/flexbox/crash-button-relayout.html + + The issue is that FlexBoxIterator would skip any child if it has visibility: collapsed. + However if one of the child is anonymous, it may wrap some other child that would be skipped. + Now FlexBoxIterator is called during the layout phase and thus some nodes would not relayouted + as expected. + + * rendering/RenderDeprecatedFlexibleBox.cpp: + (WebCore::FlexBoxIterator::next): When iterating, don't skip anonymous content as there may + be real content hiding below. + +2011-06-30 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Update SVG position values on SVG DOM updates + https://bugs.webkit.org/show_bug.cgi?id=62439 + + Test: svg/custom/crash-textPath-attributes.html + + * rendering/svg/RenderSVGInline.cpp: + (WebCore::RenderSVGInline::destroy): Notify our containing RenderSVGText that it needs + to update its positioning information. + + * rendering/svg/SVGInlineFlowBox.cpp: + (WebCore::SVGInlineFlowBox::calculateBoundaries): Check the type of the InlineBox + like the rest of the code (fixes an ASSERT_NOT_REACHED in InlineBox::calculateBoudaries). + + * rendering/svg/SVGTextLayoutAttributesBuilder.cpp: + (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree): Clear + our cached layout attributes every time we invalidate them. This avoids keeping stale + attribute that have a backpointer to a RenderObject. + +2011-07-13 John Knottenbelt <jknotten@chromium.org> + + Reference Geolocation object from GeoNotifier and Geolocation::setIsAllowed. + https://bugs.webkit.org/show_bug.cgi?id=64363 + + Reviewed by Tony Gentilcore. + + Test: fast/dom/Geolocation/remove-remote-context-in-error-callback-crash.html + + * page/Geolocation.cpp: + (WebCore::Geolocation::setIsAllowed): + * page/Geolocation.h: + +2011-06-26 Adam Barth <abarth@webkit.org> + + Reviewed by Kent Tamura. + + m_formElementsWithFormAttribute doesn't ref the objects it holds + https://bugs.webkit.org/show_bug.cgi?id=62956 + + Test: fast/forms/form-associated-element-crash3.html + + * dom/Document.h: + +2011-05-26 David Levin <levin@chromium.org> + + Reviewed by Dmitry Titov. + + WebKit's font notification has problems when the WebKit main thread != UI thread. + https://bugs.webkit.org/show_bug.cgi?id=61391 + + This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me + some time to write correctly. In the meantime, this issues happens to be causing + some crashes in Chrome so here's the fix alone for the time being. + + * platform/graphics/mac/FontCacheMac.mm: + (WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread. + (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation. + Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically, + there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code. + (WebCore::fontCacheATSNotificationCallback): Ditto. + +2011-07-07 Gavin Peters <gavinp@chromium.org> + + Reviewed by Alexey Proskuryakov. + + fast/dom/HTMLLinkElement/link-and-subresource-test.html is flaky on chromium debug bots + https://bugs.webkit.org/show_bug.cgi?id=60097 + + The culprit was that CachedResource:stopLoading() was using *this + after a call to checkNotify(), which isn't kosher. This patch + uses a CachedResourceHandle to keep the CachedResource alive. + + The test is a very close copy of the eponymous + link-and-subresource-test.html, only substituting invalid + resources for the valid ones in that test. The reproduction is + timing related, and happens much more consistantly with an invalid + resource for whatever reason. + Test: fast/dom/HTMLLinkElement/link-and-subresource-test-nonexistent.html + + * loader/cache/CachedResource.cpp: + (WebCore::CachedResource::stopLoading): + +2011-06-08 Mikołaj Małecki <m.malecki@samsung.com> + + Reviewed by Pavel Feldman. + + Web Inspector: Crash by buffer overrun crash when serializing inspector object tree. + https://bugs.webkit.org/show_bug.cgi?id=52791 + + No new tests. The problem can be reproduced by trying to create InspectorValue + from 1.0e-100 and call ->toJSONString() on this. + + * inspector/InspectorValues.cpp: + (WebCore::InspectorBasicValue::writeJSON): + Added checking the predicted buffer size and choosing exponential format, or + eventually "NaN" if the buffer is too small for decimal format. + +2011-07-26 Alexis Menard <alexis.menard@openbossa.org> + + [Qt] Disable video support on linux if the dependencies are not found. + + If we can't find the necessary dependencies to build the GStreamer media player + we disable the video support. This is related to http://trac.webkit.org/changeset/91752. + + Reviewed by Holger Freyther. + + No new tests, it's a build fix. + + * features.pri: + +2011-07-26 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] Change default backend to use GStreamer on Linux and QuickTime on Mac. + https://bugs.webkit.org/show_bug.cgi?id=63472 + + Enable the GStreamer backend and the QuickTime backend as default media players + for the Qt port on Mac and Linux. QtMultimedia is now a fallback option that you + can enable by passing DEFINES+=USE_QT_MULTIMEDIA=1 to enforce its usage. + + No new tests. The media layout tests are disabled on the Qt port but hopefully with this + switch we can enable them again. + + * WebCore.pri: + * WebCore.pro: + * features.pri: + +2011-06-23 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Eric Carlson. + + [Qt] Implement fullscreen support on Mac with the QuickTime backend. + https://bugs.webkit.org/show_bug.cgi?id=61728 + + Implement fullscreen support for Qt when using the QuickTime backend. + We mostly use what is already done for the Mac port. + + * DerivedSources.pro: We use the mac files and they have <WebCore/x> type + of includes. We need to generate those headers. + * WebCore.pro: + * platform/mac/WebVideoFullscreenController.h: + * platform/mac/WebVideoFullscreenController.mm: + * platform/mac/WebVideoFullscreenHUDWindowController.h: + * platform/mac/WebVideoFullscreenHUDWindowController.mm: + * platform/qt/WebCoreSystemInterface.h: + * platform/qt/WebCoreSystemInterface.mm: + +2011-06-21 Alexey Proskuryakov <ap@apple.com> + + Fix Mac build in some configurations. + + * platform/mac/WebCoreSystemInterface.h: Added an enum matching WKSI one, since we cannot use + WKSI in WebCore. + + * platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed an include of WebKitSystemInterface.h. + It's not meant to be used from WebCore, and if included, a wrong copy may be used. + (createControlWithMediaUIControlType): Added a FIXME about problems with Leopard build. + (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Ditto. Switched enum values to + WCSI style (lower level "wk"). + +2011-06-20 Jer Noble <jer.noble@apple.com> + + Unreviewed build fix; Fix Leopard WebCore build. + + * platform/mac/WebVideoFullscreenHUDWindowController.mm: On Leopard, NSWindowDelegate + is a category, not a protocol. + +2011-06-20 Jer Noble <jer.noble@apple.com> + + Unreviewed build fix; Fix 32-bit build. + + Code recently moved from WebKit -> WebCore does not pass WebCore's more strict compiler warnings. Use + CGFloat, and float constants wherever possible, and use narrowPrecisionToFloat() where not. + + * WebCore.xcodeproj/project.pbxproj: Add '-Wno-undef' flag for WebVideoFullScreenController.mm + * platform/mac/WebVideoFullscreenController.mm: + (constrainFrameToRatioOfFrame): Use CGFloat instead of Double. + (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]): Use float constant. + * platform/mac/WebVideoFullscreenHUDWindowController.mm: + (-[WebVideoFullscreenHUDWindowController updateVolume]): Use float for volume. + (-[WebVideoFullscreenHUDWindowController maxVolume]): Ditto. + (-[WebVideoFullscreenHUDWindowController volumeChanged:]): Ditto. + (-[WebVideoFullscreenHUDWindowController decrementVolume]): Ditto. + (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto. + (-[WebVideoFullscreenHUDWindowController volume]): Ditto. + (-[WebVideoFullscreenHUDWindowController setVolume:]): Ditto. + (timeToString): Narrow precision to float when converting to seconds. + * platform/mac/WebWindowAnimation.mm: + (scaledRect): Use CGFloat. + (-[WebWindowScaleAnimation init]): Use float constant. + (-[WebWindowScaleAnimation currentValue]): Ditto. + (-[WebWindowScaleAnimation additionalDurationNeededToReachFinalFrame]): Ditto. + (-[WebWindowFadeAnimation currentAlpha]): Ditto. + +2011-06-01 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + Move Full Screen Controllers into WebCore. + + Remove dependency on QTKit from wekitExitFullscreen() + https://bugs.webkit.org/show_bug.cgi?id=61843 + + No new tests; the existing media full screen tests are sufficient. + + * WebCore.exp.in: Add new exports. + * WebCore.xcodeproj/project.pbxproj: Add references to moved files. + * platform/mac/WebCoreSystemInterface.h: Add new WCSI interfaces to WKSI functions. + * platform/mac/WebCoreSystemInterface.mm: + * platform/mac/WebVideoFullscreenController.h: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenController.h. + * platform/mac/WebVideoFullscreenController.mm: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenController.mm. + + The following functions have had UNUSED_PARAM added: + (-[WebVideoFullscreenController applicationDidResignActive:]): + (-[WebVideoFullscreenController applicationDidChangeScreenParameters:]): + (-[WebVideoFullscreenWindow mouseMoved:]): + +Source/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.h. + * platform/mac/WebVideoFullscreenHUDWindowController.mm: Renamed from Source/WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm. + + The following functions have had UNUSED_PARAM added: + (-[WebVideoFullscreenHUDWindow cancelOperation:]): + (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]): + (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): + (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): + (-[WebVideoFullscreenHUDWindowController togglePlaying:]): + (-[WebVideoFullscreenHUDWindowController mouseEntered:]): + (-[WebVideoFullscreenHUDWindowController mouseExited:]): + (-[WebVideoFullscreenHUDWindowController rewind:]): + (-[WebVideoFullscreenHUDWindowController fastForward:]): + (-[WebVideoFullscreenHUDWindowController windowDidExpose:]): + (-[WebVideoFullscreenHUDWindowController windowDidClose:]): + + The following functions have had WKSI calls converted to WCSI ones: + (createControlWithMediaUIControlType): + (createTimeTextField): + + * platform/mac/WebWindowAnimation.h: Renamed from Source/WebKit/mac/WebView/WebWindowAnimation.h. + * platform/mac/WebWindowAnimation.mm: Renamed from Source/WebKit/mac/WebView/WebWindowAnimation.m. + (WebWindowAnimationDurationFromDuration): + + The following functions have had WKSI calls converted to WCSI ones: + (-[WebWindowScaleAnimation setCurrentProgress:]): + (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]): + +2011-07-27 Ryosuke Niwa <rniwa@webkit.org> + + Calling window.find immediately after mutating the document crashes WebKit. + https://bugs.webkit.org/show_bug.cgi?id=65296 + + Reviewed by Darin Adler. + + Don't forget to layout first. + + Test: editing/text-iterator/find-after-mutation.html + + * editing/TextIterator.cpp: + (WebCore::findPlainText): + +2011-07-27 MORITA Hajime <morrita@google.com> + + Inconsistent state of TreeScope reference. + https://bugs.webkit.org/show_bug.cgi?id=65235 + + The tree scope pointers on shadow tree nodes didn't cleared. + even when the tree scope (shadow root) is destroyed. + This change clear these poitners before detaching the shadow root. + + Reviewed by Dimitri Glazkov. + + Test: fast/dom/shadow/tree-scope-crash.html + + * dom/Element.cpp: + (WebCore::Element::removeShadowRoot): + +2011-05-22 Dominic Cooney <dominicc@chromium.org> + + Reviewed by Dimitri Glazkov. + + When removing a shadow root, also remove it from the render tree. + https://bugs.webkit.org/show_bug.cgi?id=61245 + + Test: existing fast/dom/shadow/layout-tests-can-access-shadow.html + + * dom/Element.cpp: + (WebCore::Element::removeShadowRoot): Call detach if attached. + +2011-07-22 Sergey Glazunov <serg.glazunov@gmail.com> + + Perform the JavaScript navigation check on a complete URL + https://bugs.webkit.org/show_bug.cgi?id=65038 + + Reviewed by Adam Barth. + + Test: http/tests/security/xss-DENIED-document-baseURI-javascript.html + + * page/DOMWindow.cpp: + (WebCore::DOMWindow::setLocation): + (WebCore::DOMWindow::createWindow): + (WebCore::DOMWindow::open): + +2011-07-22 David Grogan <dgrogan@chromium.org> + + Fix crash in IDBRequest::abort + https://bugs.webkit.org/show_bug.cgi?id=64740 + + Reviewed by Nate Chapin. + + Tested manually with the testcase in the bug. + + * storage/IDBRequest.cpp: + (WebCore::IDBRequest::~IDBRequest): + (WebCore::IDBRequest::abort): + +2011-07-25 Daniel Bates <dbates@rim.com> + + REGRESSION (r85964): Improper relayout of some nested positioned elements + https://bugs.webkit.org/show_bug.cgi?id=64286 + + Reviewed by David Hyatt. + + Fixes an issue when traversing up the containing block hierarchy after skipping + relatively positioned inlines. + + When processing a positioned element we skip any intermediate inlines to get to + to enclosing block B, but don't use the containing block for B (call this P_B) to + properly continue traversing up the containing block hierarchy. So, B may be + considered again instead of looking at P_B. Hence, we don't set the correct dirty + bits for P_B and may not schedule a relayout with respect to the correct layout node. + + Test: fast/block/positioning/relayout-nested-positioned-elements-crash.html + + * rendering/RenderObject.h: + (WebCore::RenderObject::markContainingBlocksForLayout): + +2011-07-26 David Hyatt <hyatt@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=60778 + + Use after free because of line box culling optimization regression. + + In the case of a child with no line box being removed (typically + a <br> in quirks mode), if there is no previous sibling with a line + box, then we have a potential problem with the culling optimization. + + The culled inline may still have other leaf line box children, but + they may follow the removed <br>. In this case we can't rely on + them, since we need a line box that comes before the <br>. + + The fix is to simply recur up to the parent if we are a culled inline + and could not find a previous line box. + + Reviewed by Dan Bernstein. + + Added editing/execCommand/crash-line-break-after-outdent.html + + * rendering/RenderLineBoxList.cpp: + (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): + +2011-07-19 Abhishek Arya <inferno@chromium.org> + + Crash when removing unrenderered nodes in replacement fragment. + https://bugs.webkit.org/show_bug.cgi?id=64801 + + Reviewed by Ryosuke Niwa. + + Test: editing/pasteboard/replacement-fragment-remove-unrendered-node-crash.html + + * editing/ReplaceSelectionCommand.cpp: + (WebCore::ReplacementFragment::removeUnrenderedNodes): + +2011-07-21 Gavin Peters <gavinp@chromium.org> + + Extend the protector of a CSS style sheet. Because checkLoaded() can recursively delete + parent style elements, the protector should be extended to include the parent call. + + https://bugs.webkit.org/show_bug.cgi?id=64736 + + Reviewed by Simon Fraser. + + Test: fast/css/css-imports-2.html + + * css/CSSStyleSheet.cpp: + (WebCore::CSSStyleSheet::checkLoaded): + +2011-07-20 Tony Chang <tony@chromium.org> + + Stale pointer due to floats not removed (flexible box display) + https://bugs.webkit.org/show_bug.cgi?id=64603 + + Reviewed by David Hyatt. + + Flexbox items should avoid floats. + + Test: fast/flexbox/horizontal-box-float-crash.html + + * rendering/RenderBox.cpp: + (WebCore::RenderBox::avoidsFloats): + * rendering/RenderBox.h: + (WebCore::RenderBox::isDeprecatedFlexItem): + +2011-07-12 Hui Huang <Hui.2.Huang@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix compiling errors with QtWebkit 2.2 WINSCW build. + https://bugs.webkit.org/show_bug.cgi?id=64391 + + (QtWebKit-2.2 only, patch not in webkit trunk) + + * bindings/generic/ActiveDOMCallback.cpp: + * css/CSSStyleSelector.h: + * page/PrintContext.cpp: + * page/PrintContext.h: + * platform/network/HTTPHeaderMap.cpp: + * xml/XPathFunctions.cpp: + * xml/XPathPredicate.cpp: + * xml/XPathResult.cpp: + +2011-07-16 Sergey Glazunov <serg.glazunov@gmail.com> + + DOMWindow::open performs a security check on a wrong window + https://bugs.webkit.org/show_bug.cgi?id=64651 + + Reviewed by Adam Barth. + + Test: http/tests/security/xss-DENIED-window-open-parent.html + + * page/DOMWindow.cpp: + (WebCore::DOMWindow::open): + +2011-07-14 Adam Barth <abarth@webkit.org> + + The beforeload event allows tracking URI changes in a frame + https://bugs.webkit.org/show_bug.cgi?id=64482 + + Reviewed by Nate Chapin. + + Tests: http/tests/security/beforeload-iframe-client-redirect.html + http/tests/security/beforeload-iframe-server-redirect.html + + Only dispatch the beforeload event for a frame if we haven't yet + committed our first real load. The URL that we send to our parent will + be the same URL the parent seens in the src attribute. + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::loadWithDocumentLoader): + +2011-07-14 Tim Horton <timothy_horton@apple.com> + + Clear SVGElementInstance's children immediately upon detachment + https://bugs.webkit.org/show_bug.cgi?id=63739 + <rdar://problem/9705708> + + Reviewed by Nikolas Zimmermann. + + In addition to clearing the instance's children in the destructor, + clear them when the instance is detached from its <use>. This way, + we won't attempt to use them after we're detached but before the + destructor has been called. + + Test: svg/custom/use-crash-using-children-before-destroy.svg + + * svg/SVGElementInstance.cpp: + (WebCore::SVGElementInstance::~SVGElementInstance): + (WebCore::SVGElementInstance::clearChildren): + * svg/SVGElementInstance.h: + * svg/SVGUseElement.cpp: + (WebCore::SVGUseElement::detachInstance): + +2011-06-20 Andras Becsi <abecsi@webkit.org> + + Reviewed by Csaba Osztrogonác. + + make-hash-tools.pl: Perl 5.14 compatibility + https://bugs.webkit.org/show_bug.cgi?id=61890 + + No new tests needed. + + * make-hash-tools.pl: Use if/elsif instead of switch/case. + +2011-07-13 Abhishek Arya <inferno@chromium.org> + + Reviewed by Adam Barth. + + Issue with Frame lifetime due to deletion in beforeload event. + https://bugs.webkit.org/show_bug.cgi?id=64457 + + Copy the Frame protector higher in the stack from loadWithDocumentLoader + to loadFrameRequest since any of loadPostRequest or loadURL can call + loadWithDocumentLoader, thereby dispatching the beforeload event and + blowing away the frame. This deleted frame will be later accessed in + the loadFrameRequest function causing a crash. + + Test: fast/events/form-iframe-target-before-load-crash2.html + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::loadFrameRequest): + (WebCore::FrameLoader::loadWithDocumentLoader): + +2011-06-03 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Frame flattening is broken with nested frames + https://bugs.webkit.org/show_bug.cgi?id=61491 + + Do not flatten offscreen iframes during frame flattening, as flattening might make them visible. + + Test: fast/frames/flattening/iframe-flattening-out-of-view.html + fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html + fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html + + * rendering/RenderIFrame.cpp: + (WebCore::RenderIFrame::flattenFrame): + +2011-06-23 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin + https://bugs.webkit.org/show_bug.cgi?id=30355 + + Test: plugins/mouse-click-plugin-clears-selection.html + + PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin + in order to clear the FrameSelection in the currently focused node. In its platform-specific + code Chromium already does this (WebPluginContainerImpl.cpp). + + * WebCore.exp.in: Add symbol for FocusController::setFocusedNode + * plugins/PluginView.cpp: + (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes + the call to FocusController:setFocusedFrame() and Document::setFocusedNode() + redundant, since it calls both. + +2011-06-30 Julien Chaffraix <jchaffraix@webkit.org> + + Reviewed by Nikolas Zimmermann. + + Assertion failure in RenderSVGInlineText::characterStartsNewTextChunk + https://bugs.webkit.org/show_bug.cgi?id=63076 + + Tests: svg/custom/crash-text-in-textpath.svg + svg/custom/text-node-in-text-invalidated.svg + + The problem was that we did not call setNeedsPositionUpdate on RenderSVGText. When + doing our layout, we would not update the attributes on our SVGRenderInlineText as + we would not lay it out. + + This was caused by childrenChanged being overridden on SVGTextPositioningElement but + not on SVGTextPathElement. + + As both classes shared the same mother class, it made sense to move the logic here. + There should be no other side effects as SVGTextPathElement and SVGTextPositioningElement + are the only classes deriving from SVGTextContentElement. + + * svg/SVGTextContentElement.cpp: + (WebCore::SVGTextContentElement::childrenChanged): Moved this method from SVGTextPositioningElement. + * svg/SVGTextContentElement.h: + * svg/SVGTextPositioningElement.cpp: + (WebCore::SVGTextPositioningElement::svgAttributeChanged): Updated after updatePositioningValuesInRenderer + removal, replaced by RenderSVGText::locateRenderSVGTextAncestor. + * svg/SVGTextPositioningElement.h: + +2011-06-30 Abhishek Arya <inferno@chromium.org> + + Reviewed by Ryosuke Niwa. + + Crash when calling DOMSubtreeModified event when extracting range + contents. + https://bugs.webkit.org/show_bug.cgi?id=63650 + + Convert a few nodes to RefPtrs and add commonRoot verification checks + for Range::processContents. + + Tests: fast/dom/Range/range-extract-contents-event-fire-crash.html + fast/dom/Range/range-extract-contents-event-fire-crash2.html + + * dom/Range.cpp: + (WebCore::childOfCommonRootBeforeOffset): + (WebCore::Range::processContents): + (WebCore::Range::processContentsBetweenOffsets): + (WebCore::Range::processAncestorsAndTheirSiblings): + +2011-06-23 Abhishek Arya <inferno@chromium.org> + + Reviewed by James Robinson. + + In RenderBlock, RenderWidget and RenderReplaced destroy functions, + call dirtyLinesFromChangedChild to tell our parent that we are going away. + https://bugs.webkit.org/show_bug.cgi?id=60307 + + Test: fast/block/child-not-removed-from-parent-lineboxes-crash.html + fast/block/block-not-removed-from-parent-lineboxes-crash.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::destroy): + * rendering/RenderReplaced.cpp: + (WebCore::RenderReplaced::destroy): + * rendering/RenderReplaced.h: + * rendering/RenderWidget.cpp: + (WebCore::RenderWidget::destroy): + +2011-05-05 David Hyatt <hyatt@apple.com> + + Reviewed by Darin Adler. + + <rdar://problem/9354979> REGRESSION (r83070-r83126): Conversation takes 10 seconds to load and makes mail unresponsive + + Culled inlines were triggering some pathological line box tree groveling that isn't even necessary. + Removed the ancient code (that used to be in RenderFlow), since it made no sense in the RenderBlock case + (it was running for inline blocks, which was definitely not even the intent) or in the RenderInline case + (the object being removed has no effect on any lines). + + Also tweaked culledInlineFirstLineBox and culledInlineLastLineBox to avoid bailing if the first replaced object that + is encountered has a null inlineBoxWrapper(). Just a slight speed optimization to avoid an extra null check. + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::destroy): + * rendering/RenderInline.cpp: + (WebCore::RenderInline::destroy): + (WebCore::RenderInline::culledInlineFirstLineBox): + (WebCore::RenderInline::culledInlineLastLineBox): + 2011-06-28 Roland Steiner <rolandsteiner@chromium.org> Reviewed by Eric Seidel. @@ -242,17 +1286,6 @@ * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::detachFromFrame): Rollout the fix for bug 62764. -2011-06-24 Alexis Menard <alexis.menard@openbossa.org> - - Unreviewed build fix. - - Build fix on Linux when using the GStreamer backend. - - No new tests, just a build fix. - - * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: - (FullScreenVideoWindow::keyPressEvent): - 2011-06-23 Abhishek Arya <inferno@chromium.org> Reviewed by Adam Barth. diff --git a/src/3rdparty/webkit/Source/WebCore/CodeGenerators.pri b/src/3rdparty/webkit/Source/WebCore/CodeGenerators.pri index cc29660..db6f7af 100644 --- a/src/3rdparty/webkit/Source/WebCore/CodeGenerators.pri +++ b/src/3rdparty/webkit/Source/WebCore/CodeGenerators.pri @@ -509,6 +509,7 @@ IDL_BINDINGS += \ svg/SVGUseElement.idl \ svg/SVGViewElement.idl \ svg/SVGVKernElement.idl \ + testing/Internals.idl \ webaudio/AudioBuffer.idl \ webaudio/AudioBufferSourceNode.idl \ webaudio/AudioChannelMerger.idl \ @@ -613,6 +614,7 @@ idl.commands = perl -I$$PWD/bindings/scripts $$idl.wkScript \ --include $$PWD/svg \ --include $$PWD/storage \ --include $$PWD/css \ + --include $$PWD/testing \ --include $$PWD/webaudio \ --include $$PWD/workers \ --outputDir $$WC_GENERATED_SOURCES_DIR \ diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.exp.in b/src/3rdparty/webkit/Source/WebCore/WebCore.exp.in index 83317a8..982a8ef 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.exp.in +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.exp.in @@ -263,6 +263,7 @@ __ZN7WebCore12IconDatabase27checkIntegrityBeforeOpeningEv __ZN7WebCore12IconDatabase5closeEv __ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE __ZN7WebCore12IconDatabaseC1Ev +__ZN7WebCore12JSDOMWrapper34virtualFunctionToPreventWeakVtableEv __ZN7WebCore12PopupMenuMacC1EPNS_15PopupMenuClientE __ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci __ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE @@ -389,6 +390,7 @@ __ZN7WebCore15DatabaseTracker8setQuotaEPNS_14SecurityOriginEy __ZN7WebCore15DatabaseTracker9setClientEPNS_21DatabaseTrackerClientE __ZN7WebCore15FocusController10setFocusedEb __ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE +__ZN7WebCore15FocusController14setFocusedNodeEPNS_4NodeEN3WTF10PassRefPtrINS_5FrameEEE __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE __ZN7WebCore15FocusController9setActiveEb __ZN7WebCore15GraphicsContext12setFillColorERKNS_5ColorENS_10ColorSpaceE @@ -1010,6 +1012,8 @@ __ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_ __ZN7WebCore9pageCacheEv __ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorE __ZN7WebCore9toElementEN3JSC7JSValueE +__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE +__ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE __ZNK3JSC8Bindings10RootObject12globalObjectEv __ZNK3WTF6String14createCFStringEv __ZNK7WebCore5Frame26getDocumentBackgroundColorEv @@ -1303,6 +1307,7 @@ __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv __ZNK7WebCore9PageCache10frameCountEv __ZNK7WebCore9PageCache21autoreleasedPageCountEv __ZTVN7WebCore12ChromeClientE +__ZTVN7WebCore12JSDOMWrapperE __ZTVN7WebCore16IconDatabaseBaseE __ZTVN7WebCore17FileChooserClientE __ZTVN7WebCore17FrameLoaderClientE @@ -1325,6 +1330,8 @@ _wkCopyNSURLResponseStatusLine _wkCopyRequestWithStorageSession _wkCreateCTLineWithUniCharProvider _wkCreateCustomCFReadStream +_wkCreateMediaUIBackgroundView +_wkCreateMediaUIControl _wkCreateNSURLConnectionDelegateProxy _wkCreatePrivateStorageSession _wkCreateURLNPasteboardFlavorTypeName @@ -1394,6 +1401,8 @@ _wkSignalCFReadStreamEnd _wkSignalCFReadStreamError _wkSignalCFReadStreamHasBytes _wkSignedPublicKeyAndChallengeString +_wkWindowSetAlpha +_wkWindowSetScaledFrame #if ENABLE(DOM_STORAGE) __ZN7WebCore14StorageTracker17initializeTrackerERKN3WTF6StringE @@ -1631,8 +1640,6 @@ __ZN3JSC8Bindings8InstanceC2EN3WTF10PassRefPtrINS0_10RootObjectEEE __ZN3JSC8Bindings8InstanceD2Ev __ZN7WebCore13IdentifierRep7isValidEPS0_ __ZN7WebCore16ScriptController16createRootObjectEPv -__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE -__ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE __ZNK3JSC8Bindings13RuntimeObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE __ZTVN3JSC13RuntimeMethodE #endif @@ -1800,6 +1807,9 @@ __ZNK7WebCore16HTMLMediaElement6volumeEv __ZNK7WebCore16HTMLMediaElement7canPlayEv __ZNK7WebCore16HTMLMediaElement12playbackRateEv __ZNK7WebCore16HTMLMediaElement8durationEv +__ZN7WebCore16HTMLMediaElement16returnToRealtimeEv +__ZNK7WebCore16HTMLMediaElement12isFullscreenEv +.objc_class_name_WebVideoFullscreenController #endif #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.gypi b/src/3rdparty/webkit/Source/WebCore/WebCore.gypi index e418f7f..7383db1 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.gypi +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.gypi @@ -6054,6 +6054,17 @@ 'xml/XSLTUnicodeSort.cpp', 'xml/XSLTUnicodeSort.h', ], + 'webcore_test_support_idl_files': [ + 'testing/Internals.idl', + ], + 'webcore_test_support_files': [ + 'testing/v8/WebCoreTestSupport.cpp', + 'testing/v8/WebCoreTestSupport.h', + 'testing/js/WebCoreTestSupport.cpp', + 'testing/js/WebCoreTestSupport.h', + 'testing/Internals.cpp', + 'testing/Internals.h', + ], 'webcore_resource_files': [ 'English.lproj/Localizable.strings', 'English.lproj/localizedStrings.js', diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.pri b/src/3rdparty/webkit/Source/WebCore/WebCore.pri index 4ba1117..82311d2 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.pri +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.pri @@ -48,14 +48,16 @@ v8 { $$SOURCE_DIR/WebCore/bindings/v8 \ $$SOURCE_DIR/WebCore/bindings/v8/custom \ $$SOURCE_DIR/WebCore/bindings/v8/specialization \ - $$SOURCE_DIR/WebCore/bridge/qt/v8 + $$SOURCE_DIR/WebCore/bridge/qt/v8 \ + $$SOURCE_DIR/WebCore/testing/v8 } else { WEBCORE_INCLUDEPATH = \ $$SOURCE_DIR/WebCore/bridge/jsc \ $$SOURCE_DIR/WebCore/bindings/js \ $$SOURCE_DIR/WebCore/bindings/js/specialization \ - $$SOURCE_DIR/WebCore/bridge/c + $$SOURCE_DIR/WebCore/bridge/c \ + $$SOURCE_DIR/WebCore/testing/js } WEBCORE_INCLUDEPATH = \ @@ -110,6 +112,7 @@ WEBCORE_INCLUDEPATH = \ $$SOURCE_DIR/WebCore/svg/graphics \ $$SOURCE_DIR/WebCore/svg/graphics/filters \ $$SOURCE_DIR/WebCore/svg/properties \ + $$SOURCE_DIR/WebCore/testing \ $$SOURCE_DIR/WebCore/webaudio \ $$SOURCE_DIR/WebCore/websockets \ $$SOURCE_DIR/WebCore/wml \ @@ -242,26 +245,22 @@ contains(DEFINES, WTF_USE_QT_BEARER=1) { } contains(DEFINES, ENABLE_VIDEO=1) { - contains(DEFINES, USE_QTKIT=1) { - DEFINES += WTF_USE_QTKIT=1 - + contains(DEFINES, WTF_USE_QTKIT=1) { INCLUDEPATH += $$PWD/platform/graphics/mac LIBS += -framework AppKit -framework AudioUnit \ -framework AudioToolbox -framework CoreAudio \ -framework QuartzCore -framework QTKit - } else:contains(DEFINES, USE_GSTREAMER=1) { - DEFINES += WTF_USE_GSTREAMER=1 + } else:contains(DEFINES, WTF_USE_GSTREAMER=1) { DEFINES += ENABLE_GLIB_SUPPORT=1 INCLUDEPATH += $$PWD/platform/graphics/gstreamer PKGCONFIG += glib-2.0 gio-2.0 gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 gstreamer-video-0.10 - } else:contains(MOBILITY_CONFIG, multimedia) { + } else:contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) { CONFIG *= mobility MOBILITY *= multimedia - DEFINES += WTF_USE_QT_MULTIMEDIA=1 } } @@ -343,7 +342,7 @@ use_qt_mobile_theme: DEFINES += WTF_USE_QT_MOBILE_THEME=1 defineTest(prependWebCoreLib) { pathToWebCoreOutput = $$ARGS/$$WEBCORE_DESTDIR - win32-msvc*|wince* { + win32-msvc*|wince*|win32-icc { LIBS = -l$$WEBCORE_TARGET $$LIBS LIBS = -L$$pathToWebCoreOutput $$LIBS POST_TARGETDEPS += $${pathToWebCoreOutput}$${QMAKE_DIR_SEP}$${WEBCORE_TARGET}.lib diff --git a/src/3rdparty/webkit/Source/WebCore/WebCore.pro b/src/3rdparty/webkit/Source/WebCore/WebCore.pro index 107ff35..a305549 100644 --- a/src/3rdparty/webkit/Source/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/Source/WebCore/WebCore.pro @@ -222,7 +222,8 @@ v8 { bindings/v8/custom/V8NotificationCenterCustom.cpp \ bindings/v8/custom/V8ConsoleCustom.cpp \ bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \ - bindings/v8/V8WorkerContextErrorHandler.cpp + bindings/v8/V8WorkerContextErrorHandler.cpp \ + testing/v8/WebCoreTestSupport.cpp } else { SOURCES += \ bindings/ScriptControllerBase.cpp \ @@ -374,7 +375,8 @@ v8 { bridge/runtime_array.cpp \ bridge/runtime_method.cpp \ bridge/runtime_object.cpp \ - bridge/runtime_root.cpp + bridge/runtime_root.cpp \ + testing/js/WebCoreTestSupport.cpp } SOURCES += \ @@ -1173,6 +1175,7 @@ SOURCES += \ rendering/style/StyleSurroundData.cpp \ rendering/style/StyleTransformData.cpp \ rendering/style/StyleVisualData.cpp \ + testing/Internals.cpp \ xml/DOMParser.cpp \ xml/XMLHttpRequest.cpp \ xml/XMLHttpRequestProgressEventThrottle.cpp \ @@ -2420,6 +2423,7 @@ HEADERS += \ svg/SVGVKernElement.h \ svg/SVGZoomAndPan.h \ svg/SVGZoomEvent.h \ + testing/Internals.h \ workers/AbstractWorker.h \ workers/DedicatedWorkerContext.h \ workers/DedicatedWorkerThread.h \ @@ -2934,31 +2938,43 @@ contains(DEFINES, ENABLE_VIDEO=1) { bindings/js/JSAudioConstructor.cpp } - contains(DEFINES, USE_QTKIT=1) { + contains(DEFINES, WTF_USE_QTKIT=1) { + INCLUDEPATH += \ + $$SOURCE_DIR/../WebKitLibraries/ + HEADERS += \ platform/graphics/mac/MediaPlayerPrivateQTKit.h \ platform/mac/WebCoreObjCExtras.h \ platform/qt/WebCoreSystemInterface.h \ platform/mac/BlockExceptions.h \ - platform/mac/WebCoreObjCExtras.h + platform/mac/WebCoreObjCExtras.h \ + platform/mac/WebVideoFullscreenController.h \ + platform/mac/WebVideoFullscreenHUDWindowController.h \ + platform/mac/WebWindowAnimation.h + SOURCES += \ + platform/graphics/cg/IntRectCG.cpp \ + platform/graphics/cg/FloatSizeCG.cpp \ + platform/cf/SharedBufferCF.cpp \ + platform/cf/KURLCFNet.cpp + + OBJECTIVE_SOURCES += \ + platform/qt/WebCoreSystemInterface.mm \ + platform/mac/BlockExceptions.mm \ + platform/mac/WebCoreObjCExtras.mm \ platform/graphics/mac/MediaPlayerPrivateQTKit.mm \ platform/mac/SharedBufferMac.mm \ platform/mac/KURLMac.mm \ platform/text/mac/StringMac.mm \ platform/graphics/mac/FloatSizeMac.mm \ platform/graphics/mac/IntRectMac.mm \ - platform/graphics/cg/IntRectCG.cpp \ - platform/graphics/cg/FloatSizeCG.cpp \ - platform/cf/SharedBufferCF.cpp \ - platform/cf/KURLCFNet.cpp \ - platform/qt/WebCoreSystemInterface.mm \ - platform/mac/BlockExceptions.mm \ - platform/mac/WebCoreObjCExtras.mm + platform/mac/WebVideoFullscreenController.mm \ + platform/mac/WebVideoFullscreenHUDWindowController.mm \ + platform/mac/WebWindowAnimation.mm DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES - } else: contains(DEFINES, USE_GSTREAMER=1) { + } else: contains(DEFINES, WTF_USE_GSTREAMER=1) { HEADERS += \ platform/graphics/gstreamer/GOwnPtrGStreamer.h \ platform/graphics/gstreamer/GRefPtrGStreamer.h \ @@ -2979,7 +2995,7 @@ contains(DEFINES, ENABLE_VIDEO=1) { platform/graphics/gstreamer/PlatformVideoWindowQt.cpp \ platform/graphics/gstreamer/ImageGStreamerQt.cpp - } else:contains(MOBILITY_CONFIG, multimedia) { + } else:contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) { HEADERS += \ platform/graphics/qt/MediaPlayerPrivateQt.h diff --git a/src/3rdparty/webkit/Source/WebCore/bindings/generic/ActiveDOMCallback.cpp b/src/3rdparty/webkit/Source/WebCore/bindings/generic/ActiveDOMCallback.cpp index ff02a42..86bfc56 100644 --- a/src/3rdparty/webkit/Source/WebCore/bindings/generic/ActiveDOMCallback.cpp +++ b/src/3rdparty/webkit/Source/WebCore/bindings/generic/ActiveDOMCallback.cpp @@ -38,29 +38,6 @@ namespace WebCore { -static void destroyOnContextThread(PassOwnPtr<ActiveDOMObjectCallbackImpl>); - -class DestroyOnContextThreadTask : public ScriptExecutionContext::Task { -public: - static PassOwnPtr<DestroyOnContextThreadTask> create(PassOwnPtr<ActiveDOMObjectCallbackImpl> impl) - { - return adoptPtr(new DestroyOnContextThreadTask(impl)); - } - - virtual void performTask(ScriptExecutionContext*) - { - destroyOnContextThread(m_impl.release()); - } - -private: - DestroyOnContextThreadTask(PassOwnPtr<ActiveDOMObjectCallbackImpl> impl) - : m_impl(impl) - { - } - - OwnPtr<ActiveDOMObjectCallbackImpl> m_impl; -}; - class ActiveDOMObjectCallbackImpl : public ActiveDOMObject { public: ActiveDOMObjectCallbackImpl(ScriptExecutionContext* context) @@ -109,6 +86,29 @@ private: bool m_stopped; }; +static void destroyOnContextThread(PassOwnPtr<ActiveDOMObjectCallbackImpl>); + +class DestroyOnContextThreadTask : public ScriptExecutionContext::Task { +public: + static PassOwnPtr<DestroyOnContextThreadTask> create(PassOwnPtr<ActiveDOMObjectCallbackImpl> impl) + { + return adoptPtr(new DestroyOnContextThreadTask(impl)); + } + + virtual void performTask(ScriptExecutionContext*) + { + destroyOnContextThread(m_impl.release()); + } + +private: + DestroyOnContextThreadTask(PassOwnPtr<ActiveDOMObjectCallbackImpl> impl) + : m_impl(impl) + { + } + + OwnPtr<ActiveDOMObjectCallbackImpl> m_impl; +}; + static void destroyOnContextThread(PassOwnPtr<ActiveDOMObjectCallbackImpl> impl) { OwnPtr<ActiveDOMObjectCallbackImpl> implOwnPtr = impl; diff --git a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.cpp b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.cpp index 60c0ed1..d54fe74 100644 --- a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.cpp +++ b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.cpp @@ -32,12 +32,9 @@ using namespace JSC; namespace WebCore { -#ifndef NDEBUG - -JSDOMWrapper::~JSDOMWrapper() +void JSDOMWrapper::virtualFunctionToPreventWeakVtable() { + ASSERT_NOT_REACHED(); } -#endif - } // namespace WebCore diff --git a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.h b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.h index 2f5bebd..9a4aca5 100644 --- a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.h +++ b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSDOMWrapper.h @@ -48,6 +48,10 @@ public: } protected: + // An inline function cannot be the first non-abstract virtual function declared + // in the class as it results in the vtable being generated as a weak symbol. + virtual void virtualFunctionToPreventWeakVtable(); + explicit JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject* globalObject) : JSObjectWithGlobalObject(globalObject, structure) { @@ -56,10 +60,6 @@ protected: // needing to reach through the frame to get to the Document*. See bug 27640. // ASSERT(globalObject->scriptExecutionContext()); } - -#ifndef NDEBUG - virtual ~JSDOMWrapper(); -#endif }; } // namespace WebCore diff --git a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSExceptionBase.h b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSExceptionBase.h index a9366ed..01c6ac2 100644 --- a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSExceptionBase.h +++ b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSExceptionBase.h @@ -1,43 +1,43 @@ -/* - * Copyright (C) 2009 Apple Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef JSExceptionBase_h -#define JSExceptionBase_h - -namespace JSC { - -class JSValue; - -} // namespace JSC - -namespace WebCore { - -class ExceptionBase; - -ExceptionBase* toExceptionBase(JSC::JSValue); - -} // namespace WebCore - -#endif // JSExceptionBase_h +/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSExceptionBase_h
+#define JSExceptionBase_h
+
+namespace JSC {
+
+class JSValue;
+
+} // namespace JSC
+
+namespace WebCore {
+
+class ExceptionBase;
+
+ExceptionBase* toExceptionBase(JSC::JSValue);
+
+} // namespace WebCore
+
+#endif // JSExceptionBase_h
diff --git a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSImageDataCustom.cpp b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSImageDataCustom.cpp index 420b60c..6e242b0 100644 --- a/src/3rdparty/webkit/Source/WebCore/bindings/js/JSImageDataCustom.cpp +++ b/src/3rdparty/webkit/Source/WebCore/bindings/js/JSImageDataCustom.cpp @@ -48,8 +48,10 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData* imageD wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ImageData, imageData); Identifier dataName(exec, "data"); static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::Base::s_info, 0, 0 }; - DEFINE_STATIC_LOCAL(Strong<Structure>, cpaStructure, (exec->globalData(), JSByteArray::createStructure(exec->globalData(), jsNull(), &cpaClassInfo))); - wrapper->putDirect(exec->globalData(), dataName, new (exec) JSByteArray(exec, cpaStructure.get(), imageData->data()->data()), DontDelete | ReadOnly); + Structure* cpaStructure = getCachedDOMStructure(globalObject, &cpaClassInfo); + if (!cpaStructure) + cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), jsNull(), &cpaClassInfo), &cpaClassInfo); + wrapper->putDirect(exec->globalData(), dataName, new (exec) JSByteArray(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly); exec->heap()->reportExtraMemoryCost(imageData->data()->length()); return wrapper; diff --git a/src/3rdparty/webkit/Source/WebCore/config.h b/src/3rdparty/webkit/Source/WebCore/config.h index 001753e..a7ddcee 100644 --- a/src/3rdparty/webkit/Source/WebCore/config.h +++ b/src/3rdparty/webkit/Source/WebCore/config.h @@ -197,6 +197,7 @@ #if OS(SYMBIAN) #define USE_SYSTEM_MALLOC 1 +#define ENABLE_PASSWORD_ECHO 1 #endif #if OS(UNIX) || OS(WINDOWS) diff --git a/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSelector.h b/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSelector.h index a9b0c3e..1fe4ea2 100644 --- a/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSelector.h +++ b/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSelector.h @@ -209,7 +209,7 @@ public: bool checkSelector(const RuleData&); - template <bool firstPass> + template <bool applyFirst> void applyDeclarations(bool important, int startIndex, int endIndex); void matchPageRules(RuleSet*, bool isLeftPage, bool isFirstPage, const String& pageName); diff --git a/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSheet.cpp b/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSheet.cpp index 16c2ba8..37e5c2a 100644 --- a/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSheet.cpp +++ b/src/3rdparty/webkit/Source/WebCore/css/CSSStyleSheet.cpp @@ -220,13 +220,13 @@ void CSSStyleSheet::checkLoaded() { if (isLoading()) return; - if (parent()) - parent()->checkLoaded(); // Avoid |this| being deleted by scripts that run via // ScriptableDocumentParser::executeScriptsWaitingForStylesheets(). // See <rdar://problem/6622300>. RefPtr<CSSStyleSheet> protector(this); + if (parent()) + parent()->checkLoaded(); m_loadCompleted = ownerNode() ? ownerNode()->sheetLoaded() : true; } diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Document.h b/src/3rdparty/webkit/Source/WebCore/dom/Document.h index 6e2f5ec..0948592 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/Document.h +++ b/src/3rdparty/webkit/Source/WebCore/dom/Document.h @@ -1227,7 +1227,7 @@ private: typedef ListHashSet<Element*, 64> FormElementListHashSet; FormElementListHashSet m_formElementsWithState; - typedef ListHashSet<FormAssociatedElement*, 32> FormAssociatedElementListHashSet; + typedef ListHashSet<RefPtr<FormAssociatedElement>, 32> FormAssociatedElementListHashSet; FormAssociatedElementListHashSet m_formElementsWithFormAttribute; typedef HashMap<FormElementKey, Vector<String>, FormElementKeyHash, FormElementKeyHashTraits> FormElementStateMap; diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp index e7bfbc0..32e47ca 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp @@ -1208,7 +1208,13 @@ void Element::removeShadowRoot() InspectorInstrumentation::willRemoveDOMNode(document(), this); data->m_shadowRoot = 0; document()->removeFocusedNodeOfSubtree(oldRoot.get()); + + // Remove from rendering tree + if (oldRoot->attached()) + oldRoot->detach(); + oldRoot->setShadowHost(0); + oldRoot->setTreeScopeRecursively(document()); if (oldRoot->inDocument()) oldRoot->removedFromDocument(); else diff --git a/src/3rdparty/webkit/Source/WebCore/dom/ProcessingInstruction.cpp b/src/3rdparty/webkit/Source/WebCore/dom/ProcessingInstruction.cpp index 30111d8..f7dcfd2 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/ProcessingInstruction.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/ProcessingInstruction.cpp @@ -62,6 +62,9 @@ ProcessingInstruction::~ProcessingInstruction() if (m_cachedSheet) m_cachedSheet->removeClient(this); + + if (inDocument()) + document()->removeStyleSheetCandidateNode(this); } void ProcessingInstruction::setData(const String& data, ExceptionCode&) diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp index be196c8..0c247c2 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/Range.cpp @@ -621,7 +621,9 @@ static inline Node* childOfCommonRootBeforeOffset(Node* container, unsigned offs { ASSERT(container); ASSERT(commonRoot); - ASSERT(commonRoot->contains(container)); + + if (!commonRoot->contains(container)) + return 0; if (container == commonRoot) { container = container->firstChild(); @@ -675,7 +677,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception if (ec) return 0; - Node* commonRoot = commonAncestorContainer(ec); + RefPtr<Node> commonRoot = commonAncestorContainer(ec); if (ec) return 0; ASSERT(commonRoot); @@ -686,8 +688,8 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception } // what is the highest node that partially selects the start / end of the range? - Node* partialStart = highestAncestorUnderCommonRoot(m_start.container(), commonRoot); - Node* partialEnd = highestAncestorUnderCommonRoot(m_end.container(), commonRoot); + RefPtr<Node> partialStart = highestAncestorUnderCommonRoot(m_start.container(), commonRoot.get()); + RefPtr<Node> partialEnd = highestAncestorUnderCommonRoot(m_end.container(), commonRoot.get()); // Start and end containers are different. // There are three possibilities here: @@ -706,29 +708,32 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception // // These are deleted, cloned, or extracted (i.e. both) depending on action. + // Note that we are verifying that our common root hierarchy is still intact + // after any DOM mutation event, at various stages below. See webkit bug 60350. + RefPtr<Node> leftContents; - if (m_start.container() != commonRoot) { + if (m_start.container() != commonRoot && commonRoot->contains(m_start.container())) { leftContents = processContentsBetweenOffsets(action, 0, m_start.container(), m_start.offset(), lengthOfContentsInNode(m_start.container()), ec); - leftContents = processAncestorsAndTheirSiblings(action, m_start.container(), ProcessContentsForward, leftContents, commonRoot, ec); + leftContents = processAncestorsAndTheirSiblings(action, m_start.container(), ProcessContentsForward, leftContents, commonRoot.get(), ec); } RefPtr<Node> rightContents; - if (m_end.container() != commonRoot) { + if (m_end.container() != commonRoot && commonRoot->contains(m_end.container())) { rightContents = processContentsBetweenOffsets(action, 0, m_end.container(), 0, m_end.offset(), ec); - rightContents = processAncestorsAndTheirSiblings(action, m_end.container(), ProcessContentsBackward, rightContents, commonRoot, ec); + rightContents = processAncestorsAndTheirSiblings(action, m_end.container(), ProcessContentsBackward, rightContents, commonRoot.get(), ec); } // delete all children of commonRoot between the start and end container - Node* processStart = childOfCommonRootBeforeOffset(m_start.container(), m_start.offset(), commonRoot); - if (m_start.container() != commonRoot) // processStart contains nodes before m_start. + RefPtr<Node> processStart = childOfCommonRootBeforeOffset(m_start.container(), m_start.offset(), commonRoot.get()); + if (processStart && m_start.container() != commonRoot) // processStart contains nodes before m_start. processStart = processStart->nextSibling(); - Node* processEnd = childOfCommonRootBeforeOffset(m_end.container(), m_end.offset(), commonRoot); + RefPtr<Node> processEnd = childOfCommonRootBeforeOffset(m_end.container(), m_end.offset(), commonRoot.get()); // Collapse the range, making sure that the result is not within a node that was partially selected. if (action == EXTRACT_CONTENTS || action == DELETE_CONTENTS) { - if (partialStart) + if (partialStart && commonRoot->contains(partialStart.get())) setStart(partialStart->parentNode(), partialStart->nodeIndex() + 1, ec); - else if (partialEnd) + else if (partialEnd && commonRoot->contains(partialEnd.get())) setStart(partialEnd->parentNode(), partialEnd->nodeIndex(), ec); if (ec) return 0; @@ -743,7 +748,7 @@ PassRefPtr<DocumentFragment> Range::processContents(ActionType action, Exception if (processStart) { NodeVector nodes; - for (Node* n = processStart; n && n != processEnd; n = n->nextSibling()) + for (Node* n = processStart.get(); n && n != processEnd; n = n->nextSibling()) nodes.append(n); processNodes(action, nodes, commonRoot, fragment, ec); } @@ -834,7 +839,7 @@ PassRefPtr<Node> Range::processContentsBetweenOffsets(ActionType action, PassRef break; } - return result; + return result.release(); } void Range::processNodes(ActionType action, Vector<RefPtr<Node> >& nodes, PassRefPtr<Node> oldContainer, PassRefPtr<Node> newContainer, ExceptionCode& ec) @@ -899,7 +904,7 @@ PassRefPtr<Node> Range::processAncestorsAndTheirSiblings(ActionType action, Node firstChildInAncestorToProcess = direction == ProcessContentsForward ? ancestor->nextSibling() : ancestor->previousSibling(); } - return clonedContainer; + return clonedContainer.release(); } PassRefPtr<DocumentFragment> Range::extractContents(ExceptionCode& ec) diff --git a/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.cpp b/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.cpp index 5b0e2ad..3bed5ae 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.cpp @@ -84,6 +84,15 @@ void StyleElement::removedFromDocument(Document* document, Element* element) document->styleSelectorChanged(DeferRecalcStyle); } +void StyleElement::clearDocumentData(Document* document, Element* element) +{ + if (m_sheet) + m_sheet->clearOwnerNode(); + + if (element->inDocument()) + document->removeStyleSheetCandidateNode(element); +} + void StyleElement::childrenChanged(Element* element) { ASSERT(element); diff --git a/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.h b/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.h index 4356c17..1f50c6e 100644 --- a/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.h +++ b/src/3rdparty/webkit/Source/WebCore/dom/StyleElement.h @@ -44,6 +44,7 @@ protected: void insertedIntoDocument(Document*, Element*); void removedFromDocument(Document*, Element*); + void clearDocumentData(Document*, Element*); void childrenChanged(Element*); void finishParsingChildren(Element*); diff --git a/src/3rdparty/webkit/Source/WebCore/editing/InsertIntoTextNodeCommand.cpp b/src/3rdparty/webkit/Source/WebCore/editing/InsertIntoTextNodeCommand.cpp index b1a455b..0fbc2af 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/InsertIntoTextNodeCommand.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/InsertIntoTextNodeCommand.cpp @@ -27,6 +27,8 @@ #include "InsertIntoTextNodeCommand.h" #include "AXObjectCache.h" +#include "RenderText.h" +#include "Settings.h" #include "Text.h" namespace WebCore { @@ -46,7 +48,13 @@ void InsertIntoTextNodeCommand::doApply() { if (!m_node->rendererIsEditable()) return; - + + if (document()->settings() && document()->settings()->passwordEchoEnabled()) { + RenderText* renderText = toRenderText(m_node->renderer()); + if (renderText && renderText->isSecure()) + renderText->momentarilyRevealLastTypedCharacter(m_offset + m_text.length() - 1); + } + ExceptionCode ec; m_node->insertData(m_offset, m_text, ec); diff --git a/src/3rdparty/webkit/Source/WebCore/editing/ReplaceSelectionCommand.cpp b/src/3rdparty/webkit/Source/WebCore/editing/ReplaceSelectionCommand.cpp index 279bb35..d1aa6da 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/ReplaceSelectionCommand.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/ReplaceSelectionCommand.cpp @@ -138,7 +138,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f if (!m_fragment->firstChild()) return; - Element* editableRoot = selection.rootEditableElement(); + RefPtr<Element> editableRoot = selection.rootEditableElement(); ASSERT(editableRoot); if (!editableRoot) return; @@ -153,8 +153,8 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f return; } - Node* styleNode = selection.base().deprecatedNode(); - RefPtr<StyledElement> holder = insertFragmentForTestRendering(styleNode); + RefPtr<Node> styleNode = selection.base().deprecatedNode(); + RefPtr<StyledElement> holder = insertFragmentForTestRendering(styleNode.get()); if (!holder) { removeInterchangeNodes(m_fragment.get()); return; @@ -174,7 +174,7 @@ ReplacementFragment::ReplacementFragment(Document* document, DocumentFragment* f m_fragment = createFragmentFromText(selection.toNormalizedRange().get(), evt->text()); if (!m_fragment->firstChild()) return; - holder = insertFragmentForTestRendering(styleNode); + holder = insertFragmentForTestRendering(styleNode.get()); } removeInterchangeNodes(holder.get()); @@ -291,7 +291,7 @@ void ReplacementFragment::restoreTestRenderingNodesToFragment(StyledElement* hol void ReplacementFragment::removeUnrenderedNodes(Node* holder) { - Vector<Node*> unrendered; + Vector<RefPtr<Node> > unrendered; for (Node* node = holder->firstChild(); node; node = node->traverseNextNode(holder)) if (!isNodeRendered(node) && !isTableStructureNode(node)) diff --git a/src/3rdparty/webkit/Source/WebCore/editing/SelectionController.cpp b/src/3rdparty/webkit/Source/WebCore/editing/SelectionController.cpp index 879cb82..ba95ede 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/SelectionController.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/SelectionController.cpp @@ -1401,7 +1401,7 @@ void SelectionController::selectAll() return; } - Node* root = 0; + RefPtr<Node> root = 0; if (isContentEditable()) root = highestEditableRoot(m_selection.start()); else { @@ -1411,7 +1411,7 @@ void SelectionController::selectAll() } if (!root) return; - VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root)); + VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root.get())); if (shouldChangeSelection(newSelection)) setSelection(newSelection); selectFrameElementInParentIfFullySelected(); diff --git a/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.cpp b/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.cpp index b09c226..38ade02 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.cpp @@ -602,21 +602,30 @@ void TextIterator::handleTextBox() } } +static inline RenderText* firstRenderTextInFirstLetter(RenderObject* firstLetter) +{ + if (!firstLetter) + return 0; + + // FIXME: Should this check descendent objects? + for (RenderObject* current = firstLetter->firstChild(); current; current = current->nextSibling()) { + if (current->isText()) + return toRenderText(current); + } + return 0; +} + void TextIterator::handleTextNodeFirstLetter(RenderTextFragment* renderer) { if (renderer->firstLetter()) { RenderObject* r = renderer->firstLetter(); if (r->style()->visibility() != VISIBLE && !m_ignoresStyleVisibility) return; - for (RenderObject *currChild = r->firstChild(); currChild; currChild->nextSibling()) { - if (currChild->isText()) { - RenderText* firstLetter = toRenderText(currChild); - m_handledFirstLetter = true; - m_remainingTextBox = m_textBox; - m_textBox = firstLetter->firstTextBox(); - m_firstLetterText = firstLetter; - return; - } + if (RenderText* firstLetter = firstRenderTextInFirstLetter(r)) { + m_handledFirstLetter = true; + m_remainingTextBox = m_textBox; + m_textBox = firstLetter->firstTextBox(); + m_firstLetterText = firstLetter; } } m_handledFirstLetter = true; @@ -1042,14 +1051,46 @@ Node* TextIterator::node() const SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator() : m_behavior(TextIteratorDefaultBehavior) , m_node(0) + , m_offset(0) + , m_handledNode(false) + , m_handledChildren(false) + , m_startNode(0) + , m_startOffset(0) + , m_endNode(0) + , m_endOffset(0) , m_positionNode(0) + , m_positionStartOffset(0) + , m_positionEndOffset(0) + , m_textCharacters(0) + , m_textLength(0) + , m_lastTextNode(0) + , m_lastCharacter(0) + , m_singleCharacterBuffer(0) + , m_havePassedStartNode(false) + , m_shouldHandleFirstLetter(false) { } SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator(const Range* r, TextIteratorBehavior behavior) : m_behavior(behavior) , m_node(0) + , m_offset(0) + , m_handledNode(false) + , m_handledChildren(false) + , m_startNode(0) + , m_startOffset(0) + , m_endNode(0) + , m_endOffset(0) , m_positionNode(0) + , m_positionStartOffset(0) + , m_positionEndOffset(0) + , m_textCharacters(0) + , m_textLength(0) + , m_lastTextNode(0) + , m_lastCharacter(0) + , m_singleCharacterBuffer(0) + , m_havePassedStartNode(false) + , m_shouldHandleFirstLetter(false) { ASSERT(m_behavior == TextIteratorDefaultBehavior); @@ -1177,23 +1218,62 @@ bool SimplifiedBackwardsTextIterator::handleTextNode() { m_lastTextNode = m_node; - RenderText* renderer = toRenderText(m_node->renderer()); - String str = renderer->text(); + int startOffset; + int offsetInNode; + RenderText* renderer = handleFirstLetter(startOffset, offsetInNode); + if (!renderer) + return true; - if (!renderer->firstTextBox() && str.length() > 0) + String text = renderer->text(); + if (!renderer->firstTextBox() && text.length() > 0) return true; m_positionEndOffset = m_offset; - - m_offset = (m_node == m_startNode) ? m_startOffset : 0; + m_offset = startOffset + offsetInNode; m_positionNode = m_node; m_positionStartOffset = m_offset; + + ASSERT(0 <= m_positionStartOffset - offsetInNode && m_positionStartOffset - offsetInNode <= static_cast<int>(text.length())); + ASSERT(1 <= m_positionEndOffset - offsetInNode && m_positionEndOffset - offsetInNode <= static_cast<int>(text.length())); + ASSERT(m_positionStartOffset <= m_positionEndOffset); + m_textLength = m_positionEndOffset - m_positionStartOffset; - m_textCharacters = str.characters() + m_positionStartOffset; + m_textCharacters = text.characters() + (m_positionStartOffset - offsetInNode); + ASSERT(m_textCharacters >= text.characters()); + ASSERT(m_textCharacters + m_textLength <= text.characters() + static_cast<int>(text.length())); - m_lastCharacter = str[m_positionEndOffset - 1]; + m_lastCharacter = text[m_positionEndOffset - 1]; - return true; + return !m_shouldHandleFirstLetter; +} + +RenderText* SimplifiedBackwardsTextIterator::handleFirstLetter(int& startOffset, int& offsetInNode) +{ + RenderText* renderer = toRenderText(m_node->renderer()); + startOffset = (m_node == m_startNode) ? m_startOffset : 0; + + if (!renderer->isTextFragment()) { + offsetInNode = 0; + return renderer; + } + + RenderTextFragment* fragment = toRenderTextFragment(renderer); + int offsetAfterFirstLetter = fragment->start(); + if (startOffset >= offsetAfterFirstLetter) { + ASSERT(!m_shouldHandleFirstLetter); + offsetInNode = offsetAfterFirstLetter; + return renderer; + } + + if (!m_shouldHandleFirstLetter && offsetAfterFirstLetter < m_offset) { + m_shouldHandleFirstLetter = true; + offsetInNode = offsetAfterFirstLetter; + return renderer; + } + + m_shouldHandleFirstLetter = false; + offsetInNode = 0; + return firstRenderTextInFirstLetter(fragment->firstLetter()); } bool SimplifiedBackwardsTextIterator::handleReplacedElement() @@ -2563,6 +2643,9 @@ tryAgain: PassRefPtr<Range> findPlainText(const Range* range, const String& target, FindOptions options) { + // CharacterIterator requires renderers to be up-to-date + range->ownerDocument()->updateLayout(); + // First, find the text. size_t matchStart; size_t matchLength; diff --git a/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.h b/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.h index 9fe4ceb..8820388 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.h +++ b/src/3rdparty/webkit/Source/WebCore/editing/TextIterator.h @@ -203,6 +203,7 @@ public: private: void exitNode(); bool handleTextNode(); + RenderText* handleFirstLetter(int& startOffset, int& offsetInNode); bool handleReplacedElement(); bool handleNonTextNode(); void emitCharacter(UChar, Node*, int startOffset, int endOffset); @@ -240,6 +241,9 @@ private: // Whether m_node has advanced beyond the iteration range (i.e. m_startNode). bool m_havePassedStartNode; + + // Should handle first-letter renderer in the next call to handleTextNode. + bool m_shouldHandleFirstLetter; }; // Builds on the text iterator, adding a character position so we can walk one diff --git a/src/3rdparty/webkit/Source/WebCore/editing/visible_units.cpp b/src/3rdparty/webkit/Source/WebCore/editing/visible_units.cpp index ff683a5..b2b52f3 100644 --- a/src/3rdparty/webkit/Source/WebCore/editing/visible_units.cpp +++ b/src/3rdparty/webkit/Source/WebCore/editing/visible_units.cpp @@ -101,7 +101,7 @@ static VisiblePosition previousBoundary(const VisiblePosition& c, BoundarySearch else { // Treat bullets used in the text security mode as regular characters when looking for boundaries String iteratorString(it.characters(), it.length()); - iteratorString = iteratorString.impl()->secure('x'); + iteratorString.fill('x'); string.prepend(iteratorString.characters(), iteratorString.length()); } next = searchFunction(string.data(), string.size(), string.size() - suffixLength, MayHaveMoreContext, needMoreContext); @@ -176,7 +176,7 @@ static VisiblePosition nextBoundary(const VisiblePosition& c, BoundarySearchFunc else { // Treat bullets used in the text security mode as regular characters when looking for boundaries String iteratorString(it.characters(), it.length()); - iteratorString = iteratorString.impl()->secure('x'); + iteratorString.fill('x'); string.append(iteratorString.characters(), iteratorString.length()); } next = searchFunction(string.data(), string.size(), prefixLength, MayHaveMoreContext, needMoreContext); diff --git a/src/3rdparty/webkit/Source/WebCore/features.pri b/src/3rdparty/webkit/Source/WebCore/features.pri index c56c9fc..3e397a1 100644 --- a/src/3rdparty/webkit/Source/WebCore/features.pri +++ b/src/3rdparty/webkit/Source/WebCore/features.pri @@ -162,17 +162,23 @@ symbian|maemo5|maemo6 { DEFINES -= ENABLE_VIDEO=1 DEFINES += ENABLE_VIDEO=0 - contains(DEFINES, USE_QTKIT=1) { + mac:!contains(DEFINES, USE_QTMULTIMEDIA=1) { DEFINES -= ENABLE_VIDEO=0 DEFINES += ENABLE_VIDEO=1 - DEFINES -= WTF_USE_QT_MULTIMEDIA=1 - DEFINES += WTF_USE_QT_MULTIMEDIA=0 - } else: contains(DEFINES, USE_GSTREAMER=1) { - DEFINES -= ENABLE_VIDEO=0 - DEFINES += ENABLE_VIDEO=1 - DEFINES -= WTF_USE_QT_MULTIMEDIA=1 - DEFINES += WTF_USE_QT_MULTIMEDIA=0 - } else:contains(MOBILITY_CONFIG, multimedia) { + DEFINES += WTF_USE_QTKIT=1 + DEFINES -= WTF_USE_QTKIT=0 + } else: linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) { + !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10) { + DEFINES -= ENABLE_VIDEO=0 + DEFINES += ENABLE_VIDEO=1 + DEFINES += WTF_USE_GSTREAMER=1 + DEFINES -= WTF_USE_GSTREAMER=0 + } else { + message("Disabling video due the lack of GLib/Gio/GStreamer.") + DEFINES -= ENABLE_VIDEO=1 + DEFINES += ENABLE_VIDEO=0 + } + } else: contains(MOBILITY_CONFIG, multimedia) { DEFINES -= ENABLE_VIDEO=0 DEFINES += ENABLE_VIDEO=1 DEFINES -= WTF_USE_QT_MULTIMEDIA=0 diff --git a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp index 1da5e2f..df97459 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.cpp @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison implementation for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 @@ -44,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -73,7 +75,7 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ +/* Line 189 of yacc.c */ #line 1 "../Source/WebCore/css/CSSGrammar.y" @@ -135,8 +137,8 @@ using namespace HTMLNames; -/* Line 268 of yacc.c */ -#line 140 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 189 of yacc.c */ +#line 142 "/Source/WebCore/generated/CSSGrammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -252,7 +254,7 @@ using namespace HTMLNames; typedef union YYSTYPE { -/* Line 293 of yacc.c */ +/* Line 214 of yacc.c */ #line 63 "../Source/WebCore/css/CSSGrammar.y" bool boolean; @@ -280,8 +282,8 @@ typedef union YYSTYPE -/* Line 293 of yacc.c */ -#line 285 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 214 of yacc.c */ +#line 287 "/Source/WebCore/generated/CSSGrammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -291,7 +293,7 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ +/* Line 264 of yacc.c */ #line 88 "../Source/WebCore/css/CSSGrammar.y" @@ -307,8 +309,8 @@ static int cssyylex(YYSTYPE* yylval, void* parser) -/* Line 343 of yacc.c */ -#line 312 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 264 of yacc.c */ +#line 314 "/Source/WebCore/generated/CSSGrammar.tab.c" #ifdef short # undef short @@ -358,7 +360,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -411,11 +413,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -438,24 +440,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -484,7 +486,23 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -504,26 +522,6 @@ union yyalloc #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - /* YYFINAL -- State number of the termination state. */ #define YYFINAL 21 /* YYLAST -- Last index in YYTABLE. */ @@ -898,8 +896,8 @@ static const yytype_uint8 yyr2[] = 3 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { @@ -1054,7 +1052,8 @@ static const yytype_int16 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -276 static const yytype_int16 yytable[] = { @@ -1228,12 +1227,6 @@ static const yytype_int16 yytable[] = 87, 88, 0, 0, 90, 91, 92 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-305)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 0, 87, 127, 37, 243, 212, 5, 250, 8, 9, @@ -1479,18 +1472,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) @@ -1500,6 +1484,7 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -1541,10 +1526,19 @@ while (YYID (0)) #endif -/* This macro is provided for backward compatibility. */ +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif @@ -1736,6 +1730,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1838,142 +1833,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } + int yyn = yypact[yystate]; - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -2006,7 +1974,6 @@ yydestruct (yymsg, yytype, yyvaluep) } } - /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -2023,9 +1990,12 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ -/*----------. -| yyparse. | -`----------*/ + + + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -2212,7 +2182,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -2243,8 +2213,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -2299,34 +2269,34 @@ yyreduce: { case 9: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 303 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_rule = (yyvsp[(4) - (6)].rule); - } + ;} break; case 10: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 309 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_keyframe = (yyvsp[(4) - (6)].keyframeRule); - } + ;} break; case 11: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 315 "../Source/WebCore/css/CSSGrammar.y" { /* can be empty */ - } + ;} break; case 12: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 321 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2338,22 +2308,22 @@ yyreduce: delete p->m_valueList; p->m_valueList = 0; } - } + ;} break; case 13: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 335 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->m_mediaQuery = p->sinkFloatingMediaQuery((yyvsp[(4) - (5)].mediaQuery)); - } + ;} break; case 14: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 342 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(4) - (5)].selectorList)) { @@ -2361,94 +2331,94 @@ yyreduce: if (p->m_selectorListForParseSelector) p->m_selectorListForParseSelector->adoptSelectorVector(*(yyvsp[(4) - (5)].selectorList)); } - } + ;} break; case 21: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 364 "../Source/WebCore/css/CSSGrammar.y" { - } + ;} break; case 24: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 374 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.rule) = static_cast<CSSParser*>(parser)->createCharsetRule((yyvsp[(3) - (5)].string)); if ((yyval.rule) && p->m_styleSheet) p->m_styleSheet->append((yyval.rule)); - } + ;} break; case 25: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 380 "../Source/WebCore/css/CSSGrammar.y" { - } + ;} break; case 26: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 382 "../Source/WebCore/css/CSSGrammar.y" { - } + ;} break; case 27: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 387 "../Source/WebCore/css/CSSGrammar.y" { // Ignore any @charset rule not at the beginning of the style sheet. (yyval.rule) = 0; - } + ;} break; case 29: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 395 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); if ((yyvsp[(2) - (3)].rule) && p->m_styleSheet) p->m_styleSheet->append((yyvsp[(2) - (3)].rule)); - } + ;} break; case 30: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 403 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(2) - (2)].rule); - } + ;} break; case 37: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 415 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true; - } + ;} break; case 41: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 424 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.ruleList) = 0; } + { (yyval.ruleList) = 0; ;} break; case 42: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 425 "../Source/WebCore/css/CSSGrammar.y" { (yyval.ruleList) = (yyvsp[(1) - (3)].ruleList); @@ -2457,357 +2427,357 @@ yyreduce: (yyval.ruleList) = static_cast<CSSParser*>(parser)->createRuleList(); (yyval.ruleList)->append((yyvsp[(2) - (3)].rule)); } - } + ;} break; case 53: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); - } + ;} break; case 54: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 456 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 55: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 459 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 56: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 462 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 57: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 468 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->addNamespace((yyvsp[(3) - (6)].string), (yyvsp[(4) - (6)].string)); (yyval.rule) = 0; -} +;} break; case 58: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 472 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; -} +;} break; case 59: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 475 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; -} +;} break; case 60: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 478 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; -} +;} break; case 61: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 484 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.string).characters = 0; } + { (yyval.string).characters = 0; ;} break; case 62: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 485 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.string) = (yyvsp[(1) - (2)].string); } + { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 65: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 494 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); - } + ;} break; case 66: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 500 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; - } + ;} break; case 67: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 503 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(3) - (4)].valueList); - } + ;} break; case 68: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 509 "../Source/WebCore/css/CSSGrammar.y" { (yyvsp[(3) - (7)].string).lower(); (yyval.mediaQueryExp) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExp((yyvsp[(3) - (7)].string), (yyvsp[(5) - (7)].valueList)); - } + ;} break; case 69: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 516 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaQueryExpList) = p->createFloatingMediaQueryExpList(); (yyval.mediaQueryExpList)->append(p->sinkFloatingMediaQueryExp((yyvsp[(1) - (1)].mediaQueryExp))); - } + ;} break; case 70: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 521 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList); (yyval.mediaQueryExpList)->append(static_cast<CSSParser*>(parser)->sinkFloatingMediaQueryExp((yyvsp[(5) - (5)].mediaQueryExp))); - } + ;} break; case 71: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 528 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExpList(); - } + ;} break; case 72: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 531 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList); - } + ;} break; case 73: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 537 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::None; - } + ;} break; case 74: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 540 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Only; - } + ;} break; case 75: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 543 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Not; - } + ;} break; case 76: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 549 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaQuery) = p->createFloatingMediaQuery(p->sinkFloatingMediaQueryExpList((yyvsp[(1) - (1)].mediaQueryExpList))); - } + ;} break; case 77: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 554 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyvsp[(3) - (4)].string).lower(); (yyval.mediaQuery) = p->createFloatingMediaQuery((yyvsp[(1) - (4)].mediaQueryRestrictor), (yyvsp[(3) - (4)].string), p->sinkFloatingMediaQueryExpList((yyvsp[(4) - (4)].mediaQueryExpList))); - } + ;} break; case 78: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 562 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); - } + ;} break; case 80: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 569 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.mediaList) = p->createMediaList(); (yyval.mediaList)->appendMediaQuery(p->sinkFloatingMediaQuery((yyvsp[(1) - (1)].mediaQuery))); - } + ;} break; case 81: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 574 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(1) - (4)].mediaList); if ((yyval.mediaList)) (yyval.mediaList)->appendMediaQuery(static_cast<CSSParser*>(parser)->sinkFloatingMediaQuery((yyvsp[(4) - (4)].mediaQuery))); - } + ;} break; case 82: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 579 "../Source/WebCore/css/CSSGrammar.y" { (yyval.mediaList) = 0; - } + ;} break; case 83: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); - } + ;} break; case 84: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 588 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule(0, (yyvsp[(5) - (6)].ruleList)); - } + ;} break; case 85: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 594 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); - } + ;} break; case 86: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 600 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(7) - (8)].keyframesRule); (yyvsp[(7) - (8)].keyframesRule)->setNameInternal((yyvsp[(3) - (8)].string)); - } + ;} break; case 89: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 612 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); } + { (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); ;} break; case 90: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 613 "../Source/WebCore/css/CSSGrammar.y" { (yyval.keyframesRule) = (yyvsp[(1) - (3)].keyframesRule); if ((yyvsp[(2) - (3)].keyframeRule)) (yyval.keyframesRule)->append((yyvsp[(2) - (3)].keyframeRule)); - } + ;} break; case 91: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 621 "../Source/WebCore/css/CSSGrammar.y" { (yyval.keyframeRule) = static_cast<CSSParser*>(parser)->createKeyframeRule((yyvsp[(1) - (6)].valueList)); - } + ;} break; case 92: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 627 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = p->createFloatingValueList(); (yyval.valueList)->addValue(p->sinkFloatingValue((yyvsp[(1) - (1)].value))); - } + ;} break; case 93: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 632 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = (yyvsp[(1) - (5)].valueList); if ((yyval.valueList)) (yyval.valueList)->addValue(p->sinkFloatingValue((yyvsp[(5) - (5)].value))); - } + ;} break; case 94: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (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 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 642 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; @@ -2818,12 +2788,12 @@ yyreduce: (yyval.value).fValue = 100; else YYERROR; - } + ;} break; case 96: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 656 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2835,42 +2805,42 @@ yyreduce: // Also clear margin at-rules here once we fully implement margin at-rules parsing. (yyval.rule) = 0; } - } + ;} break; case 97: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 667 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 98: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 670 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 99: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 676 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); (yyval.selector)->setTag(QualifiedName(nullAtom, (yyvsp[(1) - (1)].string), p->m_defaultNamespace)); (yyval.selector)->setForPage(); - } + ;} break; case 100: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 682 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2879,312 +2849,312 @@ yyreduce: (yyval.selector)->setTag(QualifiedName(nullAtom, (yyvsp[(1) - (2)].string), p->m_defaultNamespace)); (yyval.selector)->setForPage(); } - } + ;} break; case 101: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 690 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); if ((yyval.selector)) (yyval.selector)->setForPage(); - } + ;} break; case 102: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 695 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); (yyval.selector)->setForPage(); - } + ;} break; case 105: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 708 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->startDeclarationsForMarginBox(); - } + ;} break; case 106: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 710 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMarginAtRule((yyvsp[(1) - (7)].marginBox)); - } + ;} break; case 107: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 716 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopLeftCornerMarginBox; - } + ;} break; case 108: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 719 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopLeftMarginBox; - } + ;} break; case 109: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 722 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopCenterMarginBox; - } + ;} break; case 110: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 725 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopRightMarginBox; - } + ;} break; case 111: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 728 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::TopRightCornerMarginBox; - } + ;} break; case 112: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 731 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomLeftCornerMarginBox; - } + ;} break; case 113: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 734 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomLeftMarginBox; - } + ;} break; case 114: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 737 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomCenterMarginBox; - } + ;} break; case 115: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 740 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomRightMarginBox; - } + ;} break; case 116: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 743 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::BottomRightCornerMarginBox; - } + ;} break; case 117: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 746 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftTopMarginBox; - } + ;} break; case 118: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 749 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftMiddleMarginBox; - } + ;} break; case 119: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 752 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::LeftBottomMarginBox; - } + ;} break; case 120: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 755 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightTopMarginBox; - } + ;} break; case 121: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 758 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightMiddleMarginBox; - } + ;} break; case 122: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 761 "../Source/WebCore/css/CSSGrammar.y" { (yyval.marginBox) = CSSSelector::RightBottomMarginBox; - } + ;} break; case 123: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 768 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createFontFaceRule(); - } + ;} break; case 124: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 771 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 125: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 774 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 126: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 780 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.relation) = CSSSelector::DirectAdjacent; } + { (yyval.relation) = CSSSelector::DirectAdjacent; ;} break; case 127: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 781 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.relation) = CSSSelector::IndirectAdjacent; } + { (yyval.relation) = CSSSelector::IndirectAdjacent; ;} break; case 128: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 782 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.relation) = CSSSelector::Child; } + { (yyval.relation) = CSSSelector::Child; ;} break; case 129: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 786 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.integer) = (yyvsp[(1) - (1)].integer); } + { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 130: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 787 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.integer) = 1; } + { (yyval.integer) = 1; ;} break; case 131: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 791 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.integer) = -1; } + { (yyval.integer) = -1; ;} break; case 132: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 792 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.integer) = 1; } + { (yyval.integer) = 1; ;} break; case 133: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 796 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyStart(); - } + ;} break; case 134: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 803 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markSelectorListStart(); - } + ;} break; case 135: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 810 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markSelectorListEnd(); - } + ;} break; case 136: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 817 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.rule) = p->createStyleRule((yyvsp[(1) - (6)].selectorList)); - } + ;} break; case 137: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 824 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { @@ -3194,12 +3164,12 @@ yyreduce: (yyval.selectorList)->append(p->sinkFloatingSelector((yyvsp[(1) - (1)].selector))); p->updateLastSelectorLineAndPosition(); } - } + ;} break; case 138: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 833 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector)) { @@ -3209,48 +3179,48 @@ yyreduce: p->updateLastSelectorLineAndPosition(); } else (yyval.selectorList) = 0; - } + ;} break; case 139: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 842 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selectorList) = 0; - } + ;} break; case 140: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 848 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (2)].selector); - } + ;} break; case 141: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 854 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); - } + ;} break; case 142: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 858 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); - } + ;} break; case 143: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 862 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -3264,12 +3234,12 @@ yyreduce: end->setRelation(CSSSelector::Descendant); end->setTagHistory(p->sinkFloatingSelector((yyvsp[(1) - (2)].selector))); } - } + ;} break; case 144: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 875 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); @@ -3283,75 +3253,75 @@ yyreduce: end->setRelation((yyvsp[(2) - (3)].relation)); end->setTagHistory(p->sinkFloatingSelector((yyvsp[(1) - (3)].selector))); } - } + ;} break; case 145: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 888 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = 0; - } + ;} break; case 146: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 894 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.string).characters = 0; (yyval.string).length = 0; } + { (yyval.string).characters = 0; (yyval.string).length = 0; ;} break; case 147: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 895 "../Source/WebCore/css/CSSGrammar.y" - { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; } + { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; ;} break; case 148: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 896 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.string) = (yyvsp[(1) - (2)].string); } + { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 149: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 900 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.selector) = p->createFloatingSelector(); (yyval.selector)->setTag(QualifiedName(nullAtom, (yyvsp[(1) - (1)].string), p->m_defaultNamespace)); - } + ;} break; case 150: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 905 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); if ((yyval.selector)) static_cast<CSSParser*>(parser)->updateSpecifiersWithElementName(nullAtom, (yyvsp[(1) - (2)].string), (yyval.selector)); - } + ;} break; case 151: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 910 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); if ((yyval.selector)) static_cast<CSSParser*>(parser)->updateSpecifiersWithElementName(nullAtom, starAtom, (yyval.selector)); - } + ;} break; case 152: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 915 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(1) - (2)].string); @@ -3362,34 +3332,34 @@ yyreduce: p->m_styleSheet->determineNamespace(namespacePrefix))); else // FIXME: Shouldn't this case be an error? (yyval.selector)->setTag(QualifiedName(nullAtom, (yyvsp[(2) - (2)].string), p->m_defaultNamespace)); - } + ;} break; case 153: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 925 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); if ((yyval.selector)) static_cast<CSSParser*>(parser)->updateSpecifiersWithElementName((yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].string), (yyval.selector)); - } + ;} break; case 154: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 930 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); if ((yyval.selector)) static_cast<CSSParser*>(parser)->updateSpecifiersWithElementName((yyvsp[(1) - (2)].string), starAtom, (yyval.selector)); - } + ;} break; case 155: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 938 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { @@ -3403,7 +3373,7 @@ yyreduce: case 156: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 946 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (5)].selectorList) && (yyvsp[(5) - (5)].selector)) { @@ -3412,21 +3382,21 @@ yyreduce: (yyval.selectorList)->append(p->sinkFloatingSelector((yyvsp[(5) - (5)].selector))); } else (yyval.selectorList) = 0; - } + ;} break; case 157: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 954 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selectorList) = 0; - } + ;} break; case 158: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 960 "../Source/WebCore/css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (1)].string); @@ -3435,53 +3405,53 @@ yyreduce: if (doc && doc->isHTMLDocument()) str.lower(); (yyval.string) = str; - } + ;} break; case 159: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 968 "../Source/WebCore/css/CSSGrammar.y" { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; - } + ;} break; case 160: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 976 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); - } + ;} break; case 161: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 979 "../Source/WebCore/css/CSSGrammar.y" { if (!(yyvsp[(2) - (2)].selector)) (yyval.selector) = 0; else if ((yyvsp[(1) - (2)].selector)) (yyval.selector) = static_cast<CSSParser*>(parser)->updateSpecifiers((yyvsp[(1) - (2)].selector), (yyvsp[(2) - (2)].selector)); - } + ;} break; case 162: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 985 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = 0; - } + ;} break; case 163: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 991 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3490,12 +3460,12 @@ yyreduce: if (!p->m_strict) (yyvsp[(1) - (1)].string).lower(); (yyval.selector)->setValue((yyvsp[(1) - (1)].string)); - } + ;} break; case 164: -/* Line 1806 of yacc.c */ +/* Line 1455 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') { @@ -3508,12 +3478,12 @@ yyreduce: (yyvsp[(1) - (1)].string).lower(); (yyval.selector)->setValue((yyvsp[(1) - (1)].string)); } - } + ;} break; case 168: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1017 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3522,12 +3492,12 @@ yyreduce: if (!p->m_strict) (yyvsp[(2) - (2)].string).lower(); (yyval.selector)->setValue((yyvsp[(2) - (2)].string)); - } + ;} break; case 169: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1028 "../Source/WebCore/css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (2)].string); @@ -3536,35 +3506,35 @@ yyreduce: if (doc && doc->isHTMLDocument()) str.lower(); (yyval.string) = str; - } + ;} break; case 170: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1039 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->setAttribute(QualifiedName(nullAtom, (yyvsp[(3) - (4)].string), nullAtom)); (yyval.selector)->setMatch(CSSSelector::Set); - } + ;} break; case 171: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1044 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); (yyval.selector)->setAttribute(QualifiedName(nullAtom, (yyvsp[(3) - (8)].string), nullAtom)); (yyval.selector)->setMatch((CSSSelector::Match)(yyvsp[(4) - (8)].integer)); (yyval.selector)->setValue((yyvsp[(6) - (8)].string)); - } + ;} break; case 172: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1050 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (5)].string); @@ -3573,12 +3543,12 @@ yyreduce: (yyval.selector)->setAttribute(QualifiedName(namespacePrefix, (yyvsp[(4) - (5)].string), p->m_styleSheet->determineNamespace(namespacePrefix))); (yyval.selector)->setMatch(CSSSelector::Set); - } + ;} break; case 173: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1058 "../Source/WebCore/css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (9)].string); @@ -3588,66 +3558,66 @@ yyreduce: p->m_styleSheet->determineNamespace(namespacePrefix))); (yyval.selector)->setMatch((CSSSelector::Match)(yyvsp[(5) - (9)].integer)); (yyval.selector)->setValue((yyvsp[(7) - (9)].string)); - } + ;} break; case 174: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1070 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Exact; - } + ;} break; case 175: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1073 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::List; - } + ;} break; case 176: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1076 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Hyphen; - } + ;} break; case 177: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1079 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Begin; - } + ;} break; case 178: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1082 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::End; - } + ;} break; case 179: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1085 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Contain; - } + ;} break; case 182: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1096 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3657,12 +3627,12 @@ yyreduce: CSSSelector::PseudoType type = (yyval.selector)->pseudoType(); if (type == CSSSelector::PseudoUnknown) (yyval.selector) = 0; - } + ;} break; case 183: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1107 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3672,12 +3642,12 @@ yyreduce: CSSSelector::PseudoType type = (yyval.selector)->pseudoType(); if (type == CSSSelector::PseudoUnknown) (yyval.selector) = 0; - } + ;} break; case 184: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1116 "../Source/WebCore/css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3686,12 +3656,12 @@ yyreduce: (yyval.selector)->setValue((yyvsp[(3) - (3)].string)); // FIXME: This call is needed to force selector to compute the pseudoType early enough. (yyval.selector)->pseudoType(); - } + ;} break; case 185: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1129 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(4) - (6)].selectorList)) { @@ -3706,12 +3676,12 @@ yyreduce: (yyval.selector) = 0; } else (yyval.selector) = 0; - } + ;} break; case 186: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1144 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3722,12 +3692,12 @@ yyreduce: CSSSelector::PseudoType type = (yyval.selector)->pseudoType(); if (type == CSSSelector::PseudoUnknown) (yyval.selector) = 0; - } + ;} break; case 187: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1155 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3738,12 +3708,12 @@ yyreduce: CSSSelector::PseudoType type = (yyval.selector)->pseudoType(); if (type == CSSSelector::PseudoUnknown) (yyval.selector) = 0; - } + ;} break; case 188: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1166 "../Source/WebCore/css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3762,12 +3732,12 @@ yyreduce: if (!isValidNthToken((yyvsp[(4) - (6)].string))) (yyval.selector) = 0; } - } + ;} break; case 189: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1185 "../Source/WebCore/css/CSSGrammar.y" { if (!(yyvsp[(4) - (6)].selector) || !(yyvsp[(4) - (6)].selector)->isSimple()) @@ -3784,126 +3754,126 @@ yyreduce: (yyvsp[(2) - (6)].string).lower(); (yyval.selector)->setValue((yyvsp[(2) - (6)].string)); } - } + ;} break; case 190: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1204 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); - } + ;} break; case 191: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1207 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); if ( (yyvsp[(2) - (2)].boolean) ) (yyval.boolean) = (yyvsp[(2) - (2)].boolean); - } + ;} break; case 192: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1212 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); - } + ;} break; case 193: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1215 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 194: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1218 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 195: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1221 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); - } + ;} break; case 196: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1224 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); - } + ;} break; case 197: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1230 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyStart(); (yyval.boolean) = (yyvsp[(1) - (3)].boolean); - } + ;} break; case 198: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1235 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 199: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1238 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 200: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1241 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyStart(); (yyval.boolean) = false; - } + ;} break; case 201: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1246 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 202: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1249 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3911,34 +3881,34 @@ yyreduce: (yyval.boolean) = (yyvsp[(1) - (4)].boolean); if ((yyvsp[(2) - (4)].boolean)) (yyval.boolean) = (yyvsp[(2) - (4)].boolean); - } + ;} break; case 203: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1256 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyStart(); (yyval.boolean) = (yyvsp[(1) - (4)].boolean); - } + ;} break; case 204: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1261 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyStart(); (yyval.boolean) = (yyvsp[(1) - (6)].boolean); - } + ;} break; case 205: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1269 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3956,21 +3926,21 @@ yyreduce: p->m_valueList = 0; } p->markPropertyEnd((yyvsp[(5) - (5)].boolean), isPropertyParsed); - } + ;} break; case 206: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1287 "../Source/WebCore/css/CSSGrammar.y" { (yyval.boolean) = false; - } + ;} break; case 207: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1291 "../Source/WebCore/css/CSSGrammar.y" { /* The default movable type template has letter-spacing: .none; Handle this by looking for @@ -3979,102 +3949,102 @@ yyreduce: CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyEnd(false, false); (yyval.boolean) = false; - } + ;} break; case 208: -/* Line 1806 of yacc.c */ +/* Line 1455 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 */ CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyEnd(false, false); (yyval.boolean) = false; - } + ;} break; case 209: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1307 "../Source/WebCore/css/CSSGrammar.y" { /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */ (yyval.boolean) = false; - } + ;} break; case 210: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1312 "../Source/WebCore/css/CSSGrammar.y" { /* div { font-family: } Just reduce away this property with no value. */ CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyEnd(false, false); (yyval.boolean) = false; - } + ;} break; case 211: -/* Line 1806 of yacc.c */ +/* Line 1455 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 */ CSSParser* p = static_cast<CSSParser*>(parser); p->markPropertyEnd(false, false); (yyval.boolean) = false; - } + ;} break; case 212: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1326 "../Source/WebCore/css/CSSGrammar.y" { /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */ (yyval.boolean) = false; - } + ;} break; case 213: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1333 "../Source/WebCore/css/CSSGrammar.y" { (yyval.integer) = cssPropertyID((yyvsp[(1) - (2)].string)); - } + ;} break; case 214: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1339 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.boolean) = true; } + { (yyval.boolean) = true; ;} break; case 215: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1340 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.boolean) = false; } + { (yyval.boolean) = false; ;} break; case 216: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1344 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = p->createFloatingValueList(); (yyval.valueList)->addValue(p->sinkFloatingValue((yyvsp[(1) - (1)].value))); - } + ;} break; case 217: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1349 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4089,316 +4059,316 @@ yyreduce: } (yyval.valueList)->addValue(p->sinkFloatingValue((yyvsp[(3) - (3)].value))); } - } + ;} break; case 218: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1363 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; - } + ;} break; case 219: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1366 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; - } + ;} break; case 220: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1369 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; - } + ;} break; case 221: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1375 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '/'; - } + ;} break; case 222: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1378 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = ','; - } + ;} break; case 223: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1381 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = 0; - } + ;} break; case 224: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1387 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.value) = (yyvsp[(1) - (1)].value); } + { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 225: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1388 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); } + { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 226: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; ;} break; case 227: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1390 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = cssValueKeywordID((yyvsp[(1) - (2)].string)); (yyval.value).unit = CSSPrimitiveValue::CSS_IDENT; (yyval.value).string = (yyvsp[(1) - (2)].string); - } + ;} break; case 228: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 229: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(2) - (3)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 230: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; ;} break; case 231: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; ;} break; case 232: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 233: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).string = CSSParserString(); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 234: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1403 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); - } + ;} break; case 235: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1406 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); - } + ;} break; case 236: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1409 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); - } + ;} break; case 237: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1412 "../Source/WebCore/css/CSSGrammar.y" { /* Handle width: %; */ (yyval.value).id = 0; (yyval.value).unit = 0; - } + ;} break; case 238: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (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 1806 of yacc.c */ +/* Line 1455 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; } + { (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 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; ;} break; case 241: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; ;} break; case 242: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; ;} break; case 243: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; ;} break; case 244: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; ;} break; case 245: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; ;} break; case 246: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; ;} break; case 247: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; ;} break; case 248: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; ;} break; case 249: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; ;} break; case 250: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_TURN; ;} break; case 251: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; ;} break; case 252: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_S; ;} break; case 253: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; ;} break; case 254: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; ;} break; case 255: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; ;} break; case 256: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSParserValue::Q_EMS; ;} break; case 257: -/* Line 1806 of yacc.c */ +/* Line 1455 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; } + { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; ;} break; case 258: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1438 "../Source/WebCore/css/CSSGrammar.y" { (yyval.value).id = 0; @@ -4407,12 +4377,12 @@ yyreduce: CSSParser* p = static_cast<CSSParser*>(parser); if (Document* doc = p->document()) doc->setUsesRemUnits(true); - } + ;} break; case 259: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1449 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4422,12 +4392,12 @@ yyreduce: (yyval.value).id = 0; (yyval.value).unit = CSSParserValue::Function; (yyval.value).function = f; - } + ;} break; case 260: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1458 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4437,74 +4407,74 @@ yyreduce: (yyval.value).id = 0; (yyval.value).unit = CSSParserValue::Function; (yyval.value).function = f; - } + ;} break; case 261: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1470 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.value) = (yyvsp[(1) - (1)].value); } + { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 262: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1471 "../Source/WebCore/css/CSSGrammar.y" - { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); } + { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 263: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1475 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '+'; - } + ;} break; case 264: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1478 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '-'; - } + ;} break; case 265: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1481 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '*'; - } + ;} break; case 266: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1484 "../Source/WebCore/css/CSSGrammar.y" { (yyval.character) = '/'; - } + ;} break; case 267: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1487 "../Source/WebCore/css/CSSGrammar.y" { if (equalIgnoringCase("mod", (yyvsp[(1) - (2)].string).characters, (yyvsp[(1) - (2)].string).length)) (yyval.character) = '%'; else (yyval.character) = 0; - } + ;} break; case 268: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1496 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(3) - (6)].valueList)) { @@ -4518,23 +4488,23 @@ yyreduce: (yyval.valueList)->addValue(v); } else (yyval.valueList) = 0; - } + ;} break; case 269: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1511 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); (yyval.valueList) = p->createFloatingValueList(); (yyval.valueList)->addValue(p->sinkFloatingValue((yyvsp[(1) - (2)].value))); - } + ;} break; case 270: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1516 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4549,12 +4519,12 @@ yyreduce: } else (yyval.valueList) = 0; - } + ;} break; case 271: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1530 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (3)].valueList) && (yyvsp[(2) - (3)].character) && (yyvsp[(3) - (3)].valueList)) { @@ -4567,30 +4537,30 @@ yyreduce: (yyval.valueList)->extend(*((yyvsp[(3) - (3)].valueList))); } else (yyval.valueList) = 0; - } + ;} break; case 273: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1543 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = 0; - } + ;} break; case 274: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1549 "../Source/WebCore/css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(1) - (1)].valueList); - } + ;} break; case 275: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1552 "../Source/WebCore/css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].valueList) && (yyvsp[(4) - (4)].valueList)) { @@ -4603,12 +4573,12 @@ yyreduce: (yyval.valueList)->extend(*((yyvsp[(4) - (4)].valueList))); } else (yyval.valueList) = 0; - } + ;} break; case 276: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1567 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4618,39 +4588,39 @@ yyreduce: (yyval.value).id = 0; (yyval.value).unit = CSSParserValue::Function; (yyval.value).function = f; - } + ;} break; case 277: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1576 "../Source/WebCore/css/CSSGrammar.y" { YYERROR; - } + ;} break; case 278: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1583 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (1)].string); - } + ;} break; case 279: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1586 "../Source/WebCore/css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (1)].string); - } + ;} break; case 280: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1592 "../Source/WebCore/css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -4660,98 +4630,87 @@ yyreduce: (yyval.value).id = 0; (yyval.value).unit = CSSParserValue::Function; (yyval.value).function = f; - } + ;} break; case 281: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1601 "../Source/WebCore/css/CSSGrammar.y" { YYERROR; - } + ;} break; case 282: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1609 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 283: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1612 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 284: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1618 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 285: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1621 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 286: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1627 "../Source/WebCore/css/CSSGrammar.y" { (yyval.rule) = 0; - } + ;} break; case 287: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1645 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->invalidBlockHit(); - } + ;} break; case 288: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 1648 "../Source/WebCore/css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->invalidBlockHit(); - } + ;} break; -/* Line 1806 of yacc.c */ -#line 4742 "/Source/WebCore/generated/CSSGrammar.tab.c" +/* Line 1455 of yacc.c */ +#line 4712 "/Source/WebCore/generated/CSSGrammar.tab.c" default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -4779,10 +4738,6 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -4790,36 +4745,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } @@ -4878,7 +4834,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -4937,13 +4893,8 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -4968,7 +4919,7 @@ yyreturn: -/* Line 2067 of yacc.c */ +/* Line 1675 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 59225d8..2fcae75 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h +++ b/src/3rdparty/webkit/Source/WebCore/generated/CSSGrammar.h @@ -1,10 +1,12 @@ #ifndef CSSGRAMMAR_H #define CSSGRAMMAR_H -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison interface for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 @@ -128,7 +130,7 @@ typedef union YYSTYPE { -/* Line 2068 of yacc.c */ +/* Line 1676 of yacc.c */ #line 63 "../Source/WebCore/css/CSSGrammar.y" bool boolean; @@ -156,8 +158,8 @@ typedef union YYSTYPE -/* Line 2068 of yacc.c */ -#line 159 "/Source/WebCore/generated/CSSGrammar.tab.h" +/* Line 1676 of yacc.c */ +#line 161 "/Source/WebCore/generated/CSSGrammar.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 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/JSInternals.cpp b/src/3rdparty/webkit/Source/WebCore/generated/JSInternals.cpp new file mode 100644 index 0000000..1a29b36 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/generated/JSInternals.cpp @@ -0,0 +1,134 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" +#include "JSInternals.h" + +#include "ExceptionCode.h" +#include "Internals.h" +#include "JSDOMBinding.h" +#include "JSDocument.h" +#include <runtime/Error.h> +#include <wtf/GetPtr.h> + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSInternals); + +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSInternalsPrototypeTableValues[3] = +{ + { "setPasswordEchoEnabled", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsInternalsPrototypeFunctionSetPasswordEchoEnabled), (intptr_t)2 THUNK_GENERATOR(0) }, + { "setPasswordEchoDurationInSeconds", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsInternalsPrototypeFunctionSetPasswordEchoDurationInSeconds), (intptr_t)2 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSInternalsPrototypeTable = { 5, 3, JSInternalsPrototypeTableValues, 0 }; +const ClassInfo JSInternalsPrototype::s_info = { "InternalsPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSInternalsPrototypeTable, 0 }; + +JSObject* JSInternalsPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSInternals>(exec, globalObject); +} + +bool JSInternalsPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticFunctionSlot<JSObject>(exec, &JSInternalsPrototypeTable, this, propertyName, slot); +} + +bool JSInternalsPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticFunctionDescriptor<JSObject>(exec, &JSInternalsPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSInternals::s_info = { "Internals", &JSDOMWrapper::s_info, 0, 0 }; + +JSInternals::JSInternals(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Internals> impl) + : JSDOMWrapper(structure, globalObject) + , m_impl(impl) +{ + ASSERT(inherits(&s_info)); +} + +JSObject* JSInternals::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSInternalsPrototype(exec->globalData(), globalObject, JSInternalsPrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype())); +} + +EncodedJSValue JSC_HOST_CALL jsInternalsPrototypeFunctionSetPasswordEchoEnabled(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSInternals::s_info)) + return throwVMTypeError(exec); + JSInternals* castedThis = static_cast<JSInternals*>(asObject(thisValue)); + Internals* imp = static_cast<Internals*>(castedThis->impl()); + ExceptionCode ec = 0; + Document* document(toDocument(exec->argument(0))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + bool enabled(exec->argument(1).toBoolean(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + + imp->setPasswordEchoEnabled(document, enabled, ec); + setDOMException(exec, ec); + return JSValue::encode(jsUndefined()); +} + +EncodedJSValue JSC_HOST_CALL jsInternalsPrototypeFunctionSetPasswordEchoDurationInSeconds(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSInternals::s_info)) + return throwVMTypeError(exec); + JSInternals* castedThis = static_cast<JSInternals*>(asObject(thisValue)); + Internals* imp = static_cast<Internals*>(castedThis->impl()); + ExceptionCode ec = 0; + Document* document(toDocument(exec->argument(0))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + double durationInSeconds(exec->argument(1).toNumber(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + + imp->setPasswordEchoDurationInSeconds(document, durationInSeconds, ec); + setDOMException(exec, ec); + return JSValue::encode(jsUndefined()); +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Internals* impl) +{ + return wrap<JSInternals>(exec, globalObject, impl); +} + +Internals* toInternals(JSC::JSValue value) +{ + return value.inherits(&JSInternals::s_info) ? static_cast<JSInternals*>(asObject(value))->impl() : 0; +} + +} diff --git a/src/3rdparty/webkit/Source/WebCore/generated/JSInternals.h b/src/3rdparty/webkit/Source/WebCore/generated/JSInternals.h new file mode 100644 index 0000000..08e2751 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/generated/JSInternals.h @@ -0,0 +1,79 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef JSInternals_h +#define JSInternals_h + +#include "JSDOMBinding.h" +#include <runtime/JSGlobalObject.h> +#include <runtime/JSObjectWithGlobalObject.h> +#include <runtime/ObjectPrototype.h> + +namespace WebCore { + +class Internals; + +class JSInternals : public JSDOMWrapper { + typedef JSDOMWrapper Base; +public: + JSInternals(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Internals>); + static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); + static const JSC::ClassInfo s_info; + + static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) + { + return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + + Internals* impl() const { return m_impl.get(); } + +private: + RefPtr<Internals> m_impl; +protected: + static const unsigned StructureFlags = Base::StructureFlags; +}; + +JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Internals*); +Internals* toInternals(JSC::JSValue); + +class JSInternalsPrototype : public JSC::JSObjectWithGlobalObject { + typedef JSC::JSObjectWithGlobalObject Base; +public: + static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); + static const JSC::ClassInfo s_info; + virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); + virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); + static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) + { + return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info); + } + JSInternalsPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { } +protected: + static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; +}; + +// Functions + +JSC::EncodedJSValue JSC_HOST_CALL jsInternalsPrototypeFunctionSetPasswordEchoEnabled(JSC::ExecState*); +JSC::EncodedJSValue JSC_HOST_CALL jsInternalsPrototypeFunctionSetPasswordEchoDurationInSeconds(JSC::ExecState*); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/generated/JSWebGLRenderingContext.cpp b/src/3rdparty/webkit/Source/WebCore/generated/JSWebGLRenderingContext.cpp index 6f38364..e2a03c2 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/JSWebGLRenderingContext.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/JSWebGLRenderingContext.cpp @@ -30,6 +30,7 @@ #include "JSDOMBinding.h" #include "JSHTMLCanvasElement.h" #include "JSHTMLImageElement.h" +#include "JSHTMLVideoElement.h" #include "JSImageData.h" #include "JSWebGLActiveInfo.h" #include "JSWebGLBuffer.h" @@ -2985,6 +2986,40 @@ static EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexI return JSValue::encode(jsUndefined()); } +static EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexImage2D5(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSWebGLRenderingContext::s_info)) + return throwVMTypeError(exec); + JSWebGLRenderingContext* castedThis = static_cast<JSWebGLRenderingContext*>(asObject(thisValue)); + WebGLRenderingContext* imp = static_cast<WebGLRenderingContext*>(castedThis->impl()); + ExceptionCode ec = 0; + unsigned target(exec->argument(0).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + int level(exec->argument(1).toInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + unsigned internalformat(exec->argument(2).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + unsigned format(exec->argument(3).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + unsigned type(exec->argument(4).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + if (exec->argumentCount() > 5 && !exec->argument(5).isUndefinedOrNull() && !exec->argument(5).inherits(&JSHTMLVideoElement::s_info)) + return throwVMTypeError(exec); + HTMLVideoElement* video(toHTMLVideoElement(exec->argument(5))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + + imp->texImage2D(target, level, internalformat, format, type, video, ec); + setDOMException(exec, ec); + return JSValue::encode(jsUndefined()); +} + EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexImage2D(ExecState* exec) { if ((exec->argumentCount() == 9 && (exec->argument(8).isNull() || (exec->argument(8).isObject() && asObject(exec->argument(8))->inherits(&JSArrayBufferView::s_info))))) @@ -2995,6 +3030,8 @@ EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexImage2D( return jsWebGLRenderingContextPrototypeFunctionTexImage2D3(exec); if ((exec->argumentCount() == 6 && (exec->argument(5).isNull() || (exec->argument(5).isObject() && asObject(exec->argument(5))->inherits(&JSHTMLCanvasElement::s_info))))) return jsWebGLRenderingContextPrototypeFunctionTexImage2D4(exec); + if ((exec->argumentCount() == 6 && (exec->argument(5).isNull() || (exec->argument(5).isObject() && asObject(exec->argument(5))->inherits(&JSHTMLVideoElement::s_info))))) + return jsWebGLRenderingContextPrototypeFunctionTexImage2D5(exec); return throwVMTypeError(exec); } @@ -3152,6 +3189,43 @@ static EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexS return JSValue::encode(jsUndefined()); } +static EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexSubImage2D5(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSWebGLRenderingContext::s_info)) + return throwVMTypeError(exec); + JSWebGLRenderingContext* castedThis = static_cast<JSWebGLRenderingContext*>(asObject(thisValue)); + WebGLRenderingContext* imp = static_cast<WebGLRenderingContext*>(castedThis->impl()); + ExceptionCode ec = 0; + unsigned target(exec->argument(0).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + int level(exec->argument(1).toInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + int xoffset(exec->argument(2).toInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + int yoffset(exec->argument(3).toInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + unsigned format(exec->argument(4).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + unsigned type(exec->argument(5).toUInt32(exec)); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + if (exec->argumentCount() > 6 && !exec->argument(6).isUndefinedOrNull() && !exec->argument(6).inherits(&JSHTMLVideoElement::s_info)) + return throwVMTypeError(exec); + HTMLVideoElement* video(toHTMLVideoElement(exec->argument(6))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + + imp->texSubImage2D(target, level, xoffset, yoffset, format, type, video, ec); + setDOMException(exec, ec); + return JSValue::encode(jsUndefined()); +} + EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexSubImage2D(ExecState* exec) { if ((exec->argumentCount() == 9 && (exec->argument(8).isNull() || (exec->argument(8).isObject() && asObject(exec->argument(8))->inherits(&JSArrayBufferView::s_info))))) @@ -3162,6 +3236,8 @@ EncodedJSValue JSC_HOST_CALL jsWebGLRenderingContextPrototypeFunctionTexSubImage return jsWebGLRenderingContextPrototypeFunctionTexSubImage2D3(exec); if ((exec->argumentCount() == 7 && (exec->argument(6).isNull() || (exec->argument(6).isObject() && asObject(exec->argument(6))->inherits(&JSHTMLCanvasElement::s_info))))) return jsWebGLRenderingContextPrototypeFunctionTexSubImage2D4(exec); + if ((exec->argumentCount() == 7 && (exec->argument(6).isNull() || (exec->argument(6).isObject() && asObject(exec->argument(6))->inherits(&JSHTMLVideoElement::s_info))))) + return jsWebGLRenderingContextPrototypeFunctionTexSubImage2D5(exec); return throwVMTypeError(exec); } diff --git a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp index dc82e12..4e5cb97 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp +++ b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.cpp @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison implementation for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 @@ -44,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -73,7 +75,7 @@ /* Copy the first part of user declarations. */ -/* Line 268 of yacc.c */ +/* Line 189 of yacc.c */ #line 28 "../Source/WebCore/xml/XPathGrammar.y" @@ -104,8 +106,8 @@ using namespace XPath; -/* Line 268 of yacc.c */ -#line 109 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 189 of yacc.c */ +#line 111 "/Source/WebCore/generated/XPathGrammar.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -159,7 +161,7 @@ using namespace XPath; typedef union YYSTYPE { -/* Line 293 of yacc.c */ +/* Line 214 of yacc.c */ #line 60 "../Source/WebCore/xml/XPathGrammar.y" Step::Axis axis; @@ -175,8 +177,8 @@ typedef union YYSTYPE -/* Line 293 of yacc.c */ -#line 180 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 214 of yacc.c */ +#line 182 "/Source/WebCore/generated/XPathGrammar.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -186,7 +188,7 @@ typedef union YYSTYPE /* Copy the second part of user declarations. */ -/* Line 343 of yacc.c */ +/* Line 264 of yacc.c */ #line 73 "../Source/WebCore/xml/XPathGrammar.y" @@ -195,8 +197,8 @@ static void xpathyyerror(const char*) { } -/* Line 343 of yacc.c */ -#line 200 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 264 of yacc.c */ +#line 202 "/Source/WebCore/generated/XPathGrammar.tab.c" #ifdef short # undef short @@ -246,7 +248,7 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -299,11 +301,11 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # endif @@ -326,24 +328,24 @@ YYID (yyi) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ +# if (defined __cplusplus && ! defined _STDLIB_H \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 +# ifndef _STDLIB_H +# define _STDLIB_H 1 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif @@ -372,7 +374,23 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -# define YYCOPY_NEEDED 1 +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of @@ -392,26 +410,6 @@ union yyalloc #endif -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - /* YYFINAL -- State number of the termination state. */ #define YYFINAL 47 /* YYLAST -- Last index in YYTABLE. */ @@ -570,8 +568,8 @@ static const yytype_uint8 yyr2[] = 1, 2 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { @@ -622,7 +620,8 @@ static const yytype_int8 yypgoto[] = /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { @@ -641,12 +640,6 @@ static const yytype_uint8 yytable[] = 15 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-44)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 1, 12, 0, 19, 22, 48, 49, 43, 10, 11, @@ -692,18 +685,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) @@ -713,6 +697,7 @@ do \ { \ yychar = (Token); \ yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK (1); \ goto yybackup; \ } \ @@ -754,10 +739,19 @@ while (YYID (0)) #endif -/* This macro is provided for backward compatibility. */ +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif @@ -949,6 +943,7 @@ int yydebug; # define YYMAXDEPTH 10000 #endif + #if YYERROR_VERBOSE @@ -1051,142 +1046,115 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } + int yyn = yypact[yystate]; - switch (yycount) + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } + if (yysize_overflow) + return YYSIZE_MAXIMUM; - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } } #endif /* YYERROR_VERBOSE */ + /*-----------------------------------------------. | Release the memory associated to this symbol. | @@ -1219,7 +1187,6 @@ yydestruct (yymsg, yytype, yyvaluep) } } - /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus @@ -1236,9 +1203,12 @@ int yyparse (); #endif /* ! YYPARSE_PARAM */ -/*----------. -| yyparse. | -`----------*/ + + + +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1425,7 +1395,7 @@ yybackup: /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ @@ -1456,8 +1426,8 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yytable_value_is_error (yyn)) - goto yyerrlab; + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; yyn = -yyn; goto yyreduce; } @@ -1512,98 +1482,98 @@ yyreduce: { case 2: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 122 "../Source/WebCore/xml/XPathGrammar.y" { PARSER->m_topExpr = (yyvsp[(1) - (1)].expr); - } + ;} break; case 3: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 129 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(false); - } + ;} break; case 4: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 134 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(true); - } + ;} break; case 5: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 141 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; PARSER->registerParseNode((yyval.locationPath)); - } + ;} break; case 6: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 147 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); - } + ;} break; case 7: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 152 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); (yyval.locationPath)->insertFirstStep((yyvsp[(1) - (2)].step)); PARSER->unregisterParseNode((yyvsp[(1) - (2)].step)); - } + ;} break; case 8: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 161 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; (yyval.locationPath)->appendStep((yyvsp[(1) - (1)].step)); PARSER->unregisterParseNode((yyvsp[(1) - (1)].step)); PARSER->registerParseNode((yyval.locationPath)); - } + ;} break; case 9: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 169 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].step)); - } + ;} break; case 10: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 175 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step)); (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); PARSER->unregisterParseNode((yyvsp[(2) - (3)].step)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].step)); - } + ;} break; case 11: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 185 "../Source/WebCore/xml/XPathGrammar.y" { if ((yyvsp[(2) - (2)].predList)) { @@ -1613,12 +1583,12 @@ yyreduce: (yyval.step) = new Step(Step::ChildAxis, *(yyvsp[(1) - (2)].nodeTest)); PARSER->deleteNodeTest((yyvsp[(1) - (2)].nodeTest)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 12: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 196 "../Source/WebCore/xml/XPathGrammar.y" { String localName; @@ -1635,12 +1605,12 @@ yyreduce: (yyval.step) = new Step(Step::ChildAxis, Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); PARSER->deleteString((yyvsp[(1) - (2)].str)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 13: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 214 "../Source/WebCore/xml/XPathGrammar.y" { if ((yyvsp[(3) - (3)].predList)) { @@ -1650,12 +1620,12 @@ yyreduce: (yyval.step) = new Step((yyvsp[(1) - (3)].axis), *(yyvsp[(2) - (3)].nodeTest)); PARSER->deleteNodeTest((yyvsp[(2) - (3)].nodeTest)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 14: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 225 "../Source/WebCore/xml/XPathGrammar.y" { String localName; @@ -1672,21 +1642,21 @@ yyreduce: (yyval.step) = new Step((yyvsp[(1) - (3)].axis), Step::NodeTest(Step::NodeTest::NameTest, localName, namespaceURI)); PARSER->deleteString((yyvsp[(2) - (3)].str)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 17: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 249 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.axis) = Step::AttributeAxis; - } + ;} break; case 18: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 256 "../Source/WebCore/xml/XPathGrammar.y" { if (*(yyvsp[(1) - (3)].str) == "node") @@ -1698,147 +1668,147 @@ yyreduce: PARSER->deleteString((yyvsp[(1) - (3)].str)); PARSER->registerNodeTest((yyval.nodeTest)); - } + ;} break; case 19: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 269 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); PARSER->deleteString((yyvsp[(1) - (3)].str)); PARSER->registerNodeTest((yyval.nodeTest)); - } + ;} break; case 20: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 276 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace()); PARSER->deleteString((yyvsp[(1) - (4)].str)); PARSER->deleteString((yyvsp[(3) - (4)].str)); PARSER->registerNodeTest((yyval.nodeTest)); - } + ;} break; case 21: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 286 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList) = 0; - } + ;} break; case 23: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 295 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList) = new Vector<Predicate*>; (yyval.predList)->append(new Predicate((yyvsp[(1) - (1)].expr))); PARSER->unregisterParseNode((yyvsp[(1) - (1)].expr)); PARSER->registerPredicateVector((yyval.predList)); - } + ;} break; case 24: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 303 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr))); PARSER->unregisterParseNode((yyvsp[(2) - (2)].expr)); - } + ;} break; case 25: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 311 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); - } + ;} break; case 26: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 318 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 27: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 326 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 28: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 332 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); PARSER->registerParseNode((yyval.step)); - } + ;} break; case 29: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 340 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str)); PARSER->deleteString((yyvsp[(1) - (1)].str)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 30: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 347 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); - } + ;} break; case 31: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 352 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str)); PARSER->deleteString((yyvsp[(1) - (1)].str)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 32: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 359 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble()); PARSER->deleteString((yyvsp[(1) - (1)].str)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 34: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 370 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str)); @@ -1846,12 +1816,12 @@ yyreduce: YYABORT; PARSER->deleteString((yyvsp[(1) - (3)].str)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 35: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 379 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList)); @@ -1860,34 +1830,34 @@ yyreduce: PARSER->deleteString((yyvsp[(1) - (4)].str)); PARSER->deleteExpressionVector((yyvsp[(3) - (4)].argList)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 36: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 391 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.argList) = new Vector<Expression*>; (yyval.argList)->append((yyvsp[(1) - (1)].expr)); PARSER->unregisterParseNode((yyvsp[(1) - (1)].expr)); PARSER->registerExpressionVector((yyval.argList)); - } + ;} break; case 37: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 399 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.argList)->append((yyvsp[(3) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); - } + ;} break; case 40: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 413 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Union; @@ -1896,21 +1866,21 @@ yyreduce: PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 41: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 425 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(1) - (1)].locationPath); - } + ;} break; case 43: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 432 "../Source/WebCore/xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); @@ -1918,12 +1888,12 @@ yyreduce: PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].locationPath)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 44: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 441 "../Source/WebCore/xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step)); @@ -1933,134 +1903,123 @@ yyreduce: PARSER->unregisterParseNode((yyvsp[(2) - (3)].step)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].locationPath)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 46: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 456 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList)); PARSER->unregisterParseNode((yyvsp[(1) - (2)].expr)); PARSER->deletePredicateVector((yyvsp[(2) - (2)].predList)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 48: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 50: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 52: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 54: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 56: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 57: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 59: -/* Line 1806 of yacc.c */ +/* Line 1455 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)); PARSER->unregisterParseNode((yyvsp[(1) - (3)].expr)); PARSER->unregisterParseNode((yyvsp[(3) - (3)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; case 61: -/* Line 1806 of yacc.c */ +/* Line 1455 of yacc.c */ #line 548 "../Source/WebCore/xml/XPathGrammar.y" { (yyval.expr) = new Negative; (yyval.expr)->addSubExpression((yyvsp[(2) - (2)].expr)); PARSER->unregisterParseNode((yyvsp[(2) - (2)].expr)); PARSER->registerParseNode((yyval.expr)); - } + ;} break; -/* Line 1806 of yacc.c */ -#line 2051 "/Source/WebCore/generated/XPathGrammar.tab.c" +/* Line 1455 of yacc.c */ +#line 2021 "/Source/WebCore/generated/XPathGrammar.tab.c" default: break; } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2088,10 +2047,6 @@ yyreduce: | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2099,36 +2054,37 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } } -# undef YYSYNTAX_ERROR #endif } @@ -2187,7 +2143,7 @@ yyerrlab1: for (;;) { yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) + if (yyn != YYPACT_NINF) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) @@ -2246,13 +2202,8 @@ yyexhaustedlab: yyreturn: if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); @@ -2277,7 +2228,7 @@ yyreturn: -/* Line 2067 of yacc.c */ +/* Line 1675 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 2911272..fa6a7b3 100644 --- a/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h +++ b/src/3rdparty/webkit/Source/WebCore/generated/XPathGrammar.h @@ -1,8 +1,10 @@ -/* A Bison parser, made by GNU Bison 2.5. */ -/* Bison interface for Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + 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 @@ -64,7 +66,7 @@ typedef union YYSTYPE { -/* Line 2068 of yacc.c */ +/* Line 1676 of yacc.c */ #line 60 "../Source/WebCore/xml/XPathGrammar.y" Step::Axis axis; @@ -80,8 +82,8 @@ typedef union YYSTYPE -/* Line 2068 of yacc.c */ -#line 85 "/Source/WebCore/generated/XPathGrammar.tab.h" +/* Line 1676 of yacc.c */ +#line 87 "/Source/WebCore/generated/XPathGrammar.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp index 633dd1e..d7ca918 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLLinkElement.cpp @@ -83,6 +83,9 @@ HTMLLinkElement::~HTMLLinkElement() if (m_cachedLinkResource) m_cachedLinkResource->removeClient(this); #endif + + if (inDocument()) + document()->removeStyleSheetCandidateNode(this); } void HTMLLinkElement::setDisabled(bool disabled) diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLSourceElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLSourceElement.cpp index 59b3882..0631a20 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLSourceElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLSourceElement.cpp @@ -57,13 +57,15 @@ PassRefPtr<HTMLSourceElement> HTMLSourceElement::create(const QualifiedName& tag void HTMLSourceElement::insertedIntoTree(bool deep) { HTMLElement::insertedIntoTree(deep); - if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) + Element* parent = parentElement(); + if (parent && parent->isMediaElement()) static_cast<HTMLMediaElement*>(parentNode())->sourceWasAdded(this); } void HTMLSourceElement::willRemove() { - if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) + Element* parent = parentElement(); + if (parent && parent->isMediaElement()) static_cast<HTMLMediaElement*>(parentNode())->sourceWillBeRemoved(this); HTMLElement::willRemove(); } diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLStyleElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLStyleElement.cpp index 0f256e1..0213f40 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLStyleElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLStyleElement.cpp @@ -44,8 +44,7 @@ inline HTMLStyleElement::HTMLStyleElement(const QualifiedName& tagName, Document HTMLStyleElement::~HTMLStyleElement() { - if (m_sheet) - m_sheet->clearOwnerNode(); + StyleElement::clearDocumentData(document(), this); } PassRefPtr<HTMLStyleElement> HTMLStyleElement::create(const QualifiedName& tagName, Document* document, bool createdByParser) diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLTrackElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLTrackElement.cpp index 63f2788..4de878b 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/HTMLTrackElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLTrackElement.cpp @@ -53,7 +53,8 @@ PassRefPtr<HTMLTrackElement> HTMLTrackElement::create(const QualifiedName& tagNa void HTMLTrackElement::insertedIntoTree(bool deep) { HTMLElement::insertedIntoTree(deep); - if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) { + Element* parent = parentElement(); + if (parent && parent->isMediaElement()) { // TODO(annacc): // static_cast<HTMLMediaElement*>(parentNode())->trackWasAdded(this); } @@ -61,7 +62,8 @@ void HTMLTrackElement::insertedIntoTree(bool deep) void HTMLTrackElement::willRemove() { - if (parentNode() && (parentNode()->hasTagName(audioTag) || parentNode()->hasTagName(videoTag))) { + Element* parent = parentElement(); + if (parent && parent->isMediaElement()) { // TODO(annacc): // static_cast<HTMLMediaElement*>(parentNode())->trackWillBeRemoved(this); } diff --git a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp index 054f766..4492dd2 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/parser/HTMLTreeBuilder.cpp @@ -603,13 +603,13 @@ void HTMLTreeBuilder::processCloseWhenNestedTag(AtomicHTMLToken& token) m_framesetOk = false; HTMLElementStack::ElementRecord* nodeRecord = m_tree.openElements()->topRecord(); while (1) { - ContainerNode* node = nodeRecord->node(); - if (shouldClose(node)) { + RefPtr<ContainerNode> node = nodeRecord->node(); + if (shouldClose(node.get())) { ASSERT(node->isElementNode()); - processFakeEndTag(toElement(node)->tagQName()); + processFakeEndTag(toElement(node.get())->tagQName()); break; } - if (isSpecialNode(node) && !node->hasTagName(addressTag) && !node->hasTagName(divTag) && !node->hasTagName(pTag)) + if (isSpecialNode(node.get()) && !node->hasTagName(addressTag) && !node->hasTagName(divTag) && !node->hasTagName(pTag)) break; nodeRecord = nodeRecord->next(); } @@ -1554,7 +1554,7 @@ void HTMLTreeBuilder::processAnyOtherEndTagForInBody(AtomicHTMLToken& token) ASSERT(token.type() == HTMLToken::EndTag); HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord(); while (1) { - ContainerNode* node = record->node(); + RefPtr<ContainerNode> node = record->node(); if (node->hasLocalName(token.name())) { m_tree.generateImpliedEndTags(); // FIXME: The ElementRecord pointed to by record might be deleted by @@ -1568,13 +1568,13 @@ void HTMLTreeBuilder::processAnyOtherEndTagForInBody(AtomicHTMLToken& token) // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10080 // We might have already popped the node for the token in // generateImpliedEndTags, just abort. - if (!m_tree.openElements()->contains(toElement(node))) + if (!m_tree.openElements()->contains(toElement(node.get()))) return; } - m_tree.openElements()->popUntilPopped(toElement(node)); + m_tree.openElements()->popUntilPopped(toElement(node.get())); return; } - if (isSpecialNode(node)) { + if (isSpecialNode(node.get())) { parseError(token); return; } @@ -1631,7 +1631,7 @@ void HTMLTreeBuilder::callTheAdoptionAgency(AtomicHTMLToken& token) } // 4. ASSERT(furthestBlock->isAbove(formattingElementRecord)); - ContainerNode* commonAncestor = formattingElementRecord->next()->node(); + RefPtr<ContainerNode> commonAncestor = formattingElementRecord->next()->node(); // 5. HTMLFormattingElementList::Bookmark bookmark = m_tree.activeFormattingElements()->bookmarkFor(formattingElement); // 6. diff --git a/src/3rdparty/webkit/Source/WebCore/html/shadow/MediaControlElements.cpp b/src/3rdparty/webkit/Source/WebCore/html/shadow/MediaControlElements.cpp index ac5d5e2..c3bfb9a 100644 --- a/src/3rdparty/webkit/Source/WebCore/html/shadow/MediaControlElements.cpp +++ b/src/3rdparty/webkit/Source/WebCore/html/shadow/MediaControlElements.cpp @@ -57,7 +57,7 @@ HTMLMediaElement* toParentMediaElement(RenderObject* o) { Node* node = o->node(); Node* mediaNode = node ? node->shadowAncestorNode() : 0; - if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag))) + if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement()) return 0; return static_cast<HTMLMediaElement*>(mediaNode); diff --git a/src/3rdparty/webkit/Source/WebCore/inspector/InspectorValues.cpp b/src/3rdparty/webkit/Source/WebCore/inspector/InspectorValues.cpp index 09d1258..c80de51 100644 --- a/src/3rdparty/webkit/Source/WebCore/inspector/InspectorValues.cpp +++ b/src/3rdparty/webkit/Source/WebCore/inspector/InspectorValues.cpp @@ -620,7 +620,18 @@ void InspectorBasicValue::writeJSON(Vector<UChar>* output) const output->append(falseString, 5); } else if (type() == TypeNumber) { NumberToStringBuffer buffer; - unsigned length = DecimalNumber(m_doubleValue).toStringDecimal(buffer, WTF::NumberToStringBufferLength); + DecimalNumber decimal = m_doubleValue; + unsigned length = 0; + if (decimal.bufferLengthForStringDecimal() > WTF::NumberToStringBufferLength) { + // Not enough room for decimal. Use exponential format. + if (decimal.bufferLengthForStringExponential() > WTF::NumberToStringBufferLength) { + // Fallback for an abnormal case if it's too little even for exponential. + output->append("NaN", 3); + return; + } + length = decimal.toStringExponential(buffer, WTF::NumberToStringBufferLength); + } else + length = decimal.toStringDecimal(buffer, WTF::NumberToStringBufferLength); output->append(buffer, length); } } diff --git a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp index 75daae5..1b046b3 100644 --- a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp +++ b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.cpp @@ -1331,6 +1331,9 @@ static bool isFeedWithNestedProtocolInHTTPFamily(const KURL& url) void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHistory, bool lockBackForwardList, PassRefPtr<Event> event, PassRefPtr<FormState> formState, ReferrerPolicy referrerPolicy) { + // Protect frame from getting blown away inside dispatchBeforeLoadEvent in loadWithDocumentLoader. + RefPtr<Frame> protect(m_frame); + KURL url = request.resourceRequest().url(); ASSERT(m_frame->document()); @@ -1388,7 +1391,7 @@ void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const Stri RefPtr<SecurityOrigin> referrerOrigin = SecurityOrigin::createFromString(referrer); addHTTPOriginIfNeeded(request, referrerOrigin->toString()); } - addExtraFieldsToRequest(request, newLoadType, true, event || isFormSubmission); + addExtraFieldsToRequest(request, newLoadType, true); if (newLoadType == FrameLoadTypeReload || newLoadType == FrameLoadTypeReloadFromOrigin) request.setCachePolicy(ReloadIgnoringCacheData); @@ -1567,7 +1570,13 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t loader->setTriggeringAction(NavigationAction(newURL, policyChecker()->loadType(), isFormSubmission)); if (Element* ownerElement = m_frame->ownerElement()) { - if (!ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) { + // We skip dispatching the beforeload event if we've already + // committed a real document load because the event would leak + // subsequent activity by the frame which the parent frame isn't + // supposed to learn. For example, if the child frame navigated to + // a new URL, the parent frame shouldn't learn the URL. + if (!m_stateMachine.committedFirstRealDocumentLoad() + && !ownerElement->dispatchBeforeLoadEvent(loader->request().url().string())) { continueLoadAfterNavigationPolicy(loader->request(), formState, false); return; } @@ -2700,20 +2709,20 @@ void FrameLoader::detachViewsAndDocumentLoader() void FrameLoader::addExtraFieldsToSubresourceRequest(ResourceRequest& request) { - addExtraFieldsToRequest(request, m_loadType, false, false); + addExtraFieldsToRequest(request, m_loadType, false); } void FrameLoader::addExtraFieldsToMainResourceRequest(ResourceRequest& request) { - addExtraFieldsToRequest(request, m_loadType, true, false); + addExtraFieldsToRequest(request, m_loadType, true); } -void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadType loadType, bool mainResource, bool cookiePolicyURLFromRequest) +void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadType loadType, bool mainResource) { // Don't set the cookie policy URL if it's already been set. // But make sure to set it on all requests, as it has significance beyond the cookie policy for all protocols (<rdar://problem/6616664>). if (request.firstPartyForCookies().isEmpty()) { - if (mainResource && (isLoadingMainFrame() || cookiePolicyURLFromRequest)) + if (mainResource && isLoadingMainFrame()) request.setFirstPartyForCookies(request.url()); else if (Document* document = m_frame->document()) request.setFirstPartyForCookies(document->firstPartyForCookies()); @@ -2812,7 +2821,7 @@ void FrameLoader::loadPostRequest(const ResourceRequest& inRequest, const String workingResourceRequest.setHTTPMethod("POST"); workingResourceRequest.setHTTPBody(formData); workingResourceRequest.setHTTPContentType(contentType); - addExtraFieldsToRequest(workingResourceRequest, loadType, true, true); + addExtraFieldsToRequest(workingResourceRequest, loadType, true); NavigationAction action(url, loadType, true, event); @@ -3286,7 +3295,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem* item, FrameLoadType loa // Make sure to add extra fields to the request after the Origin header is added for the FormData case. // See https://bugs.webkit.org/show_bug.cgi?id=22194 for more discussion. - addExtraFieldsToRequest(request, m_loadType, true, formData); + addExtraFieldsToRequest(request, m_loadType, true); addedExtraFields = true; // FIXME: Slight hack to test if the NSURL cache contains the page we're going to. @@ -3329,7 +3338,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem* item, FrameLoadType loa } if (!addedExtraFields) - addExtraFieldsToRequest(request, m_loadType, true, formData); + addExtraFieldsToRequest(request, m_loadType, true); loadWithNavigationAction(request, action, false, loadType, 0); } diff --git a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.h index f2b16d9..728459c 100644 --- a/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.h +++ b/src/3rdparty/webkit/Source/WebCore/loader/FrameLoader.h @@ -356,7 +356,7 @@ private: void updateFirstPartyForCookies(); void setFirstPartyForCookies(const KURL&); - void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType loadType, bool isMainResource, bool cookiePolicyURLFromRequest); + void addExtraFieldsToRequest(ResourceRequest&, FrameLoadType, bool isMainResource); // Also not cool. void stopLoadingSubframes(ClearProvisionalItemPolicy); diff --git a/src/3rdparty/webkit/Source/WebCore/loader/cache/CachedResource.cpp b/src/3rdparty/webkit/Source/WebCore/loader/cache/CachedResource.cpp index 0f205da..8e5038a 100644 --- a/src/3rdparty/webkit/Source/WebCore/loader/cache/CachedResource.cpp +++ b/src/3rdparty/webkit/Source/WebCore/loader/cache/CachedResource.cpp @@ -250,6 +250,8 @@ void CachedResource::setRequest(CachedResourceRequest* request) m_status = Pending; m_request = request; + CachedResourceHandle<CachedResource> protect(this); + // All loads finish with data(allDataReceived = true) or error(), except for // canceled loads, which silently set our request to 0. Be sure to notify our // client in that case, so we don't seem to continue loading forever. @@ -258,9 +260,6 @@ void CachedResource::setRequest(CachedResourceRequest* request) setStatus(Canceled); checkNotify(); } - - if (canDelete() && !inCache()) - delete this; } void CachedResource::addClient(CachedResourceClient* client) diff --git a/src/3rdparty/webkit/Source/WebCore/make-hash-tools.pl b/src/3rdparty/webkit/Source/WebCore/make-hash-tools.pl index 37639eb..2812ce7 100644 --- a/src/3rdparty/webkit/Source/WebCore/make-hash-tools.pl +++ b/src/3rdparty/webkit/Source/WebCore/make-hash-tools.pl @@ -20,7 +20,6 @@ # Boston, MA 02110-1301, USA. use strict; -use Switch; use File::Basename; my $outdir = $ARGV[0]; @@ -28,9 +27,7 @@ shift; my $option = basename($ARGV[0],".gperf"); -switch ($option) { - -case "DocTypeStrings" { +if ($option eq "DocTypeStrings") { my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp"; my $docTypeStringsGperf = $ARGV[0]; @@ -38,9 +35,7 @@ case "DocTypeStrings" { system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?"; -} # case "DocTypeStrings" - -case "ColorData" { +} elsif ($option eq "ColorData") { my $colorDataGenerated = "$outdir/ColorData.cpp"; my $colorDataGperf = $ARGV[0]; @@ -48,6 +43,6 @@ case "ColorData" { system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?"; -} # case "ColorData" - -} # switch ($option) +} else { + die "Unknown option."; +} diff --git a/src/3rdparty/webkit/Source/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/Source/WebCore/page/DOMWindow.cpp index d1d60ad..a86c1af 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/DOMWindow.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/DOMWindow.cpp @@ -1667,7 +1667,7 @@ void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DO if (completedURL.isNull()) return; - if (isInsecureScriptAccess(activeWindow, urlString)) + if (isInsecureScriptAccess(activeWindow, completedURL)) return; // We want a new history item if we are processing a user gesture. @@ -1746,7 +1746,7 @@ Frame* DOMWindow::createWindow(const String& urlString, const AtomicString& fram newFrame->loader()->setOpener(openerFrame); newFrame->page()->setOpenedByDOM(); - if (newFrame->domWindow()->isInsecureScriptAccess(activeWindow, urlString)) + if (newFrame->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) return newFrame; if (function) @@ -1796,7 +1796,9 @@ PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicStrin if (!activeFrame->loader()->shouldAllowNavigation(targetFrame)) return 0; - if (isInsecureScriptAccess(activeWindow, urlString)) + KURL completedURL = firstFrame->document()->completeURL(urlString); + + if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) return targetFrame->domWindow(); if (urlString.isEmpty()) @@ -1805,7 +1807,7 @@ PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicStrin // For whatever reason, Firefox uses the first window rather than the active window to // determine the outgoing referrer. We replicate that behavior here. targetFrame->navigationScheduler()->scheduleLocationChange(activeFrame->document()->securityOrigin(), - firstFrame->document()->completeURL(urlString).string(), + completedURL, firstFrame->loader()->outgoingReferrer(), !activeFrame->script()->anyPageIsProcessingUserGesture(), false); diff --git a/src/3rdparty/webkit/Source/WebCore/page/FocusController.cpp b/src/3rdparty/webkit/Source/WebCore/page/FocusController.cpp index 5b91eeb..e7a44ca 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/FocusController.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/FocusController.cpp @@ -214,7 +214,7 @@ bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, Keyb document->updateLayoutIgnorePendingStylesheets(); - Node* node = (direction == FocusDirectionForward) + RefPtr<Node> node = (direction == FocusDirectionForward) ? document->nextFocusableNode(currentNode, event) : document->previousFocusableNode(currentNode, event); @@ -237,7 +237,7 @@ bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, Keyb frame = parentFrame; } - node = deepFocusableNode(direction, node, event); + node = deepFocusableNode(direction, node.get(), event); if (!node) { // We didn't find a node to focus, so we should try to pass focus to Chrome. @@ -254,7 +254,7 @@ bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, Keyb ? d->nextFocusableNode(0, event) : d->previousFocusableNode(0, event); - node = deepFocusableNode(direction, node, event); + node = deepFocusableNode(direction, node.get(), event); if (!node) return false; @@ -273,7 +273,7 @@ bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, Keyb if (node->isFrameOwnerElement()) { // We focus frames rather than frame owners. // FIXME: We should not focus frames that have no scrollbars, as focusing them isn't useful to the user. - HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node); + HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node.get()); if (!owner->contentFrame()) return false; @@ -296,13 +296,13 @@ bool FocusController::advanceFocusInDocumentOrder(FocusDirection direction, Keyb setFocusedFrame(newDocument->frame()); if (caretBrowsing) { - Position position = firstPositionInOrBeforeNode(node); + Position position = firstPositionInOrBeforeNode(node.get()); VisibleSelection newSelection(position, position, DOWNSTREAM); if (frame->selection()->shouldChangeSelection(newSelection)) frame->selection()->setSelection(newSelection); } - static_cast<Element*>(node)->focus(false); + static_cast<Element*>(node.get())->focus(false); return true; } diff --git a/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp index b7ff00a..3dadbf3 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/FrameView.cpp @@ -1938,7 +1938,7 @@ void FrameView::updateWidget(RenderEmbeddedObject* object) static_cast<HTMLPlugInImageElement*>(ownerElement)->updateWidget(CreateAnyWidgetType); // FIXME: It is not clear that Media elements need or want this updateWidget() call. #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) - else if (ownerElement->hasTagName(videoTag) || ownerElement->hasTagName(audioTag)) + else if (ownerElement->isMediaElement()) static_cast<HTMLMediaElement*>(ownerElement)->updateWidget(CreateAnyWidgetType); #endif else diff --git a/src/3rdparty/webkit/Source/WebCore/page/Geolocation.cpp b/src/3rdparty/webkit/Source/WebCore/page/Geolocation.cpp index fc5b1c6..b93379a 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/Geolocation.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/Geolocation.cpp @@ -441,6 +441,9 @@ void Geolocation::resume() void Geolocation::setIsAllowed(bool allowed) { + // Protect the Geolocation object from garbage collection during a callback. + RefPtr<Geolocation> protect(this); + // This may be due to either a new position from the service, or a cached // position. m_allowGeolocation = allowed ? Yes : No; diff --git a/src/3rdparty/webkit/Source/WebCore/page/Geolocation.h b/src/3rdparty/webkit/Source/WebCore/page/Geolocation.h index b52ad45..ec48f6e 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/Geolocation.h +++ b/src/3rdparty/webkit/Source/WebCore/page/Geolocation.h @@ -100,7 +100,7 @@ private: void startTimerIfNeeded(); void timerFired(Timer<GeoNotifier>*); - Geolocation* m_geolocation; + RefPtr<Geolocation> m_geolocation; RefPtr<PositionCallback> m_successCallback; RefPtr<PositionErrorCallback> m_errorCallback; RefPtr<PositionOptions> m_options; diff --git a/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp b/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp index 6c8b312..660ad11 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/PrintContext.cpp @@ -55,6 +55,13 @@ PrintContext::~PrintContext() end(); } +#if COMPILER(WINSCW) +const IntRect& PrintContext::pageRect(size_t pageNumber) const +{ + return m_pageRects[pageNumber]; +} +#endif + void PrintContext::computePageRects(const FloatRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, float& outPageHeight, bool allowHorizontalTiling) { m_pageRects.clear(); diff --git a/src/3rdparty/webkit/Source/WebCore/page/PrintContext.h b/src/3rdparty/webkit/Source/WebCore/page/PrintContext.h index 873937a..aadff47 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/PrintContext.h +++ b/src/3rdparty/webkit/Source/WebCore/page/PrintContext.h @@ -51,7 +51,11 @@ public: // These are only valid after page rects are computed. size_t pageCount() const { return m_pageRects.size(); } +#if COMPILER(WINSCW) + const IntRect& pageRect(size_t pageNumber) const; +#else const IntRect& pageRect(size_t pageNumber) const { return m_pageRects[pageNumber]; } +#endif const Vector<IntRect>& pageRects() const { return m_pageRects; } float computeAutomaticScaleFactor(const FloatSize& availablePaperSize); diff --git a/src/3rdparty/webkit/Source/WebCore/page/Settings.cpp b/src/3rdparty/webkit/Source/WebCore/page/Settings.cpp index 2b9e8b7..2025bd0 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/Settings.cpp +++ b/src/3rdparty/webkit/Source/WebCore/page/Settings.cpp @@ -89,6 +89,7 @@ Settings::Settings(Page* page) : m_page(page) , m_editableLinkBehavior(EditableLinkDefaultBehavior) , m_textDirectionSubmenuInclusionBehavior(TextDirectionSubmenuAutomaticallyIncluded) + , m_passwordEchoDurationInSeconds(1) , m_minimumFontSize(0) , m_minimumLogicalFontSize(0) , m_defaultFontSize(0) @@ -182,6 +183,7 @@ Settings::Settings(Page* page) , m_shouldInjectUserScriptsInInitialEmptyDocument(false) , m_allowDisplayOfInsecureContent(true) , m_allowRunningOfInsecureContent(true) + , m_passwordEchoEnabled(false) { // A Frame may not have been created yet, so we initialize the AtomicString // hash before trying to use it. diff --git a/src/3rdparty/webkit/Source/WebCore/page/Settings.h b/src/3rdparty/webkit/Source/WebCore/page/Settings.h index ffe1037..1d2a138 100644 --- a/src/3rdparty/webkit/Source/WebCore/page/Settings.h +++ b/src/3rdparty/webkit/Source/WebCore/page/Settings.h @@ -407,6 +407,12 @@ namespace WebCore { void setAllowRunningOfInsecureContent(bool flag) { m_allowRunningOfInsecureContent = flag; } bool allowRunningOfInsecureContent() const { return m_allowRunningOfInsecureContent; } + void setPasswordEchoEnabled(bool flag) { m_passwordEchoEnabled = flag; } + bool passwordEchoEnabled() const { return m_passwordEchoEnabled; } + + void setPasswordEchoDurationInSeconds(double durationInSeconds) { m_passwordEchoDurationInSeconds = durationInSeconds; } + double passwordEchoDurationInSeconds() const { return m_passwordEchoDurationInSeconds; } + private: Page* m_page; @@ -422,6 +428,7 @@ namespace WebCore { AtomicString m_fantasyFontFamily; EditableLinkBehavior m_editableLinkBehavior; TextDirectionSubmenuInclusionBehavior m_textDirectionSubmenuInclusionBehavior; + double m_passwordEchoDurationInSeconds; int m_minimumFontSize; int m_minimumLogicalFontSize; int m_defaultFontSize; @@ -513,6 +520,7 @@ namespace WebCore { bool m_shouldInjectUserScriptsInInitialEmptyDocument : 1; bool m_allowDisplayOfInsecureContent : 1; bool m_allowRunningOfInsecureContent : 1; + bool m_passwordEchoEnabled : 1; #if USE(AVFOUNDATION) static bool gAVFoundationEnabled; diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h b/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h index 7b441f4..eeb08c2 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowPrivate.h @@ -23,7 +23,9 @@ #include <QTimer> #include <QWidget> +QT_BEGIN_NAMESPACE class QKeyEvent; +QT_END_NAMESPACE namespace WebCore { diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp b/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp index a442a2b..7270785 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/gstreamer/PlatformVideoWindowQt.cpp @@ -61,9 +61,9 @@ void FullScreenVideoWindow::keyPressEvent(QKeyEvent* ev) { if (m_mediaElement && ev->key() == Qt::Key_Space) { if (!m_mediaElement->paused()) - m_mediaElement->pause(); + m_mediaElement->pause(true); else - m_mediaElement->play(); + m_mediaElement->play(true); } else if (ev->key() == Qt::Key_Escape) emit closed(); QWidget::keyPressEvent(ev); diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/mac/FontCacheMac.mm b/src/3rdparty/webkit/Source/WebCore/platform/graphics/mac/FontCacheMac.mm index c71c411..9f5c44e 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/mac/FontCacheMac.mm +++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/mac/FontCacheMac.mm @@ -36,22 +36,33 @@ #import "WebCoreSystemInterface.h" #import "WebFontCache.h" #import <AppKit/AppKit.h> +#import <wtf/MainThread.h> #import <wtf/StdLibExtras.h> namespace WebCore { +// The "void*" parameter makes the function match the prototype for callbacks from callOnMainThread. +static void invalidateFontCache(void*) +{ + if (!isMainThread()) { + callOnMainThread(&invalidateFontCache, 0); + return; + } + fontCache()->invalidate(); +} + #if !defined(BUILDING_ON_LEOPARD) static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef name, const void *, CFDictionaryRef) { ASSERT_UNUSED(observer, observer == fontCache()); ASSERT_UNUSED(name, CFEqual(name, kCTFontManagerRegisteredFontsChangedNotification)); - fontCache()->invalidate(); + invalidateFontCache(0); } #else static void fontCacheATSNotificationCallback(ATSFontNotificationInfoRef, void*) { - fontCache()->invalidate(); + invalidateFontCache(0); } #endif diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.h b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.h index 7ebfaab..9e05840 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.h +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.h @@ -70,6 +70,7 @@ typedef struct _NSRect NSRect; @class AVAsset; @class NSArray; @class NSButtonCell; +@class NSControl; @class NSData; @class NSDate; @class NSEvent; @@ -85,12 +86,14 @@ typedef struct _NSRect NSRect; @class NSURLRequest; @class NSURLResponse; @class NSView; +@class NSWindow; @class QTMovie; @class QTMovieView; #else class AVAsset; class NSArray; class NSButtonCell; +class NSControl; class NSData; class NSDate; class NSEvent; @@ -107,6 +110,7 @@ class NSTextFieldCell; class NSURLConnection; class NSURLResponse; class NSView; +class NSWindow; class QTMovie; class QTMovieView; #endif @@ -151,6 +155,22 @@ extern BOOL (*wkGetNSURLResponseMustRevalidate)(NSURLResponse *response); extern void (*wkGetWheelEventDeltas)(NSEvent*, float* deltaX, float* deltaY, BOOL* continuous); extern BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point); extern void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize); +extern NSView *(*wkCreateMediaUIBackgroundView)(void); + +typedef enum { + wkMediaUIControlTimeline, + wkMediaUIControlSlider, + wkMediaUIControlPlayPauseButton, + wkMediaUIControlExitFullscreenButton, + wkMediaUIControlRewindButton, + wkMediaUIControlFastForwardButton, + wkMediaUIControlVolumeUpButton, + wkMediaUIControlVolumeDownButton +}; +extern NSControl *(*wkCreateMediaUIControl)(int); + +extern void (*wkWindowSetAlpha)(NSWindow *, float); +extern void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); extern BOOL (*wkMediaControllerThemeAvailable)(int themeStyle); extern void (*wkPopupMenu)(NSMenu*, NSPoint location, float width, NSView*, int selectedItem, NSFont*); extern unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.mm b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.mm index 9cc6677..94191b7 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.mm +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebCoreSystemInterface.mm @@ -46,6 +46,10 @@ void (*wkDrawMediaSliderTrack)(int themeStyle, CGContextRef context, CGRect rect BOOL (*wkHitTestMediaUIPart)(int part, int themeStyle, CGRect bounds, CGPoint point); void (*wkDrawMediaUIPart)(int part, int themeStyle, CGContextRef context, CGRect rect, unsigned state); void (*wkMeasureMediaUIPart)(int part, int themeStyle, CGRect *bounds, CGSize *naturalSize); +NSView *(*wkCreateMediaUIBackgroundView)(void); +NSControl *(*wkCreateMediaUIControl)(int); +void (*wkWindowSetAlpha)(NSWindow *, float); +void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); BOOL (*wkMediaControllerThemeAvailable)(int themeStyle); NSString* (*wkGetPreferredExtensionForMIMEType)(NSString*); CFStringRef (*wkSignedPublicKeyAndChallengeString)(unsigned keySize, CFStringRef challenge, CFStringRef keyDescription); diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.h b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.h new file mode 100644 index 0000000..88df1d6 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if ENABLE(VIDEO) + +#import <Cocoa/Cocoa.h> +#import <wtf/RefPtr.h> + +namespace WebCore { + class HTMLMediaElement; +} + +@protocol WebVideoFullscreenControllerDelegate; +@class WebVideoFullscreenHUDWindowController; +@class WebWindowFadeAnimation; +@class QTMovieLayer; + +@interface WebVideoFullscreenController : NSWindowController { +@private + RefPtr<WebCore::HTMLMediaElement> _mediaElement; // (retain) + id <WebVideoFullscreenControllerDelegate> _delegate; // (assign) + + NSWindow *_backgroundFullscreenWindow; // (retain) + WebVideoFullscreenHUDWindowController *_hudController; // (retain) + + WebWindowFadeAnimation *_fadeAnimation; // (retain) + + BOOL _isEndingFullscreen; + BOOL _isWindowLoaded; + BOOL _forceDisableAnimation; + uint32_t _idleDisplaySleepAssertion; + uint32_t _idleSystemSleepAssertion; + NSTimer *_tickleTimer; + uint32_t _savedUIMode; + uint32_t _savedUIOptions; +} + +- (id <WebVideoFullscreenControllerDelegate>)delegate; +- (void)setDelegate:(id <WebVideoFullscreenControllerDelegate>)delegate; + +- (void)setupVideoOverlay:(QTMovieLayer*)layer; +- (void)setMediaElement:(WebCore::HTMLMediaElement*)mediaElement; +- (WebCore::HTMLMediaElement*)mediaElement; + +- (void)enterFullscreen:(NSScreen *)screen; +- (void)exitFullscreen; + +@end + +#endif // ENABLE(VIDEO) diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.mm b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.mm new file mode 100644 index 0000000..a943fce --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenController.mm @@ -0,0 +1,617 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "config.h" + +#if ENABLE(VIDEO) + +#import "WebVideoFullscreenController.h" + +#import "WebVideoFullscreenHUDWindowController.h" +#import "WebWindowAnimation.h" +#import <Carbon/Carbon.h> +#import <IOKit/pwr_mgt/IOPMLib.h> +#import <QTKit/QTKit.h> +#import <WebCore/HTMLMediaElement.h> +#import <WebCore/SoftLinking.h> +#import <objc/objc-runtime.h> +#import <wtf/UnusedParam.h> + +#if USE(GSTREAMER) +#import <WebCore/GStreamerGWorld.h> +#endif + +SOFT_LINK_FRAMEWORK(QTKit) +SOFT_LINK_CLASS(QTKit, QTMovieLayer) + +SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *) + +#define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification() +static const NSTimeInterval tickleTimerInterval = 1.0; + +@interface WebVideoFullscreenWindow : NSWindow +#ifndef BUILDING_ON_LEOPARD +<NSAnimationDelegate> +#endif +{ + SEL _controllerActionOnAnimationEnd; + WebWindowScaleAnimation *_fullscreenAnimation; // (retain) +} +- (void)animateFromRect:(NSRect)startRect toRect:(NSRect)endRect withSubAnimation:(NSAnimation *)subAnimation controllerAction:(SEL)controllerAction; +@end + +@interface WebVideoFullscreenController(HUDWindowControllerDelegate) <WebVideoFullscreenHUDWindowControllerDelegate> +- (void)requestExitFullscreenWithAnimation:(BOOL)animation; +- (void)updateMenuAndDockForFullscreen; +- (void)updatePowerAssertions; +@end + +@interface NSWindow(IsOnActiveSpaceAdditionForTigerAndLeopard) +- (BOOL)isOnActiveSpace; +@end + +@implementation WebVideoFullscreenController +- (id)init +{ + // Do not defer window creation, to make sure -windowNumber is created (needed by WebWindowScaleAnimation). + NSWindow *window = [[WebVideoFullscreenWindow alloc] initWithContentRect:NSZeroRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + self = [super initWithWindow:window]; + [window release]; + if (!self) + return nil; + [self windowDidLoad]; + return self; + +} +- (void)dealloc +{ + ASSERT(!_backgroundFullscreenWindow); + ASSERT(!_fadeAnimation); + [_tickleTimer invalidate]; + [_tickleTimer release]; + _tickleTimer = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [super dealloc]; +} + +- (WebVideoFullscreenWindow *)fullscreenWindow +{ + return (WebVideoFullscreenWindow *)[super window]; +} + +- (void)setupVideoOverlay:(QTMovieLayer*)layer +{ + WebVideoFullscreenWindow *window = [self fullscreenWindow]; +#if USE(GSTREAMER) + if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType) { + WebCore::GStreamerGWorld* gstGworld = _mediaElement->platformMedia().media.gstreamerGWorld; + if (gstGworld->enterFullscreen()) + [window setContentView:gstGworld->platformVideoWindow()->window()]; + } +#else + [[window contentView] setLayer:layer]; + [[window contentView] setWantsLayer:YES]; + if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType) + [layer setMovie:_mediaElement->platformMedia().media.qtMovie]; +#endif +} + +- (void)windowDidLoad +{ + WebVideoFullscreenWindow *window = [self fullscreenWindow]; + [window setHasShadow:YES]; // This is nicer with a shadow. + [window setLevel:NSPopUpMenuWindowLevel-1]; + + QTMovieLayer *layer = [[getQTMovieLayerClass() alloc] init]; + [self setupVideoOverlay:layer]; + [layer release]; + +#if !USE(GSTREAMER) + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidResignActive:) name:NSApplicationDidResignActiveNotification object:NSApp]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidChangeScreenParameters:) name:NSApplicationDidChangeScreenParametersNotification object:NSApp]; +#endif +} + +- (WebCore::HTMLMediaElement*)mediaElement +{ + return _mediaElement.get(); +} + +- (void)setMediaElement:(WebCore::HTMLMediaElement*)mediaElement +{ + _mediaElement = mediaElement; + if ([self isWindowLoaded]) { + QTMovieLayer *movieLayer = (QTMovieLayer *)[[[self fullscreenWindow] contentView] layer]; + + ASSERT(movieLayer && [movieLayer isKindOfClass:[getQTMovieLayerClass() class]]); + [self setupVideoOverlay:movieLayer]; +#if !USE(GSTREAMER) + ASSERT([movieLayer movie]); + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(rateChanged:) + name:QTMovieRateDidChangeNotification + object:[movieLayer movie]]; +#endif + } +} + +- (id <WebVideoFullscreenControllerDelegate>)delegate +{ + return _delegate; +} + +- (void)setDelegate:(id <WebVideoFullscreenControllerDelegate>)delegate +{ + _delegate = delegate; +} + +- (CGFloat)clearFadeAnimation +{ + [_fadeAnimation stopAnimation]; + CGFloat previousAlpha = [_fadeAnimation currentAlpha]; + [_fadeAnimation setWindow:nil]; + [_fadeAnimation release]; + _fadeAnimation = nil; + return previousAlpha; +} + +- (void)windowDidExitFullscreen +{ +#if USE(GSTREAMER) + if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType) + _mediaElement->platformMedia().media.gstreamerGWorld->exitFullscreen(); +#endif + [self clearFadeAnimation]; + [[self window] close]; + [self setWindow:nil]; + [self updateMenuAndDockForFullscreen]; + [self updatePowerAssertions]; + [_hudController setDelegate:nil]; + [_hudController release]; + _hudController = nil; + [_backgroundFullscreenWindow close]; + [_backgroundFullscreenWindow release]; + _backgroundFullscreenWindow = nil; + + [self autorelease]; // Associated -retain is in -exitFullscreen. + _isEndingFullscreen = NO; +} + +- (void)windowDidEnterFullscreen +{ + [self clearFadeAnimation]; + + ASSERT(!_hudController); + _hudController = [[WebVideoFullscreenHUDWindowController alloc] init]; + [_hudController setDelegate:self]; + + [self updateMenuAndDockForFullscreen]; + [self updatePowerAssertions]; + [NSCursor setHiddenUntilMouseMoves:YES]; + + // Give the HUD keyboard focus initially + [_hudController fadeWindowIn]; +} + +- (NSRect)mediaElementRect +{ + return _mediaElement->screenRect(); +} + +- (void)applicationDidResignActive:(NSNotification*)notification +{ + UNUSED_PARAM(notification); + // Check to see if the fullscreenWindow is on the active space; this function is available + // on 10.6 and later, so default to YES if the function is not available: + NSWindow* fullscreenWindow = [self fullscreenWindow]; + BOOL isOnActiveSpace = ([fullscreenWindow respondsToSelector:@selector(isOnActiveSpace)] ? [fullscreenWindow isOnActiveSpace] : YES); + + // Replicate the QuickTime Player (X) behavior when losing active application status: + // Is the fullscreen screen the main screen? (Note: this covers the case where only a + // single screen is available.) Is the fullscreen screen on the current space? IFF so, + // then exit fullscreen mode. + if ([fullscreenWindow screen] == [[NSScreen screens] objectAtIndex:0] && isOnActiveSpace) + [self requestExitFullscreenWithAnimation:NO]; +} + + +// MARK: - +// MARK: Exposed Interface + +static void constrainFrameToRatioOfFrame(NSRect *frameToConstrain, const NSRect *frame) +{ + // Keep a constrained aspect ratio for the destination window + CGFloat originalRatio = frame->size.width / frame->size.height; + CGFloat newRatio = frameToConstrain->size.width / frameToConstrain->size.height; + if (newRatio > originalRatio) { + CGFloat newWidth = originalRatio * frameToConstrain->size.height; + CGFloat diff = frameToConstrain->size.width - newWidth; + frameToConstrain->size.width = newWidth; + frameToConstrain->origin.x += diff / 2; + } else { + CGFloat newHeight = frameToConstrain->size.width / originalRatio; + CGFloat diff = frameToConstrain->size.height - newHeight; + frameToConstrain->size.height = newHeight; + frameToConstrain->origin.y += diff / 2; + } +} + +static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level) +{ + NSWindow *window = [[NSWindow alloc] initWithContentRect:frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + [window setOpaque:YES]; + [window setBackgroundColor:[NSColor blackColor]]; + [window setLevel:level]; + [window setReleasedWhenClosed:NO]; + return window; +} + +- (void)setupFadeAnimationIfNeededAndFadeIn:(BOOL)fadeIn +{ + CGFloat initialAlpha = fadeIn ? 0 : 1; + if (_fadeAnimation) { + // Make sure we support queuing animation if the previous one isn't over yet + initialAlpha = [self clearFadeAnimation]; + } + if (!_forceDisableAnimation) + _fadeAnimation = [[WebWindowFadeAnimation alloc] initWithDuration:0.2 window:_backgroundFullscreenWindow initialAlpha:initialAlpha finalAlpha:fadeIn ? 1 : 0]; +} + +- (void)enterFullscreen:(NSScreen *)screen +{ + if (!screen) + screen = [NSScreen mainScreen]; + + NSRect frame = [self mediaElementRect]; + NSRect endFrame = [screen frame]; + constrainFrameToRatioOfFrame(&endFrame, &frame); + + // Create a black window if needed + if (!_backgroundFullscreenWindow) + _backgroundFullscreenWindow = createBackgroundFullscreenWindow([screen frame], [[self window] level]-1); + else + [_backgroundFullscreenWindow setFrame:[screen frame] display:NO]; + + [self setupFadeAnimationIfNeededAndFadeIn:YES]; + if (_forceDisableAnimation) { + // This will disable scale animation + frame = NSZeroRect; + } + [[self fullscreenWindow] animateFromRect:frame toRect:endFrame withSubAnimation:_fadeAnimation controllerAction:@selector(windowDidEnterFullscreen)]; + + [_backgroundFullscreenWindow orderWindow:NSWindowBelow relativeTo:[[self fullscreenWindow] windowNumber]]; +} + +- (void)exitFullscreen +{ + if (_isEndingFullscreen) + return; + _isEndingFullscreen = YES; + [_hudController closeWindow]; + + NSRect endFrame = [self mediaElementRect]; + + [self setupFadeAnimationIfNeededAndFadeIn:NO]; + if (_forceDisableAnimation) { + // This will disable scale animation + endFrame = NSZeroRect; + } + + // We have to retain ourselves because we want to be alive for the end of the animation. + // If our owner releases us we could crash if this is not the case. + // Balanced in windowDidExitFullscreen + [self retain]; + + [[self fullscreenWindow] animateFromRect:[[self window] frame] toRect:endFrame withSubAnimation:_fadeAnimation controllerAction:@selector(windowDidExitFullscreen)]; +} + +- (void)applicationDidChangeScreenParameters:(NSNotification*)notification +{ + UNUSED_PARAM(notification); + // The user may have changed the main screen by moving the menu bar, or they may have changed + // the Dock's size or location, or they may have changed the fullscreen screen's dimensions. + // Update our presentation parameters, and ensure that the full screen window occupies the + // entire screen: + [self updateMenuAndDockForFullscreen]; + [[self window] setFrame:[[[self window] screen] frame] display:YES]; +} + +- (void)updateMenuAndDockForFullscreen +{ + // NSApplicationPresentationOptions is available on > 10.6 only: +#ifndef BUILDING_ON_LEOPARD + NSApplicationPresentationOptions options = NSApplicationPresentationDefault; + NSScreen* fullscreenScreen = [[self window] screen]; + + if (!_isEndingFullscreen) { + // Auto-hide the menu bar if the fullscreenScreen contains the menu bar: + // NOTE: if the fullscreenScreen contains the menu bar but not the dock, we must still + // auto-hide the dock, or an exception will be thrown. + if ([[NSScreen screens] objectAtIndex:0] == fullscreenScreen) + options |= (NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock); + // Check if the current screen contains the dock by comparing the screen's frame to its + // visibleFrame; if a dock is present, the visibleFrame will differ. If the current screen + // contains the dock, hide it. + else if (!NSEqualRects([fullscreenScreen frame], [fullscreenScreen visibleFrame])) + options |= NSApplicationPresentationAutoHideDock; + } + + if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) + [NSApp setPresentationOptions:options]; + else +#endif + SetSystemUIMode(_isEndingFullscreen ? kUIModeNormal : kUIModeAllHidden, 0); +} + +- (void)_disableIdleDisplaySleep +{ + if (_idleDisplaySleepAssertion == kIOPMNullAssertionID) +#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK + IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, &_idleDisplaySleepAssertion); +#else // IOPMAssertionCreate is depreciated in > 10.5 + IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleDisplaySleepAssertion); +#endif +} + +- (void)_enableIdleDisplaySleep +{ + if (_idleDisplaySleepAssertion != kIOPMNullAssertionID) { + IOPMAssertionRelease(_idleDisplaySleepAssertion); + _idleDisplaySleepAssertion = kIOPMNullAssertionID; + } +} + +- (void)_disableIdleSystemSleep +{ + if (_idleSystemSleepAssertion == kIOPMNullAssertionID) +#if defined(BUILDING_ON_LEOPARD) // IOPMAssertionCreateWithName is not defined in the 10.5 SDK + IOPMAssertionCreate(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &_idleSystemSleepAssertion); +#else // IOPMAssertionCreate is depreciated in > 10.5 + IOPMAssertionCreateWithName(kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR("WebKit playing a video fullscreen."), &_idleSystemSleepAssertion); +#endif +} + +- (void)_enableIdleSystemSleep +{ + if (_idleSystemSleepAssertion != kIOPMNullAssertionID) { + IOPMAssertionRelease(_idleSystemSleepAssertion); + _idleSystemSleepAssertion = kIOPMNullAssertionID; + } +} + +- (void)_enableTickleTimer +{ + [_tickleTimer invalidate]; + [_tickleTimer release]; + _tickleTimer = [[NSTimer scheduledTimerWithTimeInterval:tickleTimerInterval target:self selector:@selector(_tickleTimerFired) userInfo:nil repeats:YES] retain]; +} + +- (void)_disableTickleTimer +{ + [_tickleTimer invalidate]; + [_tickleTimer release]; + _tickleTimer = nil; +} + +- (void)_tickleTimerFired +{ + UpdateSystemActivity(OverallAct); +} + +- (void)updatePowerAssertions +{ + float rate = 0; + if (_mediaElement && _mediaElement->platformMedia().type == WebCore::PlatformMedia::QTMovieType) + rate = [_mediaElement->platformMedia().media.qtMovie rate]; + + if (rate && !_isEndingFullscreen) { + [self _disableIdleSystemSleep]; + [self _disableIdleDisplaySleep]; + [self _enableTickleTimer]; + } else { + [self _enableIdleSystemSleep]; + [self _enableIdleDisplaySleep]; + [self _disableTickleTimer]; + } +} + +// MARK: - +// MARK: Window callback + +- (void)_requestExit +{ + if (_mediaElement) + _mediaElement->exitFullscreen(); + _forceDisableAnimation = NO; +} + +- (void)requestExitFullscreenWithAnimation:(BOOL)animation +{ + if (_isEndingFullscreen) + return; + + _forceDisableAnimation = !animation; + [self performSelector:@selector(_requestExit) withObject:nil afterDelay:0]; + +} + +- (void)requestExitFullscreen +{ + [self requestExitFullscreenWithAnimation:YES]; +} + +- (void)fadeHUDIn +{ + [_hudController fadeWindowIn]; +} + +// MARK: - +// MARK: QTMovie callbacks + +- (void)rateChanged:(NSNotification *)unusedNotification +{ + UNUSED_PARAM(unusedNotification); + [_hudController updateRate]; + [self updatePowerAssertions]; +} + +@end + +@implementation WebVideoFullscreenWindow + +- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag +{ + UNUSED_PARAM(aStyle); + self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag]; + if (!self) + return nil; + [self setOpaque:NO]; + [self setBackgroundColor:[NSColor clearColor]]; + [self setIgnoresMouseEvents:NO]; + [self setAcceptsMouseMovedEvents:YES]; + return self; +} + +- (void)dealloc +{ + ASSERT(!_fullscreenAnimation); + [super dealloc]; +} + +- (BOOL)resignFirstResponder +{ + return NO; +} + +- (BOOL)canBecomeKeyWindow +{ + return NO; +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + UNUSED_PARAM(theEvent); +} + +- (void)cancelOperation:(id)sender +{ + UNUSED_PARAM(sender); + [[self windowController] requestExitFullscreen]; +} + +- (void)animatedResizeDidEnd +{ + // Call our windowController. + if (_controllerActionOnAnimationEnd) + [[self windowController] performSelector:_controllerActionOnAnimationEnd]; + _controllerActionOnAnimationEnd = NULL; +} + +// +// This function will animate a change of frame rectangle +// We support queuing animation, that means that we'll correctly +// interrupt the running animation, and queue the next one. +// +- (void)animateFromRect:(NSRect)startRect toRect:(NSRect)endRect withSubAnimation:(NSAnimation *)subAnimation controllerAction:(SEL)controllerAction +{ + _controllerActionOnAnimationEnd = controllerAction; + + BOOL wasAnimating = NO; + if (_fullscreenAnimation) { + wasAnimating = YES; + + // Interrupt any running animation. + [_fullscreenAnimation stopAnimation]; + + // Save the current rect to ensure a smooth transition. + startRect = [_fullscreenAnimation currentFrame]; + [_fullscreenAnimation release]; + _fullscreenAnimation = nil; + } + + if (NSIsEmptyRect(startRect) || NSIsEmptyRect(endRect)) { + // Fakely end the subanimation. + [subAnimation setCurrentProgress:1]; + // And remove the weak link to the window. + [subAnimation stopAnimation]; + + [self setFrame:endRect display:NO]; + [self makeKeyAndOrderFront:self]; + [self animatedResizeDidEnd]; + return; + } + + if (!wasAnimating) { + // We'll downscale the window during the animation based on the higher resolution rect + BOOL higherResolutionIsEndRect = startRect.size.width < endRect.size.width && startRect.size.height < endRect.size.height; + [self setFrame:higherResolutionIsEndRect ? endRect : startRect display:NO]; + } + + ASSERT(!_fullscreenAnimation); + _fullscreenAnimation = [[WebWindowScaleAnimation alloc] initWithHintedDuration:0.2 window:self initalFrame:startRect finalFrame:endRect]; + [_fullscreenAnimation setSubAnimation:subAnimation]; + [_fullscreenAnimation setDelegate:self]; + + // Make sure the animation has scaled the window before showing it. + [_fullscreenAnimation setCurrentProgress:0]; + [self makeKeyAndOrderFront:self]; + + [_fullscreenAnimation startAnimation]; +} + +- (void)animationDidEnd:(NSAnimation *)animation +{ + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(animationDidEnd:) withObject:animation waitUntilDone:NO]; + return; + } + if (animation != _fullscreenAnimation) + return; + + // The animation is not really over and was interrupted + // Don't send completion events. + if ([animation currentProgress] < 1.0) + return; + + // Ensure that animation (and subanimation) don't keep + // the weak reference to the window ivar that may be destroyed from + // now on. + [_fullscreenAnimation setWindow:nil]; + + [_fullscreenAnimation autorelease]; + _fullscreenAnimation = nil; + + [self animatedResizeDidEnd]; +} + +- (void)mouseMoved:(NSEvent *)theEvent +{ + UNUSED_PARAM(theEvent); + [[self windowController] fadeHUDIn]; +} + +@end + +#endif /* ENABLE(VIDEO) */ diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h new file mode 100644 index 0000000..92bf776 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#if ENABLE(VIDEO) + +#import <Cocoa/Cocoa.h> + +namespace WebCore { + class HTMLMediaElement; +} + +@protocol WebVideoFullscreenHUDWindowControllerDelegate; + +@interface WebVideoFullscreenHUDWindowController : NSWindowController +{ + id <WebVideoFullscreenHUDWindowControllerDelegate> _delegate; + NSTimer *_timelineUpdateTimer; + NSTrackingArea *_area; + BOOL _mouseIsInHUD; + BOOL _isEndingFullscreen; + BOOL _isScrubbing; + + NSControl *_timeline; + NSTextField *_remainingTimeText; + NSTextField *_elapsedTimeText; + NSControl *_volumeSlider; + NSButton *_playButton; +} + +- (id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate; +- (void)setDelegate:(id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate; +- (void)fadeWindowIn; +- (void)fadeWindowOut; +- (void)closeWindow; +- (void)updateRate; + +@end + +@protocol WebVideoFullscreenHUDWindowControllerDelegate <NSObject> +- (void)requestExitFullscreen; +- (WebCore::HTMLMediaElement*)mediaElement; +@end + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm new file mode 100644 index 0000000..1637c1c --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm @@ -0,0 +1,679 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "config.h" + +#if ENABLE(VIDEO) + +#import "WebVideoFullscreenHUDWindowController.h" + +#import "FloatConversion.h" +#import <WebCoreSystemInterface.h> +#import <WebCore/HTMLMediaElement.h> +#import <wtf/RetainPtr.h> +#import <wtf/UnusedParam.h> + +using namespace WebCore; +using namespace std; + +static inline CGFloat webkit_CGFloor(CGFloat value) +{ + if (sizeof(value) == sizeof(float)) + return floorf(value); + return floor(value); +} + +#define HAVE_MEDIA_CONTROL (!defined(BUILDING_ON_LEOPARD)) + +@interface WebVideoFullscreenHUDWindowController (Private) +#if !defined(BUILDING_ON_LEOPARD) +<NSWindowDelegate> +#endif + +- (void)updateTime; +- (void)timelinePositionChanged:(id)sender; +- (float)currentTime; +- (void)setCurrentTime:(float)currentTime; +- (double)duration; + +- (void)volumeChanged:(id)sender; +- (float)maxVolume; +- (float)volume; +- (void)setVolume:(float)volume; +- (void)decrementVolume; +- (void)incrementVolume; + +- (void)updatePlayButton; +- (void)togglePlaying:(id)sender; +- (BOOL)playing; +- (void)setPlaying:(BOOL)playing; + +- (void)rewind:(id)sender; +- (void)fastForward:(id)sender; + +- (NSString *)remainingTimeText; +- (NSString *)elapsedTimeText; + +- (void)exitFullscreen:(id)sender; +@end + +@interface WebVideoFullscreenHUDWindow : NSWindow +@end + +@implementation WebVideoFullscreenHUDWindow + +- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag +{ + UNUSED_PARAM(aStyle); + self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag]; + if (!self) + return nil; + + [self setOpaque:NO]; + [self setBackgroundColor:[NSColor clearColor]]; + [self setLevel:NSPopUpMenuWindowLevel]; + [self setAcceptsMouseMovedEvents:YES]; + [self setIgnoresMouseEvents:NO]; + [self setMovableByWindowBackground:YES]; + + return self; +} + +- (BOOL)canBecomeKeyWindow +{ + return YES; +} + +- (void)cancelOperation:(id)sender +{ + UNUSED_PARAM(sender); + [[self windowController] exitFullscreen:self]; +} + +- (void)center +{ + NSRect hudFrame = [self frame]; + NSRect screenFrame = [[NSScreen mainScreen] frame]; + [self setFrameTopLeftPoint:NSMakePoint(screenFrame.origin.x + (screenFrame.size.width - hudFrame.size.width) / 2, + screenFrame.origin.y + (screenFrame.size.height - hudFrame.size.height) / 6)]; +} + +- (void)keyDown:(NSEvent *)event +{ + [super keyDown:event]; + [[self windowController] fadeWindowIn]; +} + +- (BOOL)resignFirstResponder +{ + return NO; +} + +- (BOOL)performKeyEquivalent:(NSEvent *)event +{ + // Block all command key events while the fullscreen window is up. + if ([event type] != NSKeyDown) + return NO; + + if (!([event modifierFlags] & NSCommandKeyMask)) + return NO; + + return YES; +} + +@end + +static const CGFloat windowHeight = 59; +static const CGFloat windowWidth = 438; + +static const NSTimeInterval HUDWindowFadeOutDelay = 3; + +@implementation WebVideoFullscreenHUDWindowController + +- (id)init +{ + NSWindow *window = [[WebVideoFullscreenHUDWindow alloc] initWithContentRect:NSMakeRect(0, 0, windowWidth, windowHeight) + styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + self = [super initWithWindow:window]; + [window setDelegate:self]; + [window release]; + if (!self) + return nil; + [self windowDidLoad]; + return self; +} + +- (void)dealloc +{ + ASSERT(!_timelineUpdateTimer); + ASSERT(!_area); + ASSERT(!_isScrubbing); + [_timeline release]; + [_remainingTimeText release]; + [_elapsedTimeText release]; + [_volumeSlider release]; + [_playButton release]; + [super dealloc]; +} + +- (void)setArea:(NSTrackingArea *)area +{ + if (area == _area) + return; + [_area release]; + _area = [area retain]; +} + +- (void)keyDown:(NSEvent *)event +{ + NSString *charactersIgnoringModifiers = [event charactersIgnoringModifiers]; + if ([charactersIgnoringModifiers length] == 1) { + switch ([charactersIgnoringModifiers characterAtIndex:0]) { + case ' ': + [self togglePlaying:nil]; + return; + case NSUpArrowFunctionKey: + if ([event modifierFlags] & NSAlternateKeyMask) + [self setVolume:[self maxVolume]]; + else + [self incrementVolume]; + return; + case NSDownArrowFunctionKey: + if ([event modifierFlags] & NSAlternateKeyMask) + [self setVolume:0]; + else + [self decrementVolume]; + return; + default: + break; + } + } + + [super keyDown:event]; +} + +- (id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate +{ + return _delegate; +} + +- (void)setDelegate:(id <WebVideoFullscreenHUDWindowControllerDelegate>)delegate +{ + _delegate = delegate; +} + +- (void)scheduleTimeUpdate +{ + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(unscheduleTimeUpdate) object:self]; + + // First, update right away, then schedule future update + [self updateTime]; + [self updatePlayButton]; + + [_timelineUpdateTimer invalidate]; + [_timelineUpdateTimer release]; + + // Note that this creates a retain cycle between the window and us. + _timelineUpdateTimer = [[NSTimer timerWithTimeInterval:0.25 target:self selector:@selector(updateTime) userInfo:nil repeats:YES] retain]; + [[NSRunLoop currentRunLoop] addTimer:_timelineUpdateTimer forMode:NSRunLoopCommonModes]; +} + +- (void)unscheduleTimeUpdate +{ + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(unscheduleTimeUpdate) object:nil]; + + [_timelineUpdateTimer invalidate]; + [_timelineUpdateTimer release]; + _timelineUpdateTimer = nil; +} + +- (void)fadeWindowIn +{ + NSWindow *window = [self window]; + if (![window isVisible]) + [window setAlphaValue:0]; + + [window makeKeyAndOrderFront:self]; + [[window animator] setAlphaValue:1]; + [self scheduleTimeUpdate]; + + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil]; + if (!_mouseIsInHUD && [self playing]) // Don't fade out when paused. + [self performSelector:@selector(fadeWindowOut) withObject:nil afterDelay:HUDWindowFadeOutDelay]; +} + +- (void)fadeWindowOut +{ + [NSCursor setHiddenUntilMouseMoves:YES]; + [[[self window] animator] setAlphaValue:0]; + [self performSelector:@selector(unscheduleTimeUpdate) withObject:nil afterDelay:1]; +} + +- (void)closeWindow +{ + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil]; + [self unscheduleTimeUpdate]; + NSWindow *window = [self window]; + [[window contentView] removeTrackingArea:_area]; + [self setArea:nil]; + [window close]; + [window setDelegate:nil]; + [self setWindow:nil]; +} + +#ifndef HAVE_MEDIA_CONTROL +// FIXME: This code is never compiled, because HAVE_MEDIA_CONTROL is always defined to something, even on Leopard. +// FIXME: Values in this enum have a different order than ones in WKMediaUIControlType. +enum { + WKMediaUIControlPlayPauseButton, + WKMediaUIControlRewindButton, + WKMediaUIControlFastForwardButton, + WKMediaUIControlExitFullscreenButton, + WKMediaUIControlVolumeDownButton, + WKMediaUIControlSlider, + WKMediaUIControlVolumeUpButton, + WKMediaUIControlTimeline +}; +#endif + +static NSControl *createControlWithMediaUIControlType(int controlType, NSRect frame) +{ +#ifdef HAVE_MEDIA_CONTROL + NSControl *control = wkCreateMediaUIControl(controlType); + [control setFrame:frame]; + return control; +#else + // FIXME: This code is never compiled, because HAVE_MEDIA_CONTROL is always defined to something, even on Leopard. + if (controlType == wkMediaUIControlSlider) + return [[NSSlider alloc] initWithFrame:frame]; + return [[NSControl alloc] initWithFrame:frame]; +#endif +} + +static NSTextField *createTimeTextField(NSRect frame) +{ + NSTextField *textField = [[NSTextField alloc] initWithFrame:frame]; + [textField setTextColor:[NSColor whiteColor]]; + [textField setBordered:NO]; + [textField setFont:[NSFont boldSystemFontOfSize:10]]; + [textField setDrawsBackground:NO]; + [textField setBezeled:NO]; + [textField setEditable:NO]; + [textField setSelectable:NO]; + return textField; +} + +- (void)windowDidLoad +{ + static const CGFloat horizontalMargin = 10; + static const CGFloat playButtonWidth = 41; + static const CGFloat playButtonHeight = 35; + static const CGFloat playButtonTopMargin = 4; + static const CGFloat volumeSliderWidth = 50; + static const CGFloat volumeSliderHeight = 13; + static const CGFloat volumeButtonWidth = 18; + static const CGFloat volumeButtonHeight = 16; + static const CGFloat volumeUpButtonLeftMargin = 4; + static const CGFloat volumeControlsTopMargin = 13; + static const CGFloat exitFullscreenButtonWidth = 25; + static const CGFloat exitFullscreenButtonHeight = 21; + static const CGFloat exitFullscreenButtonTopMargin = 11; + static const CGFloat timelineWidth = 315; + static const CGFloat timelineHeight = 14; + static const CGFloat timelineBottomMargin = 7; + static const CGFloat timeTextFieldWidth = 54; + static const CGFloat timeTextFieldHeight = 13; + static const CGFloat timeTextFieldHorizontalMargin = 7; + + NSWindow *window = [self window]; + ASSERT(window); + +#ifdef HAVE_MEDIA_CONTROL + NSView *background = wkCreateMediaUIBackgroundView(); +#else + // FIXME: This code is never compiled, because HAVE_MEDIA_CONTROL is always defined to something, even on Leopard. + NSView *background = [[NSView alloc] init]; +#endif + [window setContentView:background]; + _area = [[NSTrackingArea alloc] initWithRect:[background bounds] options:NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways owner:self userInfo:nil]; + [background addTrackingArea:_area]; + [background release]; + + NSView *contentView = [window contentView]; + + CGFloat center = webkit_CGFloor((windowWidth - playButtonWidth) / 2); + _playButton = (NSButton *)createControlWithMediaUIControlType(wkMediaUIControlPlayPauseButton, NSMakeRect(center, windowHeight - playButtonTopMargin - playButtonHeight, playButtonWidth, playButtonHeight)); + ASSERT([_playButton isKindOfClass:[NSButton class]]); + [_playButton setTarget:self]; + [_playButton setAction:@selector(togglePlaying:)]; + [contentView addSubview:_playButton]; + + CGFloat closeToRight = windowWidth - horizontalMargin - exitFullscreenButtonWidth; + NSControl *exitFullscreenButton = createControlWithMediaUIControlType(wkMediaUIControlExitFullscreenButton, NSMakeRect(closeToRight, windowHeight - exitFullscreenButtonTopMargin - exitFullscreenButtonHeight, exitFullscreenButtonWidth, exitFullscreenButtonHeight)); + [exitFullscreenButton setAction:@selector(exitFullscreen:)]; + [exitFullscreenButton setTarget:self]; + [contentView addSubview:exitFullscreenButton]; + [exitFullscreenButton release]; + + CGFloat volumeControlsBottom = windowHeight - volumeControlsTopMargin - volumeButtonHeight; + CGFloat left = horizontalMargin; + NSControl *volumeDownButton = createControlWithMediaUIControlType(wkMediaUIControlVolumeDownButton, NSMakeRect(left, volumeControlsBottom, volumeButtonWidth, volumeButtonHeight)); + [contentView addSubview:volumeDownButton]; + [volumeDownButton setTarget:self]; + [volumeDownButton setAction:@selector(setVolumeToZero:)]; + [volumeDownButton release]; + + left += volumeButtonWidth; + _volumeSlider = createControlWithMediaUIControlType(wkMediaUIControlSlider, NSMakeRect(left, volumeControlsBottom + webkit_CGFloor((volumeButtonHeight - volumeSliderHeight) / 2), volumeSliderWidth, volumeSliderHeight)); + [_volumeSlider setValue:[NSNumber numberWithDouble:[self maxVolume]] forKey:@"maxValue"]; + [_volumeSlider setTarget:self]; + [_volumeSlider setAction:@selector(volumeChanged:)]; + [contentView addSubview:_volumeSlider]; + + left += volumeSliderWidth + volumeUpButtonLeftMargin; + NSControl *volumeUpButton = createControlWithMediaUIControlType(wkMediaUIControlVolumeUpButton, NSMakeRect(left, volumeControlsBottom, volumeButtonWidth, volumeButtonHeight)); + [volumeUpButton setTarget:self]; + [volumeUpButton setAction:@selector(setVolumeToMaximum:)]; + [contentView addSubview:volumeUpButton]; + [volumeUpButton release]; + +#ifdef HAVE_MEDIA_CONTROL + _timeline = wkCreateMediaUIControl(wkMediaUIControlTimeline); +#else + // FIXME: This code is never compiled, because HAVE_MEDIA_CONTROL is always defined to something, even on Leopard. + _timeline = [[NSSlider alloc] init]; +#endif + [_timeline setTarget:self]; + [_timeline setAction:@selector(timelinePositionChanged:)]; + [_timeline setFrame:NSMakeRect(webkit_CGFloor((windowWidth - timelineWidth) / 2), timelineBottomMargin, timelineWidth, timelineHeight)]; + [contentView addSubview:_timeline]; + + _elapsedTimeText = createTimeTextField(NSMakeRect(timeTextFieldHorizontalMargin, timelineBottomMargin, timeTextFieldWidth, timeTextFieldHeight)); + [_elapsedTimeText setAlignment:NSLeftTextAlignment]; + [contentView addSubview:_elapsedTimeText]; + + _remainingTimeText = createTimeTextField(NSMakeRect(windowWidth - timeTextFieldHorizontalMargin - timeTextFieldWidth, timelineBottomMargin, timeTextFieldWidth, timeTextFieldHeight)); + [_remainingTimeText setAlignment:NSRightTextAlignment]; + [contentView addSubview:_remainingTimeText]; + + [window recalculateKeyViewLoop]; + [window setInitialFirstResponder:_playButton]; + [window center]; +} + +- (void)updateVolume +{ + [_volumeSlider setFloatValue:[self volume]]; +} + +- (void)updateTime +{ + [self updateVolume]; + + [_timeline setFloatValue:[self currentTime]]; + [_timeline setValue:[NSNumber numberWithDouble:[self duration]] forKey:@"maxValue"]; + + [_remainingTimeText setStringValue:[self remainingTimeText]]; + [_elapsedTimeText setStringValue:[self elapsedTimeText]]; +} + +- (void)endScrubbing +{ + ASSERT(_isScrubbing); + _isScrubbing = NO; + if (HTMLMediaElement* mediaElement = [_delegate mediaElement]) + mediaElement->endScrubbing(); +} + +- (void)timelinePositionChanged:(id)sender +{ + UNUSED_PARAM(sender); + [self setCurrentTime:[_timeline floatValue]]; + if (!_isScrubbing) { + _isScrubbing = YES; + if (HTMLMediaElement* mediaElement = [_delegate mediaElement]) + mediaElement->beginScrubbing(); + static NSArray *endScrubbingModes = [[NSArray alloc] initWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode, nil]; + // Schedule -endScrubbing for when leaving mouse tracking mode. + [[NSRunLoop currentRunLoop] performSelector:@selector(endScrubbing) target:self argument:nil order:0 modes:endScrubbingModes]; + } +} + +- (float)currentTime +{ + return [_delegate mediaElement] ? [_delegate mediaElement]->currentTime() : 0; +} + +- (void)setCurrentTime:(float)currentTime +{ + if (![_delegate mediaElement]) + return; + WebCore::ExceptionCode e; + [_delegate mediaElement]->setCurrentTime(currentTime, e); + [self updateTime]; +} + +- (double)duration +{ + return [_delegate mediaElement] ? [_delegate mediaElement]->duration() : 0; +} + +- (float)maxVolume +{ + // Set the volume slider resolution + return 100; +} + +- (void)volumeChanged:(id)sender +{ + UNUSED_PARAM(sender); + [self setVolume:[_volumeSlider floatValue]]; +} + +- (void)setVolumeToZero:(id)sender +{ + UNUSED_PARAM(sender); + [self setVolume:0]; +} + +- (void)setVolumeToMaximum:(id)sender +{ + UNUSED_PARAM(sender); + [self setVolume:[self maxVolume]]; +} + +- (void)decrementVolume +{ + if (![_delegate mediaElement]) + return; + + float volume = [self volume] - 10; + [self setVolume:MAX(volume, 0)]; +} + +- (void)incrementVolume +{ + if (![_delegate mediaElement]) + return; + + float volume = [self volume] + 10; + [self setVolume:min(volume, [self maxVolume])]; +} + +- (float)volume +{ + return [_delegate mediaElement] ? [_delegate mediaElement]->volume() * [self maxVolume] : 0; +} + +- (void)setVolume:(float)volume +{ + if (![_delegate mediaElement]) + return; + WebCore::ExceptionCode e; + if ([_delegate mediaElement]->muted()) + [_delegate mediaElement]->setMuted(false); + [_delegate mediaElement]->setVolume(volume / [self maxVolume], e); + [self updateVolume]; +} + +- (void)updatePlayButton +{ + [_playButton setIntValue:[self playing]]; +} + +- (void)updateRate +{ + BOOL playing = [self playing]; + + // Keep the HUD visible when paused. + if (!playing) + [self fadeWindowIn]; + else if (!_mouseIsInHUD) { + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(fadeWindowOut) object:nil]; + [self performSelector:@selector(fadeWindowOut) withObject:nil afterDelay:HUDWindowFadeOutDelay]; + } + [self updatePlayButton]; +} + +- (void)togglePlaying:(id)sender +{ + UNUSED_PARAM(sender); + [self setPlaying:![self playing]]; +} + +- (BOOL)playing +{ + HTMLMediaElement* mediaElement = [_delegate mediaElement]; + if (!mediaElement) + return NO; + + return !mediaElement->canPlay(); +} + +- (void)setPlaying:(BOOL)playing +{ + HTMLMediaElement* mediaElement = [_delegate mediaElement]; + + if (!mediaElement) + return; + + if (playing) + mediaElement->play(mediaElement->processingUserGesture()); + else + mediaElement->pause(mediaElement->processingUserGesture()); +} + +static NSString *timeToString(double time) +{ + ASSERT_ARG(time, time >= 0); + + if (!isfinite(time)) + time = 0; + + int seconds = narrowPrecisionToFloat(abs(time)); + int hours = seconds / (60 * 60); + int minutes = (seconds / 60) % 60; + seconds %= 60; + + if (hours) + return [NSString stringWithFormat:@"%d:%02d:%02d", hours, minutes, seconds]; + + return [NSString stringWithFormat:@"%02d:%02d", minutes, seconds]; +} + +- (NSString *)remainingTimeText +{ + HTMLMediaElement* mediaElement = [_delegate mediaElement]; + if (!mediaElement) + return @""; + + return [@"-" stringByAppendingString:timeToString(mediaElement->duration() - mediaElement->currentTime())]; +} + +- (NSString *)elapsedTimeText +{ + if (![_delegate mediaElement]) + return @""; + + return timeToString([_delegate mediaElement]->currentTime()); +} + +// MARK: NSResponder + +- (void)mouseEntered:(NSEvent *)theEvent +{ + UNUSED_PARAM(theEvent); + // Make sure the HUD won't be hidden from now + _mouseIsInHUD = YES; + [self fadeWindowIn]; +} + +- (void)mouseExited:(NSEvent *)theEvent +{ + UNUSED_PARAM(theEvent); + _mouseIsInHUD = NO; + [self fadeWindowIn]; +} + +- (void)rewind:(id)sender +{ + UNUSED_PARAM(sender); + if (![_delegate mediaElement]) + return; + [_delegate mediaElement]->rewind(30); +} + +- (void)fastForward:(id)sender +{ + UNUSED_PARAM(sender); + if (![_delegate mediaElement]) + return; +} + +- (void)exitFullscreen:(id)sender +{ + UNUSED_PARAM(sender); + if (_isEndingFullscreen) + return; + _isEndingFullscreen = YES; + [_delegate requestExitFullscreen]; +} + +// MARK: NSWindowDelegate + +- (void)windowDidExpose:(NSNotification *)notification +{ + UNUSED_PARAM(notification); + [self scheduleTimeUpdate]; +} + +- (void)windowDidClose:(NSNotification *)notification +{ + UNUSED_PARAM(notification); + [self unscheduleTimeUpdate]; +} + +@end + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.h b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.h new file mode 100644 index 0000000..ecf975b --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> + +@interface WebWindowScaleAnimation : NSAnimation { +@private + NSRect _initialFrame, _finalFrame, _realFrame; + NSWindow *_window; // (assign) + NSAnimation *_subAnimation; // (retain) + NSTimeInterval _hintedDuration; +} +- (id)initWithHintedDuration:(NSTimeInterval)duration window:(NSWindow *)window initalFrame:(NSRect)initialFrame finalFrame:(NSRect)finalFrame; + +- (void)setSubAnimation:(NSAnimation *)animation; + +- (NSRect)currentFrame; + +// Be sure to call setWindow:nil to clear the weak link _window when appropriate +- (void)setWindow:(NSWindow *)window; +@end + + +@interface WebWindowFadeAnimation : NSAnimation { +@private + CGFloat _initialAlpha, _finalAlpha; + NSWindow *_window; // (assign) + BOOL _isStopped; + +} +- (id)initWithDuration:(NSTimeInterval)duration window:(NSWindow *)window initialAlpha:(CGFloat)initialAlpha finalAlpha:(CGFloat)finalAlpha; + +- (CGFloat)currentAlpha; + +// Be sure to call setWindow:nil to clear the weak link _window when appropriate +- (void)setWindow:(NSWindow *)window; +@end diff --git a/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.mm b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.mm new file mode 100644 index 0000000..1b11894 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/platform/mac/WebWindowAnimation.mm @@ -0,0 +1,234 @@ +/* + * Copyright (C) 2009 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "config.h" + +#import "WebWindowAnimation.h" + +#import "FloatConversion.h" +#import "WebCoreSystemInterface.h" +#import <wtf/Assertions.h> +#import <wtf/UnusedParam.h> + +using namespace WebCore; + +static const CGFloat slowMotionFactor = 10; + +static NSTimeInterval WebWindowAnimationDurationFromDuration(NSTimeInterval duration) +{ + return ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) ? duration * slowMotionFactor : duration; +} + +static NSRect scaledRect(NSRect _initialFrame, NSRect _finalFrame, CGFloat factor) +{ + NSRect currentRect = _initialFrame; + currentRect.origin.x += (NSMinX(_finalFrame) - NSMinX(_initialFrame)) * factor; + currentRect.origin.y += (NSMinY(_finalFrame) - NSMinY(_initialFrame)) * factor; + currentRect.size.width += (NSWidth(_finalFrame) - NSWidth(_initialFrame)) * factor; + currentRect.size.height += (NSHeight(_finalFrame) - NSHeight(_initialFrame)) * factor; + return currentRect; +} + +static CGFloat squaredDistance(NSPoint point1, NSPoint point2) +{ + CGFloat deltaX = point1.x - point2.x; + CGFloat deltaY = point1.y - point2.y; + return deltaX * deltaX + deltaY * deltaY; +} + +@implementation WebWindowScaleAnimation + +- (id)init +{ + self = [super init]; + if (!self) + return nil; + [self setAnimationBlockingMode:NSAnimationNonblockingThreaded]; + [self setFrameRate:60]; + return self; +} + +- (id)initWithHintedDuration:(NSTimeInterval)duration window:(NSWindow *)window initalFrame:(NSRect)initialFrame finalFrame:(NSRect)finalFrame +{ + self = [self init]; + if (!self) + return nil; + _hintedDuration = duration; + _window = window; + _initialFrame = initialFrame; + _finalFrame = finalFrame; + _realFrame = [window frame]; + return self; +} + +- (void) dealloc +{ + [_subAnimation release]; + [super dealloc]; +} + +- (void)setDuration:(NSTimeInterval)duration +{ + [super setDuration:WebWindowAnimationDurationFromDuration(duration)]; +} + +- (void)setWindow:(NSWindow *)window +{ + _window = window; +} + +- (float)currentValue +{ + return narrowPrecisionToFloat(0.5 - 0.5 * cos(M_PI * (1 - [self currentProgress]))); +} + +- (NSRect)currentFrame +{ + return scaledRect(_finalFrame, _initialFrame, [self currentValue]); +} + +- (void)setCurrentProgress:(NSAnimationProgress)progress +{ + if (!_window) + return; + + [super setCurrentProgress:progress]; + + NSRect currentRect = [self currentFrame]; + wkWindowSetScaledFrame(_window, currentRect, _realFrame); + [_subAnimation setCurrentProgress:progress]; +} + +- (void)setSubAnimation:(NSAnimation *)animation +{ + id oldAnimation = _subAnimation; + _subAnimation = [animation retain]; + [oldAnimation release]; +} + +- (NSTimeInterval)additionalDurationNeededToReachFinalFrame +{ + static const CGFloat maxAdditionalDuration = 1; + static const CGFloat speedFactor = 0.0001f; + + CGFloat maxDist = squaredDistance(_initialFrame.origin, _finalFrame.origin); + CGFloat dist; + + dist = squaredDistance(NSMakePoint(NSMaxX(_initialFrame), NSMinY(_initialFrame)), NSMakePoint(NSMaxX(_finalFrame), NSMinY(_finalFrame))); + if (dist > maxDist) + maxDist = dist; + + dist = squaredDistance(NSMakePoint(NSMaxX(_initialFrame), NSMaxY(_initialFrame)), NSMakePoint(NSMaxX(_finalFrame), NSMaxY(_finalFrame))); + if (dist > maxDist) + maxDist = dist; + + dist = squaredDistance(NSMakePoint(NSMinX(_initialFrame), NSMinY(_initialFrame)), NSMakePoint(NSMinX(_finalFrame), NSMinY(_finalFrame))); + if (dist > maxDist) + maxDist = dist; + + return MIN(sqrt(maxDist) * speedFactor, maxAdditionalDuration); +} + +- (void)startAnimation +{ + // Compute extra time + if (_hintedDuration) + [self setDuration:_hintedDuration + [self additionalDurationNeededToReachFinalFrame]]; + [super startAnimation]; +} + +- (void)stopAnimation +{ + _window = nil; + [super stopAnimation]; + [_subAnimation stopAnimation]; +} + +@end + +@implementation WebWindowFadeAnimation + +- (id)init +{ + self = [super init]; + if (!self) + return nil; + [self setAnimationBlockingMode:NSAnimationNonblockingThreaded]; + [self setFrameRate:60]; + [self setAnimationCurve:NSAnimationEaseInOut]; + return self; +} + +- (id)initWithDuration:(NSTimeInterval)duration window:(NSWindow *)window initialAlpha:(CGFloat)initialAlpha finalAlpha:(CGFloat)finalAlpha +{ + UNUSED_PARAM(duration); + self = [self init]; + if (!self) + return nil; + _window = window; + _initialAlpha = initialAlpha; + _finalAlpha = finalAlpha; + return self; +} + +- (void)setDuration:(NSTimeInterval)duration +{ + [super setDuration:WebWindowAnimationDurationFromDuration(duration)]; +} + +- (CGFloat)currentAlpha +{ + return MAX(0, MIN(1, _initialAlpha + [self currentValue] * (_finalAlpha - _initialAlpha))); +} + +- (void)setCurrentProgress:(NSAnimationProgress)progress +{ + if (_isStopped) + return; + + ASSERT(_window); + [super setCurrentProgress:progress]; + + wkWindowSetAlpha(_window, [self currentAlpha]); +} + +- (void)setWindow:(NSWindow*)window +{ + _window = window; +} + +- (void)stopAnimation +{ + // This is relevant when we are a sub animation of a scale animation. + // In this case we are hosted in the animated thread of the parent + // and even after [super stopAnimation], the parent might call + // setCurrrentProgress. + _isStopped = YES; + + [super stopAnimation]; +} + +@end + diff --git a/src/3rdparty/webkit/Source/WebCore/platform/network/HTTPHeaderMap.cpp b/src/3rdparty/webkit/Source/WebCore/platform/network/HTTPHeaderMap.cpp index 59cbcbe..3541e1e 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/network/HTTPHeaderMap.cpp +++ b/src/3rdparty/webkit/Source/WebCore/platform/network/HTTPHeaderMap.cpp @@ -97,20 +97,32 @@ struct CaseFoldingCStringTranslator { String HTTPHeaderMap::get(const char* name) const { +#if COMPILER(WINSCW) + return HashMap::get((AtomicString)(name)); +#else const_iterator i = find<const char*, CaseFoldingCStringTranslator>(name); if (i == end()) return String(); return i->second; +#endif } bool HTTPHeaderMap::contains(const char* name) const { +#if COMPILER(WINSCW) + return HashMap::contains((AtomicString)(name)); +#else return find<const char*, CaseFoldingCStringTranslator>(name) != end(); +#endif } pair<HTTPHeaderMap::iterator, bool> HTTPHeaderMap::add(const char* name, const String& value) { +#if COMPILER(WINSCW) + return HashMap::add((AtomicString)(name), value); +#else return HashMap<AtomicString, String, CaseFoldingHash>::add<const char*, CaseFoldingCStringTranslator>(name, value); +#endif } } // namespace WebCore diff --git a/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.h b/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.h index bd530de..e82a6fc 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.h +++ b/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.h @@ -38,14 +38,20 @@ typedef struct _NSRect NSRect; #ifdef __OBJC__ @class NSArray; +@class NSControl; @class NSString; @class NSURL; +@class NSView; +@class NSWindow; @class QTMovie; @class QTMovieView; #else class NSArray; +class NSControl; class NSString; class NSURL; +class NSView; +class NSWindow; class QTMovie; class QTMovieView; #endif @@ -53,6 +59,8 @@ class QTMovieView; extern "C" { // In alphabetical order. +extern NSView *(*wkCreateMediaUIBackgroundView)(void); +extern NSControl *(*wkCreateMediaUIControl)(int); extern unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); extern int (*wkQTMovieDataRate)(QTMovie*); extern void (*wkQTMovieDisableComponent)(uint32_t[5]); @@ -68,6 +76,19 @@ extern void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL); extern NSArray *(*wkQTGetSitesInMediaDownloadCache)(); extern void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); extern void (*wkQTClearMediaDownloadCache)(); +extern void (*wkWindowSetAlpha)(NSWindow *, float); +extern void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); + +typedef enum { + wkMediaUIControlTimeline, + wkMediaUIControlSlider, + wkMediaUIControlPlayPauseButton, + wkMediaUIControlExitFullscreenButton, + wkMediaUIControlRewindButton, + wkMediaUIControlFastForwardButton, + wkMediaUIControlVolumeUpButton, + wkMediaUIControlVolumeDownButton +} wkMediaUIControlType; } diff --git a/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.mm b/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.mm index 3e26671..868cbd9 100644 --- a/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.mm +++ b/src/3rdparty/webkit/Source/WebCore/platform/qt/WebCoreSystemInterface.mm @@ -27,6 +27,8 @@ #import "WebCoreSystemInterface.h" #import <Foundation/Foundation.h> +NSView *(*wkCreateMediaUIBackgroundView)(void); +NSControl *(*wkCreateMediaUIControl)(int); unsigned (*wkQTIncludeOnlyModernMediaFileTypes)(void); int (*wkQTMovieDataRate)(QTMovie*); void (*wkQTMovieDisableComponent)(uint32_t[5]); @@ -42,4 +44,6 @@ void (*wkQTMovieViewSetDrawSynchronously)(QTMovieView*, BOOL); NSArray *(*wkQTGetSitesInMediaDownloadCache)(); void (*wkQTClearMediaDownloadCacheForSite)(NSString *site); void (*wkQTClearMediaDownloadCache)(); +void (*wkWindowSetAlpha)(NSWindow *, float); +void (*wkWindowSetScaledFrame)(NSWindow *, NSRect, NSRect); diff --git a/src/3rdparty/webkit/Source/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/Source/WebCore/plugins/PluginView.cpp index fd2b0b0..b020946 100644 --- a/src/3rdparty/webkit/Source/WebCore/plugins/PluginView.cpp +++ b/src/3rdparty/webkit/Source/WebCore/plugins/PluginView.cpp @@ -909,8 +909,9 @@ void PluginView::focusPluginElement() { // Focus the plugin if (Page* page = m_parentFrame->page()) - page->focusController()->setFocusedFrame(m_parentFrame); - m_parentFrame->document()->setFocusedNode(m_element); + page->focusController()->setFocusedNode(m_element, m_parentFrame); + else + m_parentFrame->document()->setFocusedNode(m_element); } void PluginView::didReceiveResponse(const ResourceResponse& response) diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/CounterNode.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/CounterNode.cpp index 323f5db..8a88fc9 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/CounterNode.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/CounterNode.cpp @@ -44,6 +44,49 @@ CounterNode::CounterNode(RenderObject* o, bool hasResetType, int value) CounterNode::~CounterNode() { + // Ideally this would be an assert and this would never be reached. In reality this happens a lot + // so we need to handle these cases. The node is still connected to the tree so we need to detach it. + if (m_parent || m_previousSibling || m_nextSibling || m_firstChild || m_lastChild) { + CounterNode* oldParent = 0; + CounterNode* oldPreviousSibling = 0; + // Instead of calling removeChild() we do this safely as the tree is likely broken if we get here. + if (m_parent) { + if (m_parent->m_firstChild == this) + m_parent->m_firstChild = m_nextSibling; + if (m_parent->m_lastChild == this) + m_parent->m_lastChild = m_previousSibling; + oldParent = m_parent; + m_parent = 0; + } + if (m_previousSibling) { + if (m_previousSibling->m_nextSibling == this) + m_previousSibling->m_nextSibling = m_nextSibling; + oldPreviousSibling = m_previousSibling; + m_previousSibling = 0; + } + if (m_nextSibling) { + if (m_nextSibling->m_previousSibling == this) + m_nextSibling->m_previousSibling = oldPreviousSibling; + m_nextSibling = 0; + } + if (m_firstChild) { + // The node's children are reparented to the old parent. + for (CounterNode* child = m_firstChild; child; ) { + CounterNode* nextChild = child->m_nextSibling; + CounterNode* nextSibling = 0; + child->m_parent = oldParent; + if (oldPreviousSibling) { + nextSibling = oldPreviousSibling->m_nextSibling; + child->m_previousSibling = oldPreviousSibling; + oldPreviousSibling->m_nextSibling = child; + child->m_nextSibling = nextSibling; + nextSibling->m_previousSibling = child; + oldPreviousSibling = child; + } + child = nextChild; + } + } + } resetRenderers(); } diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp index a212dd4..39c0469 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlock.cpp @@ -184,7 +184,7 @@ void RenderBlock::destroy() childBox->remove(); } } - } else if (isInline() && parent()) + } else if (parent()) parent()->dirtyLinesFromChangedChild(this); } @@ -3204,8 +3204,10 @@ void RenderBlock::removeFloatingObject(RenderBox* o) logicalBottom = max(logicalBottom, logicalTop + 1); } if (r->m_originatingLine) { - ASSERT(r->m_originatingLine->renderer() == this); - r->m_originatingLine->markDirty(); + if (!selfNeedsLayout()) { + ASSERT(r->m_originatingLine->renderer() == this); + r->m_originatingLine->markDirty(); + } #if !ASSERT_DISABLED r->m_originatingLine = 0; #endif @@ -3668,7 +3670,7 @@ void RenderBlock::clearFloats() } floatMap.remove(f->m_renderer); - if (oldFloatingObject->m_originatingLine) { + if (oldFloatingObject->m_originatingLine && !selfNeedsLayout()) { ASSERT(oldFloatingObject->m_originatingLine->renderer() == this); oldFloatingObject->m_originatingLine->markDirty(); } diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlockLineLayout.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlockLineLayout.cpp index b0b10e3..2e92801 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlockLineLayout.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBlockLineLayout.cpp @@ -1768,7 +1768,7 @@ void TrailingObjects::updateMidpointsForTrailingBoxes(LineMidpointState& lineMid if (lineMidpointState.numMidpoints % 2) { // Find the trailing space object's midpoint. int trailingSpaceMidpoint = lineMidpointState.numMidpoints - 1; - for ( ; trailingSpaceMidpoint >= 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { } + for ( ; trailingSpaceMidpoint > 0 && lineMidpointState.midpoints[trailingSpaceMidpoint].m_obj != m_whitespace; --trailingSpaceMidpoint) { } ASSERT(trailingSpaceMidpoint >= 0); if (collapseFirstSpace == CollapseFirstSpace) lineMidpointState.midpoints[trailingSpaceMidpoint].m_pos--; diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp index 0b33abe..9c2aa48 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.cpp @@ -3200,7 +3200,7 @@ bool RenderBox::shrinkToAvoidFloats() const bool RenderBox::avoidsFloats() const { - return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot(); + return isReplaced() || hasOverflowClip() || isHR() || isLegend() || isWritingModeRoot() || isDeprecatedFlexItem(); } void RenderBox::addShadowOverflow() diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.h b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.h index 258f213..08dc922 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.h +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderBox.h @@ -378,6 +378,8 @@ public: virtual void markForPaginationRelayoutIfNeeded() { } bool isWritingModeRoot() const { return !parent() || parent()->style()->writingMode() != style()->writingMode(); } + + bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrPositioned() && parent() && parent()->isFlexibleBox(); } virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderFlexibleBox.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderFlexibleBox.cpp index b55bd9d..2a3b32c 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderFlexibleBox.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderFlexibleBox.cpp @@ -90,8 +90,8 @@ public: current = forward ? current->nextSiblingBox() : current->previousSiblingBox(); if (current && current->style()->boxOrdinalGroup() > lastOrdinal) lastOrdinal = current->style()->boxOrdinalGroup(); - } while (!current || current->style()->boxOrdinalGroup() != currentOrdinal || - current->style()->visibility() == COLLAPSE); + } while (!current || (!current->isAnonymous() + && (current->style()->boxOrdinalGroup() != currentOrdinal || current->style()->visibility() == COLLAPSE))); return current; } diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderIFrame.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderIFrame.cpp index 366d9e7..1ce79d4 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderIFrame.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderIFrame.cpp @@ -102,8 +102,9 @@ bool RenderIFrame::flattenFrame() if (!view) return false; - // Do not flatten offscreen inner frames during frame flattening. - return absoluteBoundingBoxRect().intersects(IntRect(IntPoint(0, 0), view->contentsSize())); + // Do not flatten offscreen inner frames during frame flattening, as flattening might make them visible. + IntRect boundingRect = absoluteBoundingBoxRect(); + return boundingRect.maxX() > 0 && boundingRect.maxY() > 0; } void RenderIFrame::layout() diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderInline.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderInline.cpp index 5fb8683..5bd726d 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderInline.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderInline.cpp @@ -99,8 +99,7 @@ void RenderInline::destroy() for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) box->remove(); } - } else if (isInline() && parent()) - parent()->dirtyLinesFromChangedChild(this); + } } m_lineBoxes.deleteLineBoxes(renderArena()); @@ -845,11 +844,9 @@ InlineBox* RenderInline::culledInlineFirstLineBox() const // We want to get the margin box in the inline direction, and then use our font ascent/descent in the block // direction (aligned to the root box's baseline). - if (curr->isBox()) { - RenderBox* currBox = toRenderBox(curr); - if (currBox->inlineBoxWrapper()) - return currBox->inlineBoxWrapper(); - } else if (curr->isRenderInline()) { + if (curr->isBox()) + return toRenderBox(curr)->inlineBoxWrapper(); + if (curr->isRenderInline()) { RenderInline* currInline = toRenderInline(curr); InlineBox* result = currInline->firstLineBoxIncludingCulling(); if (result) @@ -871,11 +868,9 @@ InlineBox* RenderInline::culledInlineLastLineBox() const // We want to get the margin box in the inline direction, and then use our font ascent/descent in the block // direction (aligned to the root box's baseline). - if (curr->isBox()) { - RenderBox* currBox = toRenderBox(curr); - if (currBox->inlineBoxWrapper()) - return currBox->inlineBoxWrapper(); - } else if (curr->isRenderInline()) { + if (curr->isBox()) + return toRenderBox(curr)->inlineBoxWrapper(); + if (curr->isRenderInline()) { RenderInline* currInline = toRenderInline(curr); InlineBox* result = currInline->lastLineBoxIncludingCulling(); if (result) diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderLineBoxList.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderLineBoxList.cpp index 32f133c..4b50acb 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderLineBoxList.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderLineBoxList.cpp @@ -355,8 +355,21 @@ void RenderLineBoxList::dirtyLinesFromChangedChild(RenderObject* container, Rend if (box) break; } - if (!box) + if (!box) { + if (inlineContainer && !inlineContainer->alwaysCreateLineBoxes()) { + // https://bugs.webkit.org/show_bug.cgi?id=60778 + // We may have just removed a <br> with no line box that was our first child. In this case + // we won't find a previous sibling, but firstBox can be pointing to a following sibling. + // This isn't good enough, since we won't locate the root line box that encloses the removed + // <br>. We have to just over-invalidate a bit and go up to our parent. + if (!inlineContainer->parent()->selfNeedsLayout()) { + inlineContainer->parent()->dirtyLinesFromChangedChild(inlineContainer); + inlineContainer->setNeedsLayout(true); // Mark the container as needing layout to avoid dirtying the same lines again across multiple destroy() calls of the same subtree. + } + return; + } box = firstBox->root(); + } // If we found a line box, then dirty it. if (box) { diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderObject.h b/src/3rdparty/webkit/Source/WebCore/rendering/RenderObject.h index 537f08a..44ee43c 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderObject.h +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderObject.h @@ -1022,10 +1022,13 @@ inline void RenderObject::markContainingBlocksForLayout(bool scheduleRelayout, R if (!container && !o->isRenderView()) return; if (!last->isText() && (last->style()->position() == FixedPosition || last->style()->position() == AbsolutePosition)) { + bool willSkipRelativelyPositionedInlines = !o->isRenderBlock(); while (o && !o->isRenderBlock()) // Skip relatively positioned inlines and get to the enclosing RenderBlock. o = o->container(); if (!o || o->m_posChildNeedsLayout) return; + if (willSkipRelativelyPositionedInlines) + container = o->container(); o->m_posChildNeedsLayout = true; simplifiedNormalFlowLayout = true; ASSERT(!o->isSetNeedsLayoutForbidden()); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.cpp index c27d336..09a7944 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.cpp @@ -57,6 +57,14 @@ RenderReplaced::~RenderReplaced() { } +void RenderReplaced::destroy() +{ + if (!documentBeingDestroyed() && parent()) + parent()->dirtyLinesFromChangedChild(this); + + RenderBox::destroy(); +} + void RenderReplaced::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) { RenderBox::styleDidChange(diff, oldStyle); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.h b/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.h index d6ebba6..29fc71c 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.h +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderReplaced.h @@ -32,6 +32,8 @@ public: RenderReplaced(Node*, const IntSize& intrinsicSize); virtual ~RenderReplaced(); + virtual void destroy(); + protected: virtual void layout(); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp index 3d20df4..556379e 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.cpp @@ -37,6 +37,7 @@ #include "RenderCombineText.h" #include "RenderLayer.h" #include "RenderView.h" +#include "Settings.h" #include "Text.h" #include "TextBreakIterator.h" #include "TextResourceDecoder.h" @@ -53,6 +54,37 @@ using namespace Unicode; namespace WebCore { +class SecureTextTimer; +typedef HashMap<RenderText*, SecureTextTimer*> SecureTextTimerMap; +static SecureTextTimerMap* gSecureTextTimers = 0; + +class SecureTextTimer : public TimerBase { +public: + SecureTextTimer(RenderText* renderText) + : m_renderText(renderText) + , m_lastTypedCharacterOffset(-1) + { + } + + void restartWithNewText(unsigned lastTypedCharacterOffset) + { + m_lastTypedCharacterOffset = lastTypedCharacterOffset; + startOneShot(m_renderText->document()->settings()->passwordEchoDurationInSeconds()); + } + void invalidate() { m_lastTypedCharacterOffset = -1; } + unsigned lastTypedCharacterOffset() { return m_lastTypedCharacterOffset; } + +private: + virtual void fired() + { + ASSERT(gSecureTextTimers->contains(m_renderText)); + m_renderText->setText(m_renderText->text(), true /* forcing setting text as it may be masked later */); + } + + RenderText* m_renderText; + int m_lastTypedCharacterOffset; +}; + static void makeCapitalized(String* string, UChar previous) { if (string->isNull()) @@ -196,6 +228,9 @@ void RenderText::removeAndDestroyTextBoxes() void RenderText::destroy() { + if (SecureTextTimer* secureTextTimer = gSecureTextTimers ? gSecureTextTimers->take(this) : 0) + delete secureTextTimer; + removeAndDestroyTextBoxes(); RenderObject::destroy(); } @@ -1158,13 +1193,13 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text) case TSNONE: break; case TSCIRCLE: - m_text.makeSecure(whiteBullet); + secureText(whiteBullet); break; case TSDISC: - m_text.makeSecure(bullet); + secureText(bullet); break; case TSSQUARE: - m_text.makeSecure(blackSquare); + secureText(blackSquare); } } @@ -1174,6 +1209,28 @@ void RenderText::setTextInternal(PassRefPtr<StringImpl> text) m_isAllASCII = m_text.containsOnlyASCII(); } +void RenderText::secureText(UChar mask) +{ + if (!m_text.length()) + return; + + int lastTypedCharacterOffsetToReveal = -1; + String revealedText; + SecureTextTimer* secureTextTimer = gSecureTextTimers ? gSecureTextTimers->get(this) : 0; + if (secureTextTimer && secureTextTimer->isActive()) { + lastTypedCharacterOffsetToReveal = secureTextTimer->lastTypedCharacterOffset(); + if (lastTypedCharacterOffsetToReveal >= 0) + revealedText.append(m_text[lastTypedCharacterOffsetToReveal]); + } + + m_text.fill(mask); + if (lastTypedCharacterOffsetToReveal >= 0) { + m_text.replace(lastTypedCharacterOffsetToReveal, 1, revealedText); + // m_text may be updated later before timer fires. We invalidate the lastTypedCharacterOffset to avoid inconsistency. + secureTextTimer->invalidate(); + } +} + void RenderText::setText(PassRefPtr<StringImpl> text, bool force) { ASSERT(text); @@ -1597,4 +1654,17 @@ void RenderText::checkConsistency() const #endif +void RenderText::momentarilyRevealLastTypedCharacter(unsigned lastTypedCharacterOffset) +{ + if (!gSecureTextTimers) + gSecureTextTimers = new SecureTextTimerMap; + + SecureTextTimer* secureTextTimer = gSecureTextTimers->get(this); + if (!secureTextTimer) { + secureTextTimer = new SecureTextTimer(this); + gSecureTextTimers->add(this, secureTextTimer); + } + secureTextTimer->restartWithNewText(lastTypedCharacterOffset); +} + } // namespace WebCore diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.h b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.h index 2008dad..f89a762 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.h +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderText.h @@ -117,6 +117,9 @@ public: bool containsReversedText() const { return m_containsReversedText; } + bool isSecure() const { return style()->textSecurity() != TSNONE; } + void momentarilyRevealLastTypedCharacter(unsigned lastTypedCharacterOffset); + InlineTextBox* findNextInlineTextBox(int offset, int& pos) const; bool allowTabs() const { return !style()->collapseWhiteSpace(); } @@ -158,6 +161,7 @@ private: void updateNeedsTranscoding(); inline void transformText(String&) const; + void secureText(UChar mask); float m_minWidth; // here to minimize padding in 64-bit. diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderThemeWinCE.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderThemeWinCE.cpp index a56ab3e..a22ed8c 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderThemeWinCE.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderThemeWinCE.cpp @@ -479,7 +479,7 @@ static HTMLMediaElement* mediaElementParent(Node* node) if (!node) return 0; Node* mediaNode = node->shadowAncestorNode(); - if (!mediaNode || (!mediaNode->hasTagName(HTMLNames::videoTag) && !mediaNode->hasTagName(HTMLNames::audioTag))) + if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(mediaNode)->isMediaElement()) return 0; return static_cast<HTMLMediaElement*>(mediaNode); diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp index 894d689..97444cd 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/RenderWidget.cpp @@ -125,6 +125,10 @@ void RenderWidget::destroy() document()->axObjectCache()->childrenChanged(this->parent()); document()->axObjectCache()->remove(this); } + + if (!documentBeingDestroyed() && parent()) + parent()->dirtyLinesFromChangedChild(this); + remove(); if (m_hasCounterNodeMap) diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/svg/RenderSVGInline.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/svg/RenderSVGInline.cpp index 02a85ce..fdfd92d 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/svg/RenderSVGInline.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/svg/RenderSVGInline.cpp @@ -95,6 +95,9 @@ void RenderSVGInline::absoluteQuads(Vector<FloatQuad>& quads) void RenderSVGInline::destroy() { + if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(this)) + textRenderer->setNeedsPositioningValuesUpdate(); + SVGResourcesCache::clientDestroyed(this); RenderInline::destroy(); } diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp index 1d0043b..8992a2a 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGInlineFlowBox.cpp @@ -74,8 +74,11 @@ void SVGInlineFlowBox::paint(PaintInfo& paintInfo, int, int, int, int) IntRect SVGInlineFlowBox::calculateBoundaries() const { IntRect childRect; - for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) + for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) { + if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox()) + continue; childRect.unite(child->calculateBoundaries()); + } return childRect; } diff --git a/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp b/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp index 42eb8e8..4121723 100644 --- a/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp +++ b/src/3rdparty/webkit/Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp @@ -39,7 +39,11 @@ void SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree(RenderS { ASSERT(textRoot); - // Build list of x/y/dx/dy/rotate values for each subtree element that may define these values (tspan/textPath etc). + // We always clear our current attribute as we don't want to keep any stale ones that could survive DOM modification. + Vector<SVGTextLayoutAttributes>& allAttributes = textRoot->layoutAttributes(); + allAttributes.clear(); + + // Build list of x/y/dx/dy/rotate values for each subtree element that may define these values (tspan/textPath etc). unsigned atCharacter = 0; UChar lastCharacter = '\0'; collectTextPositioningElements(textRoot, atCharacter, lastCharacter); @@ -51,8 +55,6 @@ void SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextSubtree(RenderS buildLayoutAttributesForAllCharacters(textRoot, atCharacter); // Propagate layout attributes to each RenderSVGInlineText object, and the whole list to the RenderSVGText root. - Vector<SVGTextLayoutAttributes>& allAttributes = textRoot->layoutAttributes(); - allAttributes.clear(); atCharacter = 0; lastCharacter = '\0'; propagateLayoutAttributes(textRoot, allAttributes, atCharacter, lastCharacter); diff --git a/src/3rdparty/webkit/Source/WebCore/storage/IDBRequest.cpp b/src/3rdparty/webkit/Source/WebCore/storage/IDBRequest.cpp index f8d818a..96abd87 100644 --- a/src/3rdparty/webkit/Source/WebCore/storage/IDBRequest.cpp +++ b/src/3rdparty/webkit/Source/WebCore/storage/IDBRequest.cpp @@ -66,7 +66,7 @@ IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> sourc IDBRequest::~IDBRequest() { - ASSERT(m_readyState == DONE || m_readyState == EarlyDeath); + ASSERT(m_readyState == DONE || m_readyState == EarlyDeath || !scriptExecutionContext()); if (m_transaction) m_transaction->unregisterRequest(this); } @@ -149,8 +149,11 @@ void IDBRequest::abort() ASSERT(m_readyState == DONE); return; } + // FIXME: Remove isDocument check when + // https://bugs.webkit.org/show_bug.cgi?id=57789 is resolved. + if (!scriptExecutionContext() || !scriptExecutionContext()->isDocument()) + return; - ASSERT(scriptExecutionContext()->isDocument()); EventQueue* eventQueue = static_cast<Document*>(scriptExecutionContext())->eventQueue(); for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { bool removed = eventQueue->cancelEvent(m_enqueuedEvents[i].get()); diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.cpp index 6b9c085..0fba66b 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.cpp @@ -70,6 +70,11 @@ SVGElementInstance::~SVGElementInstance() // Deregister as instance for passed element. m_element->removeInstanceMapping(this); + clearChildren(); +} + +void SVGElementInstance::clearChildren() +{ removeAllChildrenInContainer<SVGElementInstance, SVGElementInstance>(this); } @@ -105,8 +110,10 @@ void SVGElementInstance::invalidateAllInstancesOfElement(SVGElement* element) const HashSet<SVGElementInstance*>::const_iterator end = set.end(); for (HashSet<SVGElementInstance*>::const_iterator it = set.begin(); it != end; ++it) { ASSERT((*it)->correspondingElement() == element); - if (SVGUseElement* element = (*it)->correspondingUseElement()) + if (SVGUseElement* element = (*it)->correspondingUseElement()) { + ASSERT(element->inDocument()); element->invalidateShadowTree(); + } } // Be sure to rebuild use trees, if needed diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.h b/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.h index 2a8c52f..f24c16f 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.h +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGElementInstance.h @@ -59,6 +59,7 @@ public: SVGUseElement* correspondingUseElement() const { return m_correspondingUseElement; } SVGUseElement* directUseElement() const { return m_directUseElement; } SVGElement* shadowTreeElement() const { return m_shadowTreeElement.get(); } + void clearChildren(); void clearUseElements() { m_directUseElement = 0; diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGStyleElement.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGStyleElement.cpp index 042af1c..01adb35 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGStyleElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGStyleElement.cpp @@ -42,8 +42,7 @@ inline SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* SVGStyleElement::~SVGStyleElement() { - if (m_sheet) - m_sheet->clearOwnerNode(); + StyleElement::clearDocumentData(document(), this); } PassRefPtr<SVGStyleElement> SVGStyleElement::create(const QualifiedName& tagName, Document* document, bool createdByParser) diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.cpp index 4021b4f..35f0401 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.cpp @@ -28,6 +28,7 @@ #include "Frame.h" #include "RenderObject.h" #include "RenderSVGResource.h" +#include "RenderSVGText.h" #include "SVGDocumentExtensions.h" #include "SVGNames.h" #include "SVGTextQuery.h" @@ -292,6 +293,17 @@ SVGTextContentElement* SVGTextContentElement::elementFromRenderer(RenderObject* return static_cast<SVGTextContentElement*>(node); } +void SVGTextContentElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) +{ + SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); + + if (changedByParser || !renderer()) + return; + + if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(renderer())) + textRenderer->setNeedsPositioningValuesUpdate(); +} + } #endif // ENABLE(SVG) diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.h b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.h index 94bba70..222a06d 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.h +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextContentElement.h @@ -71,6 +71,7 @@ protected: void fillPassedAttributeToPropertyTypeMap(AttributeToPropertyTypeMap&); virtual bool selfHasRelativeLengths() const; + virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); private: virtual bool isTextContent() const { return true; } diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.cpp index cd714c3..ebd4789 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.cpp @@ -75,30 +75,6 @@ void SVGTextPositioningElement::parseMappedAttribute(Attribute* attr) SVGTextContentElement::parseMappedAttribute(attr); } -static inline void updatePositioningValuesInRenderer(RenderObject* renderer) -{ - RenderSVGText* textRenderer = 0; - - if (renderer->isSVGText()) - textRenderer = toRenderSVGText(renderer); - else { - // Locate RenderSVGText parent renderer. - RenderObject* parent = renderer->parent(); - while (parent && !parent->isSVGText()) - parent = parent->parent(); - - if (parent) { - ASSERT(parent->isSVGText()); - textRenderer = toRenderSVGText(parent); - } - } - - if (!textRenderer) - return; - - textRenderer->setNeedsPositioningValuesUpdate(); -} - void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrName) { SVGTextContentElement::svgAttributeChanged(attrName); @@ -116,23 +92,13 @@ void SVGTextPositioningElement::svgAttributeChanged(const QualifiedName& attrNam return; if (updateRelativeLengths || attrName == SVGNames::rotateAttr) { - updatePositioningValuesInRenderer(renderer); + if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor(renderer)) + textRenderer->setNeedsPositioningValuesUpdate(); RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer); return; } } -void SVGTextPositioningElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) -{ - SVGTextContentElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta); - - if (changedByParser) - return; - - if (RenderObject* object = renderer()) - updatePositioningValuesInRenderer(object); -} - void SVGTextPositioningElement::synchronizeProperty(const QualifiedName& attrName) { SVGTextContentElement::synchronizeProperty(attrName); diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.h b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.h index 5e6dadc..aa8792f 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.h +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGTextPositioningElement.h @@ -36,7 +36,6 @@ protected: SVGTextPositioningElement(const QualifiedName&, Document*); virtual void parseMappedAttribute(Attribute*); - virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); virtual void svgAttributeChanged(const QualifiedName&); virtual void synchronizeProperty(const QualifiedName&); void fillPassedAttributeToPropertyTypeMap(AttributeToPropertyTypeMap&); diff --git a/src/3rdparty/webkit/Source/WebCore/svg/SVGUseElement.cpp b/src/3rdparty/webkit/Source/WebCore/svg/SVGUseElement.cpp index cea8f0d..d8f9674 100644 --- a/src/3rdparty/webkit/Source/WebCore/svg/SVGUseElement.cpp +++ b/src/3rdparty/webkit/Source/WebCore/svg/SVGUseElement.cpp @@ -644,6 +644,7 @@ void SVGUseElement::detachInstance() if (!m_targetElementInstance) return; m_targetElementInstance->clearUseElements(); + m_targetElementInstance->clearChildren(); m_targetElementInstance = 0; } diff --git a/src/3rdparty/webkit/Source/WebCore/testing/Internals.cpp b/src/3rdparty/webkit/Source/WebCore/testing/Internals.cpp new file mode 100644 index 0000000..caa1274 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/Internals.cpp @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "Internals.h" + +#include "Document.h" +#include "ExceptionCode.h" +#include "Settings.h" + +namespace WebCore { + +const char* Internals::internalsId = "internals"; + +PassRefPtr<Internals> Internals::create() +{ + return adoptRef(new Internals); +} + +Internals::~Internals() +{ +} + +Internals::Internals() + : passwordEchoDurationInSecondsBackedUp(false) + , passwordEchoEnabledBackedUp(false) +{ +} + +void Internals::setPasswordEchoEnabled(Document* document, bool enabled, ExceptionCode& ec) +{ + if (!document || !document->settings()) { + ec = INVALID_ACCESS_ERR; + return; + } + + if (!passwordEchoEnabledBackedUp) { + passwordEchoEnabledBackup = document->settings()->passwordEchoEnabled(); + passwordEchoEnabledBackedUp = true; + } + document->settings()->setPasswordEchoEnabled(enabled); +} + +void Internals::setPasswordEchoDurationInSeconds(Document* document, double durationInSeconds, ExceptionCode& ec) +{ + if (!document || !document->settings()) { + ec = INVALID_ACCESS_ERR; + return; + } + + if (!passwordEchoDurationInSecondsBackedUp) { + passwordEchoDurationInSecondsBackup = document->settings()->passwordEchoDurationInSeconds(); + passwordEchoDurationInSecondsBackedUp = true; + } + document->settings()->setPasswordEchoDurationInSeconds(durationInSeconds); +} + +void Internals::reset(Document* document) +{ + if (!document || !document->settings()) + return; + + if (passwordEchoDurationInSecondsBackedUp) { + document->settings()->setPasswordEchoDurationInSeconds(passwordEchoDurationInSecondsBackup); + passwordEchoDurationInSecondsBackedUp = false; + } + + if (passwordEchoEnabledBackedUp) { + document->settings()->setPasswordEchoEnabled(passwordEchoEnabledBackup); + passwordEchoEnabledBackedUp = false; + } +} + +} + diff --git a/src/3rdparty/webkit/Source/WebCore/testing/Internals.h b/src/3rdparty/webkit/Source/WebCore/testing/Internals.h new file mode 100644 index 0000000..a56240a --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/Internals.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef Internals_h +#define Internals_h + +#include "ExceptionCode.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> + +namespace WebCore { + +class Document; + +class Internals : public RefCounted<Internals> { +public: + static PassRefPtr<Internals> create(); + virtual ~Internals(); + + void reset(Document*); + + void setPasswordEchoEnabled(Document*, bool enabled, ExceptionCode&); + void setPasswordEchoDurationInSeconds(Document*, double durationInSeconds, ExceptionCode&); + + static const char* internalsId; + +private: + Internals(); + + double passwordEchoDurationInSecondsBackup; + bool passwordEchoEnabledBackup : 1; + bool passwordEchoDurationInSecondsBackedUp : 1; + bool passwordEchoEnabledBackedUp : 1; +}; + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/testing/Internals.idl b/src/3rdparty/webkit/Source/WebCore/testing/Internals.idl new file mode 100644 index 0000000..e647c9c --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/Internals.idl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +module window { + interface [OmitConstructor] Internals { + void setPasswordEchoEnabled(in Document document, in boolean enabled) raises(DOMException); + void setPasswordEchoDurationInSeconds(in Document document, in double durationInSeconds) raises(DOMException); + }; +} diff --git a/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.cpp b/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.cpp new file mode 100644 index 0000000..8a795bf --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebCoreTestSupport.h" + +#include "Internals.h" +#include "JSDOMGlobalObject.h" +#include "JSDocument.h" +#include "JSInternals.h" +#include <JavaScriptCore/APICast.h> +#include <interpreter/CallFrame.h> + +using namespace JSC; +using namespace WebCore; + +namespace WebCoreTestSupport { + +void injectInternalsObject(JSContextRef context) +{ + JSLock lock(SilenceAssertionsOnly); + ExecState* exec = toJS(context); + JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); + globalObject->putDirect(exec->globalData(), Identifier(exec, Internals::internalsId), toJS(exec, globalObject, Internals::create())); +} + +void resetInternalsObject(JSContextRef context) +{ + JSLock lock(SilenceAssertionsOnly); + ExecState* exec = toJS(context); + JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); + Internals * internals = toInternals(globalObject->getDirect(exec->globalData(), Identifier(exec, Internals::internalsId))); + if (internals) { + ScriptExecutionContext* scriptContext = globalObject->scriptExecutionContext(); + if (scriptContext->isDocument()) + internals->reset(static_cast<Document*>(scriptContext)); + } +} + +} diff --git a/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.h b/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.h new file mode 100644 index 0000000..bfd8a8b --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/js/WebCoreTestSupport.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebCoreTestSupport_h +#define WebCoreTestSupport_h + +typedef const struct OpaqueJSContext* JSContextRef; + +namespace WebCoreTestSupport { + +void injectInternalsObject(JSContextRef); +void resetInternalsObject(JSContextRef); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.cpp b/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.cpp new file mode 100644 index 0000000..1f2c2e5 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.cpp @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "WebCoreTestSupport.h" + +#include "Document.h" +#include "Internals.h" +#include "ScriptExecutionContext.h" +#include "V8Internals.h" + +#include <v8.h> + +using namespace WebCore; + +namespace WebCoreTestSupport { + +void injectInternalsObject(v8::Local<v8::Context> context) +{ + v8::Context::Scope contextScope(context); + v8::HandleScope scope; + + context->Global()->Set(v8::String::New(Internals::internalsId), toV8(Internals::create())); +} + +void resetInternalsObject(v8::Local<v8::Context> context) +{ + v8::Context::Scope contextScope(context); + v8::HandleScope scope; + + v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(context->Global()->Get(v8::String::New(Internals::internalsId))); + Internals * internals = V8Internals::toNative(object); + if (internals) { + ScriptExecutionContext* scriptContext = getScriptExecutionContext(); + if (scriptContext->isDocument()) + internals->reset(static_cast<Document*>(scriptContext)); + } +} + +} diff --git a/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.h b/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.h new file mode 100644 index 0000000..fa49c60 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebCore/testing/v8/WebCoreTestSupport.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2011 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WebCoreTestSupport_h +#define WebCoreTestSupport_h + +namespace v8 { +class Context; +template <class T> class Local; +} + +namespace WebCoreTestSupport { + +void injectInternalsObject(v8::Local<v8::Context>); +void resetInternalsObject(v8::Local<v8::Context>); + +} // namespace WebCore + +#endif diff --git a/src/3rdparty/webkit/Source/WebCore/xml/XPathFunctions.cpp b/src/3rdparty/webkit/Source/WebCore/xml/XPathFunctions.cpp index d343a59..1807172 100644 --- a/src/3rdparty/webkit/Source/WebCore/xml/XPathFunctions.cpp +++ b/src/3rdparty/webkit/Source/WebCore/xml/XPathFunctions.cpp @@ -39,6 +39,12 @@ #include "XPathValue.h" #include <wtf/MathExtras.h> +#if COMPILER(WINSCW) +#define BOOL_TO_VALUE_CAST (unsigned long) +#else +#define BOOL_TO_VALUE_CAST +#endif + namespace WebCore { namespace XPath { @@ -453,9 +459,9 @@ Value FunStartsWith::evaluate() const String s2 = arg(1)->evaluate().toString(); if (s2.isEmpty()) - return true; + return BOOL_TO_VALUE_CAST true; - return s1.startsWith(s2); + return BOOL_TO_VALUE_CAST (s1.startsWith(s2)); } Value FunContains::evaluate() const @@ -463,10 +469,10 @@ Value FunContains::evaluate() const String s1 = arg(0)->evaluate().toString(); String s2 = arg(1)->evaluate().toString(); - if (s2.isEmpty()) - return true; + if (s2.isEmpty()) + return BOOL_TO_VALUE_CAST true; - return s1.contains(s2) != 0; + return BOOL_TO_VALUE_CAST (s1.contains(s2) != 0); } Value FunSubstringBefore::evaluate() const @@ -571,17 +577,17 @@ Value FunTranslate::evaluate() const Value FunBoolean::evaluate() const { - return arg(0)->evaluate().toBoolean(); + return BOOL_TO_VALUE_CAST (arg(0)->evaluate().toBoolean()); } Value FunNot::evaluate() const { - return !arg(0)->evaluate().toBoolean(); + return BOOL_TO_VALUE_CAST (!arg(0)->evaluate().toBoolean()); } Value FunTrue::evaluate() const { - return true; + return BOOL_TO_VALUE_CAST true; } Value FunLang::evaluate() const @@ -600,12 +606,12 @@ Value FunLang::evaluate() const } if (!languageAttribute) - return false; + return BOOL_TO_VALUE_CAST false; String langValue = languageAttribute->value(); while (true) { if (equalIgnoringCase(langValue, lang)) - return true; + return BOOL_TO_VALUE_CAST true; // Remove suffixes one by one. size_t index = langValue.reverseFind('-'); @@ -614,12 +620,12 @@ Value FunLang::evaluate() const langValue = langValue.left(index); } - return false; + return BOOL_TO_VALUE_CAST false; } Value FunFalse::evaluate() const { - return false; + return BOOL_TO_VALUE_CAST false; } Value FunNumber::evaluate() const diff --git a/src/3rdparty/webkit/Source/WebCore/xml/XPathPredicate.cpp b/src/3rdparty/webkit/Source/WebCore/xml/XPathPredicate.cpp index 2a6482f..d70d309 100644 --- a/src/3rdparty/webkit/Source/WebCore/xml/XPathPredicate.cpp +++ b/src/3rdparty/webkit/Source/WebCore/xml/XPathPredicate.cpp @@ -38,6 +38,12 @@ #include <math.h> #include <wtf/MathExtras.h> +#if COMPILER(WINSCW) +#define BOOL_TO_VALUE_CAST (unsigned long) +#else +#define BOOL_TO_VALUE_CAST +#endif + namespace WebCore { namespace XPath { @@ -142,7 +148,7 @@ bool EqTestOp::compare(const Value& lhs, const Value& rhs) const // If one object to be compared is a node-set and the other is a boolean, then the comparison will be true // if and only if the result of performing the comparison on the boolean and on the result of converting // the node-set to a boolean using the boolean function is true. - return compare(lhs.toBoolean(), rhs); + return compare(BOOL_TO_VALUE_CAST (lhs.toBoolean()), rhs); } ASSERT(0); } @@ -161,7 +167,7 @@ bool EqTestOp::compare(const Value& lhs, const Value& rhs) const return false; } if (lhs.isBoolean()) - return compare(lhs, rhs.toBoolean()); + return compare(lhs, BOOL_TO_VALUE_CAST (rhs.toBoolean())); ASSERT(0); } @@ -198,7 +204,7 @@ Value EqTestOp::evaluate() const Value lhs(subExpr(0)->evaluate()); Value rhs(subExpr(1)->evaluate()); - return compare(lhs, rhs); + return BOOL_TO_VALUE_CAST compare(lhs, rhs); } LogicalOp::LogicalOp(Opcode opcode, Expression* lhs, Expression* rhs) @@ -224,9 +230,9 @@ Value LogicalOp::evaluate() const // dictates that we must do short-circuit evaluation bool lhsBool = lhs.toBoolean(); if (lhsBool == shortCircuitOn()) - return lhsBool; + return BOOL_TO_VALUE_CAST lhsBool; - return subExpr(1)->evaluate().toBoolean(); + return BOOL_TO_VALUE_CAST (subExpr(1)->evaluate().toBoolean()); } Value Union::evaluate() const diff --git a/src/3rdparty/webkit/Source/WebCore/xml/XPathResult.cpp b/src/3rdparty/webkit/Source/WebCore/xml/XPathResult.cpp index 1dcde2e..7377509 100644 --- a/src/3rdparty/webkit/Source/WebCore/xml/XPathResult.cpp +++ b/src/3rdparty/webkit/Source/WebCore/xml/XPathResult.cpp @@ -35,6 +35,12 @@ #include "XPathEvaluator.h" #include "XPathException.h" +#if COMPILER(WINSCW) +#define BOOL_TO_VALUE_CAST (unsigned long) +#else +#define BOOL_TO_VALUE_CAST +#endif + namespace WebCore { using namespace XPath; @@ -84,7 +90,7 @@ void XPathResult::convertTo(unsigned short type, ExceptionCode& ec) break; case BOOLEAN_TYPE: m_resultType = type; - m_value = m_value.toBoolean(); + m_value = BOOL_TO_VALUE_CAST (m_value.toBoolean()); break; case UNORDERED_NODE_ITERATOR_TYPE: case UNORDERED_NODE_SNAPSHOT_TYPE: diff --git a/src/3rdparty/webkit/Source/WebKit.pri b/src/3rdparty/webkit/Source/WebKit.pri index 309357c..be1c7b7 100644 --- a/src/3rdparty/webkit/Source/WebKit.pri +++ b/src/3rdparty/webkit/Source/WebKit.pri @@ -2,6 +2,9 @@ contains(QT_CONFIG, qpa)|contains(QT_CONFIG, embedded): CONFIG += embedded +contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols +unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions + # Detect that we are building as a standalone package by the presence of # either the generated files directory or as part of the Qt package through # QTDIR_build @@ -71,6 +74,7 @@ CONFIG(release, debug|release) { INCLUDEPATH += \ $$PWD \ + $$PWD/../include \ $$OUTPUT_DIR/include/QtWebKit \ $$OUTPUT_DIR/include \ $$QT.script.includes @@ -157,6 +161,7 @@ disable_uitools: DEFINES *= QT_NO_UITOOLS # Disable a few warnings on Windows. The warnings are also # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 +win32-icc: QMAKE_CXXFLAGS += -wd873 CONFIG(qt_minimal) { DEFINES *= QT_NO_ANIMATION diff --git a/src/3rdparty/webkit/Source/WebKit/ChangeLog b/src/3rdparty/webkit/Source/WebKit/ChangeLog index ac05a54..20f61f5 100644 --- a/src/3rdparty/webkit/Source/WebKit/ChangeLog +++ b/src/3rdparty/webkit/Source/WebKit/ChangeLog @@ -1,3 +1,29 @@ +2011-06-01 Jer Noble <jer.noble@apple.com> + + Reviewed by Eric Carlson. + + Move Full Screen Controllers into WebCore. + + Remove dependency on QTKit from wekitExitFullscreen() + https://bugs.webkit.org/show_bug.cgi?id=61843 + + WebVideoFullscreenController, WebVideoFullscreenHUDController, and WebWindowAnimation + have been moved into WebCore. + + * WebKit.xcodeproj/project.pbxproj: + +2011-06-30 Leandro Pereira <leandro@profusion.mobi> + + Reviewed by Simon Hausmann. + + generate-webkitversion.pl should not "use Switch" + https://bugs.webkit.org/show_bug.cgi?id=63628 + + Switch got deprecated on recent Perl versions and the script wasn't + using the switch statement. + + * scripts/generate-webkitversion.pl: Remove "use Switch;" line. + 2011-04-18 Timothy Hatcher <timothy@apple.com> Make update-webkit-localizable-strings put WebKit/win strings in WebCore diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebframe.cpp index 026a7df..5ea7059 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebframe.cpp @@ -751,8 +751,10 @@ QMultiMap<QString, QString> QWebFrame::metaData() const static inline void clearCoreFrame(WebCore::Frame* frame) { - frame->loader()->activeDocumentLoader()->writer()->begin(); - frame->loader()->activeDocumentLoader()->writer()->end(); + WebCore::DocumentLoader* documentLoader = frame->loader()->activeDocumentLoader(); + Q_ASSERT(documentLoader); + documentLoader->writer()->begin(); + documentLoader->writer()->end(); } static inline bool isCoreFrameClear(WebCore::Frame* frame) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp index 3606764..9123ede 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp @@ -273,6 +273,11 @@ void QWebSettingsPrivate::apply() settings->setNeedsSiteSpecificQuirks(value); settings->setUsesPageCache(WebCore::pageCache()->capacity()); + +#if ENABLE(PASSWORD_ECHO) + settings->setPasswordEchoEnabled(true); + settings->setPasswordEchoDurationInSeconds(1); +#endif } else { QList<QWebSettingsPrivate*> settings = *::allSettings(); for (int i = 0; i < settings.count(); ++i) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebview.cpp index f4b23f3..76b927b 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebview.cpp @@ -372,7 +372,7 @@ void QWebViewPrivate::detachCurrentPage() Makes \a page the new web page of the web view. The parent QObject of the provided page remains the owner - of the object. If the current document is a child of the web + of the object. If the current page is a child of the web view, it will be deleted. \sa page() diff --git a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog index d702142..0bca4b2 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/Source/WebKit/qt/ChangeLog @@ -1,3 +1,306 @@ +2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> + + Unreviewed QtWebKit.pro fix for when building inside Qt + + Patch by Simo Fält <simo.falt@nokia.com> + + The QtWebKit version was being overwritten by a global Qt version when + QtWebKit was built inside Qt. Fixed by moving the version + definition after the inclusion of qbase.pri. + + * QtWebKit.pro: + +2011-08-18 Chang Shu <cshu@webkit.org> + + Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature + https://bugs.webkit.org/show_bug.cgi?id=66052 + + Reviewed by Alexey Proskuryakov. + + Enable password echo under the build flag. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + +2011-08-16 Chang Shu <cshu@webkit.org> + + Support reset in WebCore::Internals + https://bugs.webkit.org/show_bug.cgi?id=66307 + + Reviewed by Dimitri Glazkov. + + Added framework code in WebKit. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::resetInternalsObject): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2011-06-09 Robert Hogan <robert@webkit.org> + + Reviewed by Andreas Kling. + + Teach Qt about window.internals + https://bugs.webkit.org/show_bug.cgi?id=61074 + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + (DumpRenderTreeSupportQt::injectInternalsObject): + * WebCoreSupport/DumpRenderTreeSupportQt.h: + +2011-08-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + [Qt] Fix build on Lion + + https://bugs.webkit.org/show_bug.cgi?id=66770 + + Reviewed by Andreas Kling. + + We were mistakenly picking up mac/WebCoreSystemInterface.h instead of + the Qt one, and building on Lion revealed this when a typedef for + IOSurfaceRef was wrapped in PLATFORM(MAC). + + For now we fix this by including WebCoreSystemInterface using + brackets, so that we'll pick up the right file based on the + include paths. This also means exposing a few missing enums + in our own version of the file, so those were added. + + Lasty, we need to link against the right system interface library + on Lion. + + * QtWebKit.pro: + +2011-08-05 Dawit Alemayehu <adawit@kde.org> + + Reviewed by Andreas Kling. + + Reverted commit r87797, http://trac.webkit.org/changeset/87797, because it + causes the regression reported under bug# 63582. + + [Qt] REGRESSION(r87797): Broke KDEWebKit's custom QNAM. + https://bugs.webkit.org/show_bug.cgi?id=63582 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::setFrame): + +2011-07-26 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Andreas Kling. + + [Qt] Change default backend to use GStreamer on Linux and QuickTime on Mac. + https://bugs.webkit.org/show_bug.cgi?id=63472 + + Use the flag WTF_USE_QTKIT=1 rather than USE_QTKIT=1 because that flag doesn't + exist anymore, it's the default. Ditto for GStreamer. + + * QtWebKit.pro: + +2011-06-23 Alexis Menard <alexis.menard@openbossa.org> + + Reviewed by Eric Carlson. + + [Qt] Implement fullscreen support on Mac with the QuickTime backend. + https://bugs.webkit.org/show_bug.cgi?id=61728 + + Implement fullscreen support for Qt when using the QuickTime backend. + We mostly use what is already done for the Mac port. + + * QtWebKit.pro: + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::ChromeClientQt): + (WebCore::ChromeClientQt::~ChromeClientQt): + * WebCoreSupport/ChromeClientQt.h: + * WebCoreSupport/FullScreenVideoQt.cpp: + (WebCore::FullScreenVideoQt::FullScreenVideoQt): + (WebCore::FullScreenVideoQt::~FullScreenVideoQt): + (WebCore::FullScreenVideoQt::enterFullScreenForNode): + (WebCore::FullScreenVideoQt::exitFullScreenForNode): + (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback): + (WebCore::FullScreenVideoQt::isValid): + * WebCoreSupport/FullScreenVideoQt.h: + * WebCoreSupport/QTKitFullScreenVideoHandler.h: Added. + * WebCoreSupport/QTKitFullScreenVideoHandler.mm: Added. + (QTKitFullScreenVideoHandler::QTKitFullScreenVideoHandler): + (QTKitFullScreenVideoHandler::~QTKitFullScreenVideoHandler): + (QTKitFullScreenVideoHandler::enterFullScreen): + (QTKitFullScreenVideoHandler::exitFullScreen): + * WebCoreSupport/WebSystemInterface.mm: + (InitWebCoreSystemInterface): + +2011-07-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + [Qt] QtWebkit never finishes loading sites when they are loaded after an initial QUrl fails to load. + https://bugs.webkit.org/show_bug.cgi?id=61328 + + Reviewed by Andreas Kling. + + Change the hooks in FrameLoaderClient we use for emitting signals. Instead of + emitting signals in the progress notification functions, we use the + dispatchDid{Start,Finish,Fail}* functions. The main reason behind this change is + that loading code is prepared to handle load() when inside those functions. + + The crash was being caused by setUrl() (and load()) being called when + loadFinished(false) was emitted. The problem here is that when + postProgressFinishedNotification the FrameLoader wasn't ready for taking a load() + call again, because it was still the ProvisionalLoadState but with the + provisionalDocumentLoader already removed. + + To emulate the same behavior that QtWebKit had when using + postProgressFinishedNotification, we now keep track of the frame originating the + load, and emit the signals when this frame's client is called. + + The patch keeps the existing semantics for QWebPage signals, but we now emit the + QWebFrame signals everytime, not only when they are the originating frame for + loading. + + * Api/qwebframe.cpp: + (clearCoreFrame): Document our assumption that activeDocumentLoader will exist. + + * WebCoreSupport/FrameLoaderClientQt.h: Remove m_loadError, add a boolean to keep + track whether the frame is originating the load. Remove the signals from + FrameLoaderClientQt since we will emit QWebFrame and QWebPage signals directly. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::FrameLoaderClientQt): Initialize m_isOriginatingLoad. + + (WebCore::FrameLoaderClientQt::setFrame): Do not connect QWebFrame and QWebPage + signals to our signals for load/finished, signal emission will be done manually. + + (WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad): Emit + loadStarted() signal and make the first notification of estimation change, that + Qt API tests expect to exist and notify 10%. + + (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad): Remove reference to + m_loadError and emit loadFinished() signal. + + (WebCore::FrameLoaderClientQt::postProgressStartedNotification): Remove signal + emission and mark the originating load as true, since only the originating frame + gets this call in its client. + + (WebCore::FrameLoaderClientQt::postProgressFinishedNotification): Remove signal + emission. + + (WebCore::FrameLoaderClientQt::callErrorPageExtension): Return whether the call + was successful or not. This wasn't necessary before because a successful call for + error page would lead to a load(), that cleared the m_loadError. + (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad): Remove reference + to m_loadError and emit finished signal indicating error if ErrorPage extension + doesn't handle it. + (WebCore::FrameLoaderClientQt::dispatchDidFailLoad): Ditto. + + (WebCore::FrameLoaderClientQt::emitLoadStarted): Emit the loadStarted() signal + for the QWebFrame, and if the originating load also do for the QWebPage. + + (WebCore::FrameLoaderClientQt::emitLoadFinished): Same as before but for + loadFinished(). Take care to reset the originating load flag before the signals + are emitted, since they might want to set it back again. + + * tests/qwebframe/tst_qwebframe.cpp: + (URLSetter::URLSetter): Object that sets the url using either load() or setUrl() + when a certain signal is emitted in the frame. + + (URLSetter::execute): + (tst_QWebFrame::loadInSignalHandlers_data): + (tst_QWebFrame::loadInSignalHandlers): New test inspired by the bug test case. This test + crashes without this patch applied. + +2011-07-25 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + [Qt] Add more tests to cover the behavior of loadFinished() signal + https://bugs.webkit.org/show_bug.cgi?id=63490 + + Reviewed by Benjamin Poulain. + + * tests/qwebframe/tst_qwebframe.cpp: + (FakeReply::FakeReply): + (FakeNetworkManager::createRequest): Add a fake reply that gives 404 error code. + + (tst_QWebFrame::loadFinishedAfterNotFoundError): Verify that we get loadFinished(false) + after a 404 error without contents. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::errorPageExtensionLoadFinished): Verify if the argument of loadFinished() + is true when we use error page extension to produce our own error pages. + +2011-07-12 Hui Huang <Hui.2.Huang@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Fix compiling errors with QtWebkit 2.2 WINSCW build. + https://bugs.webkit.org/show_bug.cgi?id=64391 + + (QtWebKit-2.2 only, patch not in webkit trunk) + + * symbian/bwins/QtWebKitu.def: + +2011-07-19 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + [Qt] Improve documentation of QWebView::setPage() + https://bugs.webkit.org/show_bug.cgi?id=64827 + + Reviewed by Noam Rosenthal. + + * Api/qwebview.cpp: Use the word 'page' to refer to a QWebPage instead of 'document'. + +2011-05-16 Robert Hogan <robert@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + plugins/invalidate_rect.html fails on linux ports + + Add ChromeClientQt::allowsAcceleratedCompositing(). + + https://bugs.webkit.org/show_bug.cgi?id=54051 + + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::allowsAcceleratedCompositing): + * WebCoreSupport/ChromeClientQt.h: + +2011-07-01 Jade Han <jade.han@nokia.com> + + [Qt][Symbian] Update .def file for Symbian to build Tools + https://bugs.webkit.org/show_bug.cgi?id=61200 + + Reviewed by Laszlo Gombos. + + Add newly introduced symbols to fix building the Tools directory for Symbian. + + * symbian/eabi/QtWebKitu.def: + +2011-06-30 Rafael Brandao <rafael.lobo@openbossa.org> + + Reviewed by Benjamin Poulain. + + [Qt] Fix tst_QWebFrame::renderGeometry() API test + https://bugs.webkit.org/show_bug.cgi?id=63236 + + This test required a security origin with granted permission to request local resources. + By default, only local files can load local resources. So modified baseUrl to be a local file. + + * tests/qwebframe/tst_qwebframe.cpp: + (tst_QWebFrame::renderGeometry): + +2011-07-01 Jade Han <jade.han@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt][Symbian] Update .def file for Symbian + https://bugs.webkit.org/show_bug.cgi?id=61200 + + Add newly introduced symbols to fix the Symbian build. + + * symbian/eabi/QtWebKitu.def: + +2011-06-30 Fabrizio Machado <fabrizio.machado@nokia.com> + + Reviewed by Benjamin Poulain. + + [Qt] QML Webview causes performance drops + https://bugs.webkit.org/show_bug.cgi?id=57554 + + Remove tiledBackingStoreEnabled from QML WebView. + + * declarative/qdeclarativewebview.cpp: + (QDeclarativeWebView::setPage): + 2011-06-29 Alexis Menard <alexis.menard@openbossa.org> Reviewed by Benjamin Poulain. @@ -17,23 +320,6 @@ Rubber-stamped by Andreas Kling. - [Qt] Fix tst_QWebFrame::setHtmlWithResource() API test - https://bugs.webkit.org/show_bug.cgi?id=63235 - - [Qt] Fix tst_QWebFrame::renderGeometry() API test - https://bugs.webkit.org/show_bug.cgi?id=63236 - - [Qt] Fix tst_QWebFrame::setUrlWithPendingLoads() API test - https://bugs.webkit.org/show_bug.cgi?id=63237 - - * tests/qwebframe/tst_qwebframe.cpp: Mark failing test cases as expected fails until real fix. - (tst_QWebFrame::setHtmlWithResource): - (tst_QWebFrame::renderGeometry): - -2011-06-23 Csaba Osztrogonác <ossy@webkit.org> - - Rubber-stamped by Andreas Kling. - [Qt] Fix tst_QWebPage::showModalDialog() API test https://bugs.webkit.org/show_bug.cgi?id=63244 diff --git a/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro b/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro index e07f699..41b0d39 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro +++ b/src/3rdparty/webkit/Source/WebKit/qt/QtWebKit.pro @@ -42,10 +42,6 @@ win32*:!win32-msvc* { contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL } -moduleFile=$$PWD/qt_webkit_version.pri -isEmpty(QT_BUILD_TREE):include($$moduleFile) -VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION} - include_webinspector: RESOURCES += $$SOURCE_DIR/WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc # Extract sources to build from the generator definitions @@ -87,6 +83,9 @@ CONFIG(QTDIR_build) { symbian: TARGET =$$TARGET$${QT_LIBINFIX} } +moduleFile=$$PWD/qt_webkit_version.pri +isEmpty(QT_BUILD_TREE):include($$moduleFile) +VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION} symbian { TARGET.EPOCALLOWDLLDATA=1 @@ -218,31 +217,39 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) { } contains(DEFINES, ENABLE_VIDEO=1) { - !contains(DEFINES, USE_QTKIT=1):!contains(DEFINES, USE_GSTREAMER=1):contains(MOBILITY_CONFIG, multimedia) { + !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) { HEADERS += $$PWD/WebCoreSupport/FullScreenVideoWidget.h SOURCES += $$PWD/WebCoreSupport/FullScreenVideoWidget.cpp } - contains(DEFINES, USE_GSTREAMER=1) | contains(MOBILITY_CONFIG, multimedia) { + contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) { HEADERS += $$PWD/WebCoreSupport/FullScreenVideoQt.h SOURCES += $$PWD/WebCoreSupport/FullScreenVideoQt.cpp } - contains(DEFINES, USE_QTKIT=1) { - INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ - INCLUDEPATH += $$SOURCE_DIR/../WebKitLibraries/ + contains(DEFINES, WTF_USE_QTKIT=1) { + INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ \ + $$SOURCE_DIR/WebCore/platform/mac/ \ + $$SOURCE_DIR/../WebKitLibraries/ + DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES - HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h - SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm + + HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h \ + $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.h + + OBJECTIVE_SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm \ + $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.mm + + LIBS+= -framework Security -framework IOKit # We can know the Mac OS version by using the Darwin major version DARWIN_VERSION = $$split(QMAKE_HOST.version, ".") DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION) - equals(DARWIN_MAJOR_VERSION, "10") { - LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a -framework Security - } else { - equals(DARWIN_MAJOR_VERSION, "9") { - LIBS+= $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a -framework Security - } + equals(DARWIN_MAJOR_VERSION, "11") { + LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLion.a + } else:equals(DARWIN_MAJOR_VERSION, "10") { + LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a + } else:equals(DARWIN_MAJOR_VERSION, "9") { + LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a } } } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index ea2c826..a199f78 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -75,7 +75,7 @@ #include <qtooltip.h> #include <wtf/OwnPtr.h> -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) #include "FullScreenVideoQt.h" #include "HTMLMediaElement.h" #include "HTMLNames.h" @@ -92,7 +92,7 @@ bool ChromeClientQt::dumpVisitedLinksCallbacks = false; ChromeClientQt::ChromeClientQt(QWebPage* webPage) : m_webPage(webPage) , m_eventLoop(0) -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) , m_fullScreenVideo(0) #endif { @@ -104,7 +104,7 @@ ChromeClientQt::~ChromeClientQt() if (m_eventLoop) m_eventLoop->exit(); -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) delete m_fullScreenVideo; #endif } @@ -129,6 +129,13 @@ FloatRect ChromeClientQt::windowRect() return platformPageClient()->windowRect(); } +bool ChromeClientQt::allowsAcceleratedCompositing() const +{ + if (!platformPageClient()) + return false; + return platformPageClient()->allowsAcceleratedCompositing(); +} + FloatRect ChromeClientQt::pageRect() { if (!m_webPage) @@ -661,7 +668,7 @@ IntRect ChromeClientQt::visibleRectForTiledBackingStore() const } #endif -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) FullScreenVideoQt* ChromeClientQt::fullScreenVideo() { if (!m_fullScreenVideo) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h index 814a192..f1b7b8e 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -155,6 +155,7 @@ public: virtual void scheduleCompositingLayerSync(); virtual CompositingTriggerFlags allowedCompositingTriggers() const; #endif + virtual bool allowsAcceleratedCompositing() const; #if ENABLE(TILED_BACKING_STORE) virtual IntRect visibleRectForTiledBackingStore() const; @@ -164,7 +165,7 @@ public: virtual void needTouchEvents(bool) { } #endif -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) virtual bool supportsFullscreenForNode(const Node*); virtual void enterFullscreenForNode(Node*); virtual void exitFullscreenForNode(Node*); @@ -203,7 +204,7 @@ public: bool menuBarVisible; QEventLoop* m_eventLoop; -#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA)) +#if ENABLE(VIDEO) && (USE(GSTREAMER) || USE(QT_MULTIMEDIA) || USE(QTKIT)) FullScreenVideoQt* m_fullScreenVideo; #endif diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp index 9d0b4f9..2fc8e84 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -23,6 +23,9 @@ #include "config.h" #include "DumpRenderTreeSupportQt.h" +#if USE(JSC) +#include "APICast.h" +#endif #include "ApplicationCacheStorage.h" #include "CSSComputedStyleDeclaration.h" #include "ChromeClientQt.h" @@ -74,6 +77,7 @@ #include "SVGSMILElement.h" #endif #include "TextIterator.h" +#include "WebCoreTestSupport.h" #include "WorkerThread.h" #include <wtf/CurrentTime.h> @@ -1109,6 +1113,44 @@ void DumpRenderTreeSupportQt::removeShadowRoot(const QWebElement& element) webElement->removeShadowRoot(); } +void DumpRenderTreeSupportQt::injectInternalsObject(QWebFrame* frame) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); +#if USE(JSC) + JSC::JSLock lock(JSC::SilenceAssertionsOnly); + + JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld()); + Q_ASSERT(window); + + JSC::ExecState* exec = window->globalExec(); + Q_ASSERT(exec); + + JSContextRef context = toRef(exec); + WebCoreTestSupport::injectInternalsObject(context); +#elif USE(V8) + WebCoreTestSupport::injectInternalsObject(V8Proxy::mainWorldContext(coreFrame)); +#endif +} + +void DumpRenderTreeSupportQt::resetInternalsObject(QWebFrame* frame) +{ + WebCore::Frame* coreFrame = QWebFramePrivate::core(frame); +#if USE(JSC) + JSC::JSLock lock(JSC::SilenceAssertionsOnly); + + JSDOMWindow* window = toJSDOMWindow(coreFrame, mainThreadNormalWorld()); + Q_ASSERT(window); + + JSC::ExecState* exec = window->globalExec(); + Q_ASSERT(exec); + + JSContextRef context = toRef(exec); + WebCoreTestSupport::resetInternalsObject(context); +#elif USE(V8) + WebCoreTestSupport::resetInternalsObject(V8Proxy::mainWorldContext(coreFrame)); +#endif +} + // Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame) diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index c93942c..7040ea1 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -218,6 +218,7 @@ public: static QString layerTreeAsText(QWebFrame*); static void injectInternalsObject(QWebFrame*); + static void resetInternalsObject(QWebFrame*); }; #endif diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 68aecda..8971fc4 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -210,7 +210,7 @@ FrameLoaderClientQt::FrameLoaderClientQt() , m_pluginView(0) , m_hasSentResponseToPlugin(false) , m_hasRepresentation(false) - , m_loadError(ResourceError()) + , m_isOriginatingLoad(false) { } @@ -229,22 +229,12 @@ void FrameLoaderClientQt::setFrame(QWebFrame* webFrame, Frame* frame) return; } - connect(this, SIGNAL(loadStarted()), - m_webFrame->page(), SIGNAL(loadStarted())); - connect(this, SIGNAL(loadStarted()), - m_webFrame, SIGNAL(loadStarted())); connect(this, SIGNAL(loadProgress(int)), m_webFrame->page(), SIGNAL(loadProgress(int))); - connect(this, SIGNAL(loadFinished(bool)), - m_webFrame->page(), SIGNAL(loadFinished(bool))); - // FIXME: The queued connection here is needed because of a problem with QNetworkAccessManager. - // See http://bugreports.qt.nokia.com/browse/QTBUG-18718 connect(this, SIGNAL(unsupportedContent(QNetworkReply*)), - m_webFrame->page(), SIGNAL(unsupportedContent(QNetworkReply*)), Qt::QueuedConnection); + m_webFrame->page(), SIGNAL(unsupportedContent(QNetworkReply*))); - connect(this, SIGNAL(loadFinished(bool)), - m_webFrame, SIGNAL(loadFinished(bool))); connect(this, SIGNAL(titleChanged(QString)), m_webFrame, SIGNAL(titleChanged(QString))); } @@ -448,8 +438,11 @@ void FrameLoaderClientQt::dispatchDidStartProvisionalLoad() m_lastRequestedUrl = m_frame->loader()->activeDocumentLoader()->requestURL(); - if (m_webFrame) - emit m_webFrame->provisionalLoad(); + if (!m_webFrame) + return; + emitLoadStarted(); + postProgressEstimateChangedNotification(); + emit m_webFrame->provisionalLoad(); } @@ -526,12 +519,11 @@ void FrameLoaderClientQt::dispatchDidFinishLoad() if (dumpFrameLoaderCallbacks) printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); - // Clears the previous error. - m_loadError = ResourceError(); - if (!m_webFrame) return; + m_webFrame->page()->d->updateNavigationActions(); + emitLoadFinished(true); } @@ -579,12 +571,8 @@ void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*) void FrameLoaderClientQt::postProgressStartedNotification() { - if (m_webFrame && m_frame->page()) { - // As a new load have started, clear the previous error. - m_loadError = ResourceError(); - emit loadStarted(); - postProgressEstimateChangedNotification(); - } + if (m_webFrame && m_frame->page()) + m_isOriginatingLoad = true; if (m_frame->tree()->parent() || !m_webFrame) return; m_webFrame->page()->d->updateNavigationActions(); @@ -611,9 +599,6 @@ void FrameLoaderClientQt::postProgressFinishedNotification() } } } - - if (m_webFrame && m_frame->page()) - emit loadFinished(m_loadError.isNull()); } void FrameLoaderClientQt::setMainFrameDocumentReady(bool) @@ -1133,38 +1118,39 @@ bool FrameLoaderClientQt::dispatchDidLoadResourceFromMemoryCache(WebCore::Docume return false; } -void FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error) +bool FrameLoaderClientQt::callErrorPageExtension(const WebCore::ResourceError& error) { QWebPage* page = m_webFrame->page(); - if (page->supportsExtension(QWebPage::ErrorPageExtension)) { - QWebPage::ErrorPageExtensionOption option; - - if (error.domain() == "QtNetwork") - option.domain = QWebPage::QtNetwork; - else if (error.domain() == "HTTP") - option.domain = QWebPage::Http; - else if (error.domain() == "WebKit") - option.domain = QWebPage::WebKit; - else - return; + if (!page->supportsExtension(QWebPage::ErrorPageExtension)) + return false; + + QWebPage::ErrorPageExtensionOption option; + if (error.domain() == "QtNetwork") + option.domain = QWebPage::QtNetwork; + else if (error.domain() == "HTTP") + option.domain = QWebPage::Http; + else if (error.domain() == "WebKit") + option.domain = QWebPage::WebKit; + else + return false; - option.url = QUrl(error.failingURL()); - option.frame = m_webFrame; - option.error = error.errorCode(); - option.errorString = error.localizedDescription(); + option.url = QUrl(error.failingURL()); + option.frame = m_webFrame; + option.error = error.errorCode(); + option.errorString = error.localizedDescription(); - QWebPage::ErrorPageExtensionReturn output; - if (!page->extension(QWebPage::ErrorPageExtension, &option, &output)) - return; + QWebPage::ErrorPageExtensionReturn output; + if (!page->extension(QWebPage::ErrorPageExtension, &option, &output)) + return false; - KURL baseUrl(output.baseUrl); - KURL failingUrl(option.url); + KURL baseUrl(output.baseUrl); + KURL failingUrl(option.url); - WebCore::ResourceRequest request(baseUrl); - WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length()); - WebCore::SubstituteData substituteData(buffer, output.contentType, output.encoding, failingUrl); - m_frame->loader()->load(request, substituteData, false); - } + WebCore::ResourceRequest request(baseUrl); + WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(output.content.constData(), output.content.length()); + WebCore::SubstituteData substituteData(buffer, output.contentType, output.encoding, failingUrl); + m_frame->loader()->load(request, substituteData, false); + return true; } void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error) @@ -1172,9 +1158,13 @@ void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::Resource if (dumpFrameLoaderCallbacks) printf("%s - didFailProvisionalLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); - m_loadError = error; - if (!error.isNull() && !error.isCancellation()) - callErrorPageExtension(error); + if (!error.isNull() && !error.isCancellation()) { + if (callErrorPageExtension(error)) + return; + } + + if (m_webFrame) + emitLoadFinished(false); } void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error) @@ -1182,9 +1172,13 @@ void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& erro if (dumpFrameLoaderCallbacks) printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame))); - m_loadError = error; - if (!error.isNull() && !error.isCancellation()) - callErrorPageExtension(error); + if (!error.isNull() && !error.isCancellation()) { + if (callErrorPageExtension(error)) + return; + } + + if (m_webFrame) + emitLoadFinished(false); } WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage(const WebCore::NavigationAction&) @@ -1682,6 +1676,26 @@ PassRefPtr<FrameNetworkingContext> FrameLoaderClientQt::createNetworkingContext( return FrameNetworkingContextQt::create(m_frame, m_webFrame, !MIMESniffingDisabled, m_webFrame->page()->networkAccessManager()); } +void FrameLoaderClientQt::emitLoadStarted() +{ + QWebPage* webPage = m_webFrame->page(); + if (m_isOriginatingLoad && webPage) + emit webPage->loadStarted(); + emit m_webFrame->loadStarted(); +} + +void FrameLoaderClientQt::emitLoadFinished(bool ok) +{ + // Signal handlers can lead to a new load, that will use the member again. + const bool wasOriginatingLoad = m_isOriginatingLoad; + m_isOriginatingLoad = false; + + QWebPage* webPage = m_webFrame->page(); + if (wasOriginatingLoad && webPage) + emit webPage->loadFinished(ok); + emit m_webFrame->loadFinished(ok); +} + } #include "moc_FrameLoaderClientQt.cpp" diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h index 6cfd9c1..1be365d 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h @@ -67,11 +67,10 @@ class FrameLoaderClientQt : public QObject, public FrameLoaderClient { friend class ::QWebFrame; void callPolicyFunction(FramePolicyFunction function, PolicyAction action); - void callErrorPageExtension(const ResourceError&); + bool callErrorPageExtension(const ResourceError&); + signals: - void loadStarted(); void loadProgress(int d); - void loadFinished(bool); void titleChanged(const QString& title); void unsupportedContent(QNetworkReply*); @@ -265,6 +264,9 @@ private slots: void onIconLoadedForPageURL(const QString&); private: + void emitLoadStarted(); + void emitLoadFinished(bool ok); + Frame *m_frame; QWebFrame *m_webFrame; ResourceResponse m_response; @@ -279,7 +281,7 @@ private: bool m_hasRepresentation; KURL m_lastRequestedUrl; - ResourceError m_loadError; + bool m_isOriginatingLoad; }; } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp index ef97f3a..b1a6e0f 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp @@ -35,6 +35,10 @@ #include "PlatformVideoWindowPrivate.h" #endif +#if USE(QTKIT) +#include "QTKitFullScreenVideoHandler.h" +#endif + #if USE(QT_MULTIMEDIA) #include <QGraphicsVideoItem> #include <QMediaPlayer> @@ -147,6 +151,10 @@ FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* chromeClient) #if USE(GSTREAMER) m_FullScreenVideoHandlerGStreamer = new GStreamerFullScreenVideoHandler; #endif + +#if USE(QTKIT) + m_FullScreenVideoHandlerQTKit = new QTKitFullScreenVideoHandler; +#endif } FullScreenVideoQt::~FullScreenVideoQt() @@ -157,6 +165,9 @@ FullScreenVideoQt::~FullScreenVideoQt() #if USE(GSTREAMER) delete m_FullScreenVideoHandlerGStreamer; #endif +#if USE(QTKIT) + delete m_FullScreenVideoHandlerQTKit; +#endif } void FullScreenVideoQt::enterFullScreenForNode(Node* node) @@ -185,6 +196,10 @@ void FullScreenVideoQt::enterFullScreenForNode(Node* node) m_FullScreenVideoHandlerGStreamer->setVideoElement(m_videoElement); m_FullScreenVideoHandlerGStreamer->enterFullScreen(); #endif + +#if USE(QTKIT) + m_FullScreenVideoHandlerQTKit->enterFullScreen(m_videoElement); +#endif } void FullScreenVideoQt::exitFullScreenForNode(Node* node) @@ -211,6 +226,11 @@ void FullScreenVideoQt::exitFullScreenForNode(Node* node) #if USE(GSTREAMER) m_FullScreenVideoHandlerGStreamer->exitFullScreen(); #endif + +#if USE(QTKIT) + m_FullScreenVideoHandlerQTKit->exitFullScreen(); +#endif + } void FullScreenVideoQt::aboutToClose() @@ -232,9 +252,6 @@ bool FullScreenVideoQt::requiresFullScreenForVideoPlayback() { #if USE(QT_MULTIMEDIA) return m_FullScreenVideoHandler ? m_FullScreenVideoHandler->requiresFullScreenForVideoPlayback() : false; -#endif -#if USE(GSTREAMER) - return false; #else return false; #endif @@ -247,6 +264,8 @@ bool FullScreenVideoQt::isValid() const #endif #if USE(GSTREAMER) return m_FullScreenVideoHandlerGStreamer; +#elif USE(QTKIT) + return m_FullScreenVideoHandlerQTKit; #else return 0; #endif diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h index fda153d..06438ea 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h @@ -38,6 +38,9 @@ class Node; #if USE(QT_MULTIMEDIA) class MediaPlayerPrivateQt; #endif +#if USE(QTKIT) +class QTKitFullScreenVideoHandler; +#endif // We do not use ENABLE or USE because moc does not expand these macros. #if defined(WTF_USE_GSTREAMER) && WTF_USE_GSTREAMER @@ -109,6 +112,9 @@ private: #if USE(GSTREAMER) GStreamerFullScreenVideoHandler* m_FullScreenVideoHandlerGStreamer; #endif +#if USE(QTKIT) + QTKitFullScreenVideoHandler* m_FullScreenVideoHandlerQTKit; +#endif }; } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h new file mode 100644 index 0000000..39af101 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef QTKitFullScreenVideoHandler_h +#define QTKitFullScreenVideoHandler_h + +#include <OwnPtr.h> + +namespace WebCore { + +class HTMLVideoElement; + +class QTKitFullScreenVideoHandler { + class QTKitFullScreenVideoHandlerPrivate; +public: + QTKitFullScreenVideoHandler(); + ~QTKitFullScreenVideoHandler(); + void enterFullScreen(HTMLVideoElement*); + void exitFullScreen(); + +private: + OwnPtr<QTKitFullScreenVideoHandlerPrivate> privateData; +}; + +} + +#endif // QTKitFullScreenVideoHandler_h diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm new file mode 100644 index 0000000..5e94442 --- /dev/null +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#include "config.h" + +#include "QTKitFullScreenVideoHandler.h" + +#import <Cocoa/Cocoa.h> + +#include "HTMLVideoElement.h" +#include "WebVideoFullscreenController.h" + +using namespace WebCore; + +class QTKitFullScreenVideoHandler::QTKitFullScreenVideoHandlerPrivate { +public : + WebVideoFullscreenController* m_FullScreenController; +}; + +QTKitFullScreenVideoHandler::QTKitFullScreenVideoHandler() + : privateData (adoptPtr(new QTKitFullScreenVideoHandlerPrivate)) +{ + privateData->m_FullScreenController = nil; +} + +QTKitFullScreenVideoHandler::~QTKitFullScreenVideoHandler() +{ + exitFullScreen(); +} + +void QTKitFullScreenVideoHandler::enterFullScreen(HTMLVideoElement* videoElement) +{ + if (privateData->m_FullScreenController) { + // First exit fullscreen for the old mediaElement. + exitFullScreen(); + ASSERT(!privateData->m_FullScreenController); + } + if (!privateData->m_FullScreenController) { + privateData->m_FullScreenController = [[WebVideoFullscreenController alloc] init]; + [privateData->m_FullScreenController setMediaElement:videoElement]; + NSScreen* currentScreen = [NSScreen mainScreen]; + [privateData->m_FullScreenController enterFullscreen:currentScreen]; + } +} + +void QTKitFullScreenVideoHandler::exitFullScreen() +{ + [privateData->m_FullScreenController exitFullscreen]; + [privateData->m_FullScreenController release]; + privateData->m_FullScreenController = nil; +} diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/WebSystemInterface.mm b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/WebSystemInterface.mm index 7ff2ec8..8354af9 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/WebSystemInterface.mm +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/WebSystemInterface.mm @@ -57,6 +57,10 @@ void InitWebCoreSystemInterface(void) INIT(QTGetSitesInMediaDownloadCache); INIT(QTClearMediaDownloadCacheForSite); INIT(QTClearMediaDownloadCache); + INIT(CreateMediaUIBackgroundView); + INIT(CreateMediaUIControl); + INIT(WindowSetAlpha); + INIT(WindowSetScaledFrame); didInit = true; } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/Source/WebKit/qt/declarative/qdeclarativewebview.cpp index 6ba1346..22ee579d 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -782,7 +782,9 @@ void QDeclarativeWebView::setPage(QWebPage* page) connect(page->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(windowObjectCleared())); +#if !defined(Q_OS_SYMBIAN) page->settings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, true); +#endif } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/symbian/bwins/QtWebKitu.def b/src/3rdparty/webkit/Source/WebKit/qt/symbian/bwins/QtWebKitu.def index f1a545e..c93213c 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/symbian/bwins/QtWebKitu.def +++ b/src/3rdparty/webkit/Source/WebKit/qt/symbian/bwins/QtWebKitu.def @@ -368,7 +368,7 @@ EXPORTS ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void) ?qWebKitVersion@@YA?AVQString@@XZ @ 368 NONAME ; class QString qWebKitVersion(void) ?qt_drt_clearFrameName@@YAXPAVQWebFrame@@@Z @ 369 NONAME ; void qt_drt_clearFrameName(class QWebFrame *) - ?qt_drt_counterValueForElementById@@YA?AVQString@@PAVQWebFrame@@ABV1@@Z @ 370 NONAME ; class QString qt_drt_counterValueForElementById(class QWebFrame *, class QString const &) + ?qt_drt_counterValueForElementById@@YA?AVQString@@PAVQWebFrame@@ABV1@@Z @ 370 NONAME ABSENT ; class QString qt_drt_counterValueForElementById(class QWebFrame *, class QString const &) ?qt_drt_garbageCollector_collect@@YAXXZ @ 371 NONAME ; void qt_drt_garbageCollector_collect(void) ?qt_drt_garbageCollector_collectOnAlternateThread@@YAX_N@Z @ 372 NONAME ; void qt_drt_garbageCollector_collectOnAlternateThread(bool) ?qt_drt_javaScriptObjectsCount@@YAHXZ @ 373 NONAME ; int qt_drt_javaScriptObjectsCount(void) @@ -628,21 +628,21 @@ EXPORTS ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ABSENT ; class QUrl QWebSettings::inspectorUrl(void) const ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ; void QWebFrame::pageChanged(void) - ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool) - ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &) - ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ; bool qt_drt_hasDocumentElement(class QWebFrame *) - ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ; int qt_drt_numberOfPages(class QWebFrame *, float, float) - ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float) - ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &) - ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &) - ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool) - ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ; void qt_drt_setMediaType(class QWebFrame *, class QString const &) - ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool) - ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ; void qt_drt_webinspector_close(class QWebPage *) - ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &) - ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ; void qt_drt_webinspector_show(class QWebPage *) - ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ; int qt_drt_workerThreadCount(void) - ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ; void qt_wrt_setViewMode(class QWebPage *, class QString const &) + ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ABSENT ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool) + ?qt_drt_evaluateScriptInIsolatedWorld@@YAXPAVQWebFrame@@HABVQString@@@Z @ 631 NONAME ABSENT ; void qt_drt_evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &) + ?qt_drt_hasDocumentElement@@YA_NPAVQWebFrame@@@Z @ 632 NONAME ABSENT ; bool qt_drt_hasDocumentElement(class QWebFrame *) + ?qt_drt_numberOfPages@@YAHPAVQWebFrame@@MM@Z @ 633 NONAME ABSENT ; int qt_drt_numberOfPages(class QWebFrame *, float, float) + ?qt_drt_pageNumberForElementById@@YAHPAVQWebFrame@@ABVQString@@MM@Z @ 634 NONAME ABSENT ; int qt_drt_pageNumberForElementById(class QWebFrame *, class QString const &, float, float) + ?qt_drt_pauseSVGAnimation@@YA_NPAVQWebFrame@@ABVQString@@N1@Z @ 635 NONAME ABSENT ; bool qt_drt_pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &) + ?qt_drt_setDomainRelaxationForbiddenForURLScheme@@YAX_NABVQString@@@Z @ 636 NONAME ABSENT ; void qt_drt_setDomainRelaxationForbiddenForURLScheme(bool, class QString const &) + ?qt_drt_setFrameFlatteningEnabled@@YAXPAVQWebPage@@_N@Z @ 637 NONAME ABSENT ; void qt_drt_setFrameFlatteningEnabled(class QWebPage *, bool) + ?qt_drt_setMediaType@@YAXPAVQWebFrame@@ABVQString@@@Z @ 638 NONAME ABSENT ; void qt_drt_setMediaType(class QWebFrame *, class QString const &) + ?qt_drt_setTimelineProfilingEnabled@@YAXPAVQWebPage@@_N@Z @ 639 NONAME ABSENT ; void qt_drt_setTimelineProfilingEnabled(class QWebPage *, bool) + ?qt_drt_webinspector_close@@YAXPAVQWebPage@@@Z @ 640 NONAME ABSENT ; void qt_drt_webinspector_close(class QWebPage *) + ?qt_drt_webinspector_executeScript@@YAXPAVQWebPage@@JABVQString@@@Z @ 641 NONAME ABSENT ; void qt_drt_webinspector_executeScript(class QWebPage *, long, class QString const &) + ?qt_drt_webinspector_show@@YAXPAVQWebPage@@@Z @ 642 NONAME ABSENT ; void qt_drt_webinspector_show(class QWebPage *) + ?qt_drt_workerThreadCount@@YAHXZ @ 643 NONAME ABSENT ; int qt_drt_workerThreadCount(void) + ?qt_wrt_setViewMode@@YAXPAVQWebPage@@ABVQString@@@Z @ 644 NONAME ABSENT ; void qt_wrt_setViewMode(class QWebPage *, class QString const &) ?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &) ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &) @@ -650,4 +650,148 @@ EXPORTS ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool) ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool) ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&) - ?qtwebkit_setPluginCreatedCallback@@YAXP6AXPAVQWebFrame@@PAX1@Z@Z @ 652 NONAME ; void qtwebkit_setPluginCreatedCallback(void (*)(class QWebFrame *, void *, void *)) + ?qtwebkit_setPluginCreatedCallback@@YAXP6AXPAVQWebFrame@@PAX1@Z@Z @ 652 NONAME ; void qtwebkit_setPluginCreatedCallback(void (*)(class QWebFrame *, void *, void *)) + ?mediaContentUrlByElementId@DumpRenderTreeSupportQt@@SA?AVQUrl@@PAVQWebFrame@@ABVQString@@@Z @ 653 NONAME ; class QUrl DumpRenderTreeSupportQt::mediaContentUrlByElementId(QWebFrame *, const QString &) + ?webPageSetGroupName@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@ABVQString@@@Z @ 654 NONAME ; void DumpRenderTreeSupportQt::webPageSetGroupName(class QWebPage *, class QString const &) + ?webPageGroupName@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebPage@@@Z @ 655 NONAME ; class QString DumpRenderTreeSupportQt::webPageGroupName(class QWebPage *) + ?renderHints@QGraphicsWebView@@QBE?AV?$QFlags@W4RenderHint@QPainter@@@@XZ @ 656 NONAME ; class QFlags<enum QPainter::RenderHint> QGraphicsWebView::renderHints(void) const + ?setRenderHint@QGraphicsWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 657 NONAME ; void QGraphicsWebView::setRenderHint(enum QPainter::RenderHint, bool) + ?selectedHtml@QWebPage@@QBE?AVQString@@XZ @ 658 NONAME ; class QString QWebPage::selectedHtml(void) const + ?hasSelection@QWebPage@@QBE_NXZ @ 659 NONAME ; bool QWebPage::hasSelection(void) const + ?garbageCollectorCollect@DumpRenderTreeSupportQt@@SAXXZ @ 660 NONAME ; void DumpRenderTreeSupportQt::garbageCollectorCollect(void) + ?supportedContentTypes@QWebPage@@QBE?AVQStringList@@XZ @ 661 NONAME ; class QStringList QWebPage::supportedContentTypes(void) const + ?supportsContentType@QWebPage@@QBE_NABVQString@@@Z @ 662 NONAME ; bool QWebPage::supportsContentType(class QString const &) const + ?setFeaturePermission@QWebPage@@QAEXPAVQWebFrame@@W4Feature@1@W4PermissionPolicy@1@@Z @ 663 NONAME ; void QWebPage::setFeaturePermission(class QWebFrame *, enum QWebPage::Feature, enum QWebPage::PermissionPolicy) + strnstr @ 664 NONAME + ??1QWebScriptWorld@@QAE@XZ @ 665 NONAME ; QWebScriptWorld::~QWebScriptWorld(void) + ??_EQWebSettings@@QAE@I@Z @ 666 NONAME ; QWebSettings::~QWebSettings(unsigned int) + ?setSelectTrailingWhitespaceEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 667 NONAME ; void DumpRenderTreeSupportQt::setSelectTrailingWhitespaceEnabled(class QWebPage *, bool) + ?webInspectorShow@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@@Z @ 668 NONAME ; void DumpRenderTreeSupportQt::webInspectorShow(class QWebPage *) + ?firstRectForCharacterRange@DumpRenderTreeSupportQt@@SA?AV?$QList@VQVariant@@@@PAVQWebPage@@HH@Z @ 669 NONAME ; class QList<class QVariant> DumpRenderTreeSupportQt::firstRectForCharacterRange(class QWebPage *, int, int) + ?whiteListAccessFromOrigin@DumpRenderTreeSupportQt@@SAXABVQString@@00_N@Z @ 670 NONAME ; void DumpRenderTreeSupportQt::whiteListAccessFromOrigin(class QString const &, class QString const &, class QString const &, bool) + ?dumpResourceLoadCallbacks@DumpRenderTreeSupportQt@@SAX_N@Z @ 671 NONAME ; void DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(bool) + ?setWillSendRequestClearHeaders@DumpRenderTreeSupportQt@@SAXABVQStringList@@@Z @ 672 NONAME ; void DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(class QStringList const &) + ?dumpResourceLoadCallbacksPath@DumpRenderTreeSupportQt@@SAXABVQString@@@Z @ 673 NONAME ; void DumpRenderTreeSupportQt::dumpResourceLoadCallbacksPath(class QString const &) + ?featurePermissionRequestCanceled@QWebPage@@IAEXPAVQWebFrame@@W4Feature@1@@Z @ 674 NONAME ; void QWebPage::featurePermissionRequestCanceled(class QWebFrame *, enum QWebPage::Feature) + ??0ViewportAttributes@QWebPage@@QAE@ABV01@@Z @ 675 NONAME ; QWebPage::ViewportAttributes::ViewportAttributes(class QWebPage::ViewportAttributes const &) + ?getChildHistoryItems@DumpRenderTreeSupportQt@@SA?AV?$QMap@VQString@@VQWebHistoryItem@@@@ABVQWebHistoryItem@@@Z @ 676 NONAME ; class QMap<class QString, class QWebHistoryItem> DumpRenderTreeSupportQt::getChildHistoryItems(class QWebHistoryItem const &) + ??_EQWebHistoryItem@@QAE@I@Z @ 677 NONAME ; QWebHistoryItem::~QWebHistoryItem(unsigned int) + ?viewportAttributesForSize@QWebPage@@QBE?AVViewportAttributes@1@ABVQSize@@@Z @ 678 NONAME ; class QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(class QSize const &) const + ?selectedRange@DumpRenderTreeSupportQt@@SA?AV?$QList@VQVariant@@@@PAVQWebPage@@@Z @ 679 NONAME ; class QList<class QVariant> DumpRenderTreeSupportQt::selectedRange(class QWebPage *) + ?selectedHtml@QWebView@@QBE?AVQString@@XZ @ 680 NONAME ; class QString QWebView::selectedHtml(void) const + ?pageNumberForElementById@DumpRenderTreeSupportQt@@SAHPAVQWebFrame@@ABVQString@@MM@Z @ 681 NONAME ; int DumpRenderTreeSupportQt::pageNumberForElementById(class QWebFrame *, class QString const &, float, float) + ??1ViewportAttributes@QWebPage@@QAE@XZ @ 682 NONAME ; QWebPage::ViewportAttributes::~ViewportAttributes(void) + ?resumeActiveDOMObjects@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 683 NONAME ; void DumpRenderTreeSupportQt::resumeActiveDOMObjects(class QWebFrame *) + ?suspendAnimations@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 684 NONAME ; void DumpRenderTreeSupportQt::suspendAnimations(class QWebFrame *) + ?initialScaleFactor@ViewportAttributes@QWebPage@@QBEMXZ @ 685 NONAME ; float QWebPage::ViewportAttributes::initialScaleFactor(void) const + ?setSmartInsertDeleteEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 686 NONAME ; void DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled(class QWebPage *, bool) + ?nodesFromRect@DumpRenderTreeSupportQt@@SA?AV?$QList@VQVariant@@@@ABVQWebElement@@HHIIII_N@Z @ 687 NONAME ; class QList<class QVariant> DumpRenderTreeSupportQt::nodesFromRect(class QWebElement const &, int, int, unsigned int, unsigned int, unsigned int, unsigned int, bool) + ?setJavaScriptProfilingEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@_N@Z @ 688 NONAME ; void DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(class QWebFrame *, bool) + ?shouldClose@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@@Z @ 689 NONAME ; bool DumpRenderTreeSupportQt::shouldClose(class QWebFrame *) + ?clearOpener@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 690 NONAME ; void DumpRenderTreeSupportQt::clearOpener(class QWebFrame *) + ?isTargetItem@DumpRenderTreeSupportQt@@SA_NABVQWebHistoryItem@@@Z @ 691 NONAME ; bool DumpRenderTreeSupportQt::isTargetItem(class QWebHistoryItem const &) + ?setWillSendRequestReturnsNullOnRedirect@DumpRenderTreeSupportQt@@SAX_N@Z @ 692 NONAME ; void DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(bool) + ??0DumpRenderTreeSupportQt@@QAE@XZ @ 693 NONAME ; DumpRenderTreeSupportQt::DumpRenderTreeSupportQt(void) + ?isUserScalable@ViewportAttributes@QWebPage@@QBE_NXZ @ 694 NONAME ; bool QWebPage::ViewportAttributes::isUserScalable(void) const + ?clearFrameName@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 695 NONAME ; void DumpRenderTreeSupportQt::clearFrameName(class QWebFrame *) + ??0QWebScriptWorld@@QAE@XZ @ 696 NONAME ; QWebScriptWorld::QWebScriptWorld(void) + ??4ViewportAttributes@QWebPage@@QAEAAV01@ABV01@@Z @ 697 NONAME ; class QWebPage::ViewportAttributes & QWebPage::ViewportAttributes::operator=(class QWebPage::ViewportAttributes const &) + ?dumpNotification@DumpRenderTreeSupportQt@@SAX_N@Z @ 698 NONAME ; void DumpRenderTreeSupportQt::dumpNotification(bool) + ?setDeferMainResourceDataLoad@DumpRenderTreeSupportQt@@SAX_N@Z @ 699 NONAME ; void DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(bool) + ?webInspectorClose@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@@Z @ 700 NONAME ; void DumpRenderTreeSupportQt::webInspectorClose(class QWebPage *) + ?defaultMinimumTimerInterval@DumpRenderTreeSupportQt@@SANXZ @ 701 NONAME ; double DumpRenderTreeSupportQt::defaultMinimumTimerInterval(void) + ??0ViewportAttributes@QWebPage@@QAE@XZ @ 702 NONAME ; QWebPage::ViewportAttributes::ViewportAttributes(void) + ?counterValueForElementById@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebFrame@@ABV2@@Z @ 703 NONAME ; class QString DumpRenderTreeSupportQt::counterValueForElementById(class QWebFrame *, class QString const &) + ??_EQWebElement@@QAE@I@Z @ 704 NONAME ; QWebElement::~QWebElement(unsigned int) + ?setMinimumTimerInterval@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@N@Z @ 705 NONAME ; void DumpRenderTreeSupportQt::setMinimumTimerInterval(class QWebPage *, double) + ?activeMockDeviceOrientationClient@DumpRenderTreeSupportQt@@SAX_N@Z @ 706 NONAME ; void DumpRenderTreeSupportQt::activeMockDeviceOrientationClient(bool) + ?addUserStyleSheet@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@ABVQString@@@Z @ 707 NONAME ; void DumpRenderTreeSupportQt::addUserStyleSheet(class QWebPage *, class QString const &) + ?devicePixelRatio@ViewportAttributes@QWebPage@@QBEMXZ @ 708 NONAME ; float QWebPage::ViewportAttributes::devicePixelRatio(void) const + ?setMockDeviceOrientation@DumpRenderTreeSupportQt@@SAX_NN0N0N@Z @ 709 NONAME ; void DumpRenderTreeSupportQt::setMockDeviceOrientation(bool, double, bool, double, bool, double) + ?size@ViewportAttributes@QWebPage@@QBE?AVQSize@@XZ @ 710 NONAME ; class QSize QWebPage::ViewportAttributes::size(void) const + ?setCustomPolicyDelegate@DumpRenderTreeSupportQt@@SAX_N0@Z @ 711 NONAME ; void DumpRenderTreeSupportQt::setCustomPolicyDelegate(bool, bool) + ?viewportChangeRequested@QWebPage@@IAEXXZ @ 712 NONAME ; void QWebPage::viewportChangeRequested(void) + ?hasDocumentElement@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@@Z @ 713 NONAME ; bool DumpRenderTreeSupportQt::hasDocumentElement(class QWebFrame *) + ?numberOfPages@DumpRenderTreeSupportQt@@SAHPAVQWebFrame@@MM@Z @ 714 NONAME ; int DumpRenderTreeSupportQt::numberOfPages(class QWebFrame *, float, float) + ?numberOfActiveAnimations@DumpRenderTreeSupportQt@@SAHPAVQWebFrame@@@Z @ 715 NONAME ; int DumpRenderTreeSupportQt::numberOfActiveAnimations(class QWebFrame *) + ?contextMenu@DumpRenderTreeSupportQt@@SA?AVQStringList@@PAVQWebPage@@@Z @ 716 NONAME ; class QStringList DumpRenderTreeSupportQt::contextMenu(class QWebPage *) + ?setWillSendRequestReturnsNull@DumpRenderTreeSupportQt@@SAX_N@Z @ 717 NONAME ; void DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(bool) + ?resumeAnimations@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 718 NONAME ; void DumpRenderTreeSupportQt::resumeAnimations(class QWebFrame *) + ?addURLToRedirect@DumpRenderTreeSupportQt@@SAXABVQString@@0@Z @ 719 NONAME ; void DumpRenderTreeSupportQt::addURLToRedirect(class QString const &, class QString const &) + ??_EQWebDatabase@@QAE@I@Z @ 720 NONAME ; QWebDatabase::~QWebDatabase(unsigned int) + ?workerThreadCount@DumpRenderTreeSupportQt@@SAHXZ @ 721 NONAME ; int DumpRenderTreeSupportQt::workerThreadCount(void) + ?render@QWebElement@@QAEXPAVQPainter@@ABVQRect@@@Z @ 722 NONAME ; void QWebElement::render(class QPainter *, class QRect const &) + ?setFrameFlatteningEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 723 NONAME ; void DumpRenderTreeSupportQt::setFrameFlatteningEnabled(class QWebPage *, bool) + ?dumpResourceResponseMIMETypes@DumpRenderTreeSupportQt@@SAX_N@Z @ 724 NONAME ; void DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(bool) + ?pageProperty@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebFrame@@ABV2@H@Z @ 725 NONAME ; class QString DumpRenderTreeSupportQt::pageProperty(class QWebFrame *, class QString const &, int) + ??0QDRTNode@@QAE@XZ @ 726 NONAME ; QDRTNode::QDRTNode(void) + ?hasSelection@QWebView@@QBE_NXZ @ 727 NONAME ; bool QWebView::hasSelection(void) const + ??_EQDRTNode@@QAE@I@Z @ 728 NONAME ; QDRTNode::~QDRTNode(unsigned int) + ?garbageCollectorCollectOnAlternateThread@DumpRenderTreeSupportQt@@SAX_N@Z @ 729 NONAME ; void DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(bool) + ?setRenderHints@QGraphicsWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 730 NONAME ; void QGraphicsWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>) + ?setAlternateHtml@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@ABVQString@@ABVQUrl@@2@Z @ 731 NONAME ; void DumpRenderTreeSupportQt::setAlternateHtml(class QWebFrame *, class QString const &, class QUrl const &, class QUrl const &) + ?webInspectorExecuteScript@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@JABVQString@@@Z @ 732 NONAME ; void DumpRenderTreeSupportQt::webInspectorExecuteScript(class QWebPage *, long, class QString const &) + ?pauseTransitionOfProperty@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@ABVQString@@N1@Z @ 733 NONAME ; bool DumpRenderTreeSupportQt::pauseTransitionOfProperty(class QWebFrame *, class QString const &, double, class QString const &) + ?numberOfPendingGeolocationPermissionRequests@DumpRenderTreeSupportQt@@SAHPAVQWebPage@@@Z @ 734 NONAME ; int DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(class QWebPage *) + ?setEditingBehavior@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@ABVQString@@@Z @ 735 NONAME ; void DumpRenderTreeSupportQt::setEditingBehavior(class QWebPage *, class QString const &) + ?findString@DumpRenderTreeSupportQt@@SA_NPAVQWebPage@@ABVQString@@ABVQStringList@@@Z @ 736 NONAME ; bool DumpRenderTreeSupportQt::findString(class QWebPage *, class QString const &, class QStringList const &) + ?setCaretBrowsingEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 737 NONAME ; void DumpRenderTreeSupportQt::setCaretBrowsingEnabled(class QWebPage *, bool) + ?historyItemTarget@DumpRenderTreeSupportQt@@SA?AVQString@@ABVQWebHistoryItem@@@Z @ 738 NONAME ; class QString DumpRenderTreeSupportQt::historyItemTarget(class QWebHistoryItem const &) + ??1QDRTNode@@QAE@XZ @ 739 NONAME ; QDRTNode::~QDRTNode(void) + ?clearAllApplicationCaches@DumpRenderTreeSupportQt@@SAXXZ @ 740 NONAME ; void DumpRenderTreeSupportQt::clearAllApplicationCaches(void) + ?isValid@ViewportAttributes@QWebPage@@QBE_NXZ @ 741 NONAME ; bool QWebPage::ViewportAttributes::isValid(void) const + ?dumpVisitedLinksCallbacks@DumpRenderTreeSupportQt@@SAX_N@Z @ 742 NONAME ; void DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(bool) + ?resetOriginAccessWhiteLists@DumpRenderTreeSupportQt@@SAXXZ @ 743 NONAME ; void DumpRenderTreeSupportQt::resetOriginAccessWhiteLists(void) + ??_EQWebSecurityOrigin@@QAE@I@Z @ 744 NONAME ; QWebSecurityOrigin::~QWebSecurityOrigin(unsigned int) + ?dumpFrameLoader@DumpRenderTreeSupportQt@@SAX_N@Z @ 745 NONAME ; void DumpRenderTreeSupportQt::dumpFrameLoader(bool) + ?markerTextForListItem@DumpRenderTreeSupportQt@@SA?AVQString@@ABVQWebElement@@@Z @ 746 NONAME ; class QString DumpRenderTreeSupportQt::markerTextForListItem(class QWebElement const &) + ?elementDoesAutoCompleteForElementWithId@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@ABVQString@@@Z @ 747 NONAME ; bool DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(class QWebFrame *, class QString const &) + ?applicationCacheQuotaExceeded@QWebPage@@IAEXPAVQWebSecurityOrigin@@_K@Z @ 748 NONAME ; void QWebPage::applicationCacheQuotaExceeded(class QWebSecurityOrigin *, unsigned long long) + ?setTimelineProfilingEnabled@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 749 NONAME ; void DumpRenderTreeSupportQt::setTimelineProfilingEnabled(class QWebPage *, bool) + ??0QDRTNode@@AAE@PAVNode@WebCore@@@Z @ 750 NONAME ; QDRTNode::QDRTNode(class WebCore::Node *) + ?setMockGeolocationPermission@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@_N@Z @ 751 NONAME ; void DumpRenderTreeSupportQt::setMockGeolocationPermission(class QWebPage *, bool) + ?setMockGeolocationError@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@HABVQString@@@Z @ 752 NONAME ; void DumpRenderTreeSupportQt::setMockGeolocationError(class QWebPage *, int, class QString const &) + ?clearScriptWorlds@DumpRenderTreeSupportQt@@SAXXZ @ 753 NONAME ; void DumpRenderTreeSupportQt::clearScriptWorlds(void) + ?maximumScaleFactor@ViewportAttributes@QWebPage@@QBEMXZ @ 754 NONAME ; float QWebPage::ViewportAttributes::maximumScaleFactor(void) const + ?dumpHistoryCallbacks@DumpRenderTreeSupportQt@@SAX_N@Z @ 755 NONAME ; void DumpRenderTreeSupportQt::dumpHistoryCallbacks(bool) + ??0MimeType@QWebPluginFactory@@QAE@XZ @ 756 NONAME ; QWebPluginFactory::MimeType::MimeType(void) + ?pauseSVGAnimation@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@ABVQString@@N1@Z @ 757 NONAME ; bool DumpRenderTreeSupportQt::pauseSVGAnimation(class QWebFrame *, class QString const &, double, class QString const &) + ?featurePermissionRequested@QWebPage@@IAEXPAVQWebFrame@@W4Feature@1@@Z @ 758 NONAME ; void QWebPage::featurePermissionRequested(class QWebFrame *, enum QWebPage::Feature) + ?removeShadowRoot@DumpRenderTreeSupportQt@@SAXABVQWebElement@@@Z @ 759 NONAME ; void DumpRenderTreeSupportQt::removeShadowRoot(class QWebElement const &) + ??_EQWebPluginInfo@@QAE@I@Z @ 760 NONAME ; QWebPluginInfo::~QWebPluginInfo(unsigned int) + ?pageSizeAndMarginsInPixels@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebFrame@@HHHHHHH@Z @ 761 NONAME ; class QString DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels(class QWebFrame *, int, int, int, int, int, int, int) + ?suspendActiveDOMObjects@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@@Z @ 762 NONAME ; void DumpRenderTreeSupportQt::suspendActiveDOMObjects(class QWebFrame *) + ?dumpUserGestureInFrameLoader@DumpRenderTreeSupportQt@@SAX_N@Z @ 763 NONAME ; void DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(bool) + ??0QWebScriptWorld@@QAE@ABV0@@Z @ 764 NONAME ; QWebScriptWorld::QWebScriptWorld(class QWebScriptWorld const &) + ?setDumpRenderTreeModeEnabled@DumpRenderTreeSupportQt@@SAX_N@Z @ 765 NONAME ; void DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(bool) + ?evaluateScriptInIsolatedWorld@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@HABVQString@@@Z @ 766 NONAME ; void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(class QWebFrame *, int, class QString const &) + ?setApplicationCacheQuota@QWebSecurityOrigin@@QAEX_J@Z @ 767 NONAME ; void QWebSecurityOrigin::setApplicationCacheQuota(long long) + ?plainText@DumpRenderTreeSupportQt@@SA?AVQString@@ABVQVariant@@@Z @ 768 NONAME ; class QString DumpRenderTreeSupportQt::plainText(class QVariant const &) + ??1DumpRenderTreeSupportQt@@QAE@XZ @ 769 NONAME ; DumpRenderTreeSupportQt::~DumpRenderTreeSupportQt(void) + ?viewportAsText@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebPage@@HABVQSize@@1@Z @ 770 NONAME ; class QString DumpRenderTreeSupportQt::viewportAsText(class QWebPage *, int, class QSize const &, class QSize const &) + ?setDomainRelaxationForbiddenForURLScheme@DumpRenderTreeSupportQt@@SAX_NABVQString@@@Z @ 771 NONAME ; void DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(bool, class QString const &) + ?setMediaType@DumpRenderTreeSupportQt@@SAXPAVQWebFrame@@ABVQString@@@Z @ 772 NONAME ; void DumpRenderTreeSupportQt::setMediaType(class QWebFrame *, class QString const &) + ?computedStyleIncludingVisitedInfo@DumpRenderTreeSupportQt@@SA?AV?$QMap@VQString@@VQVariant@@@@ABVQWebElement@@@Z @ 773 NONAME ; class QMap<class QString, class QVariant> DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(class QWebElement const &) + ?overwritePluginDirectories@DumpRenderTreeSupportQt@@SAXXZ @ 774 NONAME ; void DumpRenderTreeSupportQt::overwritePluginDirectories(void) + ?minimumScaleFactor@ViewportAttributes@QWebPage@@QBEMXZ @ 775 NONAME ; float QWebPage::ViewportAttributes::minimumScaleFactor(void) const + ?setAutofilled@DumpRenderTreeSupportQt@@SAXABVQWebElement@@_N@Z @ 776 NONAME ; void DumpRenderTreeSupportQt::setAutofilled(class QWebElement const &, bool) + ?dumpSetAcceptsEditing@DumpRenderTreeSupportQt@@SAX_N@Z @ 777 NONAME ; void DumpRenderTreeSupportQt::dumpSetAcceptsEditing(bool) + ?pauseAnimation@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@ABVQString@@N1@Z @ 778 NONAME ; bool DumpRenderTreeSupportQt::pauseAnimation(class QWebFrame *, class QString const &, double, class QString const &) + ?isPageBoxVisible@DumpRenderTreeSupportQt@@SA_NPAVQWebFrame@@H@Z @ 779 NONAME ; bool DumpRenderTreeSupportQt::isPageBoxVisible(class QWebFrame *, int) + ?shadowRoot@DumpRenderTreeSupportQt@@SA?AVQVariant@@ABVQWebElement@@@Z @ 780 NONAME ; class QVariant DumpRenderTreeSupportQt::shadowRoot(class QWebElement const &) + ??4QDRTNode@@QAEAAV0@ABV0@@Z @ 781 NONAME ; class QDRTNode & QDRTNode::operator=(class QDRTNode const &) + ?responseMimeType@DumpRenderTreeSupportQt@@SA?AVQString@@PAVQWebFrame@@@Z @ 782 NONAME ; class QString DumpRenderTreeSupportQt::responseMimeType(class QWebFrame *) + ?setMockGeolocationPosition@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@NNN@Z @ 783 NONAME ; void DumpRenderTreeSupportQt::setMockGeolocationPosition(class QWebPage *, double, double, double) + ?isCommandEnabled@DumpRenderTreeSupportQt@@SA_NPAVQWebPage@@ABVQString@@@Z @ 784 NONAME ; bool DumpRenderTreeSupportQt::isCommandEnabled(class QWebPage *, class QString const &) + ?dumpEditingCallbacks@DumpRenderTreeSupportQt@@SAX_N@Z @ 785 NONAME ; void DumpRenderTreeSupportQt::dumpEditingCallbacks(bool) + ?setActualVisibleContentRect@QWebPage@@QBEXABVQRect@@@Z @ 786 NONAME ; void QWebPage::setActualVisibleContentRect(class QRect const &) const + ?executeCoreCommandByName@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@ABVQString@@1@Z @ 787 NONAME ; void DumpRenderTreeSupportQt::executeCoreCommandByName(class QWebPage *, class QString const &, class QString const &) + ?resetGeolocationMock@DumpRenderTreeSupportQt@@SAXPAVQWebPage@@@Z @ 788 NONAME ; void DumpRenderTreeSupportQt::resetGeolocationMock(class QWebPage *) + ?removeWhiteListAccessFromOrigin@DumpRenderTreeSupportQt@@SAXABVQString@@00_N@Z @ 789 NONAME ; void DumpRenderTreeSupportQt::removeWhiteListAccessFromOrigin(class QString const &, class QString const &, class QString const &, bool) + ??0QDRTNode@@QAE@ABV0@@Z @ 790 NONAME ; QDRTNode::QDRTNode(class QDRTNode const &) + ?removeMockDeviceOrientation@DumpRenderTreeSupportQt@@SAXXZ @ 791 NONAME ; void DumpRenderTreeSupportQt::removeMockDeviceOrientation(void) + ??4QWebScriptWorld@@QAEAAV0@ABV0@@Z @ 792 NONAME ; class QWebScriptWorld & QWebScriptWorld::operator=(class QWebScriptWorld const &) + ?javaScriptObjectsCount@DumpRenderTreeSupportQt@@SAHXZ @ 793 NONAME ; int DumpRenderTreeSupportQt::javaScriptObjectsCount(void) + ?world@QWebScriptWorld@@QBEPAVDOMWrapperWorld@WebCore@@XZ @ 794 NONAME ; class WebCore::DOMWrapperWorld * QWebScriptWorld::world(void) const + ?simulateDesktopNotificationClick@DumpRenderTreeSupportQt@@SAXABVQString@@@Z @ 795 NONAME ; void DumpRenderTreeSupportQt::simulateDesktopNotificationClick(class QString const &) + ?ensureShadowRoot@DumpRenderTreeSupportQt@@SA?AVQVariant@@ABVQWebElement@@@Z @ 796 NONAME ; class QVariant DumpRenderTreeSupportQt::ensureShadowRoot(class QWebElement const &)
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def index 176b9a1..d948de4 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/src/3rdparty/webkit/Source/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -1,847 +1,880 @@ -EXPORTS - _Z10qt_drt_runb @ 1 NONAME - _Z14qWebKitVersionv @ 2 NONAME - _Z19qWebKitMajorVersionv @ 3 NONAME - _Z19qWebKitMinorVersionv @ 4 NONAME - _Z20qt_dump_frame_loaderb @ 5 NONAME - _Z20qt_webpage_groupNameP8QWebPage @ 6 NONAME - _Z21qt_drt_clearFrameNameP9QWebFrame @ 7 NONAME - _Z21qt_drt_pauseAnimationP9QWebFrameRK7QStringdS3_ @ 8 NONAME - _Z23qt_webpage_setGroupNameP8QWebPageRK7QString @ 9 NONAME - _Z25qt_dump_editing_callbacksb @ 10 NONAME - _Z27qt_dump_set_accepts_editingb @ 11 NONAME - _Z29qt_drt_javaScriptObjectsCountv @ 12 NONAME - _Z31qt_drt_garbageCollector_collectv @ 13 NONAME - _Z31qt_drt_numberOfActiveAnimationsP9QWebFrame @ 14 NONAME - _Z31qt_dump_resource_load_callbacksb @ 15 NONAME - _Z32qt_drt_pauseTransitionOfPropertyP9QWebFrameRK7QStringdS3_ @ 16 NONAME - _Z33qt_drt_overwritePluginDirectoriesv @ 17 NONAME - _Z36qt_drt_setJavaScriptProfilingEnabledP9QWebFrameb @ 18 NONAME - _Z48qt_drt_garbageCollector_collectOnAlternateThreadb @ 19 NONAME - _ZN11QWebElement11encloseWithERK7QString @ 20 NONAME - _ZN11QWebElement11encloseWithERKS_ @ 21 NONAME - _ZN11QWebElement11removeClassERK7QString @ 22 NONAME - _ZN11QWebElement11setInnerXmlERK7QString @ 23 NONAME - _ZN11QWebElement11setOuterXmlERK7QString @ 24 NONAME - _ZN11QWebElement11toggleClassERK7QString @ 25 NONAME - _ZN11QWebElement12appendInsideERK7QString @ 26 NONAME - _ZN11QWebElement12appendInsideERKS_ @ 27 NONAME - _ZN11QWebElement12setAttributeERK7QStringS2_ @ 28 NONAME - _ZN11QWebElement12setPlainTextERK7QString @ 29 NONAME - _ZN11QWebElement13appendOutsideERK7QString @ 30 NONAME - _ZN11QWebElement13appendOutsideERKS_ @ 31 NONAME - _ZN11QWebElement13prependInsideERK7QString @ 32 NONAME - _ZN11QWebElement13prependInsideERKS_ @ 33 NONAME - _ZN11QWebElement14prependOutsideERK7QString @ 34 NONAME - _ZN11QWebElement14prependOutsideERKS_ @ 35 NONAME - _ZN11QWebElement14removeChildrenEv @ 36 NONAME ABSENT - _ZN11QWebElement14setAttributeNSERK7QStringS2_S2_ @ 37 NONAME - _ZN11QWebElement15removeAttributeERK7QString @ 38 NONAME - _ZN11QWebElement16enclosingElementEPN7WebCore4NodeE @ 39 NONAME - _ZN11QWebElement16setStylePropertyERK7QStringS2_ @ 40 NONAME - _ZN11QWebElement16takeFromDocumentEv @ 41 NONAME - _ZN11QWebElement17removeAttributeNSERK7QStringS2_ @ 42 NONAME - _ZN11QWebElement18evaluateJavaScriptERK7QString @ 43 NONAME - _ZN11QWebElement18removeFromDocumentEv @ 44 NONAME - _ZN11QWebElement19encloseContentsWithERK7QString @ 45 NONAME - _ZN11QWebElement19encloseContentsWithERKS_ @ 46 NONAME - _ZN11QWebElement7replaceERK7QString @ 47 NONAME - _ZN11QWebElement7replaceERKS_ @ 48 NONAME - _ZN11QWebElement8addClassERK7QString @ 49 NONAME - _ZN11QWebElement8setFocusEv @ 50 NONAME - _ZN11QWebElementC1EPN7WebCore4NodeE @ 51 NONAME - _ZN11QWebElementC1EPN7WebCore7ElementE @ 52 NONAME - _ZN11QWebElementC1ERKS_ @ 53 NONAME - _ZN11QWebElementC1Ev @ 54 NONAME - _ZN11QWebElementC2EPN7WebCore4NodeE @ 55 NONAME - _ZN11QWebElementC2EPN7WebCore7ElementE @ 56 NONAME - _ZN11QWebElementC2ERKS_ @ 57 NONAME - _ZN11QWebElementC2Ev @ 58 NONAME - _ZN11QWebElementD1Ev @ 59 NONAME - _ZN11QWebElementD2Ev @ 60 NONAME - _ZN11QWebElementaSERKS_ @ 61 NONAME - _ZN11QWebHistory12restoreStateERK10QByteArray @ 62 NONAME ABSENT - _ZN11QWebHistory19setMaximumItemCountEi @ 63 NONAME - _ZN11QWebHistory4backEv @ 64 NONAME - _ZN11QWebHistory5clearEv @ 65 NONAME - _ZN11QWebHistory7forwardEv @ 66 NONAME - _ZN11QWebHistory8goToItemERK15QWebHistoryItem @ 67 NONAME - _ZN11QWebHistoryC1Ev @ 68 NONAME - _ZN11QWebHistoryC2Ev @ 69 NONAME - _ZN11QWebHistoryD1Ev @ 70 NONAME - _ZN11QWebHistoryD2Ev @ 71 NONAME - _ZN12QWebDatabase14removeDatabaseERKS_ @ 72 NONAME - _ZN12QWebDatabase18removeAllDatabasesEv @ 73 NONAME - _ZN12QWebDatabaseC1EP19QWebDatabasePrivate @ 74 NONAME - _ZN12QWebDatabaseC1ERKS_ @ 75 NONAME - _ZN12QWebDatabaseC2EP19QWebDatabasePrivate @ 76 NONAME - _ZN12QWebDatabaseC2ERKS_ @ 77 NONAME - _ZN12QWebDatabaseD1Ev @ 78 NONAME - _ZN12QWebDatabaseD2Ev @ 79 NONAME - _ZN12QWebDatabaseaSERKS_ @ 80 NONAME - _ZN12QWebSettings10iconForUrlERK4QUrl @ 81 NONAME - _ZN12QWebSettings10webGraphicENS_10WebGraphicE @ 82 NONAME - _ZN12QWebSettings11setFontSizeENS_8FontSizeEi @ 83 NONAME - _ZN12QWebSettings12setAttributeENS_12WebAttributeEb @ 84 NONAME - _ZN12QWebSettings13resetFontSizeENS_8FontSizeE @ 85 NONAME - _ZN12QWebSettings13setFontFamilyENS_10FontFamilyERK7QString @ 86 NONAME - _ZN12QWebSettings13setWebGraphicENS_10WebGraphicERK7QPixmap @ 87 NONAME - _ZN12QWebSettings14globalSettingsEv @ 88 NONAME - _ZN12QWebSettings14pluginDatabaseEv @ 89 NONAME ABSENT - _ZN12QWebSettings14resetAttributeENS_12WebAttributeE @ 90 NONAME - _ZN12QWebSettings15resetFontFamilyENS_10FontFamilyE @ 91 NONAME - _ZN12QWebSettings16iconDatabasePathEv @ 92 NONAME - _ZN12QWebSettings17clearIconDatabaseEv @ 93 NONAME - _ZN12QWebSettings17clearMemoryCachesEv @ 94 NONAME - _ZN12QWebSettings18offlineStoragePathEv @ 95 NONAME - _ZN12QWebSettings19maximumPagesInCacheEv @ 96 NONAME - _ZN12QWebSettings19setIconDatabasePathERK7QString @ 97 NONAME - _ZN12QWebSettings19setLocalStoragePathERK7QString @ 98 NONAME - _ZN12QWebSettings20setUserStyleSheetUrlERK4QUrl @ 99 NONAME - _ZN12QWebSettings21setOfflineStoragePathERK7QString @ 100 NONAME - _ZN12QWebSettings22setDefaultTextEncodingERK7QString @ 101 NONAME - _ZN12QWebSettings22setMaximumPagesInCacheEi @ 102 NONAME - _ZN12QWebSettings23enablePersistentStorageERK7QString @ 103 NONAME - _ZN12QWebSettings24setObjectCacheCapacitiesEiii @ 104 NONAME - _ZN12QWebSettings26offlineStorageDefaultQuotaEv @ 105 NONAME - _ZN12QWebSettings29setOfflineStorageDefaultQuotaEx @ 106 NONAME - _ZN12QWebSettings30offlineWebApplicationCachePathEv @ 107 NONAME - _ZN12QWebSettings31offlineWebApplicationCacheQuotaEv @ 108 NONAME - _ZN12QWebSettings33setOfflineWebApplicationCachePathERK7QString @ 109 NONAME - _ZN12QWebSettings34setOfflineWebApplicationCacheQuotaEx @ 110 NONAME - _ZN12QWebSettingsC1EPN7WebCore8SettingsE @ 111 NONAME - _ZN12QWebSettingsC1Ev @ 112 NONAME - _ZN12QWebSettingsC2EPN7WebCore8SettingsE @ 113 NONAME - _ZN12QWebSettingsC2Ev @ 114 NONAME - _ZN12QWebSettingsD1Ev @ 115 NONAME - _ZN12QWebSettingsD2Ev @ 116 NONAME - _ZN13QWebInspector11qt_metacallEN11QMetaObject4CallEiPPv @ 117 NONAME - _ZN13QWebInspector11qt_metacastEPKc @ 118 NONAME - _ZN13QWebInspector11resizeEventEP12QResizeEvent @ 119 NONAME - _ZN13QWebInspector16staticMetaObjectE @ 120 NONAME DATA 16 - _ZN13QWebInspector18windowTitleChangedERK7QString @ 121 NONAME ABSENT - _ZN13QWebInspector19getStaticMetaObjectEv @ 122 NONAME - _ZN13QWebInspector5eventEP6QEvent @ 123 NONAME - _ZN13QWebInspector7setPageEP8QWebPage @ 124 NONAME - _ZN13QWebInspector9hideEventEP10QHideEvent @ 125 NONAME - _ZN13QWebInspector9showEventEP10QShowEvent @ 126 NONAME - _ZN13QWebInspectorC1EP7QWidget @ 127 NONAME - _ZN13QWebInspectorC2EP7QWidget @ 128 NONAME - _ZN13QWebInspectorD0Ev @ 129 NONAME - _ZN13QWebInspectorD1Ev @ 130 NONAME - _ZN13QWebInspectorD2Ev @ 131 NONAME - _ZN14QWebPluginInfo10setEnabledEb @ 132 NONAME - _ZN14QWebPluginInfoC1EPN7WebCore13PluginPackageE @ 133 NONAME - _ZN14QWebPluginInfoC1ERKS_ @ 134 NONAME - _ZN14QWebPluginInfoC1Ev @ 135 NONAME - _ZN14QWebPluginInfoC2EPN7WebCore13PluginPackageE @ 136 NONAME - _ZN14QWebPluginInfoC2ERKS_ @ 137 NONAME - _ZN14QWebPluginInfoC2Ev @ 138 NONAME - _ZN14QWebPluginInfoD1Ev @ 139 NONAME - _ZN14QWebPluginInfoD2Ev @ 140 NONAME - _ZN14QWebPluginInfoaSERKS_ @ 141 NONAME - _ZN15QWebHistoryItem11setUserDataERK8QVariant @ 142 NONAME - _ZN15QWebHistoryItemC1EP22QWebHistoryItemPrivate @ 143 NONAME - _ZN15QWebHistoryItemC1ERKS_ @ 144 NONAME - _ZN15QWebHistoryItemC2EP22QWebHistoryItemPrivate @ 145 NONAME - _ZN15QWebHistoryItemC2ERKS_ @ 146 NONAME - _ZN15QWebHistoryItemD1Ev @ 147 NONAME - _ZN15QWebHistoryItemD2Ev @ 148 NONAME - _ZN15QWebHistoryItemaSERKS_ @ 149 NONAME - _ZN16QGraphicsWebView10loadFailedEv @ 150 NONAME ABSENT - _ZN16QGraphicsWebView10sceneEventEP6QEvent @ 151 NONAME - _ZN16QGraphicsWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 152 NONAME - _ZN16QGraphicsWebView10urlChangedERK4QUrl @ 153 NONAME - _ZN16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 154 NONAME - _ZN16QGraphicsWebView11iconChangedEv @ 155 NONAME - _ZN16QGraphicsWebView11loadStartedEv @ 156 NONAME - _ZN16QGraphicsWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 157 NONAME - _ZN16QGraphicsWebView11qt_metacastEPKc @ 158 NONAME - _ZN16QGraphicsWebView11setGeometryERK6QRectF @ 159 NONAME - _ZN16QGraphicsWebView12focusInEventEP11QFocusEvent @ 160 NONAME - _ZN16QGraphicsWebView12loadFinishedEv @ 161 NONAME ABSENT - _ZN16QGraphicsWebView12titleChangedERK7QString @ 162 NONAME - _ZN16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 163 NONAME - _ZN16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 164 NONAME - _ZN16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 165 NONAME - _ZN16QGraphicsWebView13setZoomFactorEf @ 166 NONAME - _ZN16QGraphicsWebView13statusChangedEv @ 167 NONAME ABSENT - _ZN16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 168 NONAME - _ZN16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 169 NONAME - _ZN16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 170 NONAME - _ZN16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 171 NONAME - _ZN16QGraphicsWebView14setInteractiveEb @ 172 NONAME ABSENT - _ZN16QGraphicsWebView14updateGeometryEv @ 173 NONAME - _ZN16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 174 NONAME - _ZN16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 175 NONAME - _ZN16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 176 NONAME - _ZN16QGraphicsWebView15progressChangedEf @ 177 NONAME ABSENT - _ZN16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 178 NONAME - _ZN16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 179 NONAME - _ZN16QGraphicsWebView16staticMetaObjectE @ 180 NONAME DATA 16 - _ZN16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 181 NONAME - _ZN16QGraphicsWebView17zoomFactorChangedEv @ 182 NONAME ABSENT - _ZN16QGraphicsWebView18focusNextPrevChildEb @ 183 NONAME - _ZN16QGraphicsWebView19getStaticMetaObjectEv @ 184 NONAME - _ZN16QGraphicsWebView20interactivityChangedEv @ 185 NONAME ABSENT - _ZN16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 186 NONAME - _ZN16QGraphicsWebView4backEv @ 187 NONAME - _ZN16QGraphicsWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 188 NONAME - _ZN16QGraphicsWebView4loadERK4QUrl @ 189 NONAME - _ZN16QGraphicsWebView4stopEv @ 190 NONAME - _ZN16QGraphicsWebView5eventEP6QEvent @ 191 NONAME - _ZN16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 192 NONAME - _ZN16QGraphicsWebView6reloadEv @ 193 NONAME - _ZN16QGraphicsWebView6setUrlERK4QUrl @ 194 NONAME - _ZN16QGraphicsWebView7forwardEv @ 195 NONAME - _ZN16QGraphicsWebView7setHtmlERK7QStringRK4QUrl @ 196 NONAME - _ZN16QGraphicsWebView7setPageEP8QWebPage @ 197 NONAME - _ZN16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 198 NONAME - _ZN16QGraphicsWebViewC1EP13QGraphicsItem @ 199 NONAME - _ZN16QGraphicsWebViewC2EP13QGraphicsItem @ 200 NONAME - _ZN16QGraphicsWebViewD0Ev @ 201 NONAME - _ZN16QGraphicsWebViewD1Ev @ 202 NONAME - _ZN16QGraphicsWebViewD2Ev @ 203 NONAME - _ZN17QWebHitTestResultC1EP24QWebHitTestResultPrivate @ 204 NONAME - _ZN17QWebHitTestResultC1ERKS_ @ 205 NONAME - _ZN17QWebHitTestResultC1Ev @ 206 NONAME - _ZN17QWebHitTestResultC2EP24QWebHitTestResultPrivate @ 207 NONAME - _ZN17QWebHitTestResultC2ERKS_ @ 208 NONAME - _ZN17QWebHitTestResultC2Ev @ 209 NONAME - _ZN17QWebHitTestResultD1Ev @ 210 NONAME - _ZN17QWebHitTestResultD2Ev @ 211 NONAME - _ZN17QWebHitTestResultaSERKS_ @ 212 NONAME - _ZN17QWebPluginFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME - _ZN17QWebPluginFactory11qt_metacastEPKc @ 214 NONAME - _ZN17QWebPluginFactory14refreshPluginsEv @ 215 NONAME - _ZN17QWebPluginFactory16staticMetaObjectE @ 216 NONAME DATA 16 - _ZN17QWebPluginFactory19getStaticMetaObjectEv @ 217 NONAME - _ZN17QWebPluginFactory9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 218 NONAME - _ZN17QWebPluginFactoryC2EP7QObject @ 219 NONAME - _ZN17QWebPluginFactoryD0Ev @ 220 NONAME - _ZN17QWebPluginFactoryD1Ev @ 221 NONAME - _ZN17QWebPluginFactoryD2Ev @ 222 NONAME - _ZN18QWebPluginDatabase11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME - _ZN18QWebPluginDatabase11qt_metacastEPKc @ 224 NONAME - _ZN18QWebPluginDatabase13addSearchPathERK7QString @ 225 NONAME - _ZN18QWebPluginDatabase14setSearchPathsERK11QStringList @ 226 NONAME - _ZN18QWebPluginDatabase16staticMetaObjectE @ 227 NONAME DATA 16 - _ZN18QWebPluginDatabase17pluginForMimeTypeERK7QString @ 228 NONAME - _ZN18QWebPluginDatabase18defaultSearchPathsEv @ 229 NONAME - _ZN18QWebPluginDatabase19getStaticMetaObjectEv @ 230 NONAME - _ZN18QWebPluginDatabase29setPreferredPluginForMimeTypeERK7QStringRK14QWebPluginInfo @ 231 NONAME - _ZN18QWebPluginDatabase7refreshEv @ 232 NONAME - _ZN18QWebPluginDatabaseC1EP7QObject @ 233 NONAME - _ZN18QWebPluginDatabaseC2EP7QObject @ 234 NONAME - _ZN18QWebPluginDatabaseD0Ev @ 235 NONAME - _ZN18QWebPluginDatabaseD1Ev @ 236 NONAME - _ZN18QWebPluginDatabaseD2Ev @ 237 NONAME - _ZN18QWebSecurityOrigin10allOriginsEv @ 238 NONAME - _ZN18QWebSecurityOrigin12localSchemesEv @ 239 NONAME - _ZN18QWebSecurityOrigin14addLocalSchemeERK7QString @ 240 NONAME - _ZN18QWebSecurityOrigin16setDatabaseQuotaEx @ 241 NONAME - _ZN18QWebSecurityOrigin17removeLocalSchemeERK7QString @ 242 NONAME - _ZN18QWebSecurityOrigin25whiteListAccessFromOriginERK7QStringS2_S2_b @ 243 NONAME ABSENT - _ZN18QWebSecurityOrigin27resetOriginAccessWhiteListsEv @ 244 NONAME ABSENT - _ZN18QWebSecurityOriginC1EP25QWebSecurityOriginPrivate @ 245 NONAME - _ZN18QWebSecurityOriginC1ERKS_ @ 246 NONAME - _ZN18QWebSecurityOriginC2EP25QWebSecurityOriginPrivate @ 247 NONAME - _ZN18QWebSecurityOriginC2ERKS_ @ 248 NONAME - _ZN18QWebSecurityOriginD1Ev @ 249 NONAME - _ZN18QWebSecurityOriginD2Ev @ 250 NONAME - _ZN18QWebSecurityOriginaSERKS_ @ 251 NONAME - _ZN20QWebHistoryInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 252 NONAME - _ZN20QWebHistoryInterface11qt_metacastEPKc @ 253 NONAME - _ZN20QWebHistoryInterface16defaultInterfaceEv @ 254 NONAME - _ZN20QWebHistoryInterface16staticMetaObjectE @ 255 NONAME DATA 16 - _ZN20QWebHistoryInterface19getStaticMetaObjectEv @ 256 NONAME - _ZN20QWebHistoryInterface19setDefaultInterfaceEPS_ @ 257 NONAME - _ZN20QWebHistoryInterfaceC2EP7QObject @ 258 NONAME - _ZN20QWebHistoryInterfaceD0Ev @ 259 NONAME - _ZN20QWebHistoryInterfaceD1Ev @ 260 NONAME - _ZN20QWebHistoryInterfaceD2Ev @ 261 NONAME - _ZN8QWebPage10chooseFileEP9QWebFrameRK7QString @ 262 NONAME - _ZN8QWebPage10setPaletteERK8QPalette @ 263 NONAME - _ZN8QWebPage11linkClickedERK4QUrl @ 264 NONAME - _ZN8QWebPage11linkHoveredERK7QStringS2_S2_ @ 265 NONAME - _ZN8QWebPage11loadStartedEv @ 266 NONAME - _ZN8QWebPage11qt_metacallEN11QMetaObject4CallEiPPv @ 267 NONAME - _ZN8QWebPage11qt_metacastEPKc @ 268 NONAME - _ZN8QWebPage12createPluginERK7QStringRK4QUrlRK11QStringListS8_ @ 269 NONAME - _ZN8QWebPage12createWindowENS_13WebWindowTypeE @ 270 NONAME - _ZN8QWebPage12frameCreatedEP9QWebFrame @ 271 NONAME - _ZN8QWebPage12loadFinishedEb @ 272 NONAME - _ZN8QWebPage12loadProgressEi @ 273 NONAME - _ZN8QWebPage13triggerActionENS_9WebActionEb @ 274 NONAME - _ZN8QWebPage14printRequestedEP9QWebFrame @ 275 NONAME - _ZN8QWebPage15contentsChangedEv @ 276 NONAME - _ZN8QWebPage15javaScriptAlertEP9QWebFrameRK7QString @ 277 NONAME - _ZN8QWebPage15scrollRequestedEiiRK5QRect @ 278 NONAME - _ZN8QWebPage16javaScriptPromptEP9QWebFrameRK7QStringS4_PS2_ @ 279 NONAME - _ZN8QWebPage16repaintRequestedERK5QRect @ 280 NONAME - _ZN8QWebPage16selectionChangedEv @ 281 NONAME - _ZN8QWebPage16setPluginFactoryEP17QWebPluginFactory @ 282 NONAME - _ZN8QWebPage16staticMetaObjectE @ 283 NONAME DATA 16 - _ZN8QWebPage16statusBarMessageERK7QString @ 284 NONAME - _ZN8QWebPage17downloadRequestedERK15QNetworkRequest @ 285 NONAME - _ZN8QWebPage17javaScriptConfirmEP9QWebFrameRK7QString @ 286 NONAME - _ZN8QWebPage17microFocusChangedEv @ 287 NONAME - _ZN8QWebPage18focusNextPrevChildEb @ 288 NONAME - _ZN8QWebPage18setContentEditableEb @ 289 NONAME - _ZN8QWebPage18unsupportedContentEP13QNetworkReply @ 290 NONAME - _ZN8QWebPage19getStaticMetaObjectEv @ 291 NONAME - _ZN8QWebPage20windowCloseRequestedEv @ 292 NONAME - _ZN8QWebPage21databaseQuotaExceededEP9QWebFrame7QString @ 293 NONAME - _ZN8QWebPage21webInspectorTriggeredERK11QWebElement @ 294 NONAME ABSENT - _ZN8QWebPage23acceptNavigationRequestEP9QWebFrameRK15QNetworkRequestNS_14NavigationTypeE @ 295 NONAME - _ZN8QWebPage23geometryChangeRequestedERK5QRect @ 296 NONAME - _ZN8QWebPage23saveFrameStateRequestedEP9QWebFrameP15QWebHistoryItem @ 297 NONAME - _ZN8QWebPage23setLinkDelegationPolicyENS_20LinkDelegationPolicyE @ 298 NONAME - _ZN8QWebPage23setNetworkAccessManagerEP21QNetworkAccessManager @ 299 NONAME - _ZN8QWebPage23swallowContextMenuEventEP17QContextMenuEvent @ 300 NONAME - _ZN8QWebPage24javaScriptConsoleMessageERK7QStringiS2_ @ 301 NONAME - _ZN8QWebPage25createStandardContextMenuEv @ 302 NONAME - _ZN8QWebPage25shouldInterruptJavaScriptEv @ 303 NONAME - _ZN8QWebPage26restoreFrameStateRequestedEP9QWebFrame @ 304 NONAME - _ZN8QWebPage28setForwardUnsupportedContentEb @ 305 NONAME - _ZN8QWebPage30updatePositionDependentActionsERK6QPoint @ 306 NONAME - _ZN8QWebPage32menuBarVisibilityChangeRequestedEb @ 307 NONAME - _ZN8QWebPage32toolBarVisibilityChangeRequestedEb @ 308 NONAME - _ZN8QWebPage34statusBarVisibilityChangeRequestedEb @ 309 NONAME - _ZN8QWebPage5eventEP6QEvent @ 310 NONAME - _ZN8QWebPage7setViewEP7QWidget @ 311 NONAME - _ZN8QWebPage8findTextERK7QString6QFlagsINS_8FindFlagEE @ 312 NONAME - _ZN8QWebPage9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 313 NONAME - _ZN8QWebPageC1EP7QObject @ 314 NONAME - _ZN8QWebPageC2EP7QObject @ 315 NONAME - _ZN8QWebPageD0Ev @ 316 NONAME - _ZN8QWebPageD1Ev @ 317 NONAME - _ZN8QWebPageD2Ev @ 318 NONAME - _ZN8QWebView10paintEventEP11QPaintEvent @ 319 NONAME - _ZN8QWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 320 NONAME - _ZN8QWebView10urlChangedERK4QUrl @ 321 NONAME - _ZN8QWebView10wheelEventEP11QWheelEvent @ 322 NONAME - _ZN8QWebView11changeEventEP6QEvent @ 323 NONAME - _ZN8QWebView11iconChangedEv @ 324 NONAME - _ZN8QWebView11linkClickedERK4QUrl @ 325 NONAME - _ZN8QWebView11loadStartedEv @ 326 NONAME - _ZN8QWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 327 NONAME - _ZN8QWebView11qt_metacastEPKc @ 328 NONAME - _ZN8QWebView11resizeEventEP12QResizeEvent @ 329 NONAME - _ZN8QWebView12createWindowEN8QWebPage13WebWindowTypeE @ 330 NONAME - _ZN8QWebView12focusInEventEP11QFocusEvent @ 331 NONAME - _ZN8QWebView12loadFinishedEb @ 332 NONAME - _ZN8QWebView12loadProgressEi @ 333 NONAME - _ZN8QWebView12titleChangedERK7QString @ 334 NONAME - _ZN8QWebView13dragMoveEventEP14QDragMoveEvent @ 335 NONAME - _ZN8QWebView13focusOutEventEP11QFocusEvent @ 336 NONAME - _ZN8QWebView13keyPressEventEP9QKeyEvent @ 337 NONAME - _ZN8QWebView13setRenderHintEN8QPainter10RenderHintEb @ 338 NONAME - _ZN8QWebView13setZoomFactorEf @ 339 NONAME - _ZN8QWebView14dragEnterEventEP15QDragEnterEvent @ 340 NONAME - _ZN8QWebView14dragLeaveEventEP15QDragLeaveEvent @ 341 NONAME - _ZN8QWebView14mouseMoveEventEP11QMouseEvent @ 342 NONAME - _ZN8QWebView14setRenderHintsE6QFlagsIN8QPainter10RenderHintEE @ 343 NONAME - _ZN8QWebView15keyReleaseEventEP9QKeyEvent @ 344 NONAME - _ZN8QWebView15mousePressEventEP11QMouseEvent @ 345 NONAME - _ZN8QWebView16contextMenuEventEP17QContextMenuEvent @ 346 NONAME - _ZN8QWebView16inputMethodEventEP17QInputMethodEvent @ 347 NONAME - _ZN8QWebView16selectionChangedEv @ 348 NONAME - _ZN8QWebView16staticMetaObjectE @ 349 NONAME DATA 16 - _ZN8QWebView16statusBarMessageERK7QString @ 350 NONAME - _ZN8QWebView17mouseReleaseEventEP11QMouseEvent @ 351 NONAME - _ZN8QWebView17triggerPageActionEN8QWebPage9WebActionEb @ 352 NONAME - _ZN8QWebView18focusNextPrevChildEb @ 353 NONAME - _ZN8QWebView18guessUrlFromStringERK7QString @ 354 NONAME ABSENT - _ZN8QWebView19getStaticMetaObjectEv @ 355 NONAME - _ZN8QWebView21mouseDoubleClickEventEP11QMouseEvent @ 356 NONAME - _ZN8QWebView21setTextSizeMultiplierEf @ 357 NONAME - _ZN8QWebView4backEv @ 358 NONAME - _ZN8QWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 359 NONAME - _ZN8QWebView4loadERK4QUrl @ 360 NONAME - _ZN8QWebView4stopEv @ 361 NONAME - _ZN8QWebView5eventEP6QEvent @ 362 NONAME - _ZN8QWebView6reloadEv @ 363 NONAME - _ZN8QWebView6setUrlERK4QUrl @ 364 NONAME - _ZN8QWebView7forwardEv @ 365 NONAME - _ZN8QWebView7setHtmlERK7QStringRK4QUrl @ 366 NONAME - _ZN8QWebView7setPageEP8QWebPage @ 367 NONAME - _ZN8QWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 368 NONAME - _ZN8QWebView9dropEventEP10QDropEvent @ 369 NONAME - _ZN8QWebViewC1EP7QWidget @ 370 NONAME - _ZN8QWebViewC2EP7QWidget @ 371 NONAME - _ZN8QWebViewD0Ev @ 372 NONAME - _ZN8QWebViewD1Ev @ 373 NONAME - _ZN8QWebViewD2Ev @ 374 NONAME - _ZN9QWebFrame10setContentERK10QByteArrayRK7QStringRK4QUrl @ 375 NONAME - _ZN9QWebFrame10urlChangedERK4QUrl @ 376 NONAME - _ZN9QWebFrame11iconChangedEv @ 377 NONAME - _ZN9QWebFrame11loadStartedEv @ 378 NONAME - _ZN9QWebFrame11qt_metacallEN11QMetaObject4CallEiPPv @ 379 NONAME - _ZN9QWebFrame11qt_metacastEPKc @ 380 NONAME - _ZN9QWebFrame12loadFinishedEb @ 381 NONAME - _ZN9QWebFrame12titleChangedERK7QString @ 382 NONAME - _ZN9QWebFrame13setZoomFactorEf @ 383 NONAME - _ZN9QWebFrame15provisionalLoadEv @ 384 NONAME - _ZN9QWebFrame16staticMetaObjectE @ 385 NONAME DATA 16 - _ZN9QWebFrame17setScrollBarValueEN2Qt11OrientationEi @ 386 NONAME - _ZN9QWebFrame17setScrollPositionERK6QPoint @ 387 NONAME - _ZN9QWebFrame18evaluateJavaScriptERK7QString @ 388 NONAME - _ZN9QWebFrame18setScrollBarPolicyEN2Qt11OrientationENS0_15ScrollBarPolicyE @ 389 NONAME - _ZN9QWebFrame19contentsSizeChangedERK5QSize @ 390 NONAME - _ZN9QWebFrame19getStaticMetaObjectEv @ 391 NONAME - _ZN9QWebFrame21setTextSizeMultiplierEf @ 392 NONAME - _ZN9QWebFrame22initialLayoutCompletedEv @ 393 NONAME - _ZN9QWebFrame23setClipRenderToViewportEb @ 394 NONAME ABSENT - _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObject @ 395 NONAME - _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObjectN13QScriptEngine14ValueOwnershipE @ 396 NONAME - _ZN9QWebFrame29javaScriptWindowObjectClearedEv @ 397 NONAME - _ZN9QWebFrame4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 398 NONAME - _ZN9QWebFrame4loadERK4QUrl @ 399 NONAME - _ZN9QWebFrame5eventEP6QEvent @ 400 NONAME - _ZN9QWebFrame6renderEP8QPainter @ 401 NONAME - _ZN9QWebFrame6renderEP8QPainterRK7QRegion @ 402 NONAME - _ZN9QWebFrame6scrollEii @ 403 NONAME - _ZN9QWebFrame6setUrlERK4QUrl @ 404 NONAME - _ZN9QWebFrame7setHtmlERK7QStringRK4QUrl @ 405 NONAME - _ZN9QWebFrame8setFocusEv @ 406 NONAME - _ZN9QWebFrameC1EP8QWebPageP13QWebFrameData @ 407 NONAME - _ZN9QWebFrameC1EPS_P13QWebFrameData @ 408 NONAME - _ZN9QWebFrameC2EP8QWebPageP13QWebFrameData @ 409 NONAME - _ZN9QWebFrameC2EPS_P13QWebFrameData @ 410 NONAME - _ZN9QWebFrameD0Ev @ 411 NONAME - _ZN9QWebFrameD1Ev @ 412 NONAME - _ZN9QWebFrameD2Ev @ 413 NONAME - _ZNK11QWebElement10firstChildEv @ 414 NONAME - _ZNK11QWebElement10toInnerXmlEv @ 415 NONAME - _ZNK11QWebElement10toOuterXmlEv @ 416 NONAME - _ZNK11QWebElement11attributeNSERK7QStringS2_S2_ @ 417 NONAME - _ZNK11QWebElement11nextSiblingEv @ 418 NONAME - _ZNK11QWebElement11toPlainTextEv @ 419 NONAME - _ZNK11QWebElement12hasAttributeERK7QString @ 420 NONAME - _ZNK11QWebElement12namespaceUriEv @ 421 NONAME - _ZNK11QWebElement13hasAttributesEv @ 422 NONAME - _ZNK11QWebElement13stylePropertyERK7QStringNS_20StyleResolveStrategyE @ 423 NONAME - _ZNK11QWebElement14hasAttributeNSERK7QStringS2_ @ 424 NONAME - _ZNK11QWebElement15previousSiblingEv @ 425 NONAME - _ZNK11QWebElement5cloneEv @ 426 NONAME - _ZNK11QWebElement6isNullEv @ 427 NONAME - _ZNK11QWebElement6parentEv @ 428 NONAME - _ZNK11QWebElement6prefixEv @ 429 NONAME - _ZNK11QWebElement7classesEv @ 430 NONAME - _ZNK11QWebElement7findAllERK7QString @ 431 NONAME - _ZNK11QWebElement7tagNameEv @ 432 NONAME - _ZNK11QWebElement8documentEv @ 433 NONAME - _ZNK11QWebElement8geometryEv @ 434 NONAME - _ZNK11QWebElement8hasClassERK7QString @ 435 NONAME - _ZNK11QWebElement8hasFocusEv @ 436 NONAME - _ZNK11QWebElement8webFrameEv @ 437 NONAME - _ZNK11QWebElement9attributeERK7QStringS2_ @ 438 NONAME - _ZNK11QWebElement9findFirstERK7QString @ 439 NONAME - _ZNK11QWebElement9lastChildEv @ 440 NONAME - _ZNK11QWebElement9localNameEv @ 441 NONAME - _ZNK11QWebElementeqERKS_ @ 442 NONAME - _ZNK11QWebElementneERKS_ @ 443 NONAME - _ZNK11QWebHistory11currentItemEv @ 444 NONAME - _ZNK11QWebHistory11forwardItemEv @ 445 NONAME - _ZNK11QWebHistory12canGoForwardEv @ 446 NONAME - _ZNK11QWebHistory12forwardItemsEi @ 447 NONAME - _ZNK11QWebHistory16currentItemIndexEv @ 448 NONAME - _ZNK11QWebHistory16maximumItemCountEv @ 449 NONAME - _ZNK11QWebHistory5countEv @ 450 NONAME - _ZNK11QWebHistory5itemsEv @ 451 NONAME - _ZNK11QWebHistory6itemAtEi @ 452 NONAME - _ZNK11QWebHistory8backItemEv @ 453 NONAME - _ZNK11QWebHistory9backItemsEi @ 454 NONAME - _ZNK11QWebHistory9canGoBackEv @ 455 NONAME - _ZNK11QWebHistory9saveStateENS_19HistoryStateVersionE @ 456 NONAME ABSENT - _ZNK12QWebDatabase11displayNameEv @ 457 NONAME - _ZNK12QWebDatabase12expectedSizeEv @ 458 NONAME - _ZNK12QWebDatabase4nameEv @ 459 NONAME - _ZNK12QWebDatabase4sizeEv @ 460 NONAME - _ZNK12QWebDatabase6originEv @ 461 NONAME - _ZNK12QWebDatabase8fileNameEv @ 462 NONAME - _ZNK12QWebSettings10fontFamilyENS_10FontFamilyE @ 463 NONAME - _ZNK12QWebSettings13testAttributeENS_12WebAttributeE @ 464 NONAME - _ZNK12QWebSettings16localStoragePathEv @ 465 NONAME - _ZNK12QWebSettings17userStyleSheetUrlEv @ 466 NONAME - _ZNK12QWebSettings19defaultTextEncodingEv @ 467 NONAME - _ZNK12QWebSettings8fontSizeENS_8FontSizeE @ 468 NONAME - _ZNK13QWebInspector10metaObjectEv @ 469 NONAME - _ZNK13QWebInspector4pageEv @ 470 NONAME - _ZNK13QWebInspector8sizeHintEv @ 471 NONAME - _ZNK14QWebPluginInfo11descriptionEv @ 472 NONAME - _ZNK14QWebPluginInfo16supportsMimeTypeERK7QString @ 473 NONAME - _ZNK14QWebPluginInfo4nameEv @ 474 NONAME - _ZNK14QWebPluginInfo4pathEv @ 475 NONAME - _ZNK14QWebPluginInfo6isNullEv @ 476 NONAME - _ZNK14QWebPluginInfo9isEnabledEv @ 477 NONAME - _ZNK14QWebPluginInfo9mimeTypesEv @ 478 NONAME - _ZNK14QWebPluginInfoeqERKS_ @ 479 NONAME - _ZNK14QWebPluginInfoneERKS_ @ 480 NONAME - _ZNK15QWebHistoryItem11lastVisitedEv @ 481 NONAME - _ZNK15QWebHistoryItem11originalUrlEv @ 482 NONAME - _ZNK15QWebHistoryItem3urlEv @ 483 NONAME - _ZNK15QWebHistoryItem4iconEv @ 484 NONAME - _ZNK15QWebHistoryItem5titleEv @ 485 NONAME - _ZNK15QWebHistoryItem7isValidEv @ 486 NONAME - _ZNK15QWebHistoryItem8userDataEv @ 487 NONAME - _ZNK16QGraphicsWebView10metaObjectEv @ 488 NONAME - _ZNK16QGraphicsWebView10zoomFactorEv @ 489 NONAME - _ZNK16QGraphicsWebView13isInteractiveEv @ 490 NONAME ABSENT - _ZNK16QGraphicsWebView3urlEv @ 491 NONAME - _ZNK16QGraphicsWebView4iconEv @ 492 NONAME - _ZNK16QGraphicsWebView4pageEv @ 493 NONAME - _ZNK16QGraphicsWebView5titleEv @ 494 NONAME - _ZNK16QGraphicsWebView6statusEv @ 495 NONAME ABSENT - _ZNK16QGraphicsWebView6toHtmlEv @ 496 NONAME ABSENT - _ZNK16QGraphicsWebView7historyEv @ 497 NONAME - _ZNK16QGraphicsWebView8progressEv @ 498 NONAME ABSENT - _ZNK16QGraphicsWebView8settingsEv @ 499 NONAME - _ZNK17QWebHitTestResult11linkElementEv @ 500 NONAME - _ZNK17QWebHitTestResult12boundingRectEv @ 501 NONAME - _ZNK17QWebHitTestResult13alternateTextEv @ 502 NONAME - _ZNK17QWebHitTestResult15linkTargetFrameEv @ 503 NONAME - _ZNK17QWebHitTestResult17isContentEditableEv @ 504 NONAME - _ZNK17QWebHitTestResult17isContentSelectedEv @ 505 NONAME - _ZNK17QWebHitTestResult21enclosingBlockElementEv @ 506 NONAME - _ZNK17QWebHitTestResult3posEv @ 507 NONAME - _ZNK17QWebHitTestResult5frameEv @ 508 NONAME - _ZNK17QWebHitTestResult5titleEv @ 509 NONAME - _ZNK17QWebHitTestResult6isNullEv @ 510 NONAME - _ZNK17QWebHitTestResult6pixmapEv @ 511 NONAME - _ZNK17QWebHitTestResult7elementEv @ 512 NONAME - _ZNK17QWebHitTestResult7linkUrlEv @ 513 NONAME - _ZNK17QWebHitTestResult8imageUrlEv @ 514 NONAME - _ZNK17QWebHitTestResult8linkTextEv @ 515 NONAME - _ZNK17QWebHitTestResult9linkTitleEv @ 516 NONAME - _ZNK17QWebPluginFactory10metaObjectEv @ 517 NONAME - _ZNK17QWebPluginFactory17supportsExtensionENS_9ExtensionE @ 518 NONAME - _ZNK17QWebPluginFactory8MimeTypeeqERKS0_ @ 519 NONAME - _ZNK18QWebPluginDatabase10metaObjectEv @ 520 NONAME - _ZNK18QWebPluginDatabase11searchPathsEv @ 521 NONAME - _ZNK18QWebPluginDatabase7pluginsEv @ 522 NONAME - _ZNK18QWebSecurityOrigin13databaseQuotaEv @ 523 NONAME - _ZNK18QWebSecurityOrigin13databaseUsageEv @ 524 NONAME - _ZNK18QWebSecurityOrigin4hostEv @ 525 NONAME - _ZNK18QWebSecurityOrigin4portEv @ 526 NONAME - _ZNK18QWebSecurityOrigin6schemeEv @ 527 NONAME - _ZNK18QWebSecurityOrigin9databasesEv @ 528 NONAME - _ZNK20QWebHistoryInterface10metaObjectEv @ 529 NONAME - _ZNK8QWebPage10isModifiedEv @ 530 NONAME - _ZNK8QWebPage10metaObjectEv @ 531 NONAME - _ZNK8QWebPage10totalBytesEv @ 532 NONAME - _ZNK8QWebPage12currentFrameEv @ 533 NONAME - _ZNK8QWebPage12selectedTextEv @ 534 NONAME - _ZNK8QWebPage12viewportSizeEv @ 535 NONAME - _ZNK8QWebPage13bytesReceivedEv @ 536 NONAME - _ZNK8QWebPage13pluginFactoryEv @ 537 NONAME - _ZNK8QWebPage15setViewportSizeERK5QSize @ 538 NONAME - _ZNK8QWebPage15userAgentForUrlERK4QUrl @ 539 NONAME - _ZNK8QWebPage16inputMethodQueryEN2Qt16InputMethodQueryE @ 540 NONAME - _ZNK8QWebPage17fixedContentsSizeEv @ 541 NONAME ABSENT - _ZNK8QWebPage17isContentEditableEv @ 542 NONAME - _ZNK8QWebPage17supportsExtensionENS_9ExtensionE @ 543 NONAME - _ZNK8QWebPage20linkDelegationPolicyEv @ 544 NONAME - _ZNK8QWebPage20networkAccessManagerEv @ 545 NONAME - _ZNK8QWebPage20setFixedContentsSizeERK5QSize @ 546 NONAME ABSENT - _ZNK8QWebPage25forwardUnsupportedContentEv @ 547 NONAME - _ZNK8QWebPage4viewEv @ 548 NONAME - _ZNK8QWebPage6actionENS_9WebActionE @ 549 NONAME - _ZNK8QWebPage7frameAtERK6QPoint @ 550 NONAME - _ZNK8QWebPage7historyEv @ 551 NONAME - _ZNK8QWebPage7paletteEv @ 552 NONAME - _ZNK8QWebPage8settingsEv @ 553 NONAME - _ZNK8QWebPage9mainFrameEv @ 554 NONAME - _ZNK8QWebPage9undoStackEv @ 555 NONAME - _ZNK8QWebView10isModifiedEv @ 556 NONAME - _ZNK8QWebView10metaObjectEv @ 557 NONAME - _ZNK8QWebView10pageActionEN8QWebPage9WebActionE @ 558 NONAME - _ZNK8QWebView10zoomFactorEv @ 559 NONAME - _ZNK8QWebView11renderHintsEv @ 560 NONAME - _ZNK8QWebView12selectedTextEv @ 561 NONAME - _ZNK8QWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 562 NONAME - _ZNK8QWebView18textSizeMultiplierEv @ 563 NONAME - _ZNK8QWebView3urlEv @ 564 NONAME - _ZNK8QWebView4iconEv @ 565 NONAME - _ZNK8QWebView4pageEv @ 566 NONAME - _ZNK8QWebView5printEP8QPrinter @ 567 NONAME - _ZNK8QWebView5titleEv @ 568 NONAME - _ZNK8QWebView7historyEv @ 569 NONAME - _ZNK8QWebView8settingsEv @ 570 NONAME - _ZNK8QWebView8sizeHintEv @ 571 NONAME - _ZNK9QWebFrame10metaObjectEv @ 572 NONAME - _ZNK9QWebFrame10zoomFactorEv @ 573 NONAME - _ZNK9QWebFrame11childFramesEv @ 574 NONAME - _ZNK9QWebFrame11parentFrameEv @ 575 NONAME - _ZNK9QWebFrame11toPlainTextEv @ 576 NONAME - _ZNK9QWebFrame12contentsSizeEv @ 577 NONAME - _ZNK9QWebFrame12requestedUrlEv @ 578 NONAME - _ZNK9QWebFrame14hitTestContentERK6QPoint @ 579 NONAME - _ZNK9QWebFrame14renderTreeDumpEv @ 580 NONAME - _ZNK9QWebFrame14scrollBarValueEN2Qt11OrientationE @ 581 NONAME - _ZNK9QWebFrame14scrollPositionEv @ 582 NONAME - _ZNK9QWebFrame14securityOriginEv @ 583 NONAME - _ZNK9QWebFrame15documentElementEv @ 584 NONAME - _ZNK9QWebFrame15findAllElementsERK7QString @ 585 NONAME - _ZNK9QWebFrame15scrollBarPolicyEN2Qt11OrientationE @ 586 NONAME - _ZNK9QWebFrame16findFirstElementERK7QString @ 587 NONAME - _ZNK9QWebFrame16scrollBarMaximumEN2Qt11OrientationE @ 588 NONAME - _ZNK9QWebFrame16scrollBarMinimumEN2Qt11OrientationE @ 589 NONAME - _ZNK9QWebFrame17scrollBarGeometryEN2Qt11OrientationE @ 590 NONAME - _ZNK9QWebFrame18textSizeMultiplierEv @ 591 NONAME - _ZNK9QWebFrame20clipRenderToViewportEv @ 592 NONAME ABSENT - _ZNK9QWebFrame3posEv @ 593 NONAME - _ZNK9QWebFrame3urlEv @ 594 NONAME - _ZNK9QWebFrame4iconEv @ 595 NONAME - _ZNK9QWebFrame4pageEv @ 596 NONAME - _ZNK9QWebFrame5titleEv @ 597 NONAME - _ZNK9QWebFrame6toHtmlEv @ 598 NONAME - _ZNK9QWebFrame7baseUrlEv @ 599 NONAME - _ZNK9QWebFrame8geometryEv @ 600 NONAME - _ZNK9QWebFrame8hasFocusEv @ 601 NONAME - _ZNK9QWebFrame8metaDataEv @ 602 NONAME - _ZNK9QWebFrame9frameNameEv @ 603 NONAME - _ZTI13QWebInspector @ 604 NONAME - _ZTI16QGraphicsWebView @ 605 NONAME - _ZTI17QWebPluginFactory @ 606 NONAME - _ZTI18QWebPluginDatabase @ 607 NONAME - _ZTI20QWebHistoryInterface @ 608 NONAME - _ZTI8QWebPage @ 609 NONAME - _ZTI8QWebView @ 610 NONAME - _ZTI9QWebFrame @ 611 NONAME - _ZTV13QWebInspector @ 612 NONAME - _ZTV16QGraphicsWebView @ 613 NONAME - _ZTV17QWebPluginFactory @ 614 NONAME - _ZTV18QWebPluginDatabase @ 615 NONAME - _ZTV20QWebHistoryInterface @ 616 NONAME - _ZTV8QWebPage @ 617 NONAME - _ZTV8QWebView @ 618 NONAME - _ZTV9QWebFrame @ 619 NONAME - _ZThn16_N16QGraphicsWebView11setGeometryERK6QRectF @ 620 NONAME - _ZThn16_N16QGraphicsWebView14updateGeometryEv @ 621 NONAME - _ZThn16_N16QGraphicsWebViewD0Ev @ 622 NONAME - _ZThn16_N16QGraphicsWebViewD1Ev @ 623 NONAME - _ZThn8_N13QWebInspectorD0Ev @ 624 NONAME - _ZThn8_N13QWebInspectorD1Ev @ 625 NONAME - _ZThn8_N16QGraphicsWebView10sceneEventEP6QEvent @ 626 NONAME - _ZThn8_N16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 627 NONAME - _ZThn8_N16QGraphicsWebView12focusInEventEP11QFocusEvent @ 628 NONAME - _ZThn8_N16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 629 NONAME - _ZThn8_N16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 630 NONAME - _ZThn8_N16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 631 NONAME - _ZThn8_N16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 632 NONAME - _ZThn8_N16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 633 NONAME - _ZThn8_N16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 634 NONAME - _ZThn8_N16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 635 NONAME - _ZThn8_N16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 636 NONAME - _ZThn8_N16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 637 NONAME - _ZThn8_N16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 638 NONAME - _ZThn8_N16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 639 NONAME - _ZThn8_N16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 640 NONAME - _ZThn8_N16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 641 NONAME - _ZThn8_N16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 642 NONAME - _ZThn8_N16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 643 NONAME - _ZThn8_N16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 644 NONAME - _ZThn8_N16QGraphicsWebViewD0Ev @ 645 NONAME - _ZThn8_N16QGraphicsWebViewD1Ev @ 646 NONAME - _ZThn8_N8QWebViewD0Ev @ 647 NONAME - _ZThn8_N8QWebViewD1Ev @ 648 NONAME - _ZlsR11QDataStreamRK11QWebHistory @ 649 NONAME - _ZrsR11QDataStreamR11QWebHistory @ 650 NONAME - _Z32qt_drt_whiteListAccessFromOriginRK7QStringS1_S1_b @ 651 NONAME - _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME ABSENT - _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME - _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME - _ZN11QWebElement6renderEP8QPainter @ 655 NONAME - _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT - _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT - _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME - _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME - _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME - _ZN16QGraphicsWebView12loadProgressEi @ 661 NONAME - _ZN16QGraphicsWebView16statusBarMessageERK7QString @ 662 NONAME - _ZN16QGraphicsWebView17triggerPageActionEN8QWebPage9WebActionEb @ 663 NONAME - _ZN16QGraphicsWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 664 NONAME - _ZN21QWebElementCollection6appendERKS_ @ 665 NONAME - _ZN21QWebElementCollectionC1ERK11QWebElementRK7QString @ 666 NONAME - _ZN21QWebElementCollectionC1ERKS_ @ 667 NONAME - _ZN21QWebElementCollectionC1Ev @ 668 NONAME - _ZN21QWebElementCollectionC2ERK11QWebElementRK7QString @ 669 NONAME - _ZN21QWebElementCollectionC2ERKS_ @ 670 NONAME - _ZN21QWebElementCollectionC2Ev @ 671 NONAME - _ZN21QWebElementCollectionD1Ev @ 672 NONAME - _ZN21QWebElementCollectionD2Ev @ 673 NONAME - _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME - _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME - _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT - _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT - _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME - _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME - _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME - _ZNK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 681 NONAME - _ZNK21QWebElementCollection2atEi @ 682 NONAME - _ZNK21QWebElementCollection5countEv @ 683 NONAME - _ZNK21QWebElementCollection6toListEv @ 684 NONAME - _ZNK21QWebElementCollectionplERKS_ @ 685 NONAME - _ZNK8QWebPage21preferredContentsSizeEv @ 686 NONAME - _ZNK8QWebPage24setPreferredContentsSizeERK5QSize @ 687 NONAME - _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME - _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME - _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME - _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME - _Z23qt_networkAccessAllowedb @ 692 NONAME - _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME - _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME - _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME ABSENT - _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 696 NONAME - _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT - _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME - _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME - _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME ABSENT - _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME ABSENT - _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME ABSENT - _Z24qt_drt_workerThreadCountv @ 703 NONAME ABSENT - _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME ABSENT - _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME ABSENT - _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME ABSENT - _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME ABSENT - _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME ABSENT - _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME ABSENT - _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME ABSENT - _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME ABSENT - _ZN9QWebFrame11pageChangedEv @ 712 NONAME - _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME - _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT - _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME - _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME - _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME - _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT - _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME ABSENT - _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME ABSENT - _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME - _ZN23DumpRenderTreeSupportQt16webPageGroupNameEP8QWebPage @ 723 NONAME - _ZN23DumpRenderTreeSupportQt23garbageCollectorCollectEv @ 724 NONAME - _Z32qtwebkit_webframe_scrollOverflowP9QWebFrameiiRK6QPoint @ 725 NONAME - _ZN23DumpRenderTreeSupportQt12setMediaTypeEP9QWebFrameRK7QString @ 726 NONAME - _ZN23DumpRenderTreeSupportQt13numberOfPagesEP9QWebFrameff @ 727 NONAME - _ZN23DumpRenderTreeSupportQt13selectedRangeEP8QWebPage @ 728 NONAME - _ZN23DumpRenderTreeSupportQt14clearFrameNameEP9QWebFrame @ 729 NONAME - _ZN23DumpRenderTreeSupportQt14pauseAnimationEP9QWebFrameRK7QStringdS4_ @ 730 NONAME - _ZN23DumpRenderTreeSupportQt15dumpFrameLoaderEb @ 731 NONAME - _ZN23DumpRenderTreeSupportQt16dumpNotificationEb @ 732 NONAME - _ZN23DumpRenderTreeSupportQt16isCommandEnabledEP8QWebPageRK7QString @ 733 NONAME - _ZN23DumpRenderTreeSupportQt16webInspectorShowEP8QWebPage @ 734 NONAME - _ZN23DumpRenderTreeSupportQt17pauseSVGAnimationEP9QWebFrameRK7QStringdS4_ @ 735 NONAME - _ZN23DumpRenderTreeSupportQt17webInspectorCloseEP8QWebPage @ 736 NONAME - _ZN23DumpRenderTreeSupportQt17workerThreadCountEv @ 737 NONAME - _ZN23DumpRenderTreeSupportQt18hasDocumentElementEP9QWebFrame @ 738 NONAME - _ZN23DumpRenderTreeSupportQt20dumpEditingCallbacksEb @ 739 NONAME - _ZN23DumpRenderTreeSupportQt21markerTextForListItemERK11QWebElement @ 740 NONAME - _ZN23DumpRenderTreeSupportQt22javaScriptObjectsCountEv @ 741 NONAME - _ZN23DumpRenderTreeSupportQt23setCaretBrowsingEnabledEP8QWebPageb @ 742 NONAME - _ZN23DumpRenderTreeSupportQt24executeCoreCommandByNameEP8QWebPageRK7QStringS4_ @ 743 NONAME - _ZN23DumpRenderTreeSupportQt21dumpSetAcceptsEditingEb @ 744 NONAME - _ZN23DumpRenderTreeSupportQt22resumeActiveDOMObjectsEP9QWebFrame @ 745 NONAME - _ZN23DumpRenderTreeSupportQt23suspendActiveDOMObjectsEP9QWebFrame @ 746 NONAME - _ZN23DumpRenderTreeSupportQt24numberOfActiveAnimationsEP9QWebFrame @ 747 NONAME - _ZN23DumpRenderTreeSupportQt24pageNumberForElementByIdEP9QWebFrameRK7QStringff @ 748 NONAME - _ZN23DumpRenderTreeSupportQt25dumpResourceLoadCallbacksEb @ 749 NONAME - _ZN23DumpRenderTreeSupportQt25pauseTransitionOfPropertyEP9QWebFrameRK7QStringdS4_ @ 750 NONAME - _ZN23DumpRenderTreeSupportQt25setFrameFlatteningEnabledEP8QWebPageb @ 751 NONAME - _ZN23DumpRenderTreeSupportQt25webInspectorExecuteScriptEP8QWebPagelRK7QString @ 752 NONAME - _ZN23DumpRenderTreeSupportQt25whiteListAccessFromOriginERK7QStringS2_S2_b @ 753 NONAME - _ZN23DumpRenderTreeSupportQt26counterValueForElementByIdEP9QWebFrameRK7QString @ 754 NONAME - _ZN23DumpRenderTreeSupportQt26firstRectForCharacterRangeEP8QWebPageii @ 755 NONAME - _ZN23DumpRenderTreeSupportQt26overwritePluginDirectoriesEv @ 756 NONAME - _ZN23DumpRenderTreeSupportQt27resetOriginAccessWhiteListsEv @ 757 NONAME - _ZN23DumpRenderTreeSupportQt27setSmartInsertDeleteEnabledEP8QWebPageb @ 758 NONAME - _ZN23DumpRenderTreeSupportQt27setTimelineProfilingEnabledEP8QWebPageb @ 759 NONAME - _ZN23DumpRenderTreeSupportQt28setDumpRenderTreeModeEnabledEb @ 760 NONAME - _ZN23DumpRenderTreeSupportQt29dumpResourceLoadCallbacksPathERK7QString @ 761 NONAME - _ZN23DumpRenderTreeSupportQt29evaluateScriptInIsolatedWorldEP9QWebFrameiRK7QString @ 762 NONAME - _ZN23DumpRenderTreeSupportQt29setJavaScriptProfilingEnabledEP9QWebFrameb @ 763 NONAME - _ZN23DumpRenderTreeSupportQt29setWillSendRequestReturnsNullEb @ 764 NONAME - _ZN23DumpRenderTreeSupportQt30setWillSendRequestClearHeadersERK11QStringList @ 765 NONAME - _ZN23DumpRenderTreeSupportQt33computedStyleIncludingVisitedInfoERK11QWebElement @ 766 NONAME - _ZN23DumpRenderTreeSupportQt34setSelectTrailingWhitespaceEnabledEP8QWebPageb @ 767 NONAME - _ZN23DumpRenderTreeSupportQt39elementDoesAutoCompleteForElementWithIdEP9QWebFrameRK7QString @ 768 NONAME - _ZN23DumpRenderTreeSupportQt39setWillSendRequestReturnsNullOnRedirectEb @ 769 NONAME - _ZN23DumpRenderTreeSupportQt40garbageCollectorCollectOnAlternateThreadEb @ 770 NONAME - _ZN23DumpRenderTreeSupportQt40setDomainRelaxationForbiddenForURLSchemeEbRK7QString @ 771 NONAME - _ZN23DumpRenderTreeSupportQt18setEditingBehaviorEP8QWebPageRK7QString @ 772 NONAME - _ZN23DumpRenderTreeSupportQt24setNotificationsReceiverEP7QObject @ 773 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt26allowNotificationForOriginERK7QString @ 774 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt26setCheckPermissionFunctionEPFvP7QObjectRK4QUrlR22NotificationPermissionE @ 775 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt28setRequestPermissionFunctionEPFvP7QObjectRK7QStringE @ 776 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt31removeWhiteListAccessFromOriginERK7QStringS2_S2_b @ 777 NONAME - _ZN23DumpRenderTreeSupportQt11shouldCloseEP9QWebFrame @ 778 NONAME - _ZN23DumpRenderTreeSupportQt12isTargetItemERK15QWebHistoryItem @ 779 NONAME - _ZN23DumpRenderTreeSupportQt17historyItemTargetERK15QWebHistoryItem @ 780 NONAME - _ZN23DumpRenderTreeSupportQt20getChildHistoryItemsERK15QWebHistoryItem @ 781 NONAME - _ZN23DumpRenderTreeSupportQt23setMockGeolocationErrorEiRK7QString @ 782 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt26setMockGeolocationPositionEddd @ 783 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt17clearScriptWorldsEv @ 784 NONAME - _ZN23DumpRenderTreeSupportQt23setCustomPolicyDelegateEbb @ 785 NONAME - _ZN15QWebScriptWorldC1ERKS_ @ 786 NONAME - _ZN15QWebScriptWorldC1Ev @ 787 NONAME - _ZN15QWebScriptWorldC2ERKS_ @ 788 NONAME - _ZN15QWebScriptWorldC2Ev @ 789 NONAME - _ZN15QWebScriptWorldD1Ev @ 790 NONAME - _ZN15QWebScriptWorldD2Ev @ 791 NONAME - _ZN15QWebScriptWorldaSERKS_ @ 792 NONAME - _ZN23DumpRenderTreeSupportQt29dumpResourceResponseMIMETypesEb @ 793 NONAME - _ZN23DumpRenderTreeSupportQtC1Ev @ 794 NONAME - _ZN23DumpRenderTreeSupportQtC2Ev @ 795 NONAME - _ZN23DumpRenderTreeSupportQtD1Ev @ 796 NONAME - _ZN23DumpRenderTreeSupportQtD2Ev @ 797 NONAME - _ZN8QWebPage23allowGeolocationRequestEP9QWebFrame @ 798 NONAME ABSENT - _ZN8QWebPage23viewportChangeRequestedERKNS_13ViewportHintsE @ 799 NONAME ABSENT - _ZNK15QWebScriptWorld5worldEv @ 800 NONAME - _ZN16QGraphicsWebView13setDeviceSizeERK5QSize @ 801 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt12pagePropertyEP9QWebFrameRK7QStringi @ 802 NONAME - _ZN23DumpRenderTreeSupportQt16isPageBoxVisibleEP9QWebFramei @ 803 NONAME - _ZN23DumpRenderTreeSupportQt16resumeAnimationsEP9QWebFrame @ 804 NONAME - _ZN23DumpRenderTreeSupportQt17addUserStyleSheetEP8QWebPageRK7QString @ 805 NONAME - _ZN23DumpRenderTreeSupportQt17suspendAnimationsEP9QWebFrame @ 806 NONAME - _ZN23DumpRenderTreeSupportQt26pageSizeAndMarginsInPixelsEP9QWebFrameiiiiiii @ 807 NONAME - _ZN23DumpRenderTreeSupportQt28setDeferMainResourceDataLoadEb @ 808 NONAME - _ZN8QWebPage17setUserPermissionEP9QWebFrameNS_16PermissionDomainENS_16PermissionPolicyE @ 809 NONAME ABSENT - _ZN8QWebPage23checkPermissionFromUserEP9QWebFrameNS_16PermissionDomainERNS_16PermissionPolicyE @ 810 NONAME ABSENT - _ZN8QWebPage25requestPermissionFromUserEP9QWebFrameNS_16PermissionDomainE @ 811 NONAME ABSENT - _ZN8QWebPage27cancelRequestsForPermissionEP9QWebFrameNS_16PermissionDomainE @ 812 NONAME ABSENT - _ZNK16QGraphicsWebView10deviceSizeEv @ 813 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageRK5QSize @ 814 NONAME - _ZN23DumpRenderTreeSupportQt32simulateDesktopNotificationClickERK7QString @ 815 NONAME - _ZN8QWebPage23viewportChangeRequestedEv @ 816 NONAME - _ZNK8QWebPage28viewportConfigurationForSizeERK5QSize @ 817 NONAME ABSENT - _ZN23DumpRenderTreeSupportQt20dumpHistoryCallbacksEb @ 818 NONAME - _ZN23DumpRenderTreeSupportQt25dumpVisitedLinksCallbacksEb @ 819 NONAME - _ZN23DumpRenderTreeSupportQt9plainTextERK8QVariant @ 820 NONAME - _ZNK8QWebPage25viewportAttributesForSizeERK5QSize @ 821 NONAME - _ZN8QWebPage18ViewportAttributesC1ERKS0_ @ 822 NONAME - _ZN8QWebPage18ViewportAttributesC1Ev @ 823 NONAME - _ZN8QWebPage18ViewportAttributesC2ERKS0_ @ 824 NONAME - _ZN8QWebPage18ViewportAttributesC2Ev @ 825 NONAME - _ZN8QWebPage18ViewportAttributesD1Ev @ 826 NONAME - _ZN8QWebPage18ViewportAttributesD2Ev @ 827 NONAME - _ZN8QWebPage18ViewportAttributesaSERKS0_ @ 828 NONAME - _ZN23DumpRenderTreeSupportQt13nodesFromRectERK11QWebElementiijjjjb @ 829 NONAME - _ZN23DumpRenderTreeSupportQt28dumpUserGestureInFrameLoaderEb @ 830 NONAME - _ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME - _ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME - _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME - _ZN8QWebPage20setFeaturePermissionEP9QWebFrameNS_7FeatureENS_16PermissionPolicyE @ 834 NONAME - _ZN8QWebPage26featurePermissionRequestedEP9QWebFrameNS_7FeatureE @ 835 NONAME - _ZN8QWebPage32featurePermissionRequestCanceledEP9QWebFrameNS_7FeatureE @ 836 NONAME - _Z33qtwebkit_setPluginCreatedCallbackPFvP9QWebFramePvS1_E @ 837 NONAME - _ZN23DumpRenderTreeSupportQt23setMockGeolocationErrorEP8QWebPageiRK7QString @ 838 NONAME - _ZN23DumpRenderTreeSupportQt26setMockGeolocationPositionEP8QWebPageddd @ 839 NONAME - _ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageiRK5QSizeS4_ @ 840 NONAME - _ZN23DumpRenderTreeSupportQt13nodesFromRectERK11QWebElementiijjjjb @ 841 NONAME - _ZN23DumpRenderTreeSupportQt9plainTextERK8QVariant @ 842 NONAME - _ZN23DumpRenderTreeSupportQt26mediaContentUrlByElementIdEP9QWebFrameRK7QString @ 843 NONAME - _ZNK8QWebPage12hasSelectionEv @ 844 NONAME - _ZNK8QWebPage12selectedHtmlEv @ 845 NONAME - _ZN11QWebElement6renderEP8QPainterRK5QRect @ 846 NONAME +EXPORTS
+ _Z10qt_drt_runb @ 1 NONAME
+ _Z14qWebKitVersionv @ 2 NONAME
+ _Z19qWebKitMajorVersionv @ 3 NONAME
+ _Z19qWebKitMinorVersionv @ 4 NONAME
+ _Z20qt_dump_frame_loaderb @ 5 NONAME
+ _Z20qt_webpage_groupNameP8QWebPage @ 6 NONAME
+ _Z21qt_drt_clearFrameNameP9QWebFrame @ 7 NONAME
+ _Z21qt_drt_pauseAnimationP9QWebFrameRK7QStringdS3_ @ 8 NONAME
+ _Z23qt_webpage_setGroupNameP8QWebPageRK7QString @ 9 NONAME
+ _Z25qt_dump_editing_callbacksb @ 10 NONAME
+ _Z27qt_dump_set_accepts_editingb @ 11 NONAME
+ _Z29qt_drt_javaScriptObjectsCountv @ 12 NONAME
+ _Z31qt_drt_garbageCollector_collectv @ 13 NONAME
+ _Z31qt_drt_numberOfActiveAnimationsP9QWebFrame @ 14 NONAME
+ _Z31qt_dump_resource_load_callbacksb @ 15 NONAME
+ _Z32qt_drt_pauseTransitionOfPropertyP9QWebFrameRK7QStringdS3_ @ 16 NONAME
+ _Z33qt_drt_overwritePluginDirectoriesv @ 17 NONAME
+ _Z36qt_drt_setJavaScriptProfilingEnabledP9QWebFrameb @ 18 NONAME
+ _Z48qt_drt_garbageCollector_collectOnAlternateThreadb @ 19 NONAME
+ _ZN11QWebElement11encloseWithERK7QString @ 20 NONAME
+ _ZN11QWebElement11encloseWithERKS_ @ 21 NONAME
+ _ZN11QWebElement11removeClassERK7QString @ 22 NONAME
+ _ZN11QWebElement11setInnerXmlERK7QString @ 23 NONAME
+ _ZN11QWebElement11setOuterXmlERK7QString @ 24 NONAME
+ _ZN11QWebElement11toggleClassERK7QString @ 25 NONAME
+ _ZN11QWebElement12appendInsideERK7QString @ 26 NONAME
+ _ZN11QWebElement12appendInsideERKS_ @ 27 NONAME
+ _ZN11QWebElement12setAttributeERK7QStringS2_ @ 28 NONAME
+ _ZN11QWebElement12setPlainTextERK7QString @ 29 NONAME
+ _ZN11QWebElement13appendOutsideERK7QString @ 30 NONAME
+ _ZN11QWebElement13appendOutsideERKS_ @ 31 NONAME
+ _ZN11QWebElement13prependInsideERK7QString @ 32 NONAME
+ _ZN11QWebElement13prependInsideERKS_ @ 33 NONAME
+ _ZN11QWebElement14prependOutsideERK7QString @ 34 NONAME
+ _ZN11QWebElement14prependOutsideERKS_ @ 35 NONAME
+ _ZN11QWebElement14removeChildrenEv @ 36 NONAME ABSENT
+ _ZN11QWebElement14setAttributeNSERK7QStringS2_S2_ @ 37 NONAME
+ _ZN11QWebElement15removeAttributeERK7QString @ 38 NONAME
+ _ZN11QWebElement16enclosingElementEPN7WebCore4NodeE @ 39 NONAME
+ _ZN11QWebElement16setStylePropertyERK7QStringS2_ @ 40 NONAME
+ _ZN11QWebElement16takeFromDocumentEv @ 41 NONAME
+ _ZN11QWebElement17removeAttributeNSERK7QStringS2_ @ 42 NONAME
+ _ZN11QWebElement18evaluateJavaScriptERK7QString @ 43 NONAME
+ _ZN11QWebElement18removeFromDocumentEv @ 44 NONAME
+ _ZN11QWebElement19encloseContentsWithERK7QString @ 45 NONAME
+ _ZN11QWebElement19encloseContentsWithERKS_ @ 46 NONAME
+ _ZN11QWebElement7replaceERK7QString @ 47 NONAME
+ _ZN11QWebElement7replaceERKS_ @ 48 NONAME
+ _ZN11QWebElement8addClassERK7QString @ 49 NONAME
+ _ZN11QWebElement8setFocusEv @ 50 NONAME
+ _ZN11QWebElementC1EPN7WebCore4NodeE @ 51 NONAME
+ _ZN11QWebElementC1EPN7WebCore7ElementE @ 52 NONAME
+ _ZN11QWebElementC1ERKS_ @ 53 NONAME
+ _ZN11QWebElementC1Ev @ 54 NONAME
+ _ZN11QWebElementC2EPN7WebCore4NodeE @ 55 NONAME
+ _ZN11QWebElementC2EPN7WebCore7ElementE @ 56 NONAME
+ _ZN11QWebElementC2ERKS_ @ 57 NONAME
+ _ZN11QWebElementC2Ev @ 58 NONAME
+ _ZN11QWebElementD1Ev @ 59 NONAME
+ _ZN11QWebElementD2Ev @ 60 NONAME
+ _ZN11QWebElementaSERKS_ @ 61 NONAME
+ _ZN11QWebHistory12restoreStateERK10QByteArray @ 62 NONAME ABSENT
+ _ZN11QWebHistory19setMaximumItemCountEi @ 63 NONAME
+ _ZN11QWebHistory4backEv @ 64 NONAME
+ _ZN11QWebHistory5clearEv @ 65 NONAME
+ _ZN11QWebHistory7forwardEv @ 66 NONAME
+ _ZN11QWebHistory8goToItemERK15QWebHistoryItem @ 67 NONAME
+ _ZN11QWebHistoryC1Ev @ 68 NONAME
+ _ZN11QWebHistoryC2Ev @ 69 NONAME
+ _ZN11QWebHistoryD1Ev @ 70 NONAME
+ _ZN11QWebHistoryD2Ev @ 71 NONAME
+ _ZN12QWebDatabase14removeDatabaseERKS_ @ 72 NONAME
+ _ZN12QWebDatabase18removeAllDatabasesEv @ 73 NONAME
+ _ZN12QWebDatabaseC1EP19QWebDatabasePrivate @ 74 NONAME
+ _ZN12QWebDatabaseC1ERKS_ @ 75 NONAME
+ _ZN12QWebDatabaseC2EP19QWebDatabasePrivate @ 76 NONAME
+ _ZN12QWebDatabaseC2ERKS_ @ 77 NONAME
+ _ZN12QWebDatabaseD1Ev @ 78 NONAME
+ _ZN12QWebDatabaseD2Ev @ 79 NONAME
+ _ZN12QWebDatabaseaSERKS_ @ 80 NONAME
+ _ZN12QWebSettings10iconForUrlERK4QUrl @ 81 NONAME
+ _ZN12QWebSettings10webGraphicENS_10WebGraphicE @ 82 NONAME
+ _ZN12QWebSettings11setFontSizeENS_8FontSizeEi @ 83 NONAME
+ _ZN12QWebSettings12setAttributeENS_12WebAttributeEb @ 84 NONAME
+ _ZN12QWebSettings13resetFontSizeENS_8FontSizeE @ 85 NONAME
+ _ZN12QWebSettings13setFontFamilyENS_10FontFamilyERK7QString @ 86 NONAME
+ _ZN12QWebSettings13setWebGraphicENS_10WebGraphicERK7QPixmap @ 87 NONAME
+ _ZN12QWebSettings14globalSettingsEv @ 88 NONAME
+ _ZN12QWebSettings14pluginDatabaseEv @ 89 NONAME ABSENT
+ _ZN12QWebSettings14resetAttributeENS_12WebAttributeE @ 90 NONAME
+ _ZN12QWebSettings15resetFontFamilyENS_10FontFamilyE @ 91 NONAME
+ _ZN12QWebSettings16iconDatabasePathEv @ 92 NONAME
+ _ZN12QWebSettings17clearIconDatabaseEv @ 93 NONAME
+ _ZN12QWebSettings17clearMemoryCachesEv @ 94 NONAME
+ _ZN12QWebSettings18offlineStoragePathEv @ 95 NONAME
+ _ZN12QWebSettings19maximumPagesInCacheEv @ 96 NONAME
+ _ZN12QWebSettings19setIconDatabasePathERK7QString @ 97 NONAME
+ _ZN12QWebSettings19setLocalStoragePathERK7QString @ 98 NONAME
+ _ZN12QWebSettings20setUserStyleSheetUrlERK4QUrl @ 99 NONAME
+ _ZN12QWebSettings21setOfflineStoragePathERK7QString @ 100 NONAME
+ _ZN12QWebSettings22setDefaultTextEncodingERK7QString @ 101 NONAME
+ _ZN12QWebSettings22setMaximumPagesInCacheEi @ 102 NONAME
+ _ZN12QWebSettings23enablePersistentStorageERK7QString @ 103 NONAME
+ _ZN12QWebSettings24setObjectCacheCapacitiesEiii @ 104 NONAME
+ _ZN12QWebSettings26offlineStorageDefaultQuotaEv @ 105 NONAME
+ _ZN12QWebSettings29setOfflineStorageDefaultQuotaEx @ 106 NONAME
+ _ZN12QWebSettings30offlineWebApplicationCachePathEv @ 107 NONAME
+ _ZN12QWebSettings31offlineWebApplicationCacheQuotaEv @ 108 NONAME
+ _ZN12QWebSettings33setOfflineWebApplicationCachePathERK7QString @ 109 NONAME
+ _ZN12QWebSettings34setOfflineWebApplicationCacheQuotaEx @ 110 NONAME
+ _ZN12QWebSettingsC1EPN7WebCore8SettingsE @ 111 NONAME
+ _ZN12QWebSettingsC1Ev @ 112 NONAME
+ _ZN12QWebSettingsC2EPN7WebCore8SettingsE @ 113 NONAME
+ _ZN12QWebSettingsC2Ev @ 114 NONAME
+ _ZN12QWebSettingsD1Ev @ 115 NONAME
+ _ZN12QWebSettingsD2Ev @ 116 NONAME
+ _ZN13QWebInspector11qt_metacallEN11QMetaObject4CallEiPPv @ 117 NONAME
+ _ZN13QWebInspector11qt_metacastEPKc @ 118 NONAME
+ _ZN13QWebInspector11resizeEventEP12QResizeEvent @ 119 NONAME
+ _ZN13QWebInspector16staticMetaObjectE @ 120 NONAME DATA 16
+ _ZN13QWebInspector18windowTitleChangedERK7QString @ 121 NONAME ABSENT
+ _ZN13QWebInspector19getStaticMetaObjectEv @ 122 NONAME
+ _ZN13QWebInspector5eventEP6QEvent @ 123 NONAME
+ _ZN13QWebInspector7setPageEP8QWebPage @ 124 NONAME
+ _ZN13QWebInspector9hideEventEP10QHideEvent @ 125 NONAME
+ _ZN13QWebInspector9showEventEP10QShowEvent @ 126 NONAME
+ _ZN13QWebInspectorC1EP7QWidget @ 127 NONAME
+ _ZN13QWebInspectorC2EP7QWidget @ 128 NONAME
+ _ZN13QWebInspectorD0Ev @ 129 NONAME
+ _ZN13QWebInspectorD1Ev @ 130 NONAME
+ _ZN13QWebInspectorD2Ev @ 131 NONAME
+ _ZN14QWebPluginInfo10setEnabledEb @ 132 NONAME
+ _ZN14QWebPluginInfoC1EPN7WebCore13PluginPackageE @ 133 NONAME
+ _ZN14QWebPluginInfoC1ERKS_ @ 134 NONAME
+ _ZN14QWebPluginInfoC1Ev @ 135 NONAME
+ _ZN14QWebPluginInfoC2EPN7WebCore13PluginPackageE @ 136 NONAME
+ _ZN14QWebPluginInfoC2ERKS_ @ 137 NONAME
+ _ZN14QWebPluginInfoC2Ev @ 138 NONAME
+ _ZN14QWebPluginInfoD1Ev @ 139 NONAME
+ _ZN14QWebPluginInfoD2Ev @ 140 NONAME
+ _ZN14QWebPluginInfoaSERKS_ @ 141 NONAME
+ _ZN15QWebHistoryItem11setUserDataERK8QVariant @ 142 NONAME
+ _ZN15QWebHistoryItemC1EP22QWebHistoryItemPrivate @ 143 NONAME
+ _ZN15QWebHistoryItemC1ERKS_ @ 144 NONAME
+ _ZN15QWebHistoryItemC2EP22QWebHistoryItemPrivate @ 145 NONAME
+ _ZN15QWebHistoryItemC2ERKS_ @ 146 NONAME
+ _ZN15QWebHistoryItemD1Ev @ 147 NONAME
+ _ZN15QWebHistoryItemD2Ev @ 148 NONAME
+ _ZN15QWebHistoryItemaSERKS_ @ 149 NONAME
+ _ZN16QGraphicsWebView10loadFailedEv @ 150 NONAME ABSENT
+ _ZN16QGraphicsWebView10sceneEventEP6QEvent @ 151 NONAME
+ _ZN16QGraphicsWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 152 NONAME
+ _ZN16QGraphicsWebView10urlChangedERK4QUrl @ 153 NONAME
+ _ZN16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 154 NONAME
+ _ZN16QGraphicsWebView11iconChangedEv @ 155 NONAME
+ _ZN16QGraphicsWebView11loadStartedEv @ 156 NONAME
+ _ZN16QGraphicsWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 157 NONAME
+ _ZN16QGraphicsWebView11qt_metacastEPKc @ 158 NONAME
+ _ZN16QGraphicsWebView11setGeometryERK6QRectF @ 159 NONAME
+ _ZN16QGraphicsWebView12focusInEventEP11QFocusEvent @ 160 NONAME
+ _ZN16QGraphicsWebView12loadFinishedEv @ 161 NONAME ABSENT
+ _ZN16QGraphicsWebView12titleChangedERK7QString @ 162 NONAME
+ _ZN16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 163 NONAME
+ _ZN16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 164 NONAME
+ _ZN16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 165 NONAME
+ _ZN16QGraphicsWebView13setZoomFactorEf @ 166 NONAME
+ _ZN16QGraphicsWebView13statusChangedEv @ 167 NONAME ABSENT
+ _ZN16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 168 NONAME
+ _ZN16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 169 NONAME
+ _ZN16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 170 NONAME
+ _ZN16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 171 NONAME
+ _ZN16QGraphicsWebView14setInteractiveEb @ 172 NONAME ABSENT
+ _ZN16QGraphicsWebView14updateGeometryEv @ 173 NONAME
+ _ZN16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 174 NONAME
+ _ZN16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 175 NONAME
+ _ZN16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 176 NONAME
+ _ZN16QGraphicsWebView15progressChangedEf @ 177 NONAME ABSENT
+ _ZN16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 178 NONAME
+ _ZN16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 179 NONAME
+ _ZN16QGraphicsWebView16staticMetaObjectE @ 180 NONAME DATA 16
+ _ZN16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 181 NONAME
+ _ZN16QGraphicsWebView17zoomFactorChangedEv @ 182 NONAME ABSENT
+ _ZN16QGraphicsWebView18focusNextPrevChildEb @ 183 NONAME
+ _ZN16QGraphicsWebView19getStaticMetaObjectEv @ 184 NONAME
+ _ZN16QGraphicsWebView20interactivityChangedEv @ 185 NONAME ABSENT
+ _ZN16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 186 NONAME
+ _ZN16QGraphicsWebView4backEv @ 187 NONAME
+ _ZN16QGraphicsWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 188 NONAME
+ _ZN16QGraphicsWebView4loadERK4QUrl @ 189 NONAME
+ _ZN16QGraphicsWebView4stopEv @ 190 NONAME
+ _ZN16QGraphicsWebView5eventEP6QEvent @ 191 NONAME
+ _ZN16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 192 NONAME
+ _ZN16QGraphicsWebView6reloadEv @ 193 NONAME
+ _ZN16QGraphicsWebView6setUrlERK4QUrl @ 194 NONAME
+ _ZN16QGraphicsWebView7forwardEv @ 195 NONAME
+ _ZN16QGraphicsWebView7setHtmlERK7QStringRK4QUrl @ 196 NONAME
+ _ZN16QGraphicsWebView7setPageEP8QWebPage @ 197 NONAME
+ _ZN16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 198 NONAME
+ _ZN16QGraphicsWebViewC1EP13QGraphicsItem @ 199 NONAME
+ _ZN16QGraphicsWebViewC2EP13QGraphicsItem @ 200 NONAME
+ _ZN16QGraphicsWebViewD0Ev @ 201 NONAME
+ _ZN16QGraphicsWebViewD1Ev @ 202 NONAME
+ _ZN16QGraphicsWebViewD2Ev @ 203 NONAME
+ _ZN17QWebHitTestResultC1EP24QWebHitTestResultPrivate @ 204 NONAME
+ _ZN17QWebHitTestResultC1ERKS_ @ 205 NONAME
+ _ZN17QWebHitTestResultC1Ev @ 206 NONAME
+ _ZN17QWebHitTestResultC2EP24QWebHitTestResultPrivate @ 207 NONAME
+ _ZN17QWebHitTestResultC2ERKS_ @ 208 NONAME
+ _ZN17QWebHitTestResultC2Ev @ 209 NONAME
+ _ZN17QWebHitTestResultD1Ev @ 210 NONAME
+ _ZN17QWebHitTestResultD2Ev @ 211 NONAME
+ _ZN17QWebHitTestResultaSERKS_ @ 212 NONAME
+ _ZN17QWebPluginFactory11qt_metacallEN11QMetaObject4CallEiPPv @ 213 NONAME
+ _ZN17QWebPluginFactory11qt_metacastEPKc @ 214 NONAME
+ _ZN17QWebPluginFactory14refreshPluginsEv @ 215 NONAME
+ _ZN17QWebPluginFactory16staticMetaObjectE @ 216 NONAME DATA 16
+ _ZN17QWebPluginFactory19getStaticMetaObjectEv @ 217 NONAME
+ _ZN17QWebPluginFactory9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 218 NONAME
+ _ZN17QWebPluginFactoryC2EP7QObject @ 219 NONAME
+ _ZN17QWebPluginFactoryD0Ev @ 220 NONAME
+ _ZN17QWebPluginFactoryD1Ev @ 221 NONAME
+ _ZN17QWebPluginFactoryD2Ev @ 222 NONAME
+ _ZN18QWebPluginDatabase11qt_metacallEN11QMetaObject4CallEiPPv @ 223 NONAME
+ _ZN18QWebPluginDatabase11qt_metacastEPKc @ 224 NONAME
+ _ZN18QWebPluginDatabase13addSearchPathERK7QString @ 225 NONAME
+ _ZN18QWebPluginDatabase14setSearchPathsERK11QStringList @ 226 NONAME
+ _ZN18QWebPluginDatabase16staticMetaObjectE @ 227 NONAME DATA 16
+ _ZN18QWebPluginDatabase17pluginForMimeTypeERK7QString @ 228 NONAME
+ _ZN18QWebPluginDatabase18defaultSearchPathsEv @ 229 NONAME
+ _ZN18QWebPluginDatabase19getStaticMetaObjectEv @ 230 NONAME
+ _ZN18QWebPluginDatabase29setPreferredPluginForMimeTypeERK7QStringRK14QWebPluginInfo @ 231 NONAME
+ _ZN18QWebPluginDatabase7refreshEv @ 232 NONAME
+ _ZN18QWebPluginDatabaseC1EP7QObject @ 233 NONAME
+ _ZN18QWebPluginDatabaseC2EP7QObject @ 234 NONAME
+ _ZN18QWebPluginDatabaseD0Ev @ 235 NONAME
+ _ZN18QWebPluginDatabaseD1Ev @ 236 NONAME
+ _ZN18QWebPluginDatabaseD2Ev @ 237 NONAME
+ _ZN18QWebSecurityOrigin10allOriginsEv @ 238 NONAME
+ _ZN18QWebSecurityOrigin12localSchemesEv @ 239 NONAME
+ _ZN18QWebSecurityOrigin14addLocalSchemeERK7QString @ 240 NONAME
+ _ZN18QWebSecurityOrigin16setDatabaseQuotaEx @ 241 NONAME
+ _ZN18QWebSecurityOrigin17removeLocalSchemeERK7QString @ 242 NONAME
+ _ZN18QWebSecurityOrigin25whiteListAccessFromOriginERK7QStringS2_S2_b @ 243 NONAME ABSENT
+ _ZN18QWebSecurityOrigin27resetOriginAccessWhiteListsEv @ 244 NONAME ABSENT
+ _ZN18QWebSecurityOriginC1EP25QWebSecurityOriginPrivate @ 245 NONAME
+ _ZN18QWebSecurityOriginC1ERKS_ @ 246 NONAME
+ _ZN18QWebSecurityOriginC2EP25QWebSecurityOriginPrivate @ 247 NONAME
+ _ZN18QWebSecurityOriginC2ERKS_ @ 248 NONAME
+ _ZN18QWebSecurityOriginD1Ev @ 249 NONAME
+ _ZN18QWebSecurityOriginD2Ev @ 250 NONAME
+ _ZN18QWebSecurityOriginaSERKS_ @ 251 NONAME
+ _ZN20QWebHistoryInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 252 NONAME
+ _ZN20QWebHistoryInterface11qt_metacastEPKc @ 253 NONAME
+ _ZN20QWebHistoryInterface16defaultInterfaceEv @ 254 NONAME
+ _ZN20QWebHistoryInterface16staticMetaObjectE @ 255 NONAME DATA 16
+ _ZN20QWebHistoryInterface19getStaticMetaObjectEv @ 256 NONAME
+ _ZN20QWebHistoryInterface19setDefaultInterfaceEPS_ @ 257 NONAME
+ _ZN20QWebHistoryInterfaceC2EP7QObject @ 258 NONAME
+ _ZN20QWebHistoryInterfaceD0Ev @ 259 NONAME
+ _ZN20QWebHistoryInterfaceD1Ev @ 260 NONAME
+ _ZN20QWebHistoryInterfaceD2Ev @ 261 NONAME
+ _ZN8QWebPage10chooseFileEP9QWebFrameRK7QString @ 262 NONAME
+ _ZN8QWebPage10setPaletteERK8QPalette @ 263 NONAME
+ _ZN8QWebPage11linkClickedERK4QUrl @ 264 NONAME
+ _ZN8QWebPage11linkHoveredERK7QStringS2_S2_ @ 265 NONAME
+ _ZN8QWebPage11loadStartedEv @ 266 NONAME
+ _ZN8QWebPage11qt_metacallEN11QMetaObject4CallEiPPv @ 267 NONAME
+ _ZN8QWebPage11qt_metacastEPKc @ 268 NONAME
+ _ZN8QWebPage12createPluginERK7QStringRK4QUrlRK11QStringListS8_ @ 269 NONAME
+ _ZN8QWebPage12createWindowENS_13WebWindowTypeE @ 270 NONAME
+ _ZN8QWebPage12frameCreatedEP9QWebFrame @ 271 NONAME
+ _ZN8QWebPage12loadFinishedEb @ 272 NONAME
+ _ZN8QWebPage12loadProgressEi @ 273 NONAME
+ _ZN8QWebPage13triggerActionENS_9WebActionEb @ 274 NONAME
+ _ZN8QWebPage14printRequestedEP9QWebFrame @ 275 NONAME
+ _ZN8QWebPage15contentsChangedEv @ 276 NONAME
+ _ZN8QWebPage15javaScriptAlertEP9QWebFrameRK7QString @ 277 NONAME
+ _ZN8QWebPage15scrollRequestedEiiRK5QRect @ 278 NONAME
+ _ZN8QWebPage16javaScriptPromptEP9QWebFrameRK7QStringS4_PS2_ @ 279 NONAME
+ _ZN8QWebPage16repaintRequestedERK5QRect @ 280 NONAME
+ _ZN8QWebPage16selectionChangedEv @ 281 NONAME
+ _ZN8QWebPage16setPluginFactoryEP17QWebPluginFactory @ 282 NONAME
+ _ZN8QWebPage16staticMetaObjectE @ 283 NONAME DATA 16
+ _ZN8QWebPage16statusBarMessageERK7QString @ 284 NONAME
+ _ZN8QWebPage17downloadRequestedERK15QNetworkRequest @ 285 NONAME
+ _ZN8QWebPage17javaScriptConfirmEP9QWebFrameRK7QString @ 286 NONAME
+ _ZN8QWebPage17microFocusChangedEv @ 287 NONAME
+ _ZN8QWebPage18focusNextPrevChildEb @ 288 NONAME
+ _ZN8QWebPage18setContentEditableEb @ 289 NONAME
+ _ZN8QWebPage18unsupportedContentEP13QNetworkReply @ 290 NONAME
+ _ZN8QWebPage19getStaticMetaObjectEv @ 291 NONAME
+ _ZN8QWebPage20windowCloseRequestedEv @ 292 NONAME
+ _ZN8QWebPage21databaseQuotaExceededEP9QWebFrame7QString @ 293 NONAME
+ _ZN8QWebPage21webInspectorTriggeredERK11QWebElement @ 294 NONAME ABSENT
+ _ZN8QWebPage23acceptNavigationRequestEP9QWebFrameRK15QNetworkRequestNS_14NavigationTypeE @ 295 NONAME
+ _ZN8QWebPage23geometryChangeRequestedERK5QRect @ 296 NONAME
+ _ZN8QWebPage23saveFrameStateRequestedEP9QWebFrameP15QWebHistoryItem @ 297 NONAME
+ _ZN8QWebPage23setLinkDelegationPolicyENS_20LinkDelegationPolicyE @ 298 NONAME
+ _ZN8QWebPage23setNetworkAccessManagerEP21QNetworkAccessManager @ 299 NONAME
+ _ZN8QWebPage23swallowContextMenuEventEP17QContextMenuEvent @ 300 NONAME
+ _ZN8QWebPage24javaScriptConsoleMessageERK7QStringiS2_ @ 301 NONAME
+ _ZN8QWebPage25createStandardContextMenuEv @ 302 NONAME
+ _ZN8QWebPage25shouldInterruptJavaScriptEv @ 303 NONAME
+ _ZN8QWebPage26restoreFrameStateRequestedEP9QWebFrame @ 304 NONAME
+ _ZN8QWebPage28setForwardUnsupportedContentEb @ 305 NONAME
+ _ZN8QWebPage30updatePositionDependentActionsERK6QPoint @ 306 NONAME
+ _ZN8QWebPage32menuBarVisibilityChangeRequestedEb @ 307 NONAME
+ _ZN8QWebPage32toolBarVisibilityChangeRequestedEb @ 308 NONAME
+ _ZN8QWebPage34statusBarVisibilityChangeRequestedEb @ 309 NONAME
+ _ZN8QWebPage5eventEP6QEvent @ 310 NONAME
+ _ZN8QWebPage7setViewEP7QWidget @ 311 NONAME
+ _ZN8QWebPage8findTextERK7QString6QFlagsINS_8FindFlagEE @ 312 NONAME
+ _ZN8QWebPage9extensionENS_9ExtensionEPKNS_15ExtensionOptionEPNS_15ExtensionReturnE @ 313 NONAME
+ _ZN8QWebPageC1EP7QObject @ 314 NONAME
+ _ZN8QWebPageC2EP7QObject @ 315 NONAME
+ _ZN8QWebPageD0Ev @ 316 NONAME
+ _ZN8QWebPageD1Ev @ 317 NONAME
+ _ZN8QWebPageD2Ev @ 318 NONAME
+ _ZN8QWebView10paintEventEP11QPaintEvent @ 319 NONAME
+ _ZN8QWebView10setContentERK10QByteArrayRK7QStringRK4QUrl @ 320 NONAME
+ _ZN8QWebView10urlChangedERK4QUrl @ 321 NONAME
+ _ZN8QWebView10wheelEventEP11QWheelEvent @ 322 NONAME
+ _ZN8QWebView11changeEventEP6QEvent @ 323 NONAME
+ _ZN8QWebView11iconChangedEv @ 324 NONAME
+ _ZN8QWebView11linkClickedERK4QUrl @ 325 NONAME
+ _ZN8QWebView11loadStartedEv @ 326 NONAME
+ _ZN8QWebView11qt_metacallEN11QMetaObject4CallEiPPv @ 327 NONAME
+ _ZN8QWebView11qt_metacastEPKc @ 328 NONAME
+ _ZN8QWebView11resizeEventEP12QResizeEvent @ 329 NONAME
+ _ZN8QWebView12createWindowEN8QWebPage13WebWindowTypeE @ 330 NONAME
+ _ZN8QWebView12focusInEventEP11QFocusEvent @ 331 NONAME
+ _ZN8QWebView12loadFinishedEb @ 332 NONAME
+ _ZN8QWebView12loadProgressEi @ 333 NONAME
+ _ZN8QWebView12titleChangedERK7QString @ 334 NONAME
+ _ZN8QWebView13dragMoveEventEP14QDragMoveEvent @ 335 NONAME
+ _ZN8QWebView13focusOutEventEP11QFocusEvent @ 336 NONAME
+ _ZN8QWebView13keyPressEventEP9QKeyEvent @ 337 NONAME
+ _ZN8QWebView13setRenderHintEN8QPainter10RenderHintEb @ 338 NONAME
+ _ZN8QWebView13setZoomFactorEf @ 339 NONAME
+ _ZN8QWebView14dragEnterEventEP15QDragEnterEvent @ 340 NONAME
+ _ZN8QWebView14dragLeaveEventEP15QDragLeaveEvent @ 341 NONAME
+ _ZN8QWebView14mouseMoveEventEP11QMouseEvent @ 342 NONAME
+ _ZN8QWebView14setRenderHintsE6QFlagsIN8QPainter10RenderHintEE @ 343 NONAME
+ _ZN8QWebView15keyReleaseEventEP9QKeyEvent @ 344 NONAME
+ _ZN8QWebView15mousePressEventEP11QMouseEvent @ 345 NONAME
+ _ZN8QWebView16contextMenuEventEP17QContextMenuEvent @ 346 NONAME
+ _ZN8QWebView16inputMethodEventEP17QInputMethodEvent @ 347 NONAME
+ _ZN8QWebView16selectionChangedEv @ 348 NONAME
+ _ZN8QWebView16staticMetaObjectE @ 349 NONAME DATA 16
+ _ZN8QWebView16statusBarMessageERK7QString @ 350 NONAME
+ _ZN8QWebView17mouseReleaseEventEP11QMouseEvent @ 351 NONAME
+ _ZN8QWebView17triggerPageActionEN8QWebPage9WebActionEb @ 352 NONAME
+ _ZN8QWebView18focusNextPrevChildEb @ 353 NONAME
+ _ZN8QWebView18guessUrlFromStringERK7QString @ 354 NONAME ABSENT
+ _ZN8QWebView19getStaticMetaObjectEv @ 355 NONAME
+ _ZN8QWebView21mouseDoubleClickEventEP11QMouseEvent @ 356 NONAME
+ _ZN8QWebView21setTextSizeMultiplierEf @ 357 NONAME
+ _ZN8QWebView4backEv @ 358 NONAME
+ _ZN8QWebView4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 359 NONAME
+ _ZN8QWebView4loadERK4QUrl @ 360 NONAME
+ _ZN8QWebView4stopEv @ 361 NONAME
+ _ZN8QWebView5eventEP6QEvent @ 362 NONAME
+ _ZN8QWebView6reloadEv @ 363 NONAME
+ _ZN8QWebView6setUrlERK4QUrl @ 364 NONAME
+ _ZN8QWebView7forwardEv @ 365 NONAME
+ _ZN8QWebView7setHtmlERK7QStringRK4QUrl @ 366 NONAME
+ _ZN8QWebView7setPageEP8QWebPage @ 367 NONAME
+ _ZN8QWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 368 NONAME
+ _ZN8QWebView9dropEventEP10QDropEvent @ 369 NONAME
+ _ZN8QWebViewC1EP7QWidget @ 370 NONAME
+ _ZN8QWebViewC2EP7QWidget @ 371 NONAME
+ _ZN8QWebViewD0Ev @ 372 NONAME
+ _ZN8QWebViewD1Ev @ 373 NONAME
+ _ZN8QWebViewD2Ev @ 374 NONAME
+ _ZN9QWebFrame10setContentERK10QByteArrayRK7QStringRK4QUrl @ 375 NONAME
+ _ZN9QWebFrame10urlChangedERK4QUrl @ 376 NONAME
+ _ZN9QWebFrame11iconChangedEv @ 377 NONAME
+ _ZN9QWebFrame11loadStartedEv @ 378 NONAME
+ _ZN9QWebFrame11qt_metacallEN11QMetaObject4CallEiPPv @ 379 NONAME
+ _ZN9QWebFrame11qt_metacastEPKc @ 380 NONAME
+ _ZN9QWebFrame12loadFinishedEb @ 381 NONAME
+ _ZN9QWebFrame12titleChangedERK7QString @ 382 NONAME
+ _ZN9QWebFrame13setZoomFactorEf @ 383 NONAME
+ _ZN9QWebFrame15provisionalLoadEv @ 384 NONAME
+ _ZN9QWebFrame16staticMetaObjectE @ 385 NONAME DATA 16
+ _ZN9QWebFrame17setScrollBarValueEN2Qt11OrientationEi @ 386 NONAME
+ _ZN9QWebFrame17setScrollPositionERK6QPoint @ 387 NONAME
+ _ZN9QWebFrame18evaluateJavaScriptERK7QString @ 388 NONAME
+ _ZN9QWebFrame18setScrollBarPolicyEN2Qt11OrientationENS0_15ScrollBarPolicyE @ 389 NONAME
+ _ZN9QWebFrame19contentsSizeChangedERK5QSize @ 390 NONAME
+ _ZN9QWebFrame19getStaticMetaObjectEv @ 391 NONAME
+ _ZN9QWebFrame21setTextSizeMultiplierEf @ 392 NONAME
+ _ZN9QWebFrame22initialLayoutCompletedEv @ 393 NONAME
+ _ZN9QWebFrame23setClipRenderToViewportEb @ 394 NONAME ABSENT
+ _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObject @ 395 NONAME
+ _ZN9QWebFrame27addToJavaScriptWindowObjectERK7QStringP7QObjectN13QScriptEngine14ValueOwnershipE @ 396 NONAME
+ _ZN9QWebFrame29javaScriptWindowObjectClearedEv @ 397 NONAME
+ _ZN9QWebFrame4loadERK15QNetworkRequestN21QNetworkAccessManager9OperationERK10QByteArray @ 398 NONAME
+ _ZN9QWebFrame4loadERK4QUrl @ 399 NONAME
+ _ZN9QWebFrame5eventEP6QEvent @ 400 NONAME
+ _ZN9QWebFrame6renderEP8QPainter @ 401 NONAME
+ _ZN9QWebFrame6renderEP8QPainterRK7QRegion @ 402 NONAME
+ _ZN9QWebFrame6scrollEii @ 403 NONAME
+ _ZN9QWebFrame6setUrlERK4QUrl @ 404 NONAME
+ _ZN9QWebFrame7setHtmlERK7QStringRK4QUrl @ 405 NONAME
+ _ZN9QWebFrame8setFocusEv @ 406 NONAME
+ _ZN9QWebFrameC1EP8QWebPageP13QWebFrameData @ 407 NONAME
+ _ZN9QWebFrameC1EPS_P13QWebFrameData @ 408 NONAME
+ _ZN9QWebFrameC2EP8QWebPageP13QWebFrameData @ 409 NONAME
+ _ZN9QWebFrameC2EPS_P13QWebFrameData @ 410 NONAME
+ _ZN9QWebFrameD0Ev @ 411 NONAME
+ _ZN9QWebFrameD1Ev @ 412 NONAME
+ _ZN9QWebFrameD2Ev @ 413 NONAME
+ _ZNK11QWebElement10firstChildEv @ 414 NONAME
+ _ZNK11QWebElement10toInnerXmlEv @ 415 NONAME
+ _ZNK11QWebElement10toOuterXmlEv @ 416 NONAME
+ _ZNK11QWebElement11attributeNSERK7QStringS2_S2_ @ 417 NONAME
+ _ZNK11QWebElement11nextSiblingEv @ 418 NONAME
+ _ZNK11QWebElement11toPlainTextEv @ 419 NONAME
+ _ZNK11QWebElement12hasAttributeERK7QString @ 420 NONAME
+ _ZNK11QWebElement12namespaceUriEv @ 421 NONAME
+ _ZNK11QWebElement13hasAttributesEv @ 422 NONAME
+ _ZNK11QWebElement13stylePropertyERK7QStringNS_20StyleResolveStrategyE @ 423 NONAME
+ _ZNK11QWebElement14hasAttributeNSERK7QStringS2_ @ 424 NONAME
+ _ZNK11QWebElement15previousSiblingEv @ 425 NONAME
+ _ZNK11QWebElement5cloneEv @ 426 NONAME
+ _ZNK11QWebElement6isNullEv @ 427 NONAME
+ _ZNK11QWebElement6parentEv @ 428 NONAME
+ _ZNK11QWebElement6prefixEv @ 429 NONAME
+ _ZNK11QWebElement7classesEv @ 430 NONAME
+ _ZNK11QWebElement7findAllERK7QString @ 431 NONAME
+ _ZNK11QWebElement7tagNameEv @ 432 NONAME
+ _ZNK11QWebElement8documentEv @ 433 NONAME
+ _ZNK11QWebElement8geometryEv @ 434 NONAME
+ _ZNK11QWebElement8hasClassERK7QString @ 435 NONAME
+ _ZNK11QWebElement8hasFocusEv @ 436 NONAME
+ _ZNK11QWebElement8webFrameEv @ 437 NONAME
+ _ZNK11QWebElement9attributeERK7QStringS2_ @ 438 NONAME
+ _ZNK11QWebElement9findFirstERK7QString @ 439 NONAME
+ _ZNK11QWebElement9lastChildEv @ 440 NONAME
+ _ZNK11QWebElement9localNameEv @ 441 NONAME
+ _ZNK11QWebElementeqERKS_ @ 442 NONAME
+ _ZNK11QWebElementneERKS_ @ 443 NONAME
+ _ZNK11QWebHistory11currentItemEv @ 444 NONAME
+ _ZNK11QWebHistory11forwardItemEv @ 445 NONAME
+ _ZNK11QWebHistory12canGoForwardEv @ 446 NONAME
+ _ZNK11QWebHistory12forwardItemsEi @ 447 NONAME
+ _ZNK11QWebHistory16currentItemIndexEv @ 448 NONAME
+ _ZNK11QWebHistory16maximumItemCountEv @ 449 NONAME
+ _ZNK11QWebHistory5countEv @ 450 NONAME
+ _ZNK11QWebHistory5itemsEv @ 451 NONAME
+ _ZNK11QWebHistory6itemAtEi @ 452 NONAME
+ _ZNK11QWebHistory8backItemEv @ 453 NONAME
+ _ZNK11QWebHistory9backItemsEi @ 454 NONAME
+ _ZNK11QWebHistory9canGoBackEv @ 455 NONAME
+ _ZNK11QWebHistory9saveStateENS_19HistoryStateVersionE @ 456 NONAME ABSENT
+ _ZNK12QWebDatabase11displayNameEv @ 457 NONAME
+ _ZNK12QWebDatabase12expectedSizeEv @ 458 NONAME
+ _ZNK12QWebDatabase4nameEv @ 459 NONAME
+ _ZNK12QWebDatabase4sizeEv @ 460 NONAME
+ _ZNK12QWebDatabase6originEv @ 461 NONAME
+ _ZNK12QWebDatabase8fileNameEv @ 462 NONAME
+ _ZNK12QWebSettings10fontFamilyENS_10FontFamilyE @ 463 NONAME
+ _ZNK12QWebSettings13testAttributeENS_12WebAttributeE @ 464 NONAME
+ _ZNK12QWebSettings16localStoragePathEv @ 465 NONAME
+ _ZNK12QWebSettings17userStyleSheetUrlEv @ 466 NONAME
+ _ZNK12QWebSettings19defaultTextEncodingEv @ 467 NONAME
+ _ZNK12QWebSettings8fontSizeENS_8FontSizeE @ 468 NONAME
+ _ZNK13QWebInspector10metaObjectEv @ 469 NONAME
+ _ZNK13QWebInspector4pageEv @ 470 NONAME
+ _ZNK13QWebInspector8sizeHintEv @ 471 NONAME
+ _ZNK14QWebPluginInfo11descriptionEv @ 472 NONAME
+ _ZNK14QWebPluginInfo16supportsMimeTypeERK7QString @ 473 NONAME
+ _ZNK14QWebPluginInfo4nameEv @ 474 NONAME
+ _ZNK14QWebPluginInfo4pathEv @ 475 NONAME
+ _ZNK14QWebPluginInfo6isNullEv @ 476 NONAME
+ _ZNK14QWebPluginInfo9isEnabledEv @ 477 NONAME
+ _ZNK14QWebPluginInfo9mimeTypesEv @ 478 NONAME
+ _ZNK14QWebPluginInfoeqERKS_ @ 479 NONAME
+ _ZNK14QWebPluginInfoneERKS_ @ 480 NONAME
+ _ZNK15QWebHistoryItem11lastVisitedEv @ 481 NONAME
+ _ZNK15QWebHistoryItem11originalUrlEv @ 482 NONAME
+ _ZNK15QWebHistoryItem3urlEv @ 483 NONAME
+ _ZNK15QWebHistoryItem4iconEv @ 484 NONAME
+ _ZNK15QWebHistoryItem5titleEv @ 485 NONAME
+ _ZNK15QWebHistoryItem7isValidEv @ 486 NONAME
+ _ZNK15QWebHistoryItem8userDataEv @ 487 NONAME
+ _ZNK16QGraphicsWebView10metaObjectEv @ 488 NONAME
+ _ZNK16QGraphicsWebView10zoomFactorEv @ 489 NONAME
+ _ZNK16QGraphicsWebView13isInteractiveEv @ 490 NONAME ABSENT
+ _ZNK16QGraphicsWebView3urlEv @ 491 NONAME
+ _ZNK16QGraphicsWebView4iconEv @ 492 NONAME
+ _ZNK16QGraphicsWebView4pageEv @ 493 NONAME
+ _ZNK16QGraphicsWebView5titleEv @ 494 NONAME
+ _ZNK16QGraphicsWebView6statusEv @ 495 NONAME ABSENT
+ _ZNK16QGraphicsWebView6toHtmlEv @ 496 NONAME ABSENT
+ _ZNK16QGraphicsWebView7historyEv @ 497 NONAME
+ _ZNK16QGraphicsWebView8progressEv @ 498 NONAME ABSENT
+ _ZNK16QGraphicsWebView8settingsEv @ 499 NONAME
+ _ZNK17QWebHitTestResult11linkElementEv @ 500 NONAME
+ _ZNK17QWebHitTestResult12boundingRectEv @ 501 NONAME
+ _ZNK17QWebHitTestResult13alternateTextEv @ 502 NONAME
+ _ZNK17QWebHitTestResult15linkTargetFrameEv @ 503 NONAME
+ _ZNK17QWebHitTestResult17isContentEditableEv @ 504 NONAME
+ _ZNK17QWebHitTestResult17isContentSelectedEv @ 505 NONAME
+ _ZNK17QWebHitTestResult21enclosingBlockElementEv @ 506 NONAME
+ _ZNK17QWebHitTestResult3posEv @ 507 NONAME
+ _ZNK17QWebHitTestResult5frameEv @ 508 NONAME
+ _ZNK17QWebHitTestResult5titleEv @ 509 NONAME
+ _ZNK17QWebHitTestResult6isNullEv @ 510 NONAME
+ _ZNK17QWebHitTestResult6pixmapEv @ 511 NONAME
+ _ZNK17QWebHitTestResult7elementEv @ 512 NONAME
+ _ZNK17QWebHitTestResult7linkUrlEv @ 513 NONAME
+ _ZNK17QWebHitTestResult8imageUrlEv @ 514 NONAME
+ _ZNK17QWebHitTestResult8linkTextEv @ 515 NONAME
+ _ZNK17QWebHitTestResult9linkTitleEv @ 516 NONAME
+ _ZNK17QWebPluginFactory10metaObjectEv @ 517 NONAME
+ _ZNK17QWebPluginFactory17supportsExtensionENS_9ExtensionE @ 518 NONAME
+ _ZNK17QWebPluginFactory8MimeTypeeqERKS0_ @ 519 NONAME
+ _ZNK18QWebPluginDatabase10metaObjectEv @ 520 NONAME
+ _ZNK18QWebPluginDatabase11searchPathsEv @ 521 NONAME
+ _ZNK18QWebPluginDatabase7pluginsEv @ 522 NONAME
+ _ZNK18QWebSecurityOrigin13databaseQuotaEv @ 523 NONAME
+ _ZNK18QWebSecurityOrigin13databaseUsageEv @ 524 NONAME
+ _ZNK18QWebSecurityOrigin4hostEv @ 525 NONAME
+ _ZNK18QWebSecurityOrigin4portEv @ 526 NONAME
+ _ZNK18QWebSecurityOrigin6schemeEv @ 527 NONAME
+ _ZNK18QWebSecurityOrigin9databasesEv @ 528 NONAME
+ _ZNK20QWebHistoryInterface10metaObjectEv @ 529 NONAME
+ _ZNK8QWebPage10isModifiedEv @ 530 NONAME
+ _ZNK8QWebPage10metaObjectEv @ 531 NONAME
+ _ZNK8QWebPage10totalBytesEv @ 532 NONAME
+ _ZNK8QWebPage12currentFrameEv @ 533 NONAME
+ _ZNK8QWebPage12selectedTextEv @ 534 NONAME
+ _ZNK8QWebPage12viewportSizeEv @ 535 NONAME
+ _ZNK8QWebPage13bytesReceivedEv @ 536 NONAME
+ _ZNK8QWebPage13pluginFactoryEv @ 537 NONAME
+ _ZNK8QWebPage15setViewportSizeERK5QSize @ 538 NONAME
+ _ZNK8QWebPage15userAgentForUrlERK4QUrl @ 539 NONAME
+ _ZNK8QWebPage16inputMethodQueryEN2Qt16InputMethodQueryE @ 540 NONAME
+ _ZNK8QWebPage17fixedContentsSizeEv @ 541 NONAME ABSENT
+ _ZNK8QWebPage17isContentEditableEv @ 542 NONAME
+ _ZNK8QWebPage17supportsExtensionENS_9ExtensionE @ 543 NONAME
+ _ZNK8QWebPage20linkDelegationPolicyEv @ 544 NONAME
+ _ZNK8QWebPage20networkAccessManagerEv @ 545 NONAME
+ _ZNK8QWebPage20setFixedContentsSizeERK5QSize @ 546 NONAME ABSENT
+ _ZNK8QWebPage25forwardUnsupportedContentEv @ 547 NONAME
+ _ZNK8QWebPage4viewEv @ 548 NONAME
+ _ZNK8QWebPage6actionENS_9WebActionE @ 549 NONAME
+ _ZNK8QWebPage7frameAtERK6QPoint @ 550 NONAME
+ _ZNK8QWebPage7historyEv @ 551 NONAME
+ _ZNK8QWebPage7paletteEv @ 552 NONAME
+ _ZNK8QWebPage8settingsEv @ 553 NONAME
+ _ZNK8QWebPage9mainFrameEv @ 554 NONAME
+ _ZNK8QWebPage9undoStackEv @ 555 NONAME
+ _ZNK8QWebView10isModifiedEv @ 556 NONAME
+ _ZNK8QWebView10metaObjectEv @ 557 NONAME
+ _ZNK8QWebView10pageActionEN8QWebPage9WebActionE @ 558 NONAME
+ _ZNK8QWebView10zoomFactorEv @ 559 NONAME
+ _ZNK8QWebView11renderHintsEv @ 560 NONAME
+ _ZNK8QWebView12selectedTextEv @ 561 NONAME
+ _ZNK8QWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 562 NONAME
+ _ZNK8QWebView18textSizeMultiplierEv @ 563 NONAME
+ _ZNK8QWebView3urlEv @ 564 NONAME
+ _ZNK8QWebView4iconEv @ 565 NONAME
+ _ZNK8QWebView4pageEv @ 566 NONAME
+ _ZNK8QWebView5printEP8QPrinter @ 567 NONAME
+ _ZNK8QWebView5titleEv @ 568 NONAME
+ _ZNK8QWebView7historyEv @ 569 NONAME
+ _ZNK8QWebView8settingsEv @ 570 NONAME
+ _ZNK8QWebView8sizeHintEv @ 571 NONAME
+ _ZNK9QWebFrame10metaObjectEv @ 572 NONAME
+ _ZNK9QWebFrame10zoomFactorEv @ 573 NONAME
+ _ZNK9QWebFrame11childFramesEv @ 574 NONAME
+ _ZNK9QWebFrame11parentFrameEv @ 575 NONAME
+ _ZNK9QWebFrame11toPlainTextEv @ 576 NONAME
+ _ZNK9QWebFrame12contentsSizeEv @ 577 NONAME
+ _ZNK9QWebFrame12requestedUrlEv @ 578 NONAME
+ _ZNK9QWebFrame14hitTestContentERK6QPoint @ 579 NONAME
+ _ZNK9QWebFrame14renderTreeDumpEv @ 580 NONAME
+ _ZNK9QWebFrame14scrollBarValueEN2Qt11OrientationE @ 581 NONAME
+ _ZNK9QWebFrame14scrollPositionEv @ 582 NONAME
+ _ZNK9QWebFrame14securityOriginEv @ 583 NONAME
+ _ZNK9QWebFrame15documentElementEv @ 584 NONAME
+ _ZNK9QWebFrame15findAllElementsERK7QString @ 585 NONAME
+ _ZNK9QWebFrame15scrollBarPolicyEN2Qt11OrientationE @ 586 NONAME
+ _ZNK9QWebFrame16findFirstElementERK7QString @ 587 NONAME
+ _ZNK9QWebFrame16scrollBarMaximumEN2Qt11OrientationE @ 588 NONAME
+ _ZNK9QWebFrame16scrollBarMinimumEN2Qt11OrientationE @ 589 NONAME
+ _ZNK9QWebFrame17scrollBarGeometryEN2Qt11OrientationE @ 590 NONAME
+ _ZNK9QWebFrame18textSizeMultiplierEv @ 591 NONAME
+ _ZNK9QWebFrame20clipRenderToViewportEv @ 592 NONAME ABSENT
+ _ZNK9QWebFrame3posEv @ 593 NONAME
+ _ZNK9QWebFrame3urlEv @ 594 NONAME
+ _ZNK9QWebFrame4iconEv @ 595 NONAME
+ _ZNK9QWebFrame4pageEv @ 596 NONAME
+ _ZNK9QWebFrame5titleEv @ 597 NONAME
+ _ZNK9QWebFrame6toHtmlEv @ 598 NONAME
+ _ZNK9QWebFrame7baseUrlEv @ 599 NONAME
+ _ZNK9QWebFrame8geometryEv @ 600 NONAME
+ _ZNK9QWebFrame8hasFocusEv @ 601 NONAME
+ _ZNK9QWebFrame8metaDataEv @ 602 NONAME
+ _ZNK9QWebFrame9frameNameEv @ 603 NONAME
+ _ZTI13QWebInspector @ 604 NONAME
+ _ZTI16QGraphicsWebView @ 605 NONAME
+ _ZTI17QWebPluginFactory @ 606 NONAME
+ _ZTI18QWebPluginDatabase @ 607 NONAME
+ _ZTI20QWebHistoryInterface @ 608 NONAME
+ _ZTI8QWebPage @ 609 NONAME
+ _ZTI8QWebView @ 610 NONAME
+ _ZTI9QWebFrame @ 611 NONAME
+ _ZTV13QWebInspector @ 612 NONAME
+ _ZTV16QGraphicsWebView @ 613 NONAME
+ _ZTV17QWebPluginFactory @ 614 NONAME
+ _ZTV18QWebPluginDatabase @ 615 NONAME
+ _ZTV20QWebHistoryInterface @ 616 NONAME
+ _ZTV8QWebPage @ 617 NONAME
+ _ZTV8QWebView @ 618 NONAME
+ _ZTV9QWebFrame @ 619 NONAME
+ _ZThn16_N16QGraphicsWebView11setGeometryERK6QRectF @ 620 NONAME
+ _ZThn16_N16QGraphicsWebView14updateGeometryEv @ 621 NONAME
+ _ZThn16_N16QGraphicsWebViewD0Ev @ 622 NONAME
+ _ZThn16_N16QGraphicsWebViewD1Ev @ 623 NONAME
+ _ZThn8_N13QWebInspectorD0Ev @ 624 NONAME
+ _ZThn8_N13QWebInspectorD1Ev @ 625 NONAME
+ _ZThn8_N16QGraphicsWebView10sceneEventEP6QEvent @ 626 NONAME
+ _ZThn8_N16QGraphicsWebView10wheelEventEP24QGraphicsSceneWheelEvent @ 627 NONAME
+ _ZThn8_N16QGraphicsWebView12focusInEventEP11QFocusEvent @ 628 NONAME
+ _ZThn8_N16QGraphicsWebView13dragMoveEventEP27QGraphicsSceneDragDropEvent @ 629 NONAME
+ _ZThn8_N16QGraphicsWebView13focusOutEventEP11QFocusEvent @ 630 NONAME
+ _ZThn8_N16QGraphicsWebView13keyPressEventEP9QKeyEvent @ 631 NONAME
+ _ZThn8_N16QGraphicsWebView14dragEnterEventEP27QGraphicsSceneDragDropEvent @ 632 NONAME
+ _ZThn8_N16QGraphicsWebView14dragLeaveEventEP27QGraphicsSceneDragDropEvent @ 633 NONAME
+ _ZThn8_N16QGraphicsWebView14hoverMoveEventEP24QGraphicsSceneHoverEvent @ 634 NONAME
+ _ZThn8_N16QGraphicsWebView14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 635 NONAME
+ _ZThn8_N16QGraphicsWebView15hoverLeaveEventEP24QGraphicsSceneHoverEvent @ 636 NONAME
+ _ZThn8_N16QGraphicsWebView15keyReleaseEventEP9QKeyEvent @ 637 NONAME
+ _ZThn8_N16QGraphicsWebView15mousePressEventEP24QGraphicsSceneMouseEvent @ 638 NONAME
+ _ZThn8_N16QGraphicsWebView16contextMenuEventEP30QGraphicsSceneContextMenuEvent @ 639 NONAME
+ _ZThn8_N16QGraphicsWebView16inputMethodEventEP17QInputMethodEvent @ 640 NONAME
+ _ZThn8_N16QGraphicsWebView17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 641 NONAME
+ _ZThn8_N16QGraphicsWebView21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 642 NONAME
+ _ZThn8_N16QGraphicsWebView5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 643 NONAME
+ _ZThn8_N16QGraphicsWebView9dropEventEP27QGraphicsSceneDragDropEvent @ 644 NONAME
+ _ZThn8_N16QGraphicsWebViewD0Ev @ 645 NONAME
+ _ZThn8_N16QGraphicsWebViewD1Ev @ 646 NONAME
+ _ZThn8_N8QWebViewD0Ev @ 647 NONAME
+ _ZThn8_N8QWebViewD1Ev @ 648 NONAME
+ _ZlsR11QDataStreamRK11QWebHistory @ 649 NONAME
+ _ZrsR11QDataStreamR11QWebHistory @ 650 NONAME
+ _Z32qt_drt_whiteListAccessFromOriginRK7QStringS1_S1_b @ 651 NONAME
+ _Z33qt_drt_counterValueForElementByIdP9QWebFrameRK7QString @ 652 NONAME ABSENT
+ _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME
+ _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME
+ _ZN11QWebElement6renderEP8QPainter @ 655 NONAME
+ _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT
+ _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT
+ _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME
+ _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME
+ _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME
+ _ZN16QGraphicsWebView12loadProgressEi @ 661 NONAME
+ _ZN16QGraphicsWebView16statusBarMessageERK7QString @ 662 NONAME
+ _ZN16QGraphicsWebView17triggerPageActionEN8QWebPage9WebActionEb @ 663 NONAME
+ _ZN16QGraphicsWebView8findTextERK7QString6QFlagsIN8QWebPage8FindFlagEE @ 664 NONAME
+ _ZN21QWebElementCollection6appendERKS_ @ 665 NONAME
+ _ZN21QWebElementCollectionC1ERK11QWebElementRK7QString @ 666 NONAME
+ _ZN21QWebElementCollectionC1ERKS_ @ 667 NONAME
+ _ZN21QWebElementCollectionC1Ev @ 668 NONAME
+ _ZN21QWebElementCollectionC2ERK11QWebElementRK7QString @ 669 NONAME
+ _ZN21QWebElementCollectionC2ERKS_ @ 670 NONAME
+ _ZN21QWebElementCollectionC2Ev @ 671 NONAME
+ _ZN21QWebElementCollectionD1Ev @ 672 NONAME
+ _ZN21QWebElementCollectionD2Ev @ 673 NONAME
+ _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME
+ _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME
+ _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT
+ _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT
+ _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME
+ _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME
+ _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME
+ _ZNK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 681 NONAME
+ _ZNK21QWebElementCollection2atEi @ 682 NONAME
+ _ZNK21QWebElementCollection5countEv @ 683 NONAME
+ _ZNK21QWebElementCollection6toListEv @ 684 NONAME
+ _ZNK21QWebElementCollectionplERKS_ @ 685 NONAME
+ _ZNK8QWebPage21preferredContentsSizeEv @ 686 NONAME
+ _ZNK8QWebPage24setPreferredContentsSizeERK5QSize @ 687 NONAME
+ _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME
+ _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME
+ _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME
+ _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME
+ _Z23qt_networkAccessAllowedb @ 692 NONAME
+ _Z25qt_resumeActiveDOMObjectsP9QWebFrame @ 693 NONAME
+ _Z26qt_suspendActiveDOMObjectsP9QWebFrame @ 694 NONAME
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameii @ 695 NONAME ABSENT
+ _Z35qtwebkit_webframe_scrollRecursivelyP9QWebFrameiiRK6QPoint @ 696 NONAME
+ _ZN9QWebFrame17scrollRecursivelyEii @ 697 NONAME ABSENT
+ _ZN16QGraphicsWebView20setResizesToContentsEb @ 698 NONAME
+ _ZNK16QGraphicsWebView17resizesToContentsEv @ 699 NONAME
+ _Z20qt_drt_numberOfPagesP9QWebFrameff @ 700 NONAME ABSENT
+ _Z24qt_drt_pauseSVGAnimationP9QWebFrameRK7QStringdS3_ @ 701 NONAME ABSENT
+ _Z24qt_drt_webinspector_showP8QWebPage @ 702 NONAME ABSENT
+ _Z24qt_drt_workerThreadCountv @ 703 NONAME ABSENT
+ _Z25qt_drt_hasDocumentElementP9QWebFrame @ 704 NONAME ABSENT
+ _Z25qt_drt_webinspector_closeP8QWebPage @ 705 NONAME ABSENT
+ _Z31qt_drt_pageNumberForElementByIdP9QWebFrameRK7QStringff @ 706 NONAME ABSENT
+ _Z33qt_drt_webinspector_executeScriptP8QWebPagelRK7QString @ 707 NONAME ABSENT
+ _Z34qt_drt_setTimelineProfilingEnabledP8QWebPageb @ 708 NONAME ABSENT
+ _Z32qt_drt_setFrameFlatteningEnabledP8QWebPageb @ 709 NONAME ABSENT
+ _Z36qt_drt_evaluateScriptInIsolatedWorldP9QWebFrameiRK7QString @ 710 NONAME ABSENT
+ _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME ABSENT
+ _ZN9QWebFrame11pageChangedEv @ 712 NONAME
+ _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME
+ _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT
+ _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME
+ _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME
+ _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME
+ _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT
+ _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME ABSENT
+ _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME ABSENT
+ _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME
+ _ZN23DumpRenderTreeSupportQt16webPageGroupNameEP8QWebPage @ 723 NONAME
+ _ZN23DumpRenderTreeSupportQt23garbageCollectorCollectEv @ 724 NONAME
+ _Z32qtwebkit_webframe_scrollOverflowP9QWebFrameiiRK6QPoint @ 725 NONAME
+ _ZN23DumpRenderTreeSupportQt12setMediaTypeEP9QWebFrameRK7QString @ 726 NONAME
+ _ZN23DumpRenderTreeSupportQt13numberOfPagesEP9QWebFrameff @ 727 NONAME
+ _ZN23DumpRenderTreeSupportQt13selectedRangeEP8QWebPage @ 728 NONAME
+ _ZN23DumpRenderTreeSupportQt14clearFrameNameEP9QWebFrame @ 729 NONAME
+ _ZN23DumpRenderTreeSupportQt14pauseAnimationEP9QWebFrameRK7QStringdS4_ @ 730 NONAME
+ _ZN23DumpRenderTreeSupportQt15dumpFrameLoaderEb @ 731 NONAME
+ _ZN23DumpRenderTreeSupportQt16dumpNotificationEb @ 732 NONAME
+ _ZN23DumpRenderTreeSupportQt16isCommandEnabledEP8QWebPageRK7QString @ 733 NONAME
+ _ZN23DumpRenderTreeSupportQt16webInspectorShowEP8QWebPage @ 734 NONAME
+ _ZN23DumpRenderTreeSupportQt17pauseSVGAnimationEP9QWebFrameRK7QStringdS4_ @ 735 NONAME
+ _ZN23DumpRenderTreeSupportQt17webInspectorCloseEP8QWebPage @ 736 NONAME
+ _ZN23DumpRenderTreeSupportQt17workerThreadCountEv @ 737 NONAME
+ _ZN23DumpRenderTreeSupportQt18hasDocumentElementEP9QWebFrame @ 738 NONAME
+ _ZN23DumpRenderTreeSupportQt20dumpEditingCallbacksEb @ 739 NONAME
+ _ZN23DumpRenderTreeSupportQt21markerTextForListItemERK11QWebElement @ 740 NONAME
+ _ZN23DumpRenderTreeSupportQt22javaScriptObjectsCountEv @ 741 NONAME
+ _ZN23DumpRenderTreeSupportQt23setCaretBrowsingEnabledEP8QWebPageb @ 742 NONAME
+ _ZN23DumpRenderTreeSupportQt24executeCoreCommandByNameEP8QWebPageRK7QStringS4_ @ 743 NONAME
+ _ZN23DumpRenderTreeSupportQt21dumpSetAcceptsEditingEb @ 744 NONAME
+ _ZN23DumpRenderTreeSupportQt22resumeActiveDOMObjectsEP9QWebFrame @ 745 NONAME
+ _ZN23DumpRenderTreeSupportQt23suspendActiveDOMObjectsEP9QWebFrame @ 746 NONAME
+ _ZN23DumpRenderTreeSupportQt24numberOfActiveAnimationsEP9QWebFrame @ 747 NONAME
+ _ZN23DumpRenderTreeSupportQt24pageNumberForElementByIdEP9QWebFrameRK7QStringff @ 748 NONAME
+ _ZN23DumpRenderTreeSupportQt25dumpResourceLoadCallbacksEb @ 749 NONAME
+ _ZN23DumpRenderTreeSupportQt25pauseTransitionOfPropertyEP9QWebFrameRK7QStringdS4_ @ 750 NONAME
+ _ZN23DumpRenderTreeSupportQt25setFrameFlatteningEnabledEP8QWebPageb @ 751 NONAME
+ _ZN23DumpRenderTreeSupportQt25webInspectorExecuteScriptEP8QWebPagelRK7QString @ 752 NONAME
+ _ZN23DumpRenderTreeSupportQt25whiteListAccessFromOriginERK7QStringS2_S2_b @ 753 NONAME
+ _ZN23DumpRenderTreeSupportQt26counterValueForElementByIdEP9QWebFrameRK7QString @ 754 NONAME
+ _ZN23DumpRenderTreeSupportQt26firstRectForCharacterRangeEP8QWebPageii @ 755 NONAME
+ _ZN23DumpRenderTreeSupportQt26overwritePluginDirectoriesEv @ 756 NONAME
+ _ZN23DumpRenderTreeSupportQt27resetOriginAccessWhiteListsEv @ 757 NONAME
+ _ZN23DumpRenderTreeSupportQt27setSmartInsertDeleteEnabledEP8QWebPageb @ 758 NONAME
+ _ZN23DumpRenderTreeSupportQt27setTimelineProfilingEnabledEP8QWebPageb @ 759 NONAME
+ _ZN23DumpRenderTreeSupportQt28setDumpRenderTreeModeEnabledEb @ 760 NONAME
+ _ZN23DumpRenderTreeSupportQt29dumpResourceLoadCallbacksPathERK7QString @ 761 NONAME
+ _ZN23DumpRenderTreeSupportQt29evaluateScriptInIsolatedWorldEP9QWebFrameiRK7QString @ 762 NONAME
+ _ZN23DumpRenderTreeSupportQt29setJavaScriptProfilingEnabledEP9QWebFrameb @ 763 NONAME
+ _ZN23DumpRenderTreeSupportQt29setWillSendRequestReturnsNullEb @ 764 NONAME
+ _ZN23DumpRenderTreeSupportQt30setWillSendRequestClearHeadersERK11QStringList @ 765 NONAME
+ _ZN23DumpRenderTreeSupportQt33computedStyleIncludingVisitedInfoERK11QWebElement @ 766 NONAME
+ _ZN23DumpRenderTreeSupportQt34setSelectTrailingWhitespaceEnabledEP8QWebPageb @ 767 NONAME
+ _ZN23DumpRenderTreeSupportQt39elementDoesAutoCompleteForElementWithIdEP9QWebFrameRK7QString @ 768 NONAME
+ _ZN23DumpRenderTreeSupportQt39setWillSendRequestReturnsNullOnRedirectEb @ 769 NONAME
+ _ZN23DumpRenderTreeSupportQt40garbageCollectorCollectOnAlternateThreadEb @ 770 NONAME
+ _ZN23DumpRenderTreeSupportQt40setDomainRelaxationForbiddenForURLSchemeEbRK7QString @ 771 NONAME
+ _ZN23DumpRenderTreeSupportQt18setEditingBehaviorEP8QWebPageRK7QString @ 772 NONAME
+ _ZN23DumpRenderTreeSupportQt24setNotificationsReceiverEP7QObject @ 773 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt26allowNotificationForOriginERK7QString @ 774 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt26setCheckPermissionFunctionEPFvP7QObjectRK4QUrlR22NotificationPermissionE @ 775 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt28setRequestPermissionFunctionEPFvP7QObjectRK7QStringE @ 776 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt31removeWhiteListAccessFromOriginERK7QStringS2_S2_b @ 777 NONAME
+ _ZN23DumpRenderTreeSupportQt11shouldCloseEP9QWebFrame @ 778 NONAME
+ _ZN23DumpRenderTreeSupportQt12isTargetItemERK15QWebHistoryItem @ 779 NONAME
+ _ZN23DumpRenderTreeSupportQt17historyItemTargetERK15QWebHistoryItem @ 780 NONAME
+ _ZN23DumpRenderTreeSupportQt20getChildHistoryItemsERK15QWebHistoryItem @ 781 NONAME
+ _ZN23DumpRenderTreeSupportQt23setMockGeolocationErrorEiRK7QString @ 782 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt26setMockGeolocationPositionEddd @ 783 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt17clearScriptWorldsEv @ 784 NONAME
+ _ZN23DumpRenderTreeSupportQt23setCustomPolicyDelegateEbb @ 785 NONAME
+ _ZN15QWebScriptWorldC1ERKS_ @ 786 NONAME
+ _ZN15QWebScriptWorldC1Ev @ 787 NONAME
+ _ZN15QWebScriptWorldC2ERKS_ @ 788 NONAME
+ _ZN15QWebScriptWorldC2Ev @ 789 NONAME
+ _ZN15QWebScriptWorldD1Ev @ 790 NONAME
+ _ZN15QWebScriptWorldD2Ev @ 791 NONAME
+ _ZN15QWebScriptWorldaSERKS_ @ 792 NONAME
+ _ZN23DumpRenderTreeSupportQt29dumpResourceResponseMIMETypesEb @ 793 NONAME
+ _ZN23DumpRenderTreeSupportQtC1Ev @ 794 NONAME
+ _ZN23DumpRenderTreeSupportQtC2Ev @ 795 NONAME
+ _ZN23DumpRenderTreeSupportQtD1Ev @ 796 NONAME
+ _ZN23DumpRenderTreeSupportQtD2Ev @ 797 NONAME
+ _ZN8QWebPage23allowGeolocationRequestEP9QWebFrame @ 798 NONAME ABSENT
+ _ZN8QWebPage23viewportChangeRequestedERKNS_13ViewportHintsE @ 799 NONAME ABSENT
+ _ZNK15QWebScriptWorld5worldEv @ 800 NONAME
+ _ZN16QGraphicsWebView13setDeviceSizeERK5QSize @ 801 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt12pagePropertyEP9QWebFrameRK7QStringi @ 802 NONAME
+ _ZN23DumpRenderTreeSupportQt16isPageBoxVisibleEP9QWebFramei @ 803 NONAME
+ _ZN23DumpRenderTreeSupportQt16resumeAnimationsEP9QWebFrame @ 804 NONAME
+ _ZN23DumpRenderTreeSupportQt17addUserStyleSheetEP8QWebPageRK7QString @ 805 NONAME
+ _ZN23DumpRenderTreeSupportQt17suspendAnimationsEP9QWebFrame @ 806 NONAME
+ _ZN23DumpRenderTreeSupportQt26pageSizeAndMarginsInPixelsEP9QWebFrameiiiiiii @ 807 NONAME
+ _ZN23DumpRenderTreeSupportQt28setDeferMainResourceDataLoadEb @ 808 NONAME
+ _ZN8QWebPage17setUserPermissionEP9QWebFrameNS_16PermissionDomainENS_16PermissionPolicyE @ 809 NONAME ABSENT
+ _ZN8QWebPage23checkPermissionFromUserEP9QWebFrameNS_16PermissionDomainERNS_16PermissionPolicyE @ 810 NONAME ABSENT
+ _ZN8QWebPage25requestPermissionFromUserEP9QWebFrameNS_16PermissionDomainE @ 811 NONAME ABSENT
+ _ZN8QWebPage27cancelRequestsForPermissionEP9QWebFrameNS_16PermissionDomainE @ 812 NONAME ABSENT
+ _ZNK16QGraphicsWebView10deviceSizeEv @ 813 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageRK5QSize @ 814 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt32simulateDesktopNotificationClickERK7QString @ 815 NONAME
+ _ZN8QWebPage23viewportChangeRequestedEv @ 816 NONAME
+ _ZNK8QWebPage28viewportConfigurationForSizeERK5QSize @ 817 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt20dumpHistoryCallbacksEb @ 818 NONAME
+ _ZN23DumpRenderTreeSupportQt25dumpVisitedLinksCallbacksEb @ 819 NONAME
+ _ZN23DumpRenderTreeSupportQt9plainTextERK8QVariant @ 820 NONAME
+ _ZNK8QWebPage25viewportAttributesForSizeERK5QSize @ 821 NONAME
+ _ZN8QWebPage18ViewportAttributesC1ERKS0_ @ 822 NONAME
+ _ZN8QWebPage18ViewportAttributesC1Ev @ 823 NONAME
+ _ZN8QWebPage18ViewportAttributesC2ERKS0_ @ 824 NONAME
+ _ZN8QWebPage18ViewportAttributesC2Ev @ 825 NONAME
+ _ZN8QWebPage18ViewportAttributesD1Ev @ 826 NONAME
+ _ZN8QWebPage18ViewportAttributesD2Ev @ 827 NONAME
+ _ZN8QWebPage18ViewportAttributesaSERKS0_ @ 828 NONAME
+ _ZN23DumpRenderTreeSupportQt13nodesFromRectERK11QWebElementiijjjjb @ 829 NONAME
+ _ZN23DumpRenderTreeSupportQt28dumpUserGestureInFrameLoaderEb @ 830 NONAME
+ _ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME
+ _ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME
+ _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME
+ _ZN8QWebPage20setFeaturePermissionEP9QWebFrameNS_7FeatureENS_16PermissionPolicyE @ 834 NONAME
+ _ZN8QWebPage26featurePermissionRequestedEP9QWebFrameNS_7FeatureE @ 835 NONAME
+ _ZN8QWebPage32featurePermissionRequestCanceledEP9QWebFrameNS_7FeatureE @ 836 NONAME
+ _Z33qtwebkit_setPluginCreatedCallbackPFvP9QWebFramePvS1_E @ 837 NONAME
+ _ZN23DumpRenderTreeSupportQt23setMockGeolocationErrorEP8QWebPageiRK7QString @ 838 NONAME
+ _ZN23DumpRenderTreeSupportQt26setMockGeolocationPositionEP8QWebPageddd @ 839 NONAME
+ _ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageiRK5QSizeS4_ @ 840 NONAME
+ _ZN23DumpRenderTreeSupportQt26mediaContentUrlByElementIdEP9QWebFrameRK7QString @ 841 NONAME
+ _ZNK8QWebPage12hasSelectionEv @ 842 NONAME
+ _ZNK8QWebPage12selectedHtmlEv @ 843 NONAME
+ _ZN11QWebElement6renderEP8QPainterRK5QRect @ 844 NONAME
+ _ZN16QGraphicsWebView13setRenderHintEN8QPainter10RenderHintEb @ 845 NONAME
+ _ZN16QGraphicsWebView14setRenderHintsE6QFlagsIN8QPainter10RenderHintEE @ 846 NONAME
+ _ZNK16QGraphicsWebView11renderHintsEv @ 847 NONAME
+ _ZN18QWebSecurityOrigin24setApplicationCacheQuotaEx @ 848 NONAME
+ _ZN8QWebPage29applicationCacheQuotaExceededEP18QWebSecurityOriginy @ 849 NONAME
+ _ZNK8QWebView12hasSelectionEv @ 850 NONAME
+ _ZNK8QWebView12selectedHtmlEv @ 851 NONAME
+ _ZN23DumpRenderTreeSupportQt10findStringEP8QWebPageRK7QStringRK11QStringList @ 852 NONAME
+ _ZN23DumpRenderTreeSupportQt10shadowRootERK11QWebElement @ 853 NONAME
+ _ZN23DumpRenderTreeSupportQt11clearOpenerEP9QWebFrame @ 854 NONAME
+ _ZN23DumpRenderTreeSupportQt11contextMenuEP8QWebPage @ 855 NONAME
+ _ZN23DumpRenderTreeSupportQt13setAutofilledERK11QWebElementb @ 856 NONAME
+ _ZN23DumpRenderTreeSupportQt16addURLToRedirectERK7QStringS2_ @ 857 NONAME
+ _ZN23DumpRenderTreeSupportQt16ensureShadowRootERK11QWebElement @ 858 NONAME
+ _ZN23DumpRenderTreeSupportQt16removeShadowRootERK11QWebElement @ 859 NONAME
+ _ZN23DumpRenderTreeSupportQt16responseMimeTypeEP9QWebFrame @ 860 NONAME
+ _ZN23DumpRenderTreeSupportQt16setAlternateHtmlEP9QWebFrameRK7QStringRK4QUrlS7_ @ 861 NONAME
+ _ZN23DumpRenderTreeSupportQt20resetGeolocationMockEP8QWebPage @ 862 NONAME
+ _ZN23DumpRenderTreeSupportQt23setMinimumTimerIntervalEP8QWebPaged @ 863 NONAME
+ _ZN23DumpRenderTreeSupportQt24setMockDeviceOrientationEbdbdbd @ 864 NONAME
+ _ZN23DumpRenderTreeSupportQt25clearAllApplicationCachesEv @ 865 NONAME
+ _ZN23DumpRenderTreeSupportQt27defaultMinimumTimerIntervalEv @ 866 NONAME
+ _ZN23DumpRenderTreeSupportQt27removeMockDeviceOrientationEv @ 867 NONAME
+ _ZN23DumpRenderTreeSupportQt28setMockGeolocationPermissionEP8QWebPageb @ 868 NONAME
+ _ZN23DumpRenderTreeSupportQt33activeMockDeviceOrientationClientEb @ 869 NONAME
+ _ZN23DumpRenderTreeSupportQt44numberOfPendingGeolocationPermissionRequestsEP8QWebPage @ 870 NONAME
+ _ZN8QDRTNodeC1EPN7WebCore4NodeE @ 871 NONAME
+ _ZN8QDRTNodeC1ERKS_ @ 872 NONAME
+ _ZN8QDRTNodeC1Ev @ 873 NONAME
+ _ZN8QDRTNodeC2EPN7WebCore4NodeE @ 874 NONAME
+ _ZN8QDRTNodeC2ERKS_ @ 875 NONAME
+ _ZN8QDRTNodeC2Ev @ 876 NONAME
+ _ZN8QDRTNodeD1Ev @ 877 NONAME
+ _ZN8QDRTNodeD2Ev @ 878 NONAME
+ _ZN8QDRTNodeaSERKS_ @ 879 NONAME
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/qss/OverlayWidget.qss b/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/qss/OverlayWidget.qss index b01d43f..2a4ee9d 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/qss/OverlayWidget.qss +++ b/src/3rdparty/webkit/Source/WebKit/qt/symbian/platformplugin/qss/OverlayWidget.qss @@ -1,59 +1,59 @@ -QSlider::groove { - border: 2px solid black; - border-radius: 5px; - background: white; -} - -QSlider::handle { - border: 2px solid black; - border-radius: 8px; - background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc); -} - -QSlider::add-page { - border: 2px solid black; - border-radius: 5px; -} - -QSlider::sub-page { - border: 2px solid black; - border-radius: 5px; -} - -QSlider::groove:horizontal { - height: 10px; -} - -QSlider::handle:horizontal { - width: 40px; - margin-top: -15px; - margin-bottom: -15px; -} - -QSlider::add-page:horizontal { - height: 10px; - background: white; -} - -QSlider::sub-page:horizontal { - height: 10px; - background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc); -} - -QSlider::groove:vertical { - width: 10px; -} - -QSlider::handle:vertical { - height: 40px; margin-left: -15px; margin-right: -15px; -} - -QSlider::add-page:vertical { - width: 10px; - background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc); -} - -QSlider::sub-page:vertical { - width: 10px; - background: white; +QSlider::groove {
+ border: 2px solid black;
+ border-radius: 5px;
+ background: white;
+}
+
+QSlider::handle {
+ border: 2px solid black;
+ border-radius: 8px;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc);
+}
+
+QSlider::add-page {
+ border: 2px solid black;
+ border-radius: 5px;
+}
+
+QSlider::sub-page {
+ border: 2px solid black;
+ border-radius: 5px;
+}
+
+QSlider::groove:horizontal {
+ height: 10px;
+}
+
+QSlider::handle:horizontal {
+ width: 40px;
+ margin-top: -15px;
+ margin-bottom: -15px;
+}
+
+QSlider::add-page:horizontal {
+ height: 10px;
+ background: white;
+}
+
+QSlider::sub-page:horizontal {
+ height: 10px;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc);
+}
+
+QSlider::groove:vertical {
+ width: 10px;
+}
+
+QSlider::handle:vertical {
+ height: 40px; margin-left: -15px; margin-right: -15px;
+}
+
+QSlider::add-page:vertical {
+ width: 10px;
+ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #eee, stop:1 #ccc);
+}
+
+QSlider::sub-page:vertical {
+ width: 10px;
+ background: white;
}
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript b/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript index 41107c3..c4b9ae6 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/application_postscript @@ -1,137 +1,137 @@ -%!PS-Adobe-2.0 EPSF-1.2 -%%Creator: HiJaak 2.1 -%%CreationDate: 12/29/93 13:52:08 -%%BoundingBox:126 216 486 576 -%%EndComments -/ld {load def} bind def -/s /stroke ld /f /fill ld /m /moveto ld /l /lineto ld /c /curveto ld /rgb {255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll setrgbcolor} def -126 216 translate -360.0000 360.0000 scale -/picstr 124 string def -124 124 8 [124 0 0 -124 0 124] {currentfile picstr readhexstring pop} image -65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006565656565006565656500656565656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADAD00ADADADADAD00AD00ADADADAD00ADADADAD00000000001B1B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADAD00ADADAD00ADAD0000ADADAD00ADADADAD001B1B1B1B001B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADAD00ADADAD00ADAD00AD00ADAD00ADADADAD001B1B1B1B001B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006500650065006565650065006565650065656565656565656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADAD00AD00ADADAD00AD00ADAD00ADADADAD00000000001B1B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006500650065006565006565650065650065656500000065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006500650065006565000000000065650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADADADAD00ADADADAD00ADADAD0000ADADADAD001B1B1B1B001B001B1B1BFF -65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADADADADAD00ADADADAD00ADADADAD00ADADADAD00000000001B1B00000000FF -65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF -65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000000000092920000929200009292929292ADADADAD00000000ADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929200000092000000000092920000920000009292929292ADAD0000ADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292000092000092000092920000920000009292929292ADAD0000ADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000092929200000000929200009292929292ADADADAD00000000ADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00000000004A4A00000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDC0000DCDC0000DC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDC00000065656500000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000065656500000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00000000004A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00000000004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500650065000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A00004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A4A000000000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDC00006565006565000065FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A00000000004A4A4A4A0000004A4A4A00000000004A4A4A4A004A4A4A4A4A00000000004A00000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A00000000004A4A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A00000000004A000000004A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A00000000004A4A4A4A0000004A4A4A4A4A004A4A4A4A4A4A00000000004A00000000004A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF -showpage +%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: HiJaak 2.1
+%%CreationDate: 12/29/93 13:52:08
+%%BoundingBox:126 216 486 576
+%%EndComments
+/ld {load def} bind def
+/s /stroke ld /f /fill ld /m /moveto ld /l /lineto ld /c /curveto ld /rgb {255 div 3 1 roll 255 div 3 1 roll 255 div 3 1 roll setrgbcolor} def
+126 216 translate
+360.0000 360.0000 scale
+/picstr 124 string def
+124 124 8 [124 0 0 -124 0 124] {currentfile picstr readhexstring pop} image
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565656565006565656500656565656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADAD00ADADADADAD00AD00ADADADAD00ADADADAD00000000001B1B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADAD00ADADAD00ADAD0000ADADAD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565000065656500006565650065006565650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADAD00ADADAD00ADAD00AD00ADAD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565650065006565650065656565656565656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADAD00AD00ADADAD00AD00ADAD00ADADADAD00000000001B1B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565006565650065650065656500000065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006500650065006565000000000065650065656565650065656565656565656565656565656565656565656565656565656565ADADAD00AD00ADADADADADADADADAD00ADADADAD00ADAD00AD00ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656500656565006565656565656565656565656565656565656565656565656565656565ADADAD00ADAD00ADADAD00ADADADAD00ADADADAD00ADADAD0000ADADADAD001B1B1B1B001B001B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565006565006565006500656565656500656565000000656565656565656565656565656565656565656565656565656565656565ADADAD00ADADAD000000ADADADADAD00ADADADAD00ADADADAD00ADADADAD00000000001B1B00000000FF
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+65656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565ADADAD00ADADADADADADADADADADADADADADADADADADADADADADADADADADAD1B1B1B1B1B1B1B1B1B1BFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000000000092920000929200009292929292ADADADAD00000000ADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292929292000092920000920000009200009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929200000092000000000092920000920000009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292920000929292000092000092000092920000920000009292929292ADAD0000ADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929200009292000092000092920000920000929200009292929292ADADAD0000ADAD0000ADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292000000009292000092929200000000929200009292929292ADADADAD00000000ADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+DCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC92929292929292929292929292929292929292929292929292929292929292ADADADADADADADADADADFF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00000000004A4A00000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDC0000DCDC0000DC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDC00000065656500000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDC0000DCDC0000DC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000065656500000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00DCDC00DCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00000000004A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDC00000000DCDC0000000000DC0000DCDCDCDCDCDCDCDCDCDCDC00000000650000000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00000000004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500650065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A00004A4A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A00004A00004A4A4A4A00004A4A00004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000DCDCDCDC0000DCDCDCDCDCDCDCDCDCDCDC00006500000065000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A00004A4A4A000000000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDC0000DCDCDC0000000000DC000000000000DCDCDCDCDCDCDC00006565006565000065FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A4A4A0000004A4A4A00000000004A4A4A4A004A4A4A4A4A00000000004A00000000004A00000000004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A00000000004A000000004A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A004A4A4A4A4A004A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A004A4A4A4A004A4A004A4A4A004A4A4A4A004A4A4A4A4A4A004A4A4A4A4A004A4A4A4A4A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A00000000004A4A4A4A0000004A4A4A4A4A004A4A4A4A4A4A00000000004A00000000004A004A4A4A4A4A4A4A004A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4A4ADCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDC65656565656565656565FF
+showpage
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml b/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml index dd4f6fd..38a9fe5 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/MIMESniffing/resources/text_xml @@ -1,19 +1,19 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<CATALOG> - <CD> - <TITLE>Empire Burlesque</TITLE> - <ARTIST>Bob Dylan</ARTIST> - <COUNTRY>USA</COUNTRY> - <COMPANY>Columbia</COMPANY> - <PRICE>10.90</PRICE> - <YEAR>1985</YEAR> - </CD> - <CD> - <TITLE>Unchain my heart</TITLE> - <ARTIST>Joe Cocker</ARTIST> - <COUNTRY>USA</COUNTRY> - <COMPANY>EMI</COMPANY> - <PRICE>8.20</PRICE> - <YEAR>1987</YEAR> - </CD> -</CATALOG> +<?xml version="1.0" encoding="ISO-8859-1"?>
+<CATALOG>
+ <CD>
+ <TITLE>Empire Burlesque</TITLE>
+ <ARTIST>Bob Dylan</ARTIST>
+ <COUNTRY>USA</COUNTRY>
+ <COMPANY>Columbia</COMPANY>
+ <PRICE>10.90</PRICE>
+ <YEAR>1985</YEAR>
+ </CD>
+ <CD>
+ <TITLE>Unchain my heart</TITLE>
+ <ARTIST>Joe Cocker</ARTIST>
+ <COUNTRY>USA</COUNTRY>
+ <COMPANY>EMI</COMPANY>
+ <PRICE>8.20</PRICE>
+ <YEAR>1987</YEAR>
+ </CD>
+</CATALOG>
diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe.html b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe.html index 4b0e30c..ee0f64d 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe.html +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe.html @@ -1,53 +1,53 @@ -<html> -<head> -<title></title> -<style type="text/css"> -<!-- -#header { - background: #0f0; - position: absolute; - top: 0px; - left: 0px; - width: 800px; - height: 100px; -} -#content1 { - background: #ff0; - position: absolute; - top: 101px; - left: 0px; - width: 400px; - height: 400px; - overflow: scroll; -} -#content2 { - background: #ff7; - position: absolute; - top: 101px; - left: 401px; - width: 400px; - height: 400px; -} -#footer { - background: #0f0; - position: absolute; - top: 502px; - left: 0px; - width: 800px; - height: 200px; -} ---> -</style> -</head> -<body> -<div id="header"></div> -<div id="content1">You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible. -You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible. -You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible. -You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible. -You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible. -You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.</div> -<iframe id="content2" name="control" src="testiframe2.html"> </iframe> -<div id="footer"></div> -</body> +<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#header {
+ background: #0f0;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 100px;
+}
+#content1 {
+ background: #ff0;
+ position: absolute;
+ top: 101px;
+ left: 0px;
+ width: 400px;
+ height: 400px;
+ overflow: scroll;
+}
+#content2 {
+ background: #ff7;
+ position: absolute;
+ top: 101px;
+ left: 401px;
+ width: 400px;
+ height: 400px;
+}
+#footer {
+ background: #0f0;
+ position: absolute;
+ top: 502px;
+ left: 0px;
+ width: 800px;
+ height: 200px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="header"></div>
+<div id="content1">You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.
+You can use the overflow property when you want to have better control of the layout. Try to change the overflow property to: visible, hidden, auto, or inherit and see what happens. The default value is visible.</div>
+<iframe id="content2" name="control" src="testiframe2.html"> </iframe>
+<div id="footer"></div>
+</body>
</html>
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe2.html b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe2.html index 8957a5d..483e94e 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe2.html +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/resources/testiframe2.html @@ -1,20 +1,20 @@ -<html> -<head> -<title></title> -<style type="text/css"> -<!-- -#content { - background: #fff; - position: absolute; - top: 0px; - left: 0px; - width: 800px; - height: 800px; -} ---> -</style> -</head> -<body> -<div id="content"> </div> -</body> +<html>
+<head>
+<title></title>
+<style type="text/css">
+<!--
+#content {
+ background: #fff;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 800px;
+ height: 800px;
+}
+-->
+</style>
+</head>
+<body>
+<div id="content"> </div>
+</body>
</html>
\ No newline at end of file diff --git a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index f2bdcee..c9e862a 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -649,7 +649,7 @@ private slots: void setContent_data(); void setContent(); void setCacheLoadControlAttribute(); - //void setUrlWithPendingLoads(); + void setUrlWithPendingLoads(); void setUrlWithFragment_data(); void setUrlWithFragment(); void setUrlToEmpty(); @@ -658,6 +658,9 @@ private slots: void setUrlSameUrl(); void setUrlThenLoads_data(); void setUrlThenLoads(); + void loadFinishedAfterNotFoundError(); + void loadInSignalHandlers_data(); + void loadInSignalHandlers(); private: QString evalJS(const QString&s) { @@ -2301,6 +2304,8 @@ class FakeReply : public QNetworkReply { Q_OBJECT public: + static const QUrl urlFor404ErrorWithoutContents; + FakeReply(const QNetworkRequest& request, QObject* parent = 0) : QNetworkReply(parent) { @@ -2320,6 +2325,10 @@ public: else if (request.url().host() == QLatin1String("abcdef.abcdef")) { setError(QNetworkReply::HostNotFoundError, tr("Invalid URL")); QTimer::singleShot(0, this, SLOT(continueError())); + } else if (request.url() == FakeReply::urlFor404ErrorWithoutContents) { + setError(QNetworkReply::ContentNotFoundError, "Not found"); + setAttribute(QNetworkRequest::HttpStatusCodeAttribute, 404); + QTimer::singleShot(0, this, SLOT(continueError())); } open(QIODevice::ReadOnly); @@ -2351,6 +2360,8 @@ private slots: } }; +const QUrl FakeReply::urlFor404ErrorWithoutContents = QUrl("http://this.will/return-http-404-error-without-contents.html"); + class FakeNetworkManager : public QNetworkAccessManager { Q_OBJECT @@ -2362,17 +2373,17 @@ protected: { QString url = request.url().toString(); if (op == QNetworkAccessManager::GetOperation) { - if (url == "qrc:/test1.html" || url == "http://abcdef.abcdef/") - return new FakeReply(request, this); #ifndef QT_NO_OPENSSL - else if (url == "qrc:/fake-ssl-error.html") { + if (url == "qrc:/fake-ssl-error.html") { FakeReply* reply = new FakeReply(request, this); QList<QSslError> errors; emit sslErrors(reply, errors << QSslError(QSslError::UnspecifiedError)); return reply; } #endif - } + if (url == "qrc:/test1.html" || url == "http://abcdef.abcdef/" || request.url() == FakeReply::urlFor404ErrorWithoutContents) + return new FakeReply(request, this); + } return QNetworkAccessManager::createRequest(op, request, outgoingData); } @@ -2502,9 +2513,7 @@ void tst_QWebFrame::setHtmlWithResource() QCOMPARE(spy.count(), 1); QCOMPARE(frame->evaluateJavaScript("document.images.length").toInt(), 1); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63235", Continue); QCOMPARE(frame->evaluateJavaScript("document.images[0].width").toInt(), 128); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63235", Continue); QCOMPARE(frame->evaluateJavaScript("document.images[0].height").toInt(), 128); QString html2 = @@ -2523,7 +2532,6 @@ void tst_QWebFrame::setHtmlWithResource() QCOMPARE(spy.size(), 2); QWebElement p = frame->documentElement().findAll("p").at(0); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63235", Continue); QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red")); } @@ -2898,7 +2906,10 @@ void tst_QWebFrame::renderGeometry() QList<QWebFrame*> frames = page.mainFrame()->childFrames(); QWebFrame *frame = frames.at(0); QString innerHtml("<body style='margin: 0px;'><img src='qrc:/image.png'/></body>"); - frame->setHtml(innerHtml); + + // By default, only security origins of local files can load local resources. + // So we should specify baseUrl to be a local file in order to get a proper origin. + frame->setHtml(innerHtml, QUrl("file:///path/to/file")); waitForSignal(frame, SIGNAL(loadFinished(bool)), 200); QPicture picture; @@ -2911,9 +2922,7 @@ void tst_QWebFrame::renderGeometry() frame->render(&painter1, QWebFrame::ContentsLayer); painter1.end(); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue); QCOMPARE(size.width(), picture.boundingRect().width() + frame->scrollBarGeometry(Qt::Vertical).width()); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue); QCOMPARE(size.height(), picture.boundingRect().height() + frame->scrollBarGeometry(Qt::Horizontal).height()); // render everything, should be the size of the iframe @@ -2921,9 +2930,7 @@ void tst_QWebFrame::renderGeometry() frame->render(&painter2, QWebFrame::AllLayers); painter2.end(); - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue); QCOMPARE(size.width(), picture.boundingRect().width()); // width: 100px - QEXPECT_FAIL("", "https://bugs.webkit.org/show_bug.cgi?id=63236", Continue); QCOMPARE(size.height(), picture.boundingRect().height()); // height: 100px } @@ -3359,16 +3366,12 @@ void tst_QWebFrame::webElementSlotOnly() QCOMPARE(evalJS("myWebElementSlotObject.tagName"), QString("BODY")); } -// [Qt] Fix tst_QWebFrame::setUrlWithPendingLoads() API test -// https://bugs.webkit.org/show_bug.cgi?id=63237 -/* void tst_QWebFrame::setUrlWithPendingLoads() { QWebPage page; page.mainFrame()->setHtml("<img src='dummy:'/>"); page.mainFrame()->setUrl(QUrl("about:blank")); } -*/ void tst_QWebFrame::setUrlWithFragment_data() { @@ -3658,5 +3661,113 @@ void tst_QWebFrame::setUrlThenLoads() QCOMPARE(frame->baseUrl(), extractBaseUrl(urlToLoad2)); } +void tst_QWebFrame::loadFinishedAfterNotFoundError() +{ + QWebPage page; + QWebFrame* frame = page.mainFrame(); + + QSignalSpy spy(&page, SIGNAL(loadFinished(bool))); + FakeNetworkManager* networkManager = new FakeNetworkManager(&page); + page.setNetworkAccessManager(networkManager); + + frame->setUrl(FakeReply::urlFor404ErrorWithoutContents); + QTRY_COMPARE(spy.count(), 1); + const bool wasLoadOk = spy.at(0).at(0).toBool(); + QVERIFY(!wasLoadOk); +} + +class URLSetter : public QObject { + Q_OBJECT + +public: + enum Signal { + LoadStarted, + LoadFinished, + ProvisionalLoad + }; + + enum Type { + UseLoad, + UseSetUrl + }; + + URLSetter(QWebFrame*, Signal, Type, const QUrl&); + +public slots: + void execute(); + +signals: + void finished(); + +private: + QWebFrame* m_frame; + QUrl m_url; + Type m_type; +}; + +Q_DECLARE_METATYPE(URLSetter::Signal) +Q_DECLARE_METATYPE(URLSetter::Type) + +URLSetter::URLSetter(QWebFrame* frame, Signal signal, URLSetter::Type type, const QUrl& url) + : m_frame(frame), m_url(url), m_type(type) +{ + if (signal == LoadStarted) + connect(m_frame, SIGNAL(loadStarted()), SLOT(execute())); + else if (signal == LoadFinished) + connect(m_frame, SIGNAL(loadFinished(bool)), SLOT(execute())); + else + connect(m_frame, SIGNAL(provisionalLoad()), SLOT(execute())); +} + +void URLSetter::execute() +{ + // We track only the first emission. + m_frame->disconnect(this); + if (m_type == URLSetter::UseLoad) + m_frame->load(m_url); + else + m_frame->setUrl(m_url); + connect(m_frame, SIGNAL(loadFinished(bool)), SIGNAL(finished())); +} + +void tst_QWebFrame::loadInSignalHandlers_data() +{ + QTest::addColumn<URLSetter::Type>("type"); + QTest::addColumn<URLSetter::Signal>("signal"); + QTest::addColumn<QUrl>("url"); + + const QUrl validUrl("qrc:/test2.html"); + const QUrl invalidUrl("qrc:/invalid"); + + QTest::newRow("call load() in loadStarted() after valid url") << URLSetter::UseLoad << URLSetter::LoadStarted << validUrl; + QTest::newRow("call load() in loadStarted() after invalid url") << URLSetter::UseLoad << URLSetter::LoadStarted << invalidUrl; + QTest::newRow("call load() in loadFinished() after valid url") << URLSetter::UseLoad << URLSetter::LoadFinished << validUrl; + QTest::newRow("call load() in loadFinished() after invalid url") << URLSetter::UseLoad << URLSetter::LoadFinished << invalidUrl; + QTest::newRow("call load() in provisionalLoad() after valid url") << URLSetter::UseLoad << URLSetter::ProvisionalLoad << validUrl; + QTest::newRow("call load() in provisionalLoad() after invalid url") << URLSetter::UseLoad << URLSetter::ProvisionalLoad << invalidUrl; + + QTest::newRow("call setUrl() in loadStarted() after valid url") << URLSetter::UseSetUrl << URLSetter::LoadStarted << validUrl; + QTest::newRow("call setUrl() in loadStarted() after invalid url") << URLSetter::UseSetUrl << URLSetter::LoadStarted << invalidUrl; + QTest::newRow("call setUrl() in loadFinished() after valid url") << URLSetter::UseSetUrl << URLSetter::LoadFinished << validUrl; + QTest::newRow("call setUrl() in loadFinished() after invalid url") << URLSetter::UseSetUrl << URLSetter::LoadFinished << invalidUrl; + QTest::newRow("call setUrl() in provisionalLoad() after valid url") << URLSetter::UseSetUrl << URLSetter::ProvisionalLoad << validUrl; + QTest::newRow("call setUrl() in provisionalLoad() after invalid url") << URLSetter::UseSetUrl << URLSetter::ProvisionalLoad << invalidUrl; +} + +void tst_QWebFrame::loadInSignalHandlers() +{ + QFETCH(URLSetter::Type, type); + QFETCH(URLSetter::Signal, signal); + QFETCH(QUrl, url); + + QWebFrame* frame = m_page->mainFrame(); + const QUrl urlForSetter("qrc:/test1.html"); + URLSetter setter(frame, signal, type, urlForSetter); + + frame->load(url); + waitForSignal(&setter, SIGNAL(finished()), 200); + QCOMPARE(frame->url(), urlForSetter); +} + QTEST_MAIN(tst_QWebFrame) #include "tst_qwebframe.moc" 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 359ef05..893c284 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 @@ -130,6 +130,7 @@ private slots: void errorPageExtension(); void errorPageExtensionInIFrames(); void errorPageExtensionInFrameset(); + void errorPageExtensionLoadFinished(); void userAgentApplicationName(); void viewModes(); @@ -2572,6 +2573,35 @@ void tst_QWebPage::errorPageExtensionInFrameset() m_view->setPage(0); } +void tst_QWebPage::errorPageExtensionLoadFinished() +{ + ErrorPage page; + m_view->setPage(&page); + + QSignalSpy spyLoadFinished(m_view, SIGNAL(loadFinished(bool))); + QSignalSpy spyFrameLoadFinished(m_view->page()->mainFrame(), SIGNAL(loadFinished(bool))); + + m_view->setUrl(QUrl("data:text/html,foo")); + QTRY_COMPARE(spyLoadFinished.count(), 1); + QTRY_COMPARE(spyFrameLoadFinished.count(), 1); + + const bool loadSucceded = spyLoadFinished.at(0).at(0).toBool(); + QVERIFY(loadSucceded); + const bool frameLoadSucceded = spyFrameLoadFinished.at(0).at(0).toBool(); + QVERIFY(frameLoadSucceded); + + m_view->page()->mainFrame()->setUrl(QUrl("http://non.existent/url")); + QTRY_COMPARE(spyLoadFinished.count(), 2); + QTRY_COMPARE(spyFrameLoadFinished.count(), 2); + + const bool nonExistantLoadSucceded = spyLoadFinished.at(1).at(0).toBool(); + QVERIFY(nonExistantLoadSucceded); + const bool nonExistantFrameLoadSucceded = spyFrameLoadFinished.at(1).at(0).toBool(); + QVERIFY(nonExistantFrameLoadSucceded); + + m_view->setPage(0); +} + class FriendlyWebPage : public QWebPage { public: diff --git a/src/3rdparty/webkit/Source/WebKit2/ChangeLog b/src/3rdparty/webkit/Source/WebKit2/ChangeLog index b6e5afe..be0c43d 100644 --- a/src/3rdparty/webkit/Source/WebKit2/ChangeLog +++ b/src/3rdparty/webkit/Source/WebKit2/ChangeLog @@ -1,3 +1,30 @@ +2011-08-06 Aron Rosenberg <arosenberg@logitech.com> + + Reviewed by Benjamin Poulain. + + [Qt] Fix build with Intel compiler on Windows + https://bugs.webkit.org/show_bug.cgi?id=65088 + + Intel compiler needs .lib suffixes instead of .a + + * WebKit2.pri: + +2011-06-23 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Windowless Plugins : <input> cursor blinks even after transferring focus to plugin + https://bugs.webkit.org/show_bug.cgi?id=30355 + + PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin + in order to clear the FrameSelection in the currently focused node. In its platform-specific + code Chromium already does this (WebPluginContainerImpl.cpp). + + * WebProcess/Plugins/PluginView.cpp: + (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes + the call to FocusController:setFocusedFrame() redundant, since the + former calls it. + 2011-06-27 Huang Dongsung <luxtella@company100.net> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri b/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri index 32c25e1..3122326 100644 --- a/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri +++ b/src/3rdparty/webkit/Source/WebKit2/WebKit2.pri @@ -73,7 +73,7 @@ symbian { defineTest(prependWebKit2Lib) { pathToWebKit2Output = $$ARGS/$$WEBKIT2_DESTDIR - win32-msvc*|wince* { + win32-msvc*|wince*|win32-icc { LIBS = -l$$WEBKIT2_TARGET $$LIBS LIBS = -L$$pathToWebKit2Output $$LIBS POST_TARGETDEPS += $${pathToWebKit2Output}$${QMAKE_DIR_SEP}$${WEBKIT2_TARGET}.lib diff --git a/src/3rdparty/webkit/Source/WebKit2/WebProcess/Plugins/PluginView.cpp b/src/3rdparty/webkit/Source/WebKit2/WebProcess/Plugins/PluginView.cpp index feb1e5c..1962d8c 100644 --- a/src/3rdparty/webkit/Source/WebKit2/WebProcess/Plugins/PluginView.cpp +++ b/src/3rdparty/webkit/Source/WebKit2/WebProcess/Plugins/PluginView.cpp @@ -638,8 +638,9 @@ void PluginView::focusPluginElement() ASSERT(frame()); if (Page* page = frame()->page()) - page->focusController()->setFocusedFrame(frame()); - frame()->document()->setFocusedNode(m_pluginElement); + page->focusController()->setFocusedNode(m_pluginElement.get(), frame()); + else + frame()->document()->setFocusedNode(m_pluginElement); } void PluginView::pendingURLRequestsTimerFired() diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 85f9e4f..413f504 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 - a52dbae362a295e0adfb7ee4fdc21734ae4b7b45 + dda59e50379214c098f365a39c4d64b39ced427e diff --git a/src/3rdparty/webkit/WebKitLibraries/libWebCoreSQLite3.a b/src/3rdparty/webkit/WebKitLibraries/libWebCoreSQLite3.a Binary files differnew file mode 100644 index 0000000..2e5fd15 --- /dev/null +++ b/src/3rdparty/webkit/WebKitLibraries/libWebCoreSQLite3.a diff --git a/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLeopard.a b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLeopard.a Binary files differnew file mode 100644 index 0000000..43b6043 --- /dev/null +++ b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLeopard.a diff --git a/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLion.a b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLion.a Binary files differnew file mode 100644 index 0000000..345860c --- /dev/null +++ b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceLion.a diff --git a/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a Binary files differnew file mode 100644 index 0000000..845ca54 --- /dev/null +++ b/src/3rdparty/webkit/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a diff --git a/src/3rdparty/webkit/include/JavaScriptCore/APICast.h b/src/3rdparty/webkit/include/JavaScriptCore/APICast.h new file mode 100644 index 0000000..237bfc8 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/APICast.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/APICast.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/Error.h b/src/3rdparty/webkit/include/JavaScriptCore/Error.h new file mode 100644 index 0000000..4635063 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/Error.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/Error.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/FunctionPrototype.h b/src/3rdparty/webkit/include/JavaScriptCore/FunctionPrototype.h new file mode 100644 index 0000000..a2829fb --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/FunctionPrototype.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/FunctionPrototype.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/InternalFunction.h b/src/3rdparty/webkit/include/JavaScriptCore/InternalFunction.h new file mode 100644 index 0000000..7c549e0 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/InternalFunction.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/InternalFunction.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSBase.h b/src/3rdparty/webkit/include/JavaScriptCore/JSBase.h new file mode 100644 index 0000000..9c3826e --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSBase.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/JSBase.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSContextRef.h b/src/3rdparty/webkit/include/JavaScriptCore/JSContextRef.h new file mode 100644 index 0000000..f2f0c47 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSContextRef.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/JSContextRef.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSGlobalObject.h b/src/3rdparty/webkit/include/JavaScriptCore/JSGlobalObject.h new file mode 100644 index 0000000..ebbffb4 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSGlobalObject.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/JSGlobalObject.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSLock.h b/src/3rdparty/webkit/include/JavaScriptCore/JSLock.h new file mode 100644 index 0000000..7934695 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSLock.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/JSLock.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSObject.h b/src/3rdparty/webkit/include/JavaScriptCore/JSObject.h new file mode 100644 index 0000000..e6767cf --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSObject.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/JSObject.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSObjectWithGlobalObject.h b/src/3rdparty/webkit/include/JavaScriptCore/JSObjectWithGlobalObject.h new file mode 100644 index 0000000..2125f2d --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSObjectWithGlobalObject.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/JSObjectWithGlobalObject.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSStringRef.h b/src/3rdparty/webkit/include/JavaScriptCore/JSStringRef.h new file mode 100644 index 0000000..6141f13 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSStringRef.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/JSStringRef.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JSValueRef.h b/src/3rdparty/webkit/include/JavaScriptCore/JSValueRef.h new file mode 100644 index 0000000..a038672 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JSValueRef.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/JSValueRef.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/JavaScript.h b/src/3rdparty/webkit/include/JavaScriptCore/JavaScript.h new file mode 100644 index 0000000..d5e2b25 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/JavaScript.h @@ -0,0 +1 @@ +#include "JavaScriptCore/API/JavaScript.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/ObjectPrototype.h b/src/3rdparty/webkit/include/JavaScriptCore/ObjectPrototype.h new file mode 100644 index 0000000..d66b76c --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/ObjectPrototype.h @@ -0,0 +1 @@ +#include "JavaScriptCore/runtime/ObjectPrototype.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/SourceCode.h b/src/3rdparty/webkit/include/JavaScriptCore/SourceCode.h new file mode 100644 index 0000000..148829a --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/SourceCode.h @@ -0,0 +1 @@ +#include "JavaScriptCore/parser/SourceCode.h" diff --git a/src/3rdparty/webkit/include/JavaScriptCore/Strong.h b/src/3rdparty/webkit/include/JavaScriptCore/Strong.h new file mode 100644 index 0000000..bb611f9 --- /dev/null +++ b/src/3rdparty/webkit/include/JavaScriptCore/Strong.h @@ -0,0 +1 @@ +#include "JavaScriptCore/heap/Strong.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QGraphicsWebView b/src/3rdparty/webkit/include/QtWebKit/QGraphicsWebView new file mode 100644 index 0000000..508a397 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QGraphicsWebView @@ -0,0 +1 @@ +#include "qgraphicswebview.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebDatabase b/src/3rdparty/webkit/include/QtWebKit/QWebDatabase new file mode 100644 index 0000000..ec02742 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebDatabase @@ -0,0 +1 @@ +#include "qwebdatabase.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebElement b/src/3rdparty/webkit/include/QtWebKit/QWebElement new file mode 100644 index 0000000..32a17d0 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebElement @@ -0,0 +1 @@ +#include "qwebelement.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebElementCollection b/src/3rdparty/webkit/include/QtWebKit/QWebElementCollection new file mode 100644 index 0000000..32a17d0 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebElementCollection @@ -0,0 +1 @@ +#include "qwebelement.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebFrame b/src/3rdparty/webkit/include/QtWebKit/QWebFrame new file mode 100644 index 0000000..0748fde --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebFrame @@ -0,0 +1 @@ +#include "qwebframe.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebHistory b/src/3rdparty/webkit/include/QtWebKit/QWebHistory new file mode 100644 index 0000000..35e9da5 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebHistory @@ -0,0 +1 @@ +#include "qwebhistory.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebHistoryInterface b/src/3rdparty/webkit/include/QtWebKit/QWebHistoryInterface new file mode 100644 index 0000000..7352319 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebHistoryInterface @@ -0,0 +1 @@ +#include "qwebhistoryinterface.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebHistoryItem b/src/3rdparty/webkit/include/QtWebKit/QWebHistoryItem new file mode 100644 index 0000000..35e9da5 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebHistoryItem @@ -0,0 +1 @@ +#include "qwebhistory.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebHitTestResult b/src/3rdparty/webkit/include/QtWebKit/QWebHitTestResult new file mode 100644 index 0000000..0748fde --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebHitTestResult @@ -0,0 +1 @@ +#include "qwebframe.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebInspector b/src/3rdparty/webkit/include/QtWebKit/QWebInspector new file mode 100644 index 0000000..0923bb7 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebInspector @@ -0,0 +1 @@ +#include "qwebinspector.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebPage b/src/3rdparty/webkit/include/QtWebKit/QWebPage new file mode 100644 index 0000000..e8e8c10 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebPage @@ -0,0 +1 @@ +#include "qwebpage.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebPluginFactory b/src/3rdparty/webkit/include/QtWebKit/QWebPluginFactory new file mode 100644 index 0000000..3e4ee81 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebPluginFactory @@ -0,0 +1 @@ +#include "qwebpluginfactory.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebSecurityOrigin b/src/3rdparty/webkit/include/QtWebKit/QWebSecurityOrigin new file mode 100644 index 0000000..6427a3b --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebSecurityOrigin @@ -0,0 +1 @@ +#include "qwebsecurityorigin.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebSettings b/src/3rdparty/webkit/include/QtWebKit/QWebSettings new file mode 100644 index 0000000..f50c1a2 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebSettings @@ -0,0 +1 @@ +#include "qwebsettings.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QWebView b/src/3rdparty/webkit/include/QtWebKit/QWebView new file mode 100644 index 0000000..3ec1eb9 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QWebView @@ -0,0 +1 @@ +#include "qwebview.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/QtWebKit b/src/3rdparty/webkit/include/QtWebKit/QtWebKit new file mode 100644 index 0000000..155a551 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/QtWebKit @@ -0,0 +1,19 @@ +#ifndef QT_QTWEBKIT_MODULE_H +#define QT_QTWEBKIT_MODULE_H +#include <QtNetwork/QtNetwork> +#include "qwebframe.h" +#include "qgraphicswebview.h" +#include "qwebkitglobal.h" +#include "qwebkitplatformplugin.h" +#include "qwebpage.h" +#include "qwebview.h" +#include "qwebsettings.h" +#include "qwebhistoryinterface.h" +#include "qwebdatabase.h" +#include "qwebsecurityorigin.h" +#include "qwebelement.h" +#include "qwebpluginfactory.h" +#include "qwebhistory.h" +#include "qwebinspector.h" +#include "qwebkitversion.h" +#endif // QT_QTWEBKIT_MODULE_H diff --git a/src/3rdparty/webkit/include/QtWebKit/ViewportAttributes b/src/3rdparty/webkit/include/QtWebKit/ViewportAttributes new file mode 100644 index 0000000..e8e8c10 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/ViewportAttributes @@ -0,0 +1 @@ +#include "qwebpage.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/classheaders.pri b/src/3rdparty/webkit/include/QtWebKit/classheaders.pri new file mode 100644 index 0000000..0e13e75 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/classheaders.pri @@ -0,0 +1 @@ +WEBKIT_CLASS_HEADERS = $$PWD/QtWebKit $$PWD/QWebHitTestResult $$PWD/QWebFrame $$PWD/QGraphicsWebView $$PWD/QWebPage $$PWD/ViewportAttributes $$PWD/QWebView $$PWD/QWebSettings $$PWD/QWebHistoryInterface $$PWD/QWebDatabase $$PWD/QWebSecurityOrigin $$PWD/QWebElement $$PWD/QWebElementCollection $$PWD/QWebPluginFactory $$PWD/QWebHistoryItem $$PWD/QWebHistory $$PWD/QWebInspector diff --git a/src/3rdparty/webkit/include/QtWebKit/qgraphicswebview.h b/src/3rdparty/webkit/include/QtWebKit/qgraphicswebview.h new file mode 100644 index 0000000..0584f1d --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qgraphicswebview.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qgraphicswebview.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebdatabase.h b/src/3rdparty/webkit/include/QtWebKit/qwebdatabase.h new file mode 100644 index 0000000..f23fed4 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebdatabase.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebdatabase.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebelement.h b/src/3rdparty/webkit/include/QtWebKit/qwebelement.h new file mode 100644 index 0000000..e11a84b --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebelement.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebelement.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebframe.h b/src/3rdparty/webkit/include/QtWebKit/qwebframe.h new file mode 100644 index 0000000..d1393c5 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebframe.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebframe.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebhistory.h b/src/3rdparty/webkit/include/QtWebKit/qwebhistory.h new file mode 100644 index 0000000..edf6f81 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebhistory.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebhistory.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebhistoryinterface.h b/src/3rdparty/webkit/include/QtWebKit/qwebhistoryinterface.h new file mode 100644 index 0000000..da1a6a9 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebhistoryinterface.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebhistoryinterface.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebinspector.h b/src/3rdparty/webkit/include/QtWebKit/qwebinspector.h new file mode 100644 index 0000000..4742105 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebinspector.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebinspector.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebkitglobal.h b/src/3rdparty/webkit/include/QtWebKit/qwebkitglobal.h new file mode 100644 index 0000000..b9b2650 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebkitglobal.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebkitglobal.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebkitplatformplugin.h b/src/3rdparty/webkit/include/QtWebKit/qwebkitplatformplugin.h new file mode 100644 index 0000000..db4e554 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebkitplatformplugin.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebkitplatformplugin.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebkitversion.h b/src/3rdparty/webkit/include/QtWebKit/qwebkitversion.h new file mode 100644 index 0000000..af7be3b --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebkitversion.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebkitversion.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebpage.h b/src/3rdparty/webkit/include/QtWebKit/qwebpage.h new file mode 100644 index 0000000..2053ccb --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebpage.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebpage.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebpluginfactory.h b/src/3rdparty/webkit/include/QtWebKit/qwebpluginfactory.h new file mode 100644 index 0000000..db095b7 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebpluginfactory.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebpluginfactory.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebsecurityorigin.h b/src/3rdparty/webkit/include/QtWebKit/qwebsecurityorigin.h new file mode 100644 index 0000000..1ce553c --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebsecurityorigin.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebsecurityorigin.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebsettings.h b/src/3rdparty/webkit/include/QtWebKit/qwebsettings.h new file mode 100644 index 0000000..cdedc07 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebsettings.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebsettings.h" diff --git a/src/3rdparty/webkit/include/QtWebKit/qwebview.h b/src/3rdparty/webkit/include/QtWebKit/qwebview.h new file mode 100644 index 0000000..3490665 --- /dev/null +++ b/src/3rdparty/webkit/include/QtWebKit/qwebview.h @@ -0,0 +1 @@ +#include "../../WebKit/qt/Api/qwebview.h" diff --git a/src/3rdparty/webkit/include/WebCore/AXObjectCache.h b/src/3rdparty/webkit/include/WebCore/AXObjectCache.h new file mode 100644 index 0000000..19e50c5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/AXObjectCache.h @@ -0,0 +1 @@ +#include "WebCore/accessibility/AXObjectCache.h" diff --git a/src/3rdparty/webkit/include/WebCore/AbstractDatabase.h b/src/3rdparty/webkit/include/WebCore/AbstractDatabase.h new file mode 100644 index 0000000..e845a89 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/AbstractDatabase.h @@ -0,0 +1 @@ +#include "WebCore/storage/AbstractDatabase.h" diff --git a/src/3rdparty/webkit/include/WebCore/AnimationController.h b/src/3rdparty/webkit/include/WebCore/AnimationController.h new file mode 100644 index 0000000..5a0fc36 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/AnimationController.h @@ -0,0 +1 @@ +#include "WebCore/page/animation/AnimationController.h" diff --git a/src/3rdparty/webkit/include/WebCore/ApplicationCache.h b/src/3rdparty/webkit/include/WebCore/ApplicationCache.h new file mode 100644 index 0000000..1c73afe --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ApplicationCache.h @@ -0,0 +1 @@ +#include "WebCore/loader/appcache/ApplicationCache.h" diff --git a/src/3rdparty/webkit/include/WebCore/ApplicationCacheStorage.h b/src/3rdparty/webkit/include/WebCore/ApplicationCacheStorage.h new file mode 100644 index 0000000..f5bf232 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ApplicationCacheStorage.h @@ -0,0 +1 @@ +#include "WebCore/loader/appcache/ApplicationCacheStorage.h" diff --git a/src/3rdparty/webkit/include/WebCore/ArchiveResource.h b/src/3rdparty/webkit/include/WebCore/ArchiveResource.h new file mode 100644 index 0000000..aa854cb --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ArchiveResource.h @@ -0,0 +1 @@ +#include "WebCore/loader/archive/ArchiveResource.h" diff --git a/src/3rdparty/webkit/include/WebCore/AuthenticationClient.h b/src/3rdparty/webkit/include/WebCore/AuthenticationClient.h new file mode 100644 index 0000000..6dc6438 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/AuthenticationClient.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/AuthenticationClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/BackForwardController.h b/src/3rdparty/webkit/include/WebCore/BackForwardController.h new file mode 100644 index 0000000..f352699 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/BackForwardController.h @@ -0,0 +1 @@ +#include "WebCore/history/BackForwardController.h" diff --git a/src/3rdparty/webkit/include/WebCore/BackForwardList.h b/src/3rdparty/webkit/include/WebCore/BackForwardList.h new file mode 100644 index 0000000..211f9a3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/BackForwardList.h @@ -0,0 +1 @@ +#include "WebCore/history/BackForwardList.h" diff --git a/src/3rdparty/webkit/include/WebCore/BitmapImage.h b/src/3rdparty/webkit/include/WebCore/BitmapImage.h new file mode 100644 index 0000000..fd77e4e --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/BitmapImage.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/BitmapImage.h" diff --git a/src/3rdparty/webkit/include/WebCore/CSSComputedStyleDeclaration.h b/src/3rdparty/webkit/include/WebCore/CSSComputedStyleDeclaration.h new file mode 100644 index 0000000..89eef12 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/CSSComputedStyleDeclaration.h @@ -0,0 +1 @@ +#include "WebCore/css/CSSComputedStyleDeclaration.h" diff --git a/src/3rdparty/webkit/include/WebCore/Chrome.h b/src/3rdparty/webkit/include/WebCore/Chrome.h new file mode 100644 index 0000000..0d9d432 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Chrome.h @@ -0,0 +1 @@ +#include "WebCore/page/Chrome.h" diff --git a/src/3rdparty/webkit/include/WebCore/ChromeClient.h b/src/3rdparty/webkit/include/WebCore/ChromeClient.h new file mode 100644 index 0000000..6c49eb7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ChromeClient.h @@ -0,0 +1 @@ +#include "WebCore/page/ChromeClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/Color.h b/src/3rdparty/webkit/include/WebCore/Color.h new file mode 100644 index 0000000..0b177c5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Color.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Color.h" diff --git a/src/3rdparty/webkit/include/WebCore/ContextMenu.h b/src/3rdparty/webkit/include/WebCore/ContextMenu.h new file mode 100644 index 0000000..5eb190d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ContextMenu.h @@ -0,0 +1 @@ +#include "WebCore/platform/ContextMenu.h" diff --git a/src/3rdparty/webkit/include/WebCore/ContextMenuClient.h b/src/3rdparty/webkit/include/WebCore/ContextMenuClient.h new file mode 100644 index 0000000..5471ea8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ContextMenuClient.h @@ -0,0 +1 @@ +#include "WebCore/page/ContextMenuClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/ContextMenuController.h b/src/3rdparty/webkit/include/WebCore/ContextMenuController.h new file mode 100644 index 0000000..463f01a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ContextMenuController.h @@ -0,0 +1 @@ +#include "WebCore/page/ContextMenuController.h" diff --git a/src/3rdparty/webkit/include/WebCore/ContextMenuItem.h b/src/3rdparty/webkit/include/WebCore/ContextMenuItem.h new file mode 100644 index 0000000..0ee8088 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ContextMenuItem.h @@ -0,0 +1 @@ +#include "WebCore/platform/ContextMenuItem.h" diff --git a/src/3rdparty/webkit/include/WebCore/CookieJar.h b/src/3rdparty/webkit/include/WebCore/CookieJar.h new file mode 100644 index 0000000..4da688b --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/CookieJar.h @@ -0,0 +1 @@ +#include "WebCore/platform/CookieJar.h" diff --git a/src/3rdparty/webkit/include/WebCore/CookieStorage.h b/src/3rdparty/webkit/include/WebCore/CookieStorage.h new file mode 100644 index 0000000..a087fc5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/CookieStorage.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/CookieStorage.h" diff --git a/src/3rdparty/webkit/include/WebCore/CookiesStrategy.h b/src/3rdparty/webkit/include/WebCore/CookiesStrategy.h new file mode 100644 index 0000000..ee0f80b --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/CookiesStrategy.h @@ -0,0 +1 @@ +#include "WebCore/platform/CookiesStrategy.h" diff --git a/src/3rdparty/webkit/include/WebCore/Credential.h b/src/3rdparty/webkit/include/WebCore/Credential.h new file mode 100644 index 0000000..358cc97 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Credential.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/Credential.h" diff --git a/src/3rdparty/webkit/include/WebCore/CrossOriginPreflightResultCache.h b/src/3rdparty/webkit/include/WebCore/CrossOriginPreflightResultCache.h new file mode 100644 index 0000000..511572c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/CrossOriginPreflightResultCache.h @@ -0,0 +1 @@ +#include "WebCore/loader/CrossOriginPreflightResultCache.h" diff --git a/src/3rdparty/webkit/include/WebCore/Cursor.h b/src/3rdparty/webkit/include/WebCore/Cursor.h new file mode 100644 index 0000000..416929f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Cursor.h @@ -0,0 +1 @@ +#include "WebCore/platform/Cursor.h" diff --git a/src/3rdparty/webkit/include/WebCore/DOMImplementation.h b/src/3rdparty/webkit/include/WebCore/DOMImplementation.h new file mode 100644 index 0000000..9e37ed5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DOMImplementation.h @@ -0,0 +1 @@ +#include "WebCore/dom/DOMImplementation.h" diff --git a/src/3rdparty/webkit/include/WebCore/DOMWrapperWorld.h b/src/3rdparty/webkit/include/WebCore/DOMWrapperWorld.h new file mode 100644 index 0000000..15450f6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DOMWrapperWorld.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/DOMWrapperWorld.h" diff --git a/src/3rdparty/webkit/include/WebCore/DatabaseDetails.h b/src/3rdparty/webkit/include/WebCore/DatabaseDetails.h new file mode 100644 index 0000000..1759bd3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DatabaseDetails.h @@ -0,0 +1 @@ +#include "WebCore/storage/DatabaseDetails.h" diff --git a/src/3rdparty/webkit/include/WebCore/DatabaseTracker.h b/src/3rdparty/webkit/include/WebCore/DatabaseTracker.h new file mode 100644 index 0000000..e4e9f82 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DatabaseTracker.h @@ -0,0 +1 @@ +#include "WebCore/storage/DatabaseTracker.h" diff --git a/src/3rdparty/webkit/include/WebCore/DatabaseTrackerClient.h b/src/3rdparty/webkit/include/WebCore/DatabaseTrackerClient.h new file mode 100644 index 0000000..d020ce1 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DatabaseTrackerClient.h @@ -0,0 +1 @@ +#include "WebCore/storage/DatabaseTrackerClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/Document.h b/src/3rdparty/webkit/include/WebCore/Document.h new file mode 100644 index 0000000..064119d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Document.h @@ -0,0 +1 @@ +#include "WebCore/dom/Document.h" diff --git a/src/3rdparty/webkit/include/WebCore/DocumentFragment.h b/src/3rdparty/webkit/include/WebCore/DocumentFragment.h new file mode 100644 index 0000000..4ff6d72 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DocumentFragment.h @@ -0,0 +1 @@ +#include "WebCore/dom/DocumentFragment.h" diff --git a/src/3rdparty/webkit/include/WebCore/DocumentLoader.h b/src/3rdparty/webkit/include/WebCore/DocumentLoader.h new file mode 100644 index 0000000..b93cbb0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DocumentLoader.h @@ -0,0 +1 @@ +#include "WebCore/loader/DocumentLoader.h" diff --git a/src/3rdparty/webkit/include/WebCore/DocumentMarkerController.h b/src/3rdparty/webkit/include/WebCore/DocumentMarkerController.h new file mode 100644 index 0000000..74f9fc4 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DocumentMarkerController.h @@ -0,0 +1 @@ +#include "WebCore/dom/DocumentMarkerController.h" diff --git a/src/3rdparty/webkit/include/WebCore/DragActions.h b/src/3rdparty/webkit/include/WebCore/DragActions.h new file mode 100644 index 0000000..8e4d0b3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DragActions.h @@ -0,0 +1 @@ +#include "WebCore/page/DragActions.h" diff --git a/src/3rdparty/webkit/include/WebCore/DragClient.h b/src/3rdparty/webkit/include/WebCore/DragClient.h new file mode 100644 index 0000000..e9a96a5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DragClient.h @@ -0,0 +1 @@ +#include "WebCore/page/DragClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/DragController.h b/src/3rdparty/webkit/include/WebCore/DragController.h new file mode 100644 index 0000000..30de072 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DragController.h @@ -0,0 +1 @@ +#include "WebCore/page/DragController.h" diff --git a/src/3rdparty/webkit/include/WebCore/DragData.h b/src/3rdparty/webkit/include/WebCore/DragData.h new file mode 100644 index 0000000..d66db38 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/DragData.h @@ -0,0 +1 @@ +#include "WebCore/platform/DragData.h" diff --git a/src/3rdparty/webkit/include/WebCore/EditAction.h b/src/3rdparty/webkit/include/WebCore/EditAction.h new file mode 100644 index 0000000..75200b2 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EditAction.h @@ -0,0 +1 @@ +#include "WebCore/editing/EditAction.h" diff --git a/src/3rdparty/webkit/include/WebCore/EditCommand.h b/src/3rdparty/webkit/include/WebCore/EditCommand.h new file mode 100644 index 0000000..06d9145 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EditCommand.h @@ -0,0 +1 @@ +#include "WebCore/editing/EditCommand.h" diff --git a/src/3rdparty/webkit/include/WebCore/Editor.h b/src/3rdparty/webkit/include/WebCore/Editor.h new file mode 100644 index 0000000..1d2a300 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Editor.h @@ -0,0 +1 @@ +#include "WebCore/editing/Editor.h" diff --git a/src/3rdparty/webkit/include/WebCore/EditorClient.h b/src/3rdparty/webkit/include/WebCore/EditorClient.h new file mode 100644 index 0000000..027fb4e --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EditorClient.h @@ -0,0 +1 @@ +#include "WebCore/page/EditorClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/EditorInsertAction.h b/src/3rdparty/webkit/include/WebCore/EditorInsertAction.h new file mode 100644 index 0000000..7fc8a54 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EditorInsertAction.h @@ -0,0 +1 @@ +#include "WebCore/editing/EditorInsertAction.h" diff --git a/src/3rdparty/webkit/include/WebCore/Element.h b/src/3rdparty/webkit/include/WebCore/Element.h new file mode 100644 index 0000000..ead3556 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Element.h @@ -0,0 +1 @@ +#include "WebCore/dom/Element.h" diff --git a/src/3rdparty/webkit/include/WebCore/EmptyProtocolDefinitions.h b/src/3rdparty/webkit/include/WebCore/EmptyProtocolDefinitions.h new file mode 100644 index 0000000..c75e216 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EmptyProtocolDefinitions.h @@ -0,0 +1 @@ +#include "WebCore/platform/mac/EmptyProtocolDefinitions.h" diff --git a/src/3rdparty/webkit/include/WebCore/Event.h b/src/3rdparty/webkit/include/WebCore/Event.h new file mode 100644 index 0000000..3a79434 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Event.h @@ -0,0 +1 @@ +#include "WebCore/dom/Event.h" diff --git a/src/3rdparty/webkit/include/WebCore/EventHandler.h b/src/3rdparty/webkit/include/WebCore/EventHandler.h new file mode 100644 index 0000000..afb7092 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/EventHandler.h @@ -0,0 +1 @@ +#include "WebCore/page/EventHandler.h" diff --git a/src/3rdparty/webkit/include/WebCore/FileChooser.h b/src/3rdparty/webkit/include/WebCore/FileChooser.h new file mode 100644 index 0000000..e968b5c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FileChooser.h @@ -0,0 +1 @@ +#include "WebCore/platform/FileChooser.h" diff --git a/src/3rdparty/webkit/include/WebCore/FileSystem.h b/src/3rdparty/webkit/include/WebCore/FileSystem.h new file mode 100644 index 0000000..27195b9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FileSystem.h @@ -0,0 +1 @@ +#include "WebCore/platform/FileSystem.h" diff --git a/src/3rdparty/webkit/include/WebCore/FloatPoint.h b/src/3rdparty/webkit/include/WebCore/FloatPoint.h new file mode 100644 index 0000000..9246f21 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FloatPoint.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/FloatPoint.h" diff --git a/src/3rdparty/webkit/include/WebCore/FloatRect.h b/src/3rdparty/webkit/include/WebCore/FloatRect.h new file mode 100644 index 0000000..b18898f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FloatRect.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/FloatRect.h" diff --git a/src/3rdparty/webkit/include/WebCore/FloatSize.h b/src/3rdparty/webkit/include/WebCore/FloatSize.h new file mode 100644 index 0000000..0178b44 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FloatSize.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/FloatSize.h" diff --git a/src/3rdparty/webkit/include/WebCore/FocusController.h b/src/3rdparty/webkit/include/WebCore/FocusController.h new file mode 100644 index 0000000..4fb9ab7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FocusController.h @@ -0,0 +1 @@ +#include "WebCore/page/FocusController.h" diff --git a/src/3rdparty/webkit/include/WebCore/FocusDirection.h b/src/3rdparty/webkit/include/WebCore/FocusDirection.h new file mode 100644 index 0000000..1c76ae5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FocusDirection.h @@ -0,0 +1 @@ +#include "WebCore/page/FocusDirection.h" diff --git a/src/3rdparty/webkit/include/WebCore/Font.h b/src/3rdparty/webkit/include/WebCore/Font.h new file mode 100644 index 0000000..84ae5e6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Font.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Font.h" diff --git a/src/3rdparty/webkit/include/WebCore/FontRenderingMode.h b/src/3rdparty/webkit/include/WebCore/FontRenderingMode.h new file mode 100644 index 0000000..3f2925c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FontRenderingMode.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/FontRenderingMode.h" diff --git a/src/3rdparty/webkit/include/WebCore/FormState.h b/src/3rdparty/webkit/include/WebCore/FormState.h new file mode 100644 index 0000000..2be503d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FormState.h @@ -0,0 +1 @@ +#include "WebCore/loader/FormState.h" diff --git a/src/3rdparty/webkit/include/WebCore/Frame.h b/src/3rdparty/webkit/include/WebCore/Frame.h new file mode 100644 index 0000000..447a563 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Frame.h @@ -0,0 +1 @@ +#include "WebCore/page/Frame.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameLoadRequest.h b/src/3rdparty/webkit/include/WebCore/FrameLoadRequest.h new file mode 100644 index 0000000..3744166 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameLoadRequest.h @@ -0,0 +1 @@ +#include "WebCore/page/FrameLoadRequest.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameLoader.h b/src/3rdparty/webkit/include/WebCore/FrameLoader.h new file mode 100644 index 0000000..d5f7c97 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameLoader.h @@ -0,0 +1 @@ +#include "WebCore/loader/FrameLoader.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameLoaderClient.h b/src/3rdparty/webkit/include/WebCore/FrameLoaderClient.h new file mode 100644 index 0000000..140b7a1 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameLoaderClient.h @@ -0,0 +1 @@ +#include "WebCore/loader/FrameLoaderClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameLoaderTypes.h b/src/3rdparty/webkit/include/WebCore/FrameLoaderTypes.h new file mode 100644 index 0000000..5b12e86 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameLoaderTypes.h @@ -0,0 +1 @@ +#include "WebCore/loader/FrameLoaderTypes.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameNetworkingContext.h b/src/3rdparty/webkit/include/WebCore/FrameNetworkingContext.h new file mode 100644 index 0000000..1e37ea8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameNetworkingContext.h @@ -0,0 +1 @@ +#include "WebCore/loader/FrameNetworkingContext.h" diff --git a/src/3rdparty/webkit/include/WebCore/FrameView.h b/src/3rdparty/webkit/include/WebCore/FrameView.h new file mode 100644 index 0000000..0e85324 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/FrameView.h @@ -0,0 +1 @@ +#include "WebCore/page/FrameView.h" diff --git a/src/3rdparty/webkit/include/WebCore/GCController.h b/src/3rdparty/webkit/include/WebCore/GCController.h new file mode 100644 index 0000000..c528ce0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GCController.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/GCController.h" diff --git a/src/3rdparty/webkit/include/WebCore/Geolocation.h b/src/3rdparty/webkit/include/WebCore/Geolocation.h new file mode 100644 index 0000000..3fe78ca --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Geolocation.h @@ -0,0 +1 @@ +#include "WebCore/page/Geolocation.h" diff --git a/src/3rdparty/webkit/include/WebCore/GeolocationClient.h b/src/3rdparty/webkit/include/WebCore/GeolocationClient.h new file mode 100644 index 0000000..f77eb42 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GeolocationClient.h @@ -0,0 +1 @@ +#include "WebCore/page/GeolocationClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/GeolocationController.h b/src/3rdparty/webkit/include/WebCore/GeolocationController.h new file mode 100644 index 0000000..e929b83 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GeolocationController.h @@ -0,0 +1 @@ +#include "WebCore/page/GeolocationController.h" diff --git a/src/3rdparty/webkit/include/WebCore/GeolocationError.h b/src/3rdparty/webkit/include/WebCore/GeolocationError.h new file mode 100644 index 0000000..657e27c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GeolocationError.h @@ -0,0 +1 @@ +#include "WebCore/page/GeolocationError.h" diff --git a/src/3rdparty/webkit/include/WebCore/GeolocationPosition.h b/src/3rdparty/webkit/include/WebCore/GeolocationPosition.h new file mode 100644 index 0000000..19f09cc --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GeolocationPosition.h @@ -0,0 +1 @@ +#include "WebCore/page/GeolocationPosition.h" diff --git a/src/3rdparty/webkit/include/WebCore/Gradient.h b/src/3rdparty/webkit/include/WebCore/Gradient.h new file mode 100644 index 0000000..33ab685 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Gradient.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Gradient.h" diff --git a/src/3rdparty/webkit/include/WebCore/GraphicsContext.h b/src/3rdparty/webkit/include/WebCore/GraphicsContext.h new file mode 100644 index 0000000..e82ec75 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GraphicsContext.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/GraphicsContext.h" diff --git a/src/3rdparty/webkit/include/WebCore/GraphicsContextCG.h b/src/3rdparty/webkit/include/WebCore/GraphicsContextCG.h new file mode 100644 index 0000000..c71753f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GraphicsContextCG.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/cg/GraphicsContextCG.h" diff --git a/src/3rdparty/webkit/include/WebCore/GraphicsLayer.h b/src/3rdparty/webkit/include/WebCore/GraphicsLayer.h new file mode 100644 index 0000000..3387101 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GraphicsLayer.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/GraphicsLayer.h" diff --git a/src/3rdparty/webkit/include/WebCore/GraphicsLayerCA.h b/src/3rdparty/webkit/include/WebCore/GraphicsLayerCA.h new file mode 100644 index 0000000..314d55c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GraphicsLayerCA.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/ca/GraphicsLayerCA.h" diff --git a/src/3rdparty/webkit/include/WebCore/GraphicsLayerClient.h b/src/3rdparty/webkit/include/WebCore/GraphicsLayerClient.h new file mode 100644 index 0000000..10e9e60 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/GraphicsLayerClient.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/GraphicsLayerClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLAppletElement.h b/src/3rdparty/webkit/include/WebCore/HTMLAppletElement.h new file mode 100644 index 0000000..c0bacf1 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLAppletElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLAppletElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLFormElement.h b/src/3rdparty/webkit/include/WebCore/HTMLFormElement.h new file mode 100644 index 0000000..83db912 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLFormElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLFormElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLFrameElement.h b/src/3rdparty/webkit/include/WebCore/HTMLFrameElement.h new file mode 100644 index 0000000..2a59d8c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLFrameElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLFrameElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLFrameOwnerElement.h b/src/3rdparty/webkit/include/WebCore/HTMLFrameOwnerElement.h new file mode 100644 index 0000000..1219a12 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLFrameOwnerElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLFrameOwnerElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLIFrameElement.h b/src/3rdparty/webkit/include/WebCore/HTMLIFrameElement.h new file mode 100644 index 0000000..fe96ccf --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLIFrameElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLIFrameElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLInputElement.h b/src/3rdparty/webkit/include/WebCore/HTMLInputElement.h new file mode 100644 index 0000000..60100aa --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLInputElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLInputElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLMediaElement.h b/src/3rdparty/webkit/include/WebCore/HTMLMediaElement.h new file mode 100644 index 0000000..d332c0a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLMediaElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLMediaElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLPlugInElement.h b/src/3rdparty/webkit/include/WebCore/HTMLPlugInElement.h new file mode 100644 index 0000000..c3eb10f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLPlugInElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLPlugInElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLPlugInImageElement.h b/src/3rdparty/webkit/include/WebCore/HTMLPlugInImageElement.h new file mode 100644 index 0000000..38c638c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLPlugInImageElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLPlugInImageElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLTableCellElement.h b/src/3rdparty/webkit/include/WebCore/HTMLTableCellElement.h new file mode 100644 index 0000000..2e3e09d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLTableCellElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLTableCellElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTMLTextAreaElement.h b/src/3rdparty/webkit/include/WebCore/HTMLTextAreaElement.h new file mode 100644 index 0000000..6613ae6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTMLTextAreaElement.h @@ -0,0 +1 @@ +#include "WebCore/html/HTMLTextAreaElement.h" diff --git a/src/3rdparty/webkit/include/WebCore/HTTPHeaderMap.h b/src/3rdparty/webkit/include/WebCore/HTTPHeaderMap.h new file mode 100644 index 0000000..a48b2ce --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HTTPHeaderMap.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/HTTPHeaderMap.h" diff --git a/src/3rdparty/webkit/include/WebCore/HistoryItem.h b/src/3rdparty/webkit/include/WebCore/HistoryItem.h new file mode 100644 index 0000000..284e4b9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HistoryItem.h @@ -0,0 +1 @@ +#include "WebCore/history/HistoryItem.h" diff --git a/src/3rdparty/webkit/include/WebCore/HitTestRequest.h b/src/3rdparty/webkit/include/WebCore/HitTestRequest.h new file mode 100644 index 0000000..6f1f0d8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HitTestRequest.h @@ -0,0 +1 @@ +#include "WebCore/rendering/HitTestRequest.h" diff --git a/src/3rdparty/webkit/include/WebCore/HitTestResult.h b/src/3rdparty/webkit/include/WebCore/HitTestResult.h new file mode 100644 index 0000000..50e3246 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HitTestResult.h @@ -0,0 +1 @@ +#include "WebCore/rendering/HitTestResult.h" diff --git a/src/3rdparty/webkit/include/WebCore/HostWindow.h b/src/3rdparty/webkit/include/WebCore/HostWindow.h new file mode 100644 index 0000000..82bd27f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/HostWindow.h @@ -0,0 +1 @@ +#include "WebCore/platform/HostWindow.h" diff --git a/src/3rdparty/webkit/include/WebCore/Icon.h b/src/3rdparty/webkit/include/WebCore/Icon.h new file mode 100644 index 0000000..3b027fc --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Icon.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Icon.h" diff --git a/src/3rdparty/webkit/include/WebCore/IconDatabase.h b/src/3rdparty/webkit/include/WebCore/IconDatabase.h new file mode 100644 index 0000000..ba2985a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IconDatabase.h @@ -0,0 +1 @@ +#include "WebCore/loader/icon/IconDatabase.h" diff --git a/src/3rdparty/webkit/include/WebCore/IconDatabaseBase.h b/src/3rdparty/webkit/include/WebCore/IconDatabaseBase.h new file mode 100644 index 0000000..9cc3e82 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IconDatabaseBase.h @@ -0,0 +1 @@ +#include "WebCore/loader/icon/IconDatabaseBase.h" diff --git a/src/3rdparty/webkit/include/WebCore/IconDatabaseClient.h b/src/3rdparty/webkit/include/WebCore/IconDatabaseClient.h new file mode 100644 index 0000000..f70b84e --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IconDatabaseClient.h @@ -0,0 +1 @@ +#include "WebCore/loader/icon/IconDatabaseClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/IdentifierRep.h b/src/3rdparty/webkit/include/WebCore/IdentifierRep.h new file mode 100644 index 0000000..51a75d6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IdentifierRep.h @@ -0,0 +1 @@ +#include "WebCore/bridge/IdentifierRep.h" diff --git a/src/3rdparty/webkit/include/WebCore/Image.h b/src/3rdparty/webkit/include/WebCore/Image.h new file mode 100644 index 0000000..9e713f4 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Image.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Image.h" diff --git a/src/3rdparty/webkit/include/WebCore/InspectorClient.h b/src/3rdparty/webkit/include/WebCore/InspectorClient.h new file mode 100644 index 0000000..7cc8863 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/InspectorClient.h @@ -0,0 +1 @@ +#include "WebCore/inspector/InspectorClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/InspectorController.h b/src/3rdparty/webkit/include/WebCore/InspectorController.h new file mode 100644 index 0000000..f3bf6a7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/InspectorController.h @@ -0,0 +1 @@ +#include "WebCore/inspector/InspectorController.h" diff --git a/src/3rdparty/webkit/include/WebCore/InspectorFrontendClientLocal.h b/src/3rdparty/webkit/include/WebCore/InspectorFrontendClientLocal.h new file mode 100644 index 0000000..de2f131 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/InspectorFrontendClientLocal.h @@ -0,0 +1 @@ +#include "WebCore/inspector/InspectorFrontendClientLocal.h" diff --git a/src/3rdparty/webkit/include/WebCore/IntPoint.h b/src/3rdparty/webkit/include/WebCore/IntPoint.h new file mode 100644 index 0000000..6738be4 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IntPoint.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/IntPoint.h" diff --git a/src/3rdparty/webkit/include/WebCore/IntRect.h b/src/3rdparty/webkit/include/WebCore/IntRect.h new file mode 100644 index 0000000..9ff65c1 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IntRect.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/IntRect.h" diff --git a/src/3rdparty/webkit/include/WebCore/IntRectHash.h b/src/3rdparty/webkit/include/WebCore/IntRectHash.h new file mode 100644 index 0000000..f21fc99 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IntRectHash.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/IntRectHash.h" diff --git a/src/3rdparty/webkit/include/WebCore/IntSize.h b/src/3rdparty/webkit/include/WebCore/IntSize.h new file mode 100644 index 0000000..1ed1253 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/IntSize.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/IntSize.h" diff --git a/src/3rdparty/webkit/include/WebCore/JSCSSStyleDeclaration.h b/src/3rdparty/webkit/include/WebCore/JSCSSStyleDeclaration.h new file mode 100644 index 0000000..9b6643c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/JSCSSStyleDeclaration.h @@ -0,0 +1 @@ +#include "WebCore/generated/JSCSSStyleDeclaration.h" diff --git a/src/3rdparty/webkit/include/WebCore/JSPluginElementFunctions.h b/src/3rdparty/webkit/include/WebCore/JSPluginElementFunctions.h new file mode 100644 index 0000000..be5c4e6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/JSPluginElementFunctions.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/JSPluginElementFunctions.h" diff --git a/src/3rdparty/webkit/include/WebCore/KURL.h b/src/3rdparty/webkit/include/WebCore/KURL.h new file mode 100644 index 0000000..66540b2 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/KURL.h @@ -0,0 +1 @@ +#include "WebCore/platform/KURL.h" diff --git a/src/3rdparty/webkit/include/WebCore/KeyboardEvent.h b/src/3rdparty/webkit/include/WebCore/KeyboardEvent.h new file mode 100644 index 0000000..10fe215 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/KeyboardEvent.h @@ -0,0 +1 @@ +#include "WebCore/dom/KeyboardEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/Language.h b/src/3rdparty/webkit/include/WebCore/Language.h new file mode 100644 index 0000000..fb27338 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Language.h @@ -0,0 +1 @@ +#include "WebCore/platform/Language.h" diff --git a/src/3rdparty/webkit/include/WebCore/LinkHash.h b/src/3rdparty/webkit/include/WebCore/LinkHash.h new file mode 100644 index 0000000..c5c7438 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/LinkHash.h @@ -0,0 +1 @@ +#include "WebCore/platform/LinkHash.h" diff --git a/src/3rdparty/webkit/include/WebCore/LocalizedStrings.h b/src/3rdparty/webkit/include/WebCore/LocalizedStrings.h new file mode 100644 index 0000000..1a0a77a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/LocalizedStrings.h @@ -0,0 +1 @@ +#include "WebCore/platform/LocalizedStrings.h" diff --git a/src/3rdparty/webkit/include/WebCore/Logging.h b/src/3rdparty/webkit/include/WebCore/Logging.h new file mode 100644 index 0000000..b85d7b8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Logging.h @@ -0,0 +1 @@ +#include "WebCore/platform/Logging.h" diff --git a/src/3rdparty/webkit/include/WebCore/MIMETypeRegistry.h b/src/3rdparty/webkit/include/WebCore/MIMETypeRegistry.h new file mode 100644 index 0000000..0c39b17 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/MIMETypeRegistry.h @@ -0,0 +1 @@ +#include "WebCore/platform/MIMETypeRegistry.h" diff --git a/src/3rdparty/webkit/include/WebCore/MediaCanStartListener.h b/src/3rdparty/webkit/include/WebCore/MediaCanStartListener.h new file mode 100644 index 0000000..7c78efc --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/MediaCanStartListener.h @@ -0,0 +1 @@ +#include "WebCore/page/MediaCanStartListener.h" diff --git a/src/3rdparty/webkit/include/WebCore/MemoryCache.h b/src/3rdparty/webkit/include/WebCore/MemoryCache.h new file mode 100644 index 0000000..c903f1d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/MemoryCache.h @@ -0,0 +1 @@ +#include "WebCore/loader/cache/MemoryCache.h" diff --git a/src/3rdparty/webkit/include/WebCore/MouseEvent.h b/src/3rdparty/webkit/include/WebCore/MouseEvent.h new file mode 100644 index 0000000..5f43397 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/MouseEvent.h @@ -0,0 +1 @@ +#include "WebCore/dom/MouseEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/NavigationAction.h b/src/3rdparty/webkit/include/WebCore/NavigationAction.h new file mode 100644 index 0000000..ca0f93c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/NavigationAction.h @@ -0,0 +1 @@ +#include "WebCore/loader/NavigationAction.h" diff --git a/src/3rdparty/webkit/include/WebCore/NetscapePlugInStreamLoader.h b/src/3rdparty/webkit/include/WebCore/NetscapePlugInStreamLoader.h new file mode 100644 index 0000000..8047c20 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/NetscapePlugInStreamLoader.h @@ -0,0 +1 @@ +#include "WebCore/loader/NetscapePlugInStreamLoader.h" diff --git a/src/3rdparty/webkit/include/WebCore/NetworkingContext.h b/src/3rdparty/webkit/include/WebCore/NetworkingContext.h new file mode 100644 index 0000000..7a2e974 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/NetworkingContext.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/NetworkingContext.h" diff --git a/src/3rdparty/webkit/include/WebCore/Node.h b/src/3rdparty/webkit/include/WebCore/Node.h new file mode 100644 index 0000000..eca5439 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Node.h @@ -0,0 +1 @@ +#include "WebCore/dom/Node.h" diff --git a/src/3rdparty/webkit/include/WebCore/NotImplemented.h b/src/3rdparty/webkit/include/WebCore/NotImplemented.h new file mode 100644 index 0000000..d9198fc --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/NotImplemented.h @@ -0,0 +1 @@ +#include "WebCore/platform/NotImplemented.h" diff --git a/src/3rdparty/webkit/include/WebCore/Page.h b/src/3rdparty/webkit/include/WebCore/Page.h new file mode 100644 index 0000000..ea3c5b3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Page.h @@ -0,0 +1 @@ +#include "WebCore/page/Page.h" diff --git a/src/3rdparty/webkit/include/WebCore/PageCache.h b/src/3rdparty/webkit/include/WebCore/PageCache.h new file mode 100644 index 0000000..3210b0e --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PageCache.h @@ -0,0 +1 @@ +#include "WebCore/history/PageCache.h" diff --git a/src/3rdparty/webkit/include/WebCore/PageGroup.h b/src/3rdparty/webkit/include/WebCore/PageGroup.h new file mode 100644 index 0000000..2dd1abd --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PageGroup.h @@ -0,0 +1 @@ +#include "WebCore/page/PageGroup.h" diff --git a/src/3rdparty/webkit/include/WebCore/Path.h b/src/3rdparty/webkit/include/WebCore/Path.h new file mode 100644 index 0000000..add6db3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Path.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/Path.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformCALayer.h b/src/3rdparty/webkit/include/WebCore/PlatformCALayer.h new file mode 100644 index 0000000..bfa9258 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformCALayer.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/ca/PlatformCALayer.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformContextCairo.h b/src/3rdparty/webkit/include/WebCore/PlatformContextCairo.h new file mode 100644 index 0000000..ccd6a92 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformContextCairo.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/cairo/PlatformContextCairo.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformGestureEvent.h b/src/3rdparty/webkit/include/WebCore/PlatformGestureEvent.h new file mode 100644 index 0000000..377e5cb --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformGestureEvent.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformGestureEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformKeyboardEvent.h b/src/3rdparty/webkit/include/WebCore/PlatformKeyboardEvent.h new file mode 100644 index 0000000..19d8251 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformKeyboardEvent.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformKeyboardEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformMouseEvent.h b/src/3rdparty/webkit/include/WebCore/PlatformMouseEvent.h new file mode 100644 index 0000000..9d0abba --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformMouseEvent.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformMouseEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformStrategies.h b/src/3rdparty/webkit/include/WebCore/PlatformStrategies.h new file mode 100644 index 0000000..641c5d2 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformStrategies.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformStrategies.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformTouchEvent.h b/src/3rdparty/webkit/include/WebCore/PlatformTouchEvent.h new file mode 100644 index 0000000..7628c0a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformTouchEvent.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformTouchEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformTouchPoint.h b/src/3rdparty/webkit/include/WebCore/PlatformTouchPoint.h new file mode 100644 index 0000000..ef0c316 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformTouchPoint.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformTouchPoint.h" diff --git a/src/3rdparty/webkit/include/WebCore/PlatformWheelEvent.h b/src/3rdparty/webkit/include/WebCore/PlatformWheelEvent.h new file mode 100644 index 0000000..23a8af9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PlatformWheelEvent.h @@ -0,0 +1 @@ +#include "WebCore/platform/PlatformWheelEvent.h" diff --git a/src/3rdparty/webkit/include/WebCore/PluginData.h b/src/3rdparty/webkit/include/WebCore/PluginData.h new file mode 100644 index 0000000..26ad15a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PluginData.h @@ -0,0 +1 @@ +#include "WebCore/plugins/PluginData.h" diff --git a/src/3rdparty/webkit/include/WebCore/PluginStrategy.h b/src/3rdparty/webkit/include/WebCore/PluginStrategy.h new file mode 100644 index 0000000..4c84db0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PluginStrategy.h @@ -0,0 +1 @@ +#include "WebCore/plugins/PluginStrategy.h" diff --git a/src/3rdparty/webkit/include/WebCore/PluginViewBase.h b/src/3rdparty/webkit/include/WebCore/PluginViewBase.h new file mode 100644 index 0000000..c5d0535 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PluginViewBase.h @@ -0,0 +1 @@ +#include "WebCore/plugins/PluginViewBase.h" diff --git a/src/3rdparty/webkit/include/WebCore/PolicyChecker.h b/src/3rdparty/webkit/include/WebCore/PolicyChecker.h new file mode 100644 index 0000000..98c0626 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PolicyChecker.h @@ -0,0 +1 @@ +#include "WebCore/loader/PolicyChecker.h" diff --git a/src/3rdparty/webkit/include/WebCore/PopupMenu.h b/src/3rdparty/webkit/include/WebCore/PopupMenu.h new file mode 100644 index 0000000..e4764a8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PopupMenu.h @@ -0,0 +1 @@ +#include "WebCore/platform/PopupMenu.h" diff --git a/src/3rdparty/webkit/include/WebCore/PopupMenuClient.h b/src/3rdparty/webkit/include/WebCore/PopupMenuClient.h new file mode 100644 index 0000000..dba5017 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PopupMenuClient.h @@ -0,0 +1 @@ +#include "WebCore/platform/PopupMenuClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/PopupMenuStyle.h b/src/3rdparty/webkit/include/WebCore/PopupMenuStyle.h new file mode 100644 index 0000000..e51de9b --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PopupMenuStyle.h @@ -0,0 +1 @@ +#include "WebCore/platform/PopupMenuStyle.h" diff --git a/src/3rdparty/webkit/include/WebCore/PrintContext.h b/src/3rdparty/webkit/include/WebCore/PrintContext.h new file mode 100644 index 0000000..f234cb6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/PrintContext.h @@ -0,0 +1 @@ +#include "WebCore/page/PrintContext.h" diff --git a/src/3rdparty/webkit/include/WebCore/ProgressTracker.h b/src/3rdparty/webkit/include/WebCore/ProgressTracker.h new file mode 100644 index 0000000..3fff316 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ProgressTracker.h @@ -0,0 +1 @@ +#include "WebCore/loader/ProgressTracker.h" diff --git a/src/3rdparty/webkit/include/WebCore/ProtectionSpace.h b/src/3rdparty/webkit/include/WebCore/ProtectionSpace.h new file mode 100644 index 0000000..be6afe5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ProtectionSpace.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/ProtectionSpace.h" diff --git a/src/3rdparty/webkit/include/WebCore/ProxyServer.h b/src/3rdparty/webkit/include/WebCore/ProxyServer.h new file mode 100644 index 0000000..a933b78 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ProxyServer.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/ProxyServer.h" diff --git a/src/3rdparty/webkit/include/WebCore/Range.h b/src/3rdparty/webkit/include/WebCore/Range.h new file mode 100644 index 0000000..21ebad8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Range.h @@ -0,0 +1 @@ +#include "WebCore/dom/Range.h" diff --git a/src/3rdparty/webkit/include/WebCore/RenderEmbeddedObject.h b/src/3rdparty/webkit/include/WebCore/RenderEmbeddedObject.h new file mode 100644 index 0000000..31be6c9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RenderEmbeddedObject.h @@ -0,0 +1 @@ +#include "WebCore/rendering/RenderEmbeddedObject.h" diff --git a/src/3rdparty/webkit/include/WebCore/RenderLayer.h b/src/3rdparty/webkit/include/WebCore/RenderLayer.h new file mode 100644 index 0000000..aefe178 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RenderLayer.h @@ -0,0 +1 @@ +#include "WebCore/rendering/RenderLayer.h" diff --git a/src/3rdparty/webkit/include/WebCore/RenderTheme.h b/src/3rdparty/webkit/include/WebCore/RenderTheme.h new file mode 100644 index 0000000..324d109 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RenderTheme.h @@ -0,0 +1 @@ +#include "WebCore/rendering/RenderTheme.h" diff --git a/src/3rdparty/webkit/include/WebCore/RenderTreeAsText.h b/src/3rdparty/webkit/include/WebCore/RenderTreeAsText.h new file mode 100644 index 0000000..7ae5171 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RenderTreeAsText.h @@ -0,0 +1 @@ +#include "WebCore/rendering/RenderTreeAsText.h" diff --git a/src/3rdparty/webkit/include/WebCore/RenderView.h b/src/3rdparty/webkit/include/WebCore/RenderView.h new file mode 100644 index 0000000..3402a57 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RenderView.h @@ -0,0 +1 @@ +#include "WebCore/rendering/RenderView.h" diff --git a/src/3rdparty/webkit/include/WebCore/ReplaceSelectionCommand.h b/src/3rdparty/webkit/include/WebCore/ReplaceSelectionCommand.h new file mode 100644 index 0000000..e320498 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ReplaceSelectionCommand.h @@ -0,0 +1 @@ +#include "WebCore/editing/ReplaceSelectionCommand.h" diff --git a/src/3rdparty/webkit/include/WebCore/ResourceHandle.h b/src/3rdparty/webkit/include/WebCore/ResourceHandle.h new file mode 100644 index 0000000..42a0e20 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ResourceHandle.h @@ -0,0 +1 @@ +#include "WebCore/platform/network/ResourceHandle.h" diff --git a/src/3rdparty/webkit/include/WebCore/ResourceLoadScheduler.h b/src/3rdparty/webkit/include/WebCore/ResourceLoadScheduler.h new file mode 100644 index 0000000..5cf5d4b --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ResourceLoadScheduler.h @@ -0,0 +1 @@ +#include "WebCore/loader/ResourceLoadScheduler.h" diff --git a/src/3rdparty/webkit/include/WebCore/RuntimeEnabledFeatures.h b/src/3rdparty/webkit/include/WebCore/RuntimeEnabledFeatures.h new file mode 100644 index 0000000..a8e879b --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/RuntimeEnabledFeatures.h @@ -0,0 +1 @@ +#include "WebCore/bindings/generic/RuntimeEnabledFeatures.h" diff --git a/src/3rdparty/webkit/include/WebCore/SchemeRegistry.h b/src/3rdparty/webkit/include/WebCore/SchemeRegistry.h new file mode 100644 index 0000000..6c89b6a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SchemeRegistry.h @@ -0,0 +1 @@ +#include "WebCore/platform/SchemeRegistry.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScriptController.h b/src/3rdparty/webkit/include/WebCore/ScriptController.h new file mode 100644 index 0000000..5bd55f4 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScriptController.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/ScriptController.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScriptValue.h b/src/3rdparty/webkit/include/WebCore/ScriptValue.h new file mode 100644 index 0000000..4afbad7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScriptValue.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/ScriptValue.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScrollTypes.h b/src/3rdparty/webkit/include/WebCore/ScrollTypes.h new file mode 100644 index 0000000..c35b2f3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScrollTypes.h @@ -0,0 +1 @@ +#include "WebCore/platform/ScrollTypes.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScrollView.h b/src/3rdparty/webkit/include/WebCore/ScrollView.h new file mode 100644 index 0000000..6b4f7f6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScrollView.h @@ -0,0 +1 @@ +#include "WebCore/platform/ScrollView.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScrollableArea.h b/src/3rdparty/webkit/include/WebCore/ScrollableArea.h new file mode 100644 index 0000000..11afb5f --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScrollableArea.h @@ -0,0 +1 @@ +#include "WebCore/platform/ScrollableArea.h" diff --git a/src/3rdparty/webkit/include/WebCore/Scrollbar.h b/src/3rdparty/webkit/include/WebCore/Scrollbar.h new file mode 100644 index 0000000..9fe1514 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Scrollbar.h @@ -0,0 +1 @@ +#include "WebCore/platform/Scrollbar.h" diff --git a/src/3rdparty/webkit/include/WebCore/ScrollbarTheme.h b/src/3rdparty/webkit/include/WebCore/ScrollbarTheme.h new file mode 100644 index 0000000..fc4e762 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ScrollbarTheme.h @@ -0,0 +1 @@ +#include "WebCore/platform/ScrollbarTheme.h" diff --git a/src/3rdparty/webkit/include/WebCore/SearchPopupMenu.h b/src/3rdparty/webkit/include/WebCore/SearchPopupMenu.h new file mode 100644 index 0000000..637ad39 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SearchPopupMenu.h @@ -0,0 +1 @@ +#include "WebCore/platform/SearchPopupMenu.h" diff --git a/src/3rdparty/webkit/include/WebCore/SecurityOrigin.h b/src/3rdparty/webkit/include/WebCore/SecurityOrigin.h new file mode 100644 index 0000000..5b00657 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SecurityOrigin.h @@ -0,0 +1 @@ +#include "WebCore/page/SecurityOrigin.h" diff --git a/src/3rdparty/webkit/include/WebCore/SecurityOriginHash.h b/src/3rdparty/webkit/include/WebCore/SecurityOriginHash.h new file mode 100644 index 0000000..dac6640 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SecurityOriginHash.h @@ -0,0 +1 @@ +#include "WebCore/page/SecurityOriginHash.h" diff --git a/src/3rdparty/webkit/include/WebCore/SerializedScriptValue.h b/src/3rdparty/webkit/include/WebCore/SerializedScriptValue.h new file mode 100644 index 0000000..2186c56 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SerializedScriptValue.h @@ -0,0 +1 @@ +#include "WebCore/bindings/js/SerializedScriptValue.h" diff --git a/src/3rdparty/webkit/include/WebCore/Settings.h b/src/3rdparty/webkit/include/WebCore/Settings.h new file mode 100644 index 0000000..3a29adc --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Settings.h @@ -0,0 +1 @@ +#include "WebCore/page/Settings.h" diff --git a/src/3rdparty/webkit/include/WebCore/ShadowRoot.h b/src/3rdparty/webkit/include/WebCore/ShadowRoot.h new file mode 100644 index 0000000..1a832bb --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ShadowRoot.h @@ -0,0 +1 @@ +#include "WebCore/dom/ShadowRoot.h" diff --git a/src/3rdparty/webkit/include/WebCore/SharedBuffer.h b/src/3rdparty/webkit/include/WebCore/SharedBuffer.h new file mode 100644 index 0000000..95eedd0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SharedBuffer.h @@ -0,0 +1 @@ +#include "WebCore/platform/SharedBuffer.h" diff --git a/src/3rdparty/webkit/include/WebCore/SimpleFontData.h b/src/3rdparty/webkit/include/WebCore/SimpleFontData.h new file mode 100644 index 0000000..3d90d29 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SimpleFontData.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/SimpleFontData.h" diff --git a/src/3rdparty/webkit/include/WebCore/SoftLinking.h b/src/3rdparty/webkit/include/WebCore/SoftLinking.h new file mode 100644 index 0000000..3ceb0c0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SoftLinking.h @@ -0,0 +1 @@ +#include "WebCore/platform/mac/SoftLinking.h" diff --git a/src/3rdparty/webkit/include/WebCore/SpellingCorrectionController.h b/src/3rdparty/webkit/include/WebCore/SpellingCorrectionController.h new file mode 100644 index 0000000..d7c0571 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SpellingCorrectionController.h @@ -0,0 +1 @@ +#include "WebCore/editing/SpellingCorrectionController.h" diff --git a/src/3rdparty/webkit/include/WebCore/StorageTracker.h b/src/3rdparty/webkit/include/WebCore/StorageTracker.h new file mode 100644 index 0000000..55d240a --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/StorageTracker.h @@ -0,0 +1 @@ +#include "WebCore/storage/StorageTracker.h" diff --git a/src/3rdparty/webkit/include/WebCore/SubstituteData.h b/src/3rdparty/webkit/include/WebCore/SubstituteData.h new file mode 100644 index 0000000..47db253 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/SubstituteData.h @@ -0,0 +1 @@ +#include "WebCore/loader/SubstituteData.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextAffinity.h b/src/3rdparty/webkit/include/WebCore/TextAffinity.h new file mode 100644 index 0000000..e97160c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextAffinity.h @@ -0,0 +1 @@ +#include "WebCore/editing/TextAffinity.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextCheckerClient.h b/src/3rdparty/webkit/include/WebCore/TextCheckerClient.h new file mode 100644 index 0000000..860e675 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextCheckerClient.h @@ -0,0 +1 @@ +#include "WebCore/platform/text/TextCheckerClient.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextDirection.h b/src/3rdparty/webkit/include/WebCore/TextDirection.h new file mode 100644 index 0000000..de842d6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextDirection.h @@ -0,0 +1 @@ +#include "WebCore/platform/text/TextDirection.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextIterator.h b/src/3rdparty/webkit/include/WebCore/TextIterator.h new file mode 100644 index 0000000..193bbd8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextIterator.h @@ -0,0 +1 @@ +#include "WebCore/editing/TextIterator.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextResourceDecoder.h b/src/3rdparty/webkit/include/WebCore/TextResourceDecoder.h new file mode 100644 index 0000000..75eae5c --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextResourceDecoder.h @@ -0,0 +1 @@ +#include "WebCore/loader/TextResourceDecoder.h" diff --git a/src/3rdparty/webkit/include/WebCore/TextRun.h b/src/3rdparty/webkit/include/WebCore/TextRun.h new file mode 100644 index 0000000..8e2a041 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/TextRun.h @@ -0,0 +1 @@ +#include "WebCore/platform/graphics/TextRun.h" diff --git a/src/3rdparty/webkit/include/WebCore/Timer.h b/src/3rdparty/webkit/include/WebCore/Timer.h new file mode 100644 index 0000000..62727b1 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Timer.h @@ -0,0 +1 @@ +#include "WebCore/platform/Timer.h" diff --git a/src/3rdparty/webkit/include/WebCore/UIEventWithKeyState.h b/src/3rdparty/webkit/include/WebCore/UIEventWithKeyState.h new file mode 100644 index 0000000..c0ac9aa --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UIEventWithKeyState.h @@ -0,0 +1 @@ +#include "WebCore/dom/UIEventWithKeyState.h" diff --git a/src/3rdparty/webkit/include/WebCore/UserContentTypes.h b/src/3rdparty/webkit/include/WebCore/UserContentTypes.h new file mode 100644 index 0000000..cf75a72 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UserContentTypes.h @@ -0,0 +1 @@ +#include "WebCore/page/UserContentTypes.h" diff --git a/src/3rdparty/webkit/include/WebCore/UserContentURLPattern.h b/src/3rdparty/webkit/include/WebCore/UserContentURLPattern.h new file mode 100644 index 0000000..877c9cb --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UserContentURLPattern.h @@ -0,0 +1 @@ +#include "WebCore/page/UserContentURLPattern.h" diff --git a/src/3rdparty/webkit/include/WebCore/UserGestureIndicator.h b/src/3rdparty/webkit/include/WebCore/UserGestureIndicator.h new file mode 100644 index 0000000..384902e --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UserGestureIndicator.h @@ -0,0 +1 @@ +#include "WebCore/dom/UserGestureIndicator.h" diff --git a/src/3rdparty/webkit/include/WebCore/UserScriptTypes.h b/src/3rdparty/webkit/include/WebCore/UserScriptTypes.h new file mode 100644 index 0000000..bdd9ec8 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UserScriptTypes.h @@ -0,0 +1 @@ +#include "WebCore/page/UserScriptTypes.h" diff --git a/src/3rdparty/webkit/include/WebCore/UserTypingGestureIndicator.h b/src/3rdparty/webkit/include/WebCore/UserTypingGestureIndicator.h new file mode 100644 index 0000000..b7a34a4 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/UserTypingGestureIndicator.h @@ -0,0 +1 @@ +#include "WebCore/dom/UserTypingGestureIndicator.h" diff --git a/src/3rdparty/webkit/include/WebCore/ViewportArguments.h b/src/3rdparty/webkit/include/WebCore/ViewportArguments.h new file mode 100644 index 0000000..dd0911d --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/ViewportArguments.h @@ -0,0 +1 @@ +#include "WebCore/dom/ViewportArguments.h" diff --git a/src/3rdparty/webkit/include/WebCore/VisiblePosition.h b/src/3rdparty/webkit/include/WebCore/VisiblePosition.h new file mode 100644 index 0000000..5575815 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/VisiblePosition.h @@ -0,0 +1 @@ +#include "WebCore/editing/VisiblePosition.h" diff --git a/src/3rdparty/webkit/include/WebCore/VisitedLinkStrategy.h b/src/3rdparty/webkit/include/WebCore/VisitedLinkStrategy.h new file mode 100644 index 0000000..f5b8a57 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/VisitedLinkStrategy.h @@ -0,0 +1 @@ +#include "WebCore/platform/VisitedLinkStrategy.h" diff --git a/src/3rdparty/webkit/include/WebCore/WebCoreKeyboardUIMode.h b/src/3rdparty/webkit/include/WebCore/WebCoreKeyboardUIMode.h new file mode 100644 index 0000000..8b748d3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/WebCoreKeyboardUIMode.h @@ -0,0 +1 @@ +#include "WebCore/page/WebCoreKeyboardUIMode.h" diff --git a/src/3rdparty/webkit/include/WebCore/Widget.h b/src/3rdparty/webkit/include/WebCore/Widget.h new file mode 100644 index 0000000..d4e2687 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/Widget.h @@ -0,0 +1 @@ +#include "WebCore/platform/Widget.h" diff --git a/src/3rdparty/webkit/include/WebCore/WindowFeatures.h b/src/3rdparty/webkit/include/WebCore/WindowFeatures.h new file mode 100644 index 0000000..bb349fd --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/WindowFeatures.h @@ -0,0 +1 @@ +#include "WebCore/page/WindowFeatures.h" diff --git a/src/3rdparty/webkit/include/WebCore/markup.h b/src/3rdparty/webkit/include/WebCore/markup.h new file mode 100644 index 0000000..05cdeea --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/markup.h @@ -0,0 +1 @@ +#include "WebCore/editing/markup.h" diff --git a/src/3rdparty/webkit/include/WebCore/npapi.h b/src/3rdparty/webkit/include/WebCore/npapi.h new file mode 100644 index 0000000..ec1c3b0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/npapi.h @@ -0,0 +1 @@ +#include "WebCore/bridge/npapi.h" diff --git a/src/3rdparty/webkit/include/WebCore/npfunctions.h b/src/3rdparty/webkit/include/WebCore/npfunctions.h new file mode 100644 index 0000000..151ef69 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/npfunctions.h @@ -0,0 +1 @@ +#include "WebCore/plugins/npfunctions.h" diff --git a/src/3rdparty/webkit/include/WebCore/npruntime.h b/src/3rdparty/webkit/include/WebCore/npruntime.h new file mode 100644 index 0000000..271e548 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/npruntime.h @@ -0,0 +1 @@ +#include "WebCore/bridge/npruntime.h" diff --git a/src/3rdparty/webkit/include/WebCore/npruntime_internal.h b/src/3rdparty/webkit/include/WebCore/npruntime_internal.h new file mode 100644 index 0000000..255abc3 --- /dev/null +++ b/src/3rdparty/webkit/include/WebCore/npruntime_internal.h @@ -0,0 +1 @@ +#include "WebCore/bridge/npruntime_internal.h" diff --git a/src/3rdparty/webkit/include/WebKit2/RunLoop.h b/src/3rdparty/webkit/include/WebKit2/RunLoop.h new file mode 100644 index 0000000..d6f6d5f --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/RunLoop.h @@ -0,0 +1 @@ +#include "WebKit2/Platform/RunLoop.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKArray.h b/src/3rdparty/webkit/include/WebKit2/WKArray.h new file mode 100644 index 0000000..b3841b0 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKArray.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKArray.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKBackForwardList.h b/src/3rdparty/webkit/include/WebKit2/WKBackForwardList.h new file mode 100644 index 0000000..26f2e74 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKBackForwardList.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKBackForwardList.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKBackForwardListItem.h b/src/3rdparty/webkit/include/WebKit2/WKBackForwardListItem.h new file mode 100644 index 0000000..e609686 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKBackForwardListItem.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKBackForwardListItem.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKBase.h b/src/3rdparty/webkit/include/WebKit2/WKBase.h new file mode 100644 index 0000000..c859bf9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKBase.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKBase.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKContext.h b/src/3rdparty/webkit/include/WebKit2/WKContext.h new file mode 100644 index 0000000..c884b67 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKContext.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKContext.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKContextMenuItemTypes.h b/src/3rdparty/webkit/include/WebKit2/WKContextMenuItemTypes.h new file mode 100644 index 0000000..62e0aa9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKContextMenuItemTypes.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKContextMenuItemTypes.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKCookieManager.h b/src/3rdparty/webkit/include/WebKit2/WKCookieManager.h new file mode 100644 index 0000000..3ff208f --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKCookieManager.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKCookieManager.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKCredentialTypes.h b/src/3rdparty/webkit/include/WebKit2/WKCredentialTypes.h new file mode 100644 index 0000000..6221bc7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKCredentialTypes.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKCredentialTypes.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKData.h b/src/3rdparty/webkit/include/WebKit2/WKData.h new file mode 100644 index 0000000..794eedf --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKData.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKData.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKDictionary.h b/src/3rdparty/webkit/include/WebKit2/WKDictionary.h new file mode 100644 index 0000000..570f234 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKDictionary.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKDictionary.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKError.h b/src/3rdparty/webkit/include/WebKit2/WKError.h new file mode 100644 index 0000000..4cf78d6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKError.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKError.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKEvent.h b/src/3rdparty/webkit/include/WebKit2/WKEvent.h new file mode 100644 index 0000000..e58bc1c --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKEvent.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKEvent.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKFindOptions.h b/src/3rdparty/webkit/include/WebKit2/WKFindOptions.h new file mode 100644 index 0000000..1e4ef92 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKFindOptions.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKFindOptions.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKFormSubmissionListener.h b/src/3rdparty/webkit/include/WebKit2/WKFormSubmissionListener.h new file mode 100644 index 0000000..b4cceb7 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKFormSubmissionListener.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKFormSubmissionListener.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKFrame.h b/src/3rdparty/webkit/include/WebKit2/WKFrame.h new file mode 100644 index 0000000..3ac6529 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKFrame.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKFrame.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKFramePolicyListener.h b/src/3rdparty/webkit/include/WebKit2/WKFramePolicyListener.h new file mode 100644 index 0000000..7916c38 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKFramePolicyListener.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKFramePolicyListener.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKGeolocationManager.h b/src/3rdparty/webkit/include/WebKit2/WKGeolocationManager.h new file mode 100644 index 0000000..3e503e6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKGeolocationManager.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKGeolocationManager.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKGeolocationPermissionRequest.h b/src/3rdparty/webkit/include/WebKit2/WKGeolocationPermissionRequest.h new file mode 100644 index 0000000..5205a0e --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKGeolocationPermissionRequest.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKGeolocationPermissionRequest.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKGeolocationPosition.h b/src/3rdparty/webkit/include/WebKit2/WKGeolocationPosition.h new file mode 100644 index 0000000..cff7f23 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKGeolocationPosition.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKGeolocationPosition.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKGeometry.h b/src/3rdparty/webkit/include/WebKit2/WKGeometry.h new file mode 100644 index 0000000..b84460c --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKGeometry.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKGeometry.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKGraphicsContext.h b/src/3rdparty/webkit/include/WebKit2/WKGraphicsContext.h new file mode 100644 index 0000000..fbccdc9 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKGraphicsContext.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKGraphicsContext.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKImage.h b/src/3rdparty/webkit/include/WebKit2/WKImage.h new file mode 100644 index 0000000..a02314d --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKImage.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKImage.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKMutableArray.h b/src/3rdparty/webkit/include/WebKit2/WKMutableArray.h new file mode 100644 index 0000000..a47af3b --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKMutableArray.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKMutableArray.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKMutableDictionary.h b/src/3rdparty/webkit/include/WebKit2/WKMutableDictionary.h new file mode 100644 index 0000000..0c345f5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKMutableDictionary.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKMutableDictionary.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKNativeEvent.h b/src/3rdparty/webkit/include/WebKit2/WKNativeEvent.h new file mode 100644 index 0000000..deeb2a5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKNativeEvent.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKNativeEvent.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKNavigationData.h b/src/3rdparty/webkit/include/WebKit2/WKNavigationData.h new file mode 100644 index 0000000..9607b97 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKNavigationData.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKNavigationData.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKNumber.h b/src/3rdparty/webkit/include/WebKit2/WKNumber.h new file mode 100644 index 0000000..7924588 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKNumber.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKNumber.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKOpenPanelParameters.h b/src/3rdparty/webkit/include/WebKit2/WKOpenPanelParameters.h new file mode 100644 index 0000000..b0c4134 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKOpenPanelParameters.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKOpenPanelParameters.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKOpenPanelResultListener.h b/src/3rdparty/webkit/include/WebKit2/WKOpenPanelResultListener.h new file mode 100644 index 0000000..a3b015d --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKOpenPanelResultListener.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKOpenPanelResultListener.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKPage.h b/src/3rdparty/webkit/include/WebKit2/WKPage.h new file mode 100644 index 0000000..75d785c --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKPage.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKPage.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKPageGroup.h b/src/3rdparty/webkit/include/WebKit2/WKPageGroup.h new file mode 100644 index 0000000..eefeb25 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKPageGroup.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKPageGroup.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKPageLoadTypes.h b/src/3rdparty/webkit/include/WebKit2/WKPageLoadTypes.h new file mode 100644 index 0000000..cd39b9d --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKPageLoadTypes.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKPageLoadTypes.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKPreferences.h b/src/3rdparty/webkit/include/WebKit2/WKPreferences.h new file mode 100644 index 0000000..5777a3a --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKPreferences.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKPreferences.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKProtectionSpaceTypes.h b/src/3rdparty/webkit/include/WebKit2/WKProtectionSpaceTypes.h new file mode 100644 index 0000000..025ce94 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKProtectionSpaceTypes.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/C/WKProtectionSpaceTypes.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKRetainPtr.h b/src/3rdparty/webkit/include/WebKit2/WKRetainPtr.h new file mode 100644 index 0000000..5e58f97 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKRetainPtr.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/cpp/WKRetainPtr.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKString.h b/src/3rdparty/webkit/include/WebKit2/WKString.h new file mode 100644 index 0000000..381b3c6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKString.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKString.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKType.h b/src/3rdparty/webkit/include/WebKit2/WKType.h new file mode 100644 index 0000000..addabdd --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKType.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKType.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKURL.h b/src/3rdparty/webkit/include/WebKit2/WKURL.h new file mode 100644 index 0000000..d7f765b --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKURL.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKURL.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKURLRequest.h b/src/3rdparty/webkit/include/WebKit2/WKURLRequest.h new file mode 100644 index 0000000..21d3b70 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKURLRequest.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKURLRequest.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKURLResponse.h b/src/3rdparty/webkit/include/WebKit2/WKURLResponse.h new file mode 100644 index 0000000..f62c0f5 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKURLResponse.h @@ -0,0 +1 @@ +#include "WebKit2/Shared/API/c/WKURLResponse.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WKView.h b/src/3rdparty/webkit/include/WebKit2/WKView.h new file mode 100644 index 0000000..4247dc6 --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WKView.h @@ -0,0 +1 @@ +#include "WebKit2/UIProcess/API/mac/WKView.h" diff --git a/src/3rdparty/webkit/include/WebKit2/WebProcess.h b/src/3rdparty/webkit/include/WebKit2/WebProcess.h new file mode 100644 index 0000000..9b8eb4a --- /dev/null +++ b/src/3rdparty/webkit/include/WebKit2/WebProcess.h @@ -0,0 +1 @@ +#include "WebKit2/WebProcess/WebProcess.h" diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h index 96b561e..dd465db 100644 --- a/src/corelib/arch/qatomic_armv6.h +++ b/src/corelib/arch/qatomic_armv6.h @@ -152,6 +152,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) asm volatile("0:\n" "ldrex %[result], [%[_q_value]]\n" "eors %[result], %[result], %[expectedValue]\n" + "itt eq\n" "strexeq %[result], %[newValue], [%[_q_value]]\n" "teqeq %[result], #1\n" "beq 0b\n" @@ -210,6 +211,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu asm volatile("0:\n" "ldrex %[result], [%[_q_value]]\n" "eors %[result], %[result], %[expectedValue]\n" + "itt eq\n" "strexeq %[result], %[newValue], [%[_q_value]]\n" "teqeq %[result], #1\n" "beq 0b\n" diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 985f515..dd06a2a 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -213,12 +213,13 @@ QTextCodecCleanup::~QTextCodecCleanup() destroying_is_ok = true; #endif - for (QList<QTextCodec *>::const_iterator it = all->constBegin() - ; it != all->constEnd(); ++it) { + QList<QTextCodec *> *myAll = all; + all = 0; // Otherwise the d'tor destroys the iterator + for (QList<QTextCodec *>::const_iterator it = myAll->constBegin() + ; it != myAll->constEnd(); ++it) { delete *it; } - delete all; - all = 0; + delete myAll; localeMapper = 0; #ifdef Q_DEBUG_TEXTCODEC diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 9c7f1c6..cfe5eea 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1924,50 +1924,51 @@ public: } }; +#define Q_GLOBAL_STATIC_INIT(TYPE, NAME) \ + static QGlobalStatic<TYPE > this_ ## NAME \ + = { Q_BASIC_ATOMIC_INITIALIZER(0), false } + #define Q_GLOBAL_STATIC(TYPE, NAME) \ static TYPE *NAME() \ { \ - static QGlobalStatic<TYPE > thisGlobalStatic \ - = { Q_BASIC_ATOMIC_INITIALIZER(0), false }; \ - if (!thisGlobalStatic.pointer && !thisGlobalStatic.destroyed) { \ + Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \ + if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \ TYPE *x = new TYPE; \ - if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) \ + if (!this__StaticVar_.pointer.testAndSetOrdered(0, x)) \ delete x; \ else \ - static QGlobalStaticDeleter<TYPE > cleanup(thisGlobalStatic); \ + static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \ } \ - return thisGlobalStatic.pointer; \ + return this__StaticVar_.pointer; \ } #define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \ static TYPE *NAME() \ { \ - static QGlobalStatic<TYPE > thisGlobalStatic \ - = { Q_BASIC_ATOMIC_INITIALIZER(0), false }; \ - if (!thisGlobalStatic.pointer && !thisGlobalStatic.destroyed) { \ + Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \ + if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \ TYPE *x = new TYPE ARGS; \ - if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) \ + if (!this__StaticVar_.pointer.testAndSetOrdered(0, x)) \ delete x; \ else \ - static QGlobalStaticDeleter<TYPE > cleanup(thisGlobalStatic); \ + static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \ } \ - return thisGlobalStatic.pointer; \ + return this__StaticVar_.pointer; \ } #define Q_GLOBAL_STATIC_WITH_INITIALIZER(TYPE, NAME, INITIALIZER) \ static TYPE *NAME() \ { \ - static QGlobalStatic<TYPE > thisGlobalStatic \ - = { Q_BASIC_ATOMIC_INITIALIZER(0), false }; \ - if (!thisGlobalStatic.pointer && !thisGlobalStatic.destroyed) { \ + Q_GLOBAL_STATIC_INIT(TYPE, _StaticVar_); \ + if (!this__StaticVar_.pointer && !this__StaticVar_.destroyed) { \ QScopedPointer<TYPE > x(new TYPE); \ INITIALIZER; \ - if (thisGlobalStatic.pointer.testAndSetOrdered(0, x.data())) { \ - static QGlobalStaticDeleter<TYPE > cleanup(thisGlobalStatic); \ + if (this__StaticVar_.pointer.testAndSetOrdered(0, x.data())) { \ + static QGlobalStaticDeleter<TYPE > cleanup(this__StaticVar_); \ x.take(); \ } \ } \ - return thisGlobalStatic.pointer; \ + return this__StaticVar_.pointer; \ } #endif diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index b31cf69..c0c62e1 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -802,14 +802,23 @@ QString QDir::convertSeparators(const QString &pathName) */ QString QDir::toNativeSeparators(const QString &pathName) { - QString n(pathName); #if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) - for (int i = 0; i < (int)n.length(); ++i) { - if (n[i] == QLatin1Char('/')) - n[i] = QLatin1Char('\\'); + int i = pathName.indexOf(QLatin1Char('/')); + if (i != -1) { + QString n(pathName); + + QChar * const data = n.data(); + data[i++] = QLatin1Char('\\'); + + for (; i < n.length(); ++i) { + if (data[i] == QLatin1Char('/')) + data[i] = QLatin1Char('\\'); + } + + return n; } #endif - return n; + return pathName; } /*! @@ -826,14 +835,23 @@ QString QDir::toNativeSeparators(const QString &pathName) */ QString QDir::fromNativeSeparators(const QString &pathName) { - QString n(pathName); #if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) - for (int i = 0; i < (int)n.length(); ++i) { - if (n[i] == QLatin1Char('\\')) - n[i] = QLatin1Char('/'); + int i = pathName.indexOf(QLatin1Char('\\')); + if (i != -1) { + QString n(pathName); + + QChar * const data = n.data(); + data[i++] = QLatin1Char('/'); + + for (; i < n.length(); ++i) { + if (data[i] == QLatin1Char('\\')) + data[i] = QLatin1Char('/'); + } + + return n; } #endif - return n; + return pathName; } /*! @@ -1615,9 +1633,13 @@ bool QDir::operator==(const QDir &dir) const if (d->filters == other->filters && d->sort == other->sort && d->nameFilters == other->nameFilters) { - d->resolveAbsoluteEntry(); - other->resolveAbsoluteEntry(); - return d->absoluteDirEntry.filePath().compare(other->absoluteDirEntry.filePath(), sensitive) == 0; + + // Assume directories are the same if path is the same + if (d->dirEntry.filePath() == other->dirEntry.filePath()) + return true; + + // Fallback to expensive canonical path computation + return canonicalPath().compare(dir.canonicalPath(), sensitive) == 0; } return false; } diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index ca42c87..ff328da 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -391,6 +391,11 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const return true; if (d->isDefaultConstructed || fileinfo.d_ptr->isDefaultConstructed) return false; + + // Assume files are the same if path is the same + if (d->fileEntry.filePath() == fileinfo.d_ptr->fileEntry.filePath()) + return true; + Qt::CaseSensitivity sensitive; if (d->fileEngine == 0 || fileinfo.d_ptr->fileEngine == 0) { if (d->fileEngine != fileinfo.d_ptr->fileEngine) // one is native, the other is a custom file-engine @@ -406,6 +411,7 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const if (fileinfo.size() != size()) //if the size isn't the same... return false; + // Fallback to expensive canonical path computation return canonicalFilePath().compare(fileinfo.canonicalFilePath(), sensitive) == 0; } diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index f704fc3..764ee6d 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -536,7 +536,7 @@ QFileSystemEntry QFileSystemEngine::absoluteName(const QFileSystemEntry &entry) // Force uppercase drive letters. ret[0] = ret.at(0).toUpper(); } - return QFileSystemEntry(ret); + return QFileSystemEntry(ret, QFileSystemEntry::FromInternalPath()); } //static @@ -1052,11 +1052,12 @@ QString QFileSystemEngine::tempPath() } if (ret.isEmpty()) { #if !defined(Q_OS_WINCE) - ret = QLatin1String("c:/tmp"); + ret = QLatin1String("C:/tmp"); #else ret = QLatin1String("/Temp"); #endif - } + } else if (ret.length() >= 2 && ret[1] == QLatin1Char(':')) + ret[0] = ret.at(0).toUpper(); // Force uppercase drive letters. return ret; } diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index 0855d93..e80a8b6 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -44,21 +44,18 @@ #ifndef QT_NO_TEMPORARYFILE #include "qplatformdefs.h" -#include "qabstractfileengine.h" #include "private/qfile_p.h" -#include "private/qabstractfileengine_p.h" #include "private/qfsfileengine_p.h" +#include "private/qsystemerror_p.h" +#include "private/qfilesystemengine_p.h" -#if !defined(Q_OS_WINCE) -# include <errno.h> +#if defined(Q_OS_SYMBIAN) +#include "private/qcore_symbian_p.h" #endif -#include <stdlib.h> -#include <time.h> -#include <ctype.h> - -#if defined(Q_OS_UNIX) -# include "private/qcore_unix_p.h" // overrides QT_OPEN +#if !defined(Q_OS_WIN) && !defined(Q_OS_SYMBIAN) +#include "private/qcore_unix_p.h" // overrides QT_OPEN +#include <errno.h> #endif #if defined(QT_BUILD_CORE_LIB) @@ -67,6 +64,30 @@ QT_BEGIN_NAMESPACE +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) +typedef ushort Char; + +static inline Char Latin1Char(char ch) +{ + return ushort(uchar(ch)); +} + +# ifdef Q_OS_WIN +typedef HANDLE NativeFileHandle; +# else // Q_OS_SYMBIAN +# ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API +typedef RFile64 NativeFileHandle; +# else +typedef RFile NativeFileHandle; +# endif +# endif + +#else // POSIX +typedef char Char; +typedef char Latin1Char; +typedef int NativeFileHandle; +#endif + /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -100,27 +121,33 @@ QT_BEGIN_NAMESPACE \internal Generates a unique file path and returns a native handle to the open file. - \a path is used as a template when generating unique paths, - \a placeholderStart and \a placeholderEnd delimit the sub-string that will - be randomized. + \a path is used as a template when generating unique paths, \a pos + identifies the position of the first character that will be replaced in the + template and \a length the number of characters that may be substituted. Returns an open handle to the newly created file if successful, an invalid handle otherwise. In both cases, the string in \a path will be changed and contain the generated path name. */ -static int createFileFromTemplate(char *const path, - char *const placeholderStart, char *const placeholderEnd) +static bool createFileFromTemplate(NativeFileHandle &file, + QFileSystemEntry::NativePath &path, size_t pos, size_t length, + QSystemError &error) { - Q_ASSERT(placeholderEnd > placeholderStart); + Q_ASSERT(length != 0); + Q_ASSERT(pos < size_t(path.length())); + Q_ASSERT(length <= size_t(path.length()) - pos); + + Char *const placeholderStart = (Char *)path.data() + pos; + Char *const placeholderEnd = placeholderStart + length; // Initialize placeholder with random chars + PID. { - char *rIter = placeholderEnd; + Char *rIter = placeholderEnd; #if defined(QT_BUILD_CORE_LIB) - qint64 pid = QCoreApplication::applicationPid(); + quint64 pid = quint64(QCoreApplication::applicationPid()); do { - *--rIter = (pid % 10) + '0'; + *--rIter = Latin1Char((pid % 10) + '0'); pid /= 10; } while (rIter != placeholderStart && pid != 0); #endif @@ -128,48 +155,93 @@ static int createFileFromTemplate(char *const path, while (rIter != placeholderStart) { char ch = char((qrand() & 0xffff) % (26 + 26)); if (ch < 26) - *--rIter = ch + 'A'; + *--rIter = Latin1Char(ch + 'A'); else - *--rIter = ch - 26 + 'a'; + *--rIter = Latin1Char(ch - 26 + 'a'); } } +#ifdef Q_OS_SYMBIAN + RFs& fs = qt_s60GetRFs(); +#endif + for (;;) { // Atomically create file and obtain handle -#ifndef Q_OS_WIN - { - int fd = QT_OPEN(path, QT_OPEN_CREAT | O_EXCL | QT_OPEN_RDWR | QT_OPEN_LARGEFILE, 0600); - if (fd != -1) - return fd; - if (errno != EEXIST) - return -1; +#if defined(Q_OS_WIN) + file = CreateFile((const wchar_t *)path.constData(), + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW, + FILE_ATTRIBUTE_NORMAL, NULL); + + if (file != INVALID_HANDLE_VALUE) + return true; + + DWORD err = GetLastError(); + if (err != ERROR_FILE_EXISTS) { + error = QSystemError(err, QSystemError::NativeError); + return false; + } +#elif defined(Q_OS_SYMBIAN) + TInt err = file.Create(fs, qt_QString2TPtrC(path), + EFileRead | EFileWrite | EFileShareReadersOrWriters); + + if (err == KErrNone) + return true; + + if (err != KErrAlreadyExists) { + error = QSystemError(err, QSystemError::NativeError); + return false; + } +#else // POSIX + file = QT_OPEN(path.constData(), + QT_OPEN_CREAT | O_EXCL | QT_OPEN_RDWR | QT_OPEN_LARGEFILE, + 0600); + + if (file != -1) + return true; + + int err = errno; + if (err != EEXIST) { + error = QSystemError(err, QSystemError::NativeError); + return false; } -#else - if (!QFileInfo(QLatin1String(path)).exists()) - return 1; #endif /* tricky little algorwwithm for backward compatibility */ - for (char *iter = placeholderStart;;) { + for (Char *iter = placeholderStart;;) { // Character progression: [0-9] => 'a' ... 'z' => 'A' .. 'Z' // String progression: "ZZaiC" => "aabiC" - if (*iter == 'Z') { - *iter++ = 'a'; - if (iter == placeholderEnd) - return -1; - } else { - if (isdigit(*iter)) - *iter = 'a'; - else if (*iter == 'z') /* inc from z to A */ - *iter = 'A'; - else { + switch (char(*iter)) { + case 'Z': + // Rollover, advance next character + *iter = Latin1Char('a'); + if (++iter == placeholderEnd) { + // Out of alternatives. Return file exists error, previously set. + error = QSystemError(err, QSystemError::NativeError); + return false; + } + + continue; + + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + *iter = Latin1Char('a'); + break; + + case 'z': + // increment 'z' to 'A' + *iter = Latin1Char('A'); + break; + + default: ++*iter; - } - break; + break; } + break; } } - /*NOTREACHED*/ + + Q_ASSERT(false); } //************* QTemporaryFileEngine @@ -250,7 +322,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) QString qfilename = d->fileEntry.filePath(); - // Find placeholder string. + // Ensure there is a placeholder mask uint phPos = qfilename.length(); uint phLength = 0; @@ -262,70 +334,73 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) continue; } - if (qfilename[phPos] == QLatin1Char('/') - || phLength >= 6) { + if (phLength >= 6 + || qfilename[phPos] == QLatin1Char('/')) { ++phPos; break; } + // start over phLength = 0; } - QStringRef prefix, suffix; - if (phLength < 6) { - qfilename += QLatin1Char('.'); - prefix = QStringRef(&qfilename); - phLength = 6; - } else { - prefix = qfilename.leftRef(phPos); - suffix = qfilename.midRef(phPos + phLength); - } + if (phLength < 6) + qfilename.append(QLatin1String(".XXXXXX")); - QByteArray filename = prefix.toLocal8Bit(); + // "Nativify" :-) + QFileSystemEntry::NativePath filename = QFileSystemEngine::absoluteName( + QFileSystemEntry(qfilename, QFileSystemEntry::FromInternalPath())) + .nativeFilePath(); + + // Find mask in native path phPos = filename.length(); - if (suffix.isEmpty()) - filename.resize(phPos + phLength); - else - filename.insert(phPos + phLength, suffix.toLocal8Bit()); - - char *path = filename.data(); - -#ifndef Q_OS_WIN - int fd = createFileFromTemplate(path, path + phPos, path + phPos + phLength); - if (fd != -1) { - // First open the fd as an external file descriptor to - // initialize the engine properly. - if (QFSFileEngine::open(openMode, fd)) { - - // Allow the engine to close the handle even if it's "external". - d->closeFileHandle = true; - - // Restore the file names (open() resets them). - d->fileEntry = QFileSystemEntry(QString::fromLocal8Bit(path, filename.length())); //note that filename is NOT a native path - filePathIsTemplate = false; - return true; + phLength = 0; + while (phPos != 0) { + --phPos; + + if (filename[phPos] == Latin1Char('X')) { + ++phLength; + continue; } - QT_CLOSE(fd); - } - setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError, qt_error_string(errno)); - return false; -#else - if (createFileFromTemplate(path, path + phPos, path + phPos + phLength) == -1) { - return false; + if (phLength >= 6) { + ++phPos; + break; + } + + // start over + phLength = 0; } - QString template_ = d->fileEntry.filePath(); - d->fileEntry = QFileSystemEntry(QString::fromLocal8Bit(path, filename.length())); + Q_ASSERT(phLength >= 6); - if (QFSFileEngine::open(openMode)) { - filePathIsTemplate = false; - return true; + QSystemError error; +#if defined(Q_OS_WIN) + NativeFileHandle &file = d->fileHandle; +#elif defined(Q_OS_SYMBIAN) + NativeFileHandle &file = d->symbianFile; +#else // POSIX + NativeFileHandle &file = d->fd; +#endif + + if (!createFileFromTemplate(file, filename, phPos, phLength, error)) { + setError(QFile::OpenError, error.toString()); + return false; } - d->fileEntry = QFileSystemEntry(template_); - return false; + d->fileEntry = QFileSystemEntry(filename, QFileSystemEntry::FromNativePath()); + +#if !defined(Q_OS_WIN) + d->closeFileHandle = true; #endif + + filePathIsTemplate = false; + + d->openMode = openMode; + d->lastFlushFailed = false; + d->tried_stat = 0; + + return true; } bool QTemporaryFileEngine::remove() diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 767b713..a8edea4 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -541,7 +541,7 @@ QByteArray qUncompress(const uchar* data, int nbytes) forever { ulong alloc = len; - if (len >= (1 << 31) - sizeof(QByteArray::Data)) { + if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) { //QByteArray does not support that huge size anyway. qWarning("qUncompress: Input data is corrupted"); return QByteArray(); @@ -561,7 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes) switch (res) { case Z_OK: if (len != alloc) { - if (len >= (1 << 31) - sizeof(QByteArray::Data)) { + if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) { //QByteArray does not support that huge size anyway. qWarning("qUncompress: Input data is corrupted"); return QByteArray(); diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 085103c..8e4fb32 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4040,8 +4040,11 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time) RTz tz; User::LeaveIfError(tz.Connect()); CleanupClosePushL(tz); - res.tm_isdst = tz.IsDaylightSavingOnL(*tz.GetTimeZoneIdL(),utcTTime); + CTzId *tzId = tz.GetTimeZoneIdL(); + CleanupStack::PushL(tzId); + res.tm_isdst = tz.IsDaylightSavingOnL(*tzId,utcTTime); User::LeaveIfError(tz.ConvertToLocalTime(utcTTime)); + CleanupStack::PopAndDestroy(tzId); CleanupStack::PopAndDestroy(&tz)); if (KErrNone == err) { TDateTime localDateTime = utcTTime.DateTime(); diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 0f67652..af3b7d5 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -564,9 +564,8 @@ qreal QLineF::length() const Returns the angle of the line in degrees. - The return value will be in the range of values from 0.0 up to but not - including 360.0. The angles are measured counter-clockwise from a point - on the x-axis to the right of the origin (x > 0). + Positive values for the angles mean counter-clockwise while negative values + mean the clockwise direction. Zero degrees is at the 3 o'clock position. \sa setAngle() */ diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp index 187ad67..9f68313 100644 --- a/src/dbus/qdbusabstractinterface.cpp +++ b/src/dbus/qdbusabstractinterface.cpp @@ -88,6 +88,7 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv : connection(con), service(serv), path(p), interface(iface), lastError(checkIfValid(serv, p, iface, isDynamic, (connectionPrivate() && connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode))), + timeout(-1), isValid(!lastError.isValid()) { if (!isValid) @@ -144,7 +145,7 @@ void QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, QVariant & QLatin1String("Get")); QDBusMessagePrivate::setParametersValidated(msg, true); msg << interface << QString::fromUtf8(mp.name()); - QDBusMessage reply = connection.call(msg, QDBus::Block); + QDBusMessage reply = connection.call(msg, QDBus::Block, timeout); if (reply.type() != QDBusMessage::ReplyMessage) { lastError = reply; @@ -210,7 +211,7 @@ bool QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const Q QLatin1String("Set")); QDBusMessagePrivate::setParametersValidated(msg, true); msg << interface << QString::fromUtf8(mp.name()) << QVariant::fromValue(QDBusVariant(value)); - QDBusMessage reply = connection.call(msg, QDBus::Block); + QDBusMessage reply = connection.call(msg, QDBus::Block, timeout); if (reply.type() != QDBusMessage::ReplyMessage) { lastError = reply; @@ -384,6 +385,28 @@ QDBusError QDBusAbstractInterface::lastError() const } /*! + Sets the timeout in seconds for all future DBus calls to \a timeout. + -1 means the default DBus timeout (usually 25 seconds). + + \since 4.8 +*/ +void QDBusAbstractInterface::setTimeout(int timeout) +{ + d_func()->timeout = timeout; +} + +/*! + Returns the current value of the timeout in seconds. + -1 means the default DBus timeout (usually 25 seconds). + + \since 4.8 +*/ +int QDBusAbstractInterface::timeout() const +{ + return d_func()->timeout; +} + +/*! Places a call to the remote method specified by \a method on this interface, using \a args as arguments. This function returns the message that was received as a reply, which can be a normal QDBusMessage::ReplyMessage (indicating success) or QDBusMessage::ErrorMessage (if the call @@ -442,7 +465,7 @@ QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode, QDBusMessagePrivate::setParametersValidated(msg, true); msg.setArguments(args); - QDBusMessage reply = d->connection.call(msg, mode); + QDBusMessage reply = d->connection.call(msg, mode, d->timeout); if (thread() == QThread::currentThread()) d->lastError = reply; // will clear if reply isn't an error @@ -475,7 +498,7 @@ QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), method); QDBusMessagePrivate::setParametersValidated(msg, true); msg.setArguments(args); - return d->connection.asyncCall(msg); + return d->connection.asyncCall(msg, d->timeout); } /*! diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h index 72b922e..34ff410 100644 --- a/src/dbus/qdbusabstractinterface.h +++ b/src/dbus/qdbusabstractinterface.h @@ -95,6 +95,9 @@ public: QDBusError lastError() const; + void setTimeout(int timeout); + int timeout() const; + QDBusMessage call(const QString &method, const QVariant &arg1 = QVariant(), const QVariant &arg2 = QVariant(), diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h index a000daf..4f96165 100644 --- a/src/dbus/qdbusabstractinterface_p.h +++ b/src/dbus/qdbusabstractinterface_p.h @@ -77,6 +77,7 @@ public: QString path; QString interface; mutable QDBusError lastError; + int timeout; // this is set during creation and never changed // it can't be const because QDBusInterfacePrivate has one more check diff --git a/src/declarative/debugger/qjsdebuggeragent.cpp b/src/declarative/debugger/qjsdebuggeragent.cpp index 683032b..5fc64e1 100644 --- a/src/declarative/debugger/qjsdebuggeragent.cpp +++ b/src/declarative/debugger/qjsdebuggeragent.cpp @@ -511,27 +511,24 @@ void QJSDebuggerAgentPrivate::positionChange(qint64 scriptId, int lineNumber, in // check breakpoints if (!breakpoints.isEmpty()) { - QHash<qint64, QString>::const_iterator it = filenames.constFind(scriptId); - QScriptContext *ctx = engine()->currentContext(); - QScriptContextInfo info(ctx); - if (it == filenames.constEnd()) { - // It is possible that the scripts are loaded before the agent is attached - QString filename = info.fileName(); + const QScriptContext *ctx = engine()->currentContext(); + const QScriptContextInfo info(ctx); - JSAgentStackData frame; - frame.functionName = info.functionName().toUtf8(); - - QPair<QString, qint32> key = qMakePair(filename, lineNumber); - it = filenames.insert(scriptId, filename); - } + if (info.functionType() == QScriptContextInfo::ScriptFunction) { + QHash<qint64, QString>::const_iterator it = filenames.constFind(scriptId); + // It is possible that the scripts are loaded before the agent is attached + if (it == filenames.constEnd()) { + it = filenames.insert(scriptId, info.fileName()); + } - const QString filePath = it.value(); - JSAgentBreakpoints bps = fileNameToBreakpoints.values(fileName(filePath)).toSet(); + const QString filePath = it.value(); + const JSAgentBreakpoints bps = fileNameToBreakpoints.values(fileName(filePath)).toSet(); - foreach (const JSAgentBreakpointData &bp, bps) { - if (bp.lineNumber == lineNumber) { - stopped(); - return; + foreach (const JSAgentBreakpointData &bp, bps) { + if (bp.lineNumber == lineNumber) { + stopped(); + return; + } } } } diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index b1ebec8..8787a5e 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -114,7 +114,7 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty bool AnimatedImage::cache - \since QtQuick 1.1 + \since Quick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -123,7 +123,7 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty bool AnimatedImage::mirror - \since QtQuick 1.1 + \since Quick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 4b4efb6..9c274e9 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -215,7 +215,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() /*! \qmlproperty bool BorderImage::cache - \since QtQuick 1.1 + \since Quick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -224,7 +224,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() /*! \qmlproperty bool BorderImage::mirror - \since QtQuick 1.1 + \since Quick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index fd2dc45..d5c58df 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1399,7 +1399,7 @@ void QDeclarativeFlickable::setContentHeight(qreal h) /*! \qmlmethod Flickable::resizeContent(real width, real height, QPointF center) \preliminary - \since QtQuick 1.1 + \since Quick 1.1 Resizes the content to \a width x \a height about \a center. @@ -1439,7 +1439,7 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center) /*! \qmlmethod Flickable::returnToBounds() \preliminary - \since QtQuick 1.1 + \since Quick 1.1 Ensures the content is within legal bounds. diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index e53472d..23433d6 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2618,7 +2618,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode) /*! \qmlmethod GridView::positionViewAtBeginning() \qmlmethod GridView::positionViewAtEnd() - \since QtQuick 1.1 + \since Quick 1.1 Positions the view at the beginning or end, taking into account any header or footer. diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 9b9d680..e6bb798 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -473,7 +473,7 @@ QRectF QDeclarativeImage::boundingRect() const /*! \qmlproperty bool Image::cache - \since QtQuick 1.1 + \since Quick 1.1 Specifies whether the image should be cached. The default value is true. Setting \a cache to false is useful when dealing with large images, @@ -482,7 +482,7 @@ QRectF QDeclarativeImage::boundingRect() const /*! \qmlproperty bool Image::mirror - \since QtQuick 1.1 + \since Quick 1.1 This property holds whether the image should be horizontally inverted (effectively displaying a mirrored image). diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index d36d163..805ca4d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -3480,7 +3480,7 @@ qreal QDeclarativeItem::implicitHeight() const /*! \qmlproperty real Item::implicitWidth \qmlproperty real Item::implicitHeight - \since QtQuick 1.1 + \since Quick 1.1 Defines the natural width or height of the Item if no \l width or \l height is specified. diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index f0fc96b..f29f778 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -3028,7 +3028,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode) /*! \qmlmethod ListView::positionViewAtBeginning() \qmlmethod ListView::positionViewAtEnd() - \since QtQuick 1.1 + \since Quick 1.1 Positions the view at the beginning or end, taking into account any header or footer. diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 0e06a4c..18f008a 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -419,7 +419,7 @@ void QDeclarativeMouseArea::setEnabled(bool a) /*! \qmlproperty bool MouseArea::preventStealing - \since QtQuick 1.1 + \since Quick 1.1 This property holds whether the mouse events may be stolen from this MouseArea. diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 483cad4..f3d1a68 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -584,7 +584,7 @@ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent) /*! \qmlproperty enumeration Row::layoutDirection - \since QtQuick 1.1 + \since Quick 1.1 This property holds the layoutDirection of the row. @@ -878,7 +878,7 @@ void QDeclarativeGrid::setFlow(Flow flow) /*! \qmlproperty enumeration Grid::layoutDirection - \since QtQuick 1.1 + \since Quick 1.1 This property holds the layout direction of the layout. @@ -1236,7 +1236,7 @@ void QDeclarativeFlow::setFlow(Flow flow) /*! \qmlproperty enumeration Flow::layoutDirection - \since QtQuick 1.1 + \since Quick 1.1 This property holds the layout direction of the layout. diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index e881b96..813c255 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -128,7 +128,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() /*! \qmlsignal Repeater::onItemAdded(int index, Item item) - \since QtQuick 1.1 + \since Quick 1.1 This handler is called when an item is added to the repeater. The \a index parameter holds the index at which the item has been inserted within the @@ -137,7 +137,7 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() /*! \qmlsignal Repeater::onItemRemoved(int index, Item item) - \since QtQuick 1.1 + \since Quick 1.1 This handler is called when an item is removed from the repeater. The \a index parameter holds the index at which the item was removed from the repeater, @@ -306,7 +306,7 @@ int QDeclarativeRepeater::count() const /*! \qmlmethod Item Repeater::itemAt(index) - \since QtQuick 1.1 + \since Quick 1.1 Returns the \l Item that has been created at the given \a index, or \c null if no item exists at \a index. diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 20e4eef..54ff406 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1190,7 +1190,7 @@ void QDeclarativeText::setWrapMode(WrapMode mode) /*! \qmlproperty int Text::lineCount - \since QtQuick 1.1 + \since Quick 1.1 Returns the number of lines visible in the text item. @@ -1206,7 +1206,7 @@ int QDeclarativeText::lineCount() const /*! \qmlproperty bool Text::truncated - \since QtQuick 1.1 + \since Quick 1.1 Returns true if the text has been truncated due to \l maximumLineCount or \l elide. @@ -1223,7 +1223,7 @@ bool QDeclarativeText::truncated() const /*! \qmlproperty int Text::maximumLineCount - \since QtQuick 1.1 + \since Quick 1.1 Set this property to limit the number of lines that the text item will show. If elide is set to Text.ElideRight, the text will be elided appropriately. @@ -1457,7 +1457,7 @@ qreal QDeclarativeText::paintedHeight() const /*! \qmlproperty real Text::lineHeight - \since QtQuick 1.1 + \since Quick 1.1 Sets the line height for the text. The value can be in pixels or a multiplier depending on lineHeightMode. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index ca7e948..0ea7ff3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -107,7 +107,7 @@ TextEdit { /*! \qmlsignal TextEdit::onLinkActivated(string link) - \since QtQuick 1.1 + \since Quick 1.1 This handler is called when the user clicks on a link embedded in the text. The link must be in rich text or HTML format and the @@ -546,7 +546,15 @@ bool QDeclarativeTextEditPrivate::determineHorizontalAlignment() { Q_Q(QDeclarativeTextEdit); if (hAlignImplicit && q->isComponentComplete()) { - bool alignToRight = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : rightToLeftText; + bool alignToRight; + if (text.isEmpty()) { + const QString preeditText = control->textCursor().block().layout()->preeditAreaText(); + alignToRight = preeditText.isEmpty() + ? QApplication::keyboardInputDirection() == Qt::RightToLeft + : preeditText.isRightToLeft(); + } else { + alignToRight = rightToLeftText; + } return setHAlign(alignToRight ? QDeclarativeTextEdit::AlignRight : QDeclarativeTextEdit::AlignLeft); } return false; @@ -615,7 +623,7 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode) /*! \qmlproperty int TextEdit::lineCount - \since QtQuick 1.1 + \since Quick 1.1 Returns the total number of lines in the textEdit item. */ @@ -709,7 +717,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos) /*! \qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters) - \since QtQuick 1.1 + \since Quick 1.1 Moves the cursor to \a position and updates the selection according to the optional \a mode parameter. (To only move the cursor, set the \l cursorPosition property.) @@ -1074,7 +1082,7 @@ void QDeclarativeTextEdit::setSelectByMouse(bool on) /*! \qmlproperty enum TextEdit::mouseSelectionMode - \since QtQuick 1.1 + \since Quick 1.1 Specifies how text should be selected using a mouse. @@ -1220,7 +1228,7 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus) /*! \qmlmethod void TextEdit::deselect() - \since QtQuick 1.1 + \since Quick 1.1 Removes active text selection. */ @@ -1581,6 +1589,7 @@ void QDeclarativeTextEdit::q_textChanged() void QDeclarativeTextEdit::moveCursorDelegate() { Q_D(QDeclarativeTextEdit); + d->determineHorizontalAlignment(); updateMicroFocus(); emit cursorRectangleChanged(); if(!d->cursor) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 5245236..cc3f0b9 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -407,7 +407,11 @@ bool QDeclarativeTextInputPrivate::determineHorizontalAlignment() if (hAlignImplicit) { // if no explicit alignment has been set, follow the natural layout direction of the text QString text = control->text(); - bool isRightToLeft = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : text.isRightToLeft(); + if (text.isEmpty()) + text = control->preeditAreaText(); + bool isRightToLeft = text.isEmpty() + ? QApplication::keyboardInputDirection() == Qt::RightToLeft + : text.isRightToLeft(); return setHAlign(isRightToLeft ? QDeclarativeTextInput::AlignRight : QDeclarativeTextInput::AlignLeft); } return false; @@ -874,7 +878,8 @@ void QDeclarativeTextInputPrivate::updateInputMethodHints() \o TextInput.Normal - Displays the text as it is. (Default) \o TextInput.Password - Displays asterixes instead of characters. \o TextInput.NoEcho - Displays nothing. - \o TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes. + \o TextInput.PasswordEchoOnEdit - Displays characters as they are entered + while editing, otherwise displays asterisks. \endlist */ QDeclarativeTextInput::EchoMode QDeclarativeTextInput::echoMode() const @@ -1010,7 +1015,7 @@ int QDeclarativeTextInput::positionAt(int x) const /*! \qmlmethod int TextInput::positionAt(int x, CursorPosition position = CursorBetweenCharacters) - \since QtQuick 1.1 + \since Quick 1.1 This function returns the character position at x pixels from the left of the textInput. Position 0 is before the @@ -1398,7 +1403,7 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) /*! \qmlmethod void TextInput::deselect() - \since QtQuick 1.1 + \since Quick 1.1 Removes active text selection. */ @@ -1570,7 +1575,7 @@ void QDeclarativeTextInput::setSelectByMouse(bool on) /*! \qmlproperty enum TextInput::mouseSelectionMode - \since QtQuick 1.1 + \since Quick 1.1 Specifies how text should be selected using a mouse. @@ -1618,7 +1623,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position) /*! \qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters) - \since QtQuick 1.1 + \since Quick 1.1 Moves the cursor to \a position and updates the selection according to the optional \a mode parameter. (To only move the cursor, set the \l cursorPosition property.) @@ -1906,6 +1911,7 @@ void QDeclarativeTextInput::cursorPosChanged() void QDeclarativeTextInput::updateCursorRectangle() { Q_D(QDeclarativeTextInput); + d->determineHorizontalAlignment(); d->updateHorizontalScroll(); updateRect();//TODO: Only update rect between pos's updateMicroFocus(); diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 26757b5..b896a77 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -1375,7 +1375,7 @@ void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent, Q_D(QDeclarativeVisualDataModel); const int count = sourceEnd - sourceStart + 1; if (destinationParent == d->m_root && sourceParent == d->m_root) { - _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-1, count); + _q_itemsMoved(sourceStart, sourceStart > destinationRow ? destinationRow : destinationRow-count, count); } else if (sourceParent == d->m_root) { _q_itemsRemoved(sourceStart, count); } else if (destinationParent == d->m_root) { diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 313fe58..51ffc10 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -143,17 +143,17 @@ struct Register { void setNaN() { setqreal(qSNaN()); } bool isUndefined() const { return type == 0; } - void setQObject(QObject *o) { *((QObject **)data) = o; type = QMetaType::QObjectStar; } - QObject *getQObject() const { return *((QObject **)data); } + void setQObject(QObject *o) { qobjectValue = o; type = QMetaType::QObjectStar; } + QObject *getQObject() const { return qobjectValue; } - void setqreal(qreal v) { *((qreal *)data) = v; type = QMetaType::QReal; } - qreal getqreal() const { return *((qreal *)data); } + void setqreal(qreal v) { qrealValue = v; type = QMetaType::QReal; } + qreal getqreal() const { return qrealValue; } - void setint(int v) { *((int *)data) = v; type = QMetaType::Int; } - int getint() const { return *((int *)data); } + void setint(int v) { intValue = v; type = QMetaType::Int; } + int getint() const { return intValue; } - void setbool(bool v) { *((bool *)data) = v; type = QMetaType::Bool; } - bool getbool() const { return *((bool *)data); } + void setbool(bool v) { boolValue = v; type = QMetaType::Bool; } + bool getbool() const { return boolValue; } QVariant *getvariantptr() { return (QVariant *)typeDataPtr(); } QString *getstringptr() { return (QString *)typeDataPtr(); } @@ -171,7 +171,15 @@ struct Register { void settype(int t) { type = t; } int type; // Optional type - void *data[2]; // Object stored here + union { + QObject *qobjectValue; + qreal qrealValue; + int intValue; + bool boolValue; + char data[sizeof(QVariant)]; + qint64 q_for_alignment_1; + double q_for_alignment_2; + }; #ifdef REGISTER_CLEANUP_DEBUG Register() { @@ -2388,7 +2396,7 @@ bool QDeclarativeBindingCompilerPrivate::parseConditional(QDeclarativeJS::AST::N skip.skip.reg = -1; bytecode << skip; - // Release to allow reuse of reg + // Release to allow reuse of reg in else path releaseReg(ok.reg); bytecode[skipIdx].skip.count = bytecode.count() - skipIdx - 1; @@ -2398,8 +2406,7 @@ bool QDeclarativeBindingCompilerPrivate::parseConditional(QDeclarativeJS::AST::N if (!parseExpression(expression->ko, ko)) return false; if (ko.unknownType) return false; - // Release to allow reuse of reg - releaseReg(ko.reg); + // Do not release reg here, so that its ownership passes to the caller bytecode[skipIdx2].skip.count = bytecode.count() - skipIdx2 - 1; if (ok != ko) diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h index 2a5eace..4f22b8f 100644 --- a/src/declarative/qml/qdeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedata_p.h @@ -55,10 +55,10 @@ #include <QtScript/qscriptvalue.h> #include <private/qobject_p.h> -#include "private/qdeclarativeguard_p.h" QT_BEGIN_NAMESPACE +class QDeclarativeGuardImpl; class QDeclarativeCompiledData; class QDeclarativeAbstractBinding; class QDeclarativeContext; @@ -134,7 +134,7 @@ public: quint32 objectDataRefCount; QDeclarativePropertyCache *propertyCache; - QDeclarativeGuard<QObject> *guards; + QDeclarativeGuardImpl *guards; static QDeclarativeData *get(const QObject *object, bool create = false) { QObjectPrivate *priv = QObjectPrivate::get(const_cast<QObject *>(object)); @@ -160,32 +160,6 @@ private: mutable QDeclarativeDataExtended *extendedData; }; -template<class T> -void QDeclarativeGuard<T>::addGuard() -{ - Q_ASSERT(!prev); - - if (QObjectPrivate::get(o)->wasDeleted) - return; - - QDeclarativeData *data = QDeclarativeData::get(o, true); - next = data->guards; - if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = &next; - data->guards = reinterpret_cast<QDeclarativeGuard<QObject> *>(this); - prev = &data->guards; -} - -template<class T> -void QDeclarativeGuard<T>::remGuard() -{ - Q_ASSERT(prev); - - if (next) reinterpret_cast<QDeclarativeGuard<T> *>(next)->prev = prev; - *prev = next; - next = 0; - prev = 0; -} - QT_END_NAMESPACE #endif // QDECLARATIVEDATA_P_H diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 8679445..34014f7 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1154,7 +1154,7 @@ void QDeclarativeData::destroyed(QObject *object) context->destroy(); while (guards) { - QDeclarativeGuard<QObject> *guard = guards; + QDeclarativeGuard<QObject> *guard = static_cast<QDeclarativeGuard<QObject> *>(guards); *guard = (QObject *)0; guard->objectDestroyed(object); } diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 8f22314..8707a7f 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -147,12 +147,6 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) if (binding) rv.binding = binding->expression(); - QVariant value; - if (prop.userType() != 0) { - value = prop.read(obj); - } - rv.value = valueContents(value); - if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { rv.type = QDeclarativeObjectProperty::Basic; } else if (QDeclarativeMetaType::isQObject(prop.userType())) { @@ -161,6 +155,12 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) rv.type = QDeclarativeObjectProperty::List; } + QVariant value; + if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) { + value = prop.read(obj); + } + rv.value = valueContents(value); + return rv; } diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h index a085258..4d84951 100644 --- a/src/declarative/qml/qdeclarativeguard_p.h +++ b/src/declarative/qml/qdeclarativeguard_p.h @@ -55,16 +55,30 @@ #include <QtCore/qglobal.h> #include <QtCore/qvariant.h> +#include <private/qdeclarativedata_p.h> QT_BEGIN_NAMESPACE +class QDeclarativeGuardImpl +{ +public: + inline QDeclarativeGuardImpl(); + inline QDeclarativeGuardImpl(QObject *); + inline QDeclarativeGuardImpl(const QDeclarativeGuardImpl &); + inline ~QDeclarativeGuardImpl(); + + QObject *o; + QDeclarativeGuardImpl *next; + QDeclarativeGuardImpl **prev; + + inline void addGuard(); + inline void remGuard(); +}; + class QObject; template<class T> -class QDeclarativeGuard +class QDeclarativeGuard : private QDeclarativeGuardImpl { - QObject *o; - QDeclarativeGuard<QObject> *next; - QDeclarativeGuard<QObject> **prev; friend class QDeclarativeData; public: inline QDeclarativeGuard(); @@ -74,6 +88,9 @@ public: inline QDeclarativeGuard<T> &operator=(const QDeclarativeGuard<T> &o); inline QDeclarativeGuard<T> &operator=(T *); + + inline T *object() const; + inline void setObject(T *g); inline bool isNull() const { return !o; } @@ -89,69 +106,109 @@ public: protected: virtual void objectDestroyed(T *) {} - -private: - inline void addGuard(); - inline void remGuard(); }; -QT_END_NAMESPACE +QDeclarativeGuardImpl::QDeclarativeGuardImpl() +: o(0), next(0), prev(0) +{ +} -Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>) +QDeclarativeGuardImpl::QDeclarativeGuardImpl(QObject *g) +: o(g), next(0), prev(0) +{ + if (o) addGuard(); +} -#include "private/qdeclarativedata_p.h" +QDeclarativeGuardImpl::QDeclarativeGuardImpl(const QDeclarativeGuardImpl &g) +: o(g.o), next(0), prev(0) +{ + if (o) addGuard(); +} -QT_BEGIN_NAMESPACE +QDeclarativeGuardImpl::~QDeclarativeGuardImpl() +{ + if (prev) remGuard(); + o = 0; +} + +void QDeclarativeGuardImpl::addGuard() +{ + Q_ASSERT(!prev); + + if (QObjectPrivate::get(o)->wasDeleted) + return; + + QDeclarativeData *data = QDeclarativeData::get(o, true); + next = data->guards; + if (next) next->prev = &next; + data->guards = this; + prev = &data->guards; +} + +void QDeclarativeGuardImpl::remGuard() +{ + Q_ASSERT(prev); + + if (next) next->prev = prev; + *prev = next; + next = 0; + prev = 0; +} template<class T> QDeclarativeGuard<T>::QDeclarativeGuard() -: o(0), next(0), prev(0) { } template<class T> QDeclarativeGuard<T>::QDeclarativeGuard(T *g) -: o(g), next(0), prev(0) +: QDeclarativeGuardImpl(g) { - if (o) addGuard(); } template<class T> QDeclarativeGuard<T>::QDeclarativeGuard(const QDeclarativeGuard<T> &g) -: o(g.o), next(0), prev(0) +: QDeclarativeGuardImpl(g) { - if (o) addGuard(); } template<class T> QDeclarativeGuard<T>::~QDeclarativeGuard() { - if (prev) remGuard(); - o = 0; } template<class T> QDeclarativeGuard<T> &QDeclarativeGuard<T>::operator=(const QDeclarativeGuard<T> &g) { - if (g.o != o) { - if (prev) remGuard(); - o = g.o; - if (o) addGuard(); - } + setObject(g.object()); return *this; } template<class T> QDeclarativeGuard<T> &QDeclarativeGuard<T>::operator=(T *g) { + setObject(g); + return *this; +} + +template<class T> +T *QDeclarativeGuard<T>::object() const +{ + return static_cast<T *>(o); +}; + +template<class T> +void QDeclarativeGuard<T>::setObject(T *g) +{ if (g != o) { if (prev) remGuard(); o = g; if (o) addGuard(); } - return *this; } QT_END_NAMESPACE +Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>) + #endif // QDECLARATIVEGUARD_P_H diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 53f702c..f6f593c 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -680,14 +680,30 @@ private: inline void cleanup(); - char data[4 * sizeof(void *)]; + union { + float floatValue; + double doubleValue; + quint32 intValue; + bool boolValue; + QObject *qobjectPtr; + + char allocData[sizeof(QVariant)]; + }; + + // Pointers to allocData + union { + QString *qstringPtr; + QVariant *qvariantPtr; + QList<QObject *> *qlistPtr; + QScriptValue *qscriptValuePtr; + }; + int type; - bool isObjectType; }; } MetaCallArgument::MetaCallArgument() -: type(QVariant::Invalid), isObjectType(false) +: type(QVariant::Invalid) { } @@ -699,22 +715,22 @@ MetaCallArgument::~MetaCallArgument() void MetaCallArgument::cleanup() { if (type == QMetaType::QString) { - ((QString *)&data)->~QString(); - } else if (type == -1 || type == qMetaTypeId<QVariant>()) { - ((QVariant *)&data)->~QVariant(); + qstringPtr->~QString(); + } else if (type == -1 || type == QMetaType::QVariant) { + qvariantPtr->~QVariant(); } else if (type == qMetaTypeId<QScriptValue>()) { - ((QScriptValue *)&data)->~QScriptValue(); + qscriptValuePtr->~QScriptValue(); } else if (type == qMetaTypeId<QList<QObject *> >()) { - ((QList<QObject *> *)&data)->~QList<QObject *>(); + qlistPtr->~QList<QObject *>(); } } void *MetaCallArgument::dataPtr() { if (type == -1) - return ((QVariant *)data)->data(); - else - return (void *)&data; + return qvariantPtr->data(); + else + return (void *)&allocData; } void MetaCallArgument::initAsType(int callType, QDeclarativeEngine *e) @@ -725,7 +741,7 @@ void MetaCallArgument::initAsType(int callType, QDeclarativeEngine *e) QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(e); if (callType == qMetaTypeId<QScriptValue>()) { - new (&data) QScriptValue(engine->undefinedValue()); + qscriptValuePtr = new (&allocData) QScriptValue(engine->undefinedValue()); type = callType; } else if (callType == QMetaType::Int || callType == QMetaType::UInt || @@ -734,20 +750,20 @@ void MetaCallArgument::initAsType(int callType, QDeclarativeEngine *e) callType == QMetaType::Float) { type = callType; } else if (callType == QMetaType::QObjectStar) { - *((QObject **)&data) = 0; + qobjectPtr = 0; type = callType; } else if (callType == QMetaType::QString) { - new (&data) QString(); + qstringPtr = new (&allocData) QString(); type = callType; } else if (callType == qMetaTypeId<QVariant>()) { type = callType; - new (&data) QVariant(); + qvariantPtr = new (&allocData) QVariant(); } else if (callType == qMetaTypeId<QList<QObject *> >()) { type = callType; - new (&data) QList<QObject *>(); + qlistPtr = new (&allocData) QList<QObject *>(); } else { type = -1; - new (&data) QVariant(callType, (void *)0); + qvariantPtr = new (&allocData) QVariant(callType, (void *)0); } } @@ -756,59 +772,60 @@ void MetaCallArgument::fromScriptValue(int callType, QDeclarativeEngine *engine, if (type != 0) { cleanup(); type = 0; } if (callType == qMetaTypeId<QScriptValue>()) { - new (&data) QScriptValue(value); + qscriptValuePtr = new (&allocData) QScriptValue(value); type = qMetaTypeId<QScriptValue>(); } else if (callType == QMetaType::Int) { - *((int *)&data) = int(value.toInt32()); + intValue = quint32(value.toInt32()); type = callType; } else if (callType == QMetaType::UInt) { - *((uint *)&data) = uint(value.toUInt32()); + intValue = quint32(value.toUInt32()); type = callType; } else if (callType == QMetaType::Bool) { - *((bool *)&data) = value.toBool(); + boolValue = value.toBool(); type = callType; } else if (callType == QMetaType::Double) { - *((double *)&data) = double(value.toNumber()); + doubleValue = double(value.toNumber()); type = callType; } else if (callType == QMetaType::Float) { - *((float *)&data) = float(value.toNumber()); + floatValue = float(value.toNumber()); type = callType; } else if (callType == QMetaType::QString) { if (value.isNull() || value.isUndefined()) - new (&data) QString(); + qstringPtr = new (&allocData) QString(); else - new (&data) QString(value.toString()); + qstringPtr = new (&allocData) QString(value.toString()); type = callType; } else if (callType == QMetaType::QObjectStar) { - *((QObject **)&data) = value.toQObject(); + qobjectPtr = value.toQObject(); type = callType; } else if (callType == qMetaTypeId<QVariant>()) { - new (&data) QVariant(QDeclarativeEnginePrivate::get(engine)->scriptValueToVariant(value)); + QVariant other = QDeclarativeEnginePrivate::get(engine)->scriptValueToVariant(value); + qvariantPtr = new (&allocData) QVariant(other); type = callType; } else if (callType == qMetaTypeId<QList<QObject*> >()) { - QList<QObject *> *list = new (&data) QList<QObject *>(); + qlistPtr = new (&allocData) QList<QObject *>(); if (value.isArray()) { int length = value.property(QLatin1String("length")).toInt32(); for (int ii = 0; ii < length; ++ii) { QScriptValue arrayItem = value.property(ii); QObject *d = arrayItem.toQObject(); - list->append(d); + qlistPtr->append(d); } } else if (QObject *d = value.toQObject()) { - list->append(d); + qlistPtr->append(d); } type = callType; } else { - new (&data) QVariant(); + qvariantPtr = new (&allocData) QVariant(); type = -1; QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(engine); QVariant v = priv->scriptValueToVariant(value); if (v.userType() == callType) { - *((QVariant *)&data) = v; + *qvariantPtr = v; } else if (v.canConvert((QVariant::Type)callType)) { - *((QVariant *)&data) = v; - ((QVariant *)&data)->convert((QVariant::Type)callType); + *qvariantPtr = v; + qvariantPtr->convert((QVariant::Type)callType); } else if (const QMetaObject *mo = priv->rawMetaObjectForType(callType)) { QObject *obj = priv->toQObject(v); @@ -818,9 +835,9 @@ void MetaCallArgument::fromScriptValue(int callType, QDeclarativeEngine *engine, if (!objMo) obj = 0; } - *((QVariant *)&data) = QVariant(callType, &obj); + *qvariantPtr = QVariant(callType, &obj); } else { - *((QVariant *)&data) = QVariant(callType, (void *)0); + *qvariantPtr = QVariant(callType, (void *)0); } } } @@ -830,27 +847,26 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e) QScriptEngine *engine = QDeclarativeEnginePrivate::getScriptEngine(e); if (type == qMetaTypeId<QScriptValue>()) { - return QScriptDeclarativeClass::Value(engine, *((QScriptValue *)&data)); + return QScriptDeclarativeClass::Value(engine, *qscriptValuePtr); } else if (type == QMetaType::Int) { - return QScriptDeclarativeClass::Value(engine, *((int *)&data)); + return QScriptDeclarativeClass::Value(engine, int(intValue)); } else if (type == QMetaType::UInt) { - return QScriptDeclarativeClass::Value(engine, *((uint *)&data)); + return QScriptDeclarativeClass::Value(engine, uint(intValue)); } else if (type == QMetaType::Bool) { - return QScriptDeclarativeClass::Value(engine, *((bool *)&data)); + return QScriptDeclarativeClass::Value(engine, boolValue); } else if (type == QMetaType::Double) { - return QScriptDeclarativeClass::Value(engine, *((double *)&data)); + return QScriptDeclarativeClass::Value(engine, doubleValue); } else if (type == QMetaType::Float) { - return QScriptDeclarativeClass::Value(engine, *((float *)&data)); + return QScriptDeclarativeClass::Value(engine, floatValue); } else if (type == QMetaType::QString) { - return QScriptDeclarativeClass::Value(engine, *((QString *)&data)); + return QScriptDeclarativeClass::Value(engine, *qstringPtr); } else if (type == QMetaType::QObjectStar) { - QObject *object = *((QObject **)&data); - if (object) - QDeclarativeData::get(object, true)->setImplicitDestructible(); + if (qobjectPtr) + QDeclarativeData::get(qobjectPtr, true)->setImplicitDestructible(); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e); - return QScriptDeclarativeClass::Value(engine, priv->objectClass->newQObject(object)); + return QScriptDeclarativeClass::Value(engine, priv->objectClass->newQObject(qobjectPtr)); } else if (type == qMetaTypeId<QList<QObject *> >()) { - QList<QObject *> &list = *(QList<QObject *>*)&data; + QList<QObject *> &list = *qlistPtr; QScriptValue rv = engine->newArray(list.count()); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(e); for (int ii = 0; ii < list.count(); ++ii) { @@ -861,7 +877,7 @@ QScriptDeclarativeClass::Value MetaCallArgument::toValue(QDeclarativeEngine *e) return QScriptDeclarativeClass::Value(engine, rv); } else if (type == -1 || type == qMetaTypeId<QVariant>()) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(e); - QScriptValue rv = ep->scriptValueFromVariant(*((QVariant *)&data)); + QScriptValue rv = ep->scriptValueFromVariant(*qvariantPtr); if (rv.isQObject()) { QObject *object = rv.toQObject(); if (object) diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index 06aed98..a23f89d 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -74,6 +74,27 @@ QT_BEGIN_NAMESPACE +// A simple stack wrapper around QVarLengthArray +template<typename T> +class QDeclarativeVMEStack : private QVarLengthArray<T, 128> +{ +private: + typedef QVarLengthArray<T, 128> VLA; + int _index; + +public: + inline QDeclarativeVMEStack(); + inline bool isEmpty() const; + inline const T &top() const; + inline void push(const T &o); + inline T pop(); + inline int count() const; + inline const T &at(int index) const; +}; + +// We do this so we can forward declare the type in the qdeclarativevme_p.h header +class QDeclarativeVMEObjectStack : public QDeclarativeVMEStack<QObject *> {}; + QDeclarativeVME::QDeclarativeVME() { } @@ -99,10 +120,12 @@ struct ListInstance QDeclarativeListProperty<void> qListProperty; }; +Q_DECLARE_TYPEINFO(ListInstance, Q_PRIMITIVE_TYPE | Q_MOVABLE_TYPE); + QObject *QDeclarativeVME::run(QDeclarativeContextData *ctxt, QDeclarativeCompiledData *comp, int start, int count, const QBitField &bindingSkipList) { - QDeclarativeVMEStack<QObject *> stack; + QDeclarativeVMEObjectStack stack; if (start == -1) start = 0; if (count == -1) count = comp->bytecode.count(); @@ -121,7 +144,7 @@ void QDeclarativeVME::runDeferred(QObject *object) QDeclarativeCompiledData *comp = data->deferredComponent; int start = data->deferredIdx + 1; int count = data->deferredComponent->bytecode.at(data->deferredIdx).defer.deferCount; - QDeclarativeVMEStack<QObject *> stack; + QDeclarativeVMEObjectStack stack; stack.push(object); run(stack, ctxt, comp, start, count, QBitField()); @@ -143,7 +166,7 @@ static void removeBindingOnProperty(QObject *o, int index) #define CLEAN_PROPERTY(o, index) if (fastHasBinding(o, index)) removeBindingOnProperty(o, index) -QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack, +QObject *QDeclarativeVME::run(QDeclarativeVMEObjectStack &stack, QDeclarativeContextData *ctxt, QDeclarativeCompiledData *comp, int start, int count, @@ -1054,5 +1077,48 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData } } +template<typename T> +QDeclarativeVMEStack<T>::QDeclarativeVMEStack() +: _index(-1) +{ +} + +template<typename T> +bool QDeclarativeVMEStack<T>::isEmpty() const { + return _index == -1; +} + +template<typename T> +const T &QDeclarativeVMEStack<T>::top() const { + return at(_index); +} + +template<typename T> +void QDeclarativeVMEStack<T>::push(const T &o) { + _index++; + + Q_ASSERT(_index <= VLA::size()); + if (_index == VLA::size()) + VLA::append(o); + else + VLA::data()[_index] = o; +} + +template<typename T> +T QDeclarativeVMEStack<T>::pop() { + Q_ASSERT(_index >= 0); + --_index; + return VLA::data()[_index + 1]; +} + +template<typename T> +int QDeclarativeVMEStack<T>::count() const { + return _index + 1; +} + +template<typename T> +const T &QDeclarativeVMEStack<T>::at(int index) const { + return VLA::data()[index]; +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativevme_p.h b/src/declarative/qml/qdeclarativevme_p.h index 6b7b93f..b7f110f 100644 --- a/src/declarative/qml/qdeclarativevme_p.h +++ b/src/declarative/qml/qdeclarativevme_p.h @@ -58,6 +58,7 @@ #include <QtCore/QString> #include <QtCore/QStack> +#include <QtCore/QVarLengthArray> QT_BEGIN_NAMESPACE @@ -67,34 +68,7 @@ class QDeclarativeCompiledData; class QDeclarativeCompiledData; class QDeclarativeContextData; -template<typename T, int N = 128> -class QDeclarativeVMEStack { -public: - QDeclarativeVMEStack() : index(-1), maxSize(N), data((T *)fixedData) {} - ~QDeclarativeVMEStack() { if (data != (T *)fixedData) qFree(data); } - - bool isEmpty() const { return index == -1; } - const T &top() const { return data[index]; } - void push(const T &i) { ++index; if (index == maxSize) realloc(); data[index] = i; } - const T &pop() { --index; return data[index + 1]; } - int count() const { return index + 1; } - const T &at(int idx) { return data[idx]; } - -private: - void realloc() { - maxSize += N; - if (data != (T *)fixedData) { - data = (T*)qRealloc(data, maxSize * sizeof(T)); - } else { - data = (T*)qMalloc(maxSize * sizeof(T)); - } - } - int index; - int maxSize; - T *data; - char fixedData[N * sizeof(T)]; -}; - +class QDeclarativeVMEObjectStack; class QDeclarativeVME { public: @@ -109,7 +83,7 @@ public: QList<QDeclarativeError> errors() const; private: - QObject *run(QDeclarativeVMEStack<QObject *> &, + QObject *run(QDeclarativeVMEObjectStack &, QDeclarativeContextData *, QDeclarativeCompiledData *, int start, int count, const QBitField &); diff --git a/src/declarative/qml/qdeclarativewatcher.cpp b/src/declarative/qml/qdeclarativewatcher.cpp index c174998..33f0358 100644 --- a/src/declarative/qml/qdeclarativewatcher.cpp +++ b/src/declarative/qml/qdeclarativewatcher.cpp @@ -47,6 +47,7 @@ #include <qdeclarativedebugservice_p.h> #include "private/qdeclarativeproperty_p.h" +#include "private/qdeclarativevaluetype_p.h" #include <QtCore/qmetaobject.h> #include <QtCore/qdebug.h> @@ -112,7 +113,7 @@ void QDeclarativeWatchProxy::notifyValueChanged() QVariant v; if (m_expr) v = m_expr->evaluate(); - else + else if (QDeclarativeValueTypeFactory::isValueType(m_property.userType())) v = m_property.read(m_object); emit m_watch->propertyChanged(m_id, m_debugId, m_property, v); diff --git a/src/declarative/util/qdeclarativebind.cpp b/src/declarative/util/qdeclarativebind.cpp index b7199ac..051df60 100644 --- a/src/declarative/util/qdeclarativebind.cpp +++ b/src/declarative/util/qdeclarativebind.cpp @@ -42,6 +42,7 @@ #include "private/qdeclarativebind_p.h" #include "private/qdeclarativenullablevalue_p_p.h" +#include "private/qdeclarativeguard_p.h" #include <qdeclarativeengine.h> #include <qdeclarativecontext.h> @@ -64,7 +65,7 @@ public: bool when : 1; bool componentComplete : 1; - QObject *obj; + QDeclarativeGuard<QObject> obj; QString prop; QDeclarativeNullableValue<QVariant> value; }; diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 28c2df6..9604117 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -784,6 +784,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & QDeclarativeListModel *rv = static_cast<QDeclarativeListModel *>(obj); ModelNode *root = new ModelNode(rv->m_nested); + rv->m_nested->m_ownsRoot = true; rv->m_nested->_root = root; QStack<ModelNode *> nodes; nodes << root; diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index ec18f59..195b935 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -206,7 +206,9 @@ public: struct OperationGuard : public QDeclarativeGuard<QDeclarativeStateOperation> { - OperationGuard(QObject *obj, QList<OperationGuard> *l) : list(l) { (QDeclarativeGuard<QObject>&)*this = obj; } + OperationGuard(QObject *obj, QList<OperationGuard> *l) : list(l) { + setObject(static_cast<QDeclarativeStateOperation *>(obj)); + } QList<OperationGuard> *list; void objectDestroyed(QDeclarativeStateOperation *) { // we assume priv will always be destroyed after objectDestroyed calls diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp index a3f57d4..c098a38 100644 --- a/src/declarative/util/qdeclarativestategroup.cpp +++ b/src/declarative/util/qdeclarativestategroup.cpp @@ -73,6 +73,11 @@ public: static QDeclarativeState *at_state(QDeclarativeListProperty<QDeclarativeState> *list, int index); static void clear_states(QDeclarativeListProperty<QDeclarativeState> *list); + static void append_transition(QDeclarativeListProperty<QDeclarativeTransition> *list, QDeclarativeTransition *state); + static int count_transitions(QDeclarativeListProperty<QDeclarativeTransition> *list); + static QDeclarativeTransition *at_transition(QDeclarativeListProperty<QDeclarativeTransition> *list, int index); + static void clear_transitions(QDeclarativeListProperty<QDeclarativeTransition> *list); + QList<QDeclarativeState *> states; QList<QDeclarativeTransition *> transitions; @@ -218,7 +223,35 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty<QDecla QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty() { Q_D(QDeclarativeStateGroup); - return QDeclarativeListProperty<QDeclarativeTransition>(this, d->transitions); + return QDeclarativeListProperty<QDeclarativeTransition>(this, &d->transitions, &QDeclarativeStateGroupPrivate::append_transition, + &QDeclarativeStateGroupPrivate::count_transitions, + &QDeclarativeStateGroupPrivate::at_transition, + &QDeclarativeStateGroupPrivate::clear_transitions); +} + +void QDeclarativeStateGroupPrivate::append_transition(QDeclarativeListProperty<QDeclarativeTransition> *list, QDeclarativeTransition *trans) +{ + QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object); + if (trans) + _this->d_func()->transitions.append(trans); +} + +int QDeclarativeStateGroupPrivate::count_transitions(QDeclarativeListProperty<QDeclarativeTransition> *list) +{ + QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object); + return _this->d_func()->transitions.count(); +} + +QDeclarativeTransition *QDeclarativeStateGroupPrivate::at_transition(QDeclarativeListProperty<QDeclarativeTransition> *list, int index) +{ + QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object); + return _this->d_func()->transitions.at(index); +} + +void QDeclarativeStateGroupPrivate::clear_transitions(QDeclarativeListProperty<QDeclarativeTransition> *list) +{ + QDeclarativeStateGroup *_this = static_cast<QDeclarativeStateGroup *>(list->object); + _this->d_func()->transitions.clear(); } /*! diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index bab991b..45995ce 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -319,6 +319,8 @@ QDeclarativeView::~QDeclarativeView() Ensure that the URL provided is full and correct, in particular, use \l QUrl::fromLocalFile() when loading a file from the local filesystem. + + \sa {Network Transparency}{Loading Resources in QML} */ /*! diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 6f9245b..658dcad 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -147,114 +147,217 @@ struct XmlQueryJob QString prefix; }; -class QDeclarativeXmlQuery : public QObject + +class QDeclarativeXmlQueryEngine; +class QDeclarativeXmlQueryThreadObject : public QObject { Q_OBJECT public: - QDeclarativeXmlQuery(QObject *parent=0) - : QObject(parent), m_queryIds(XMLLISTMODEL_CLEAR_ID + 1) { - qRegisterMetaType<QDeclarativeXmlQueryResult>("QDeclarativeXmlQueryResult"); - moveToThread(&m_thread); - m_thread.start(QThread::IdlePriority); - } + QDeclarativeXmlQueryThreadObject(QDeclarativeXmlQueryEngine *); - ~QDeclarativeXmlQuery() { - if(m_thread.isRunning()) { - m_thread.quit(); - m_thread.wait(); - } - } - - void abort(int id) { - QMutexLocker ml(&m_mutex); - if (id != -1) { - m_jobs.remove(id); - } - } - - int doQuery(QString query, QString namespaces, QByteArray data, QList<QDeclarativeXmlListModelRole *>* roleObjects, QStringList keyRoleResultsCache) { - { - QMutexLocker m1(&m_mutex); - m_queryIds.ref(); - if (m_queryIds <= 0) - m_queryIds = 1; - } - - XmlQueryJob job; - job.queryId = m_queryIds; - job.data = data; - job.query = QLatin1String("doc($src)") + query; - job.namespaces = namespaces; - job.keyRoleResultsCache = keyRoleResultsCache; - - for (int i=0; i<roleObjects->count(); i++) { - if (!roleObjects->at(i)->isValid()) { - job.roleQueries << QString(); - continue; - } - job.roleQueries << roleObjects->at(i)->query(); - job.roleQueryErrorId << static_cast<void*>(roleObjects->at(i)); - if (roleObjects->at(i)->isKey()) - job.keyRoleQueries << job.roleQueries.last(); - } + void processJobs(); + virtual bool event(QEvent *e); - { - QMutexLocker ml(&m_mutex); - m_jobs.insert(m_queryIds, job); - } +private: + QDeclarativeXmlQueryEngine *m_queryEngine; +}; - QMetaObject::invokeMethod(this, "processQuery", Qt::QueuedConnection, Q_ARG(int, job.queryId)); - return job.queryId; - } -private slots: - void processQuery(int queryId) { - XmlQueryJob job; +class QDeclarativeXmlQueryEngine : public QThread +{ + Q_OBJECT +public: + QDeclarativeXmlQueryEngine(QDeclarativeEngine *eng); + ~QDeclarativeXmlQueryEngine(); - { - QMutexLocker ml(&m_mutex); - if (!m_jobs.contains(queryId)) - return; - job = m_jobs.value(queryId); - } + int doQuery(QString query, QString namespaces, QByteArray data, QList<QDeclarativeXmlListModelRole *>* roleObjects, QStringList keyRoleResultsCache); + void abort(int id); - QDeclarativeXmlQueryResult result; - result.queryId = job.queryId; - doQueryJob(&job, &result); - doSubQueryJob(&job, &result); + void processJobs(); - { - QMutexLocker ml(&m_mutex); - if (m_jobs.contains(queryId)) { - emit queryCompleted(result); - m_jobs.remove(queryId); - } - } - } + static QDeclarativeXmlQueryEngine *instance(QDeclarativeEngine *engine); -Q_SIGNALS: +signals: void queryCompleted(const QDeclarativeXmlQueryResult &); void error(void*, const QString&); protected: - + void run(); private: + void processQuery(XmlQueryJob *job); void doQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); void doSubQueryJob(XmlQueryJob *job, QDeclarativeXmlQueryResult *currentResult); void getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const; void addIndexToRangeList(QList<QDeclarativeXmlListRange> *ranges, int index) const; -private: QMutex m_mutex; - QThread m_thread; - QMap<int, XmlQueryJob> m_jobs; + QDeclarativeXmlQueryThreadObject *m_threadObject; + QList<XmlQueryJob> m_jobs; + QSet<int> m_cancelledJobs; QAtomicInt m_queryIds; + + QDeclarativeEngine *m_engine; + QObject *m_eventLoopQuitHack; + + static QHash<QDeclarativeEngine *,QDeclarativeXmlQueryEngine*> queryEngines; + static QMutex queryEnginesMutex; }; +QHash<QDeclarativeEngine *,QDeclarativeXmlQueryEngine*> QDeclarativeXmlQueryEngine::queryEngines; +QMutex QDeclarativeXmlQueryEngine::queryEnginesMutex; + + +QDeclarativeXmlQueryThreadObject::QDeclarativeXmlQueryThreadObject(QDeclarativeXmlQueryEngine *e) + : m_queryEngine(e) +{ +} + +void QDeclarativeXmlQueryThreadObject::processJobs() +{ + QCoreApplication::postEvent(this, new QEvent(QEvent::User)); +} + +bool QDeclarativeXmlQueryThreadObject::event(QEvent *e) +{ + if (e->type() == QEvent::User) { + m_queryEngine->processJobs(); + return true; + } else { + return QObject::event(e); + } +} + + + +QDeclarativeXmlQueryEngine::QDeclarativeXmlQueryEngine(QDeclarativeEngine *eng) +: QThread(eng), m_threadObject(0), m_queryIds(XMLLISTMODEL_CLEAR_ID + 1), m_engine(eng), m_eventLoopQuitHack(0) +{ + qRegisterMetaType<QDeclarativeXmlQueryResult>("QDeclarativeXmlQueryResult"); + + m_eventLoopQuitHack = new QObject; + m_eventLoopQuitHack->moveToThread(this); + connect(m_eventLoopQuitHack, SIGNAL(destroyed(QObject*)), SLOT(quit()), Qt::DirectConnection); + start(QThread::IdlePriority); +} + +QDeclarativeXmlQueryEngine::~QDeclarativeXmlQueryEngine() +{ + queryEnginesMutex.lock(); + queryEngines.remove(m_engine); + queryEnginesMutex.unlock(); + + m_eventLoopQuitHack->deleteLater(); + wait(); +} -Q_GLOBAL_STATIC(QDeclarativeXmlQuery, globalXmlQuery) +int QDeclarativeXmlQueryEngine::doQuery(QString query, QString namespaces, QByteArray data, QList<QDeclarativeXmlListModelRole *>* roleObjects, QStringList keyRoleResultsCache) { + { + QMutexLocker m1(&m_mutex); + m_queryIds.ref(); + if (m_queryIds <= 0) + m_queryIds = 1; + } + + XmlQueryJob job; + job.queryId = m_queryIds; + job.data = data; + job.query = QLatin1String("doc($src)") + query; + job.namespaces = namespaces; + job.keyRoleResultsCache = keyRoleResultsCache; + + for (int i=0; i<roleObjects->count(); i++) { + if (!roleObjects->at(i)->isValid()) { + job.roleQueries << QString(); + continue; + } + job.roleQueries << roleObjects->at(i)->query(); + job.roleQueryErrorId << static_cast<void*>(roleObjects->at(i)); + if (roleObjects->at(i)->isKey()) + job.keyRoleQueries << job.roleQueries.last(); + } + + { + QMutexLocker ml(&m_mutex); + m_jobs.append(job); + if (m_threadObject) + m_threadObject->processJobs(); + } + + return job.queryId; +} + +void QDeclarativeXmlQueryEngine::abort(int id) +{ + QMutexLocker ml(&m_mutex); + if (id != -1) + m_cancelledJobs.insert(id); +} + +void QDeclarativeXmlQueryEngine::run() +{ + m_mutex.lock(); + m_threadObject = new QDeclarativeXmlQueryThreadObject(this); + m_mutex.unlock(); + + processJobs(); + exec(); + + delete m_threadObject; + m_threadObject = 0; +} + +void QDeclarativeXmlQueryEngine::processJobs() +{ + QMutexLocker locker(&m_mutex); + + while (true) { + if (m_jobs.isEmpty()) + return; + + XmlQueryJob currentJob = m_jobs.takeLast(); + while (m_cancelledJobs.remove(currentJob.queryId)) { + if (m_jobs.isEmpty()) + return; + currentJob = m_jobs.takeLast(); + } + + locker.unlock(); + processQuery(¤tJob); + locker.relock(); + } +} -void QDeclarativeXmlQuery::doQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) +QDeclarativeXmlQueryEngine *QDeclarativeXmlQueryEngine::instance(QDeclarativeEngine *engine) +{ + queryEnginesMutex.lock(); + QDeclarativeXmlQueryEngine *queryEng = queryEngines.value(engine); + if (!queryEng) { + queryEng = new QDeclarativeXmlQueryEngine(engine); + queryEngines.insert(engine, queryEng); + } + queryEnginesMutex.unlock(); + + return queryEng; +} + +void QDeclarativeXmlQueryEngine::processQuery(XmlQueryJob *job) +{ + QDeclarativeXmlQueryResult result; + result.queryId = job->queryId; + doQueryJob(job, &result); + doSubQueryJob(job, &result); + + { + QMutexLocker ml(&m_mutex); + if (m_cancelledJobs.contains(job->queryId)) { + m_cancelledJobs.remove(job->queryId); + } else { + emit queryCompleted(result); + } + } +} + +void QDeclarativeXmlQueryEngine::doQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); @@ -293,7 +396,7 @@ void QDeclarativeXmlQuery::doQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQu currentResult->size = (count > 0 ? count : 0); } -void QDeclarativeXmlQuery::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const +void QDeclarativeXmlQueryEngine::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QStringList *values, QXmlQuery *query) const { const QStringList &keysQueries = currentJob.keyRoleQueries; QString keysQuery; @@ -314,7 +417,7 @@ void QDeclarativeXmlQuery::getValuesOfKeyRoles(const XmlQueryJob& currentJob, QS } } -void QDeclarativeXmlQuery::addIndexToRangeList(QList<QDeclarativeXmlListRange> *ranges, int index) const { +void QDeclarativeXmlQueryEngine::addIndexToRangeList(QList<QDeclarativeXmlListRange> *ranges, int index) const { if (ranges->isEmpty()) ranges->append(qMakePair(index, 1)); else if (ranges->last().first + ranges->last().second == index) @@ -323,7 +426,7 @@ void QDeclarativeXmlQuery::addIndexToRangeList(QList<QDeclarativeXmlListRange> * ranges->append(qMakePair(index, 1)); } -void QDeclarativeXmlQuery::doSubQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) +void QDeclarativeXmlQueryEngine::doSubQueryJob(XmlQueryJob *currentJob, QDeclarativeXmlQueryResult *currentResult) { Q_ASSERT(currentJob->queryId != -1); @@ -434,6 +537,15 @@ public: emit q->statusChanged(status); } + void deleteReply() { + Q_Q(QDeclarativeXmlListModel); + if (reply) { + QObject::disconnect(reply, 0, q, 0); + reply->deleteLater(); + reply = 0; + } + } + bool isComponentComplete; QUrl src; QString xml; @@ -443,6 +555,7 @@ public: QList<int> roles; QStringList roleNames; int highestRole; + QNetworkReply *reply; QDeclarativeXmlListModel::Status status; QString errorString; @@ -450,6 +563,7 @@ public: int queryId; QStringList keyRoleResultsCache; QList<QDeclarativeXmlListModelRole *> roleObjects; + static void append_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list, QDeclarativeXmlListModelRole *role); static void clear_role(QDeclarativeListProperty<QDeclarativeXmlListModelRole> *list); QList<QList<QVariant> > data; @@ -583,10 +697,6 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent) : QListModelInterface(*(new QDeclarativeXmlListModelPrivate), parent) { - connect(globalXmlQuery(), SIGNAL(queryCompleted(QDeclarativeXmlQueryResult)), - this, SLOT(queryCompleted(QDeclarativeXmlQueryResult))); - connect(globalXmlQuery(), SIGNAL(error(void*,QString)), - this, SLOT(queryError(void*,QString))); } QDeclarativeXmlListModel::~QDeclarativeXmlListModel() @@ -852,6 +962,12 @@ void QDeclarativeXmlListModel::classBegin() { Q_D(QDeclarativeXmlListModel); d->isComponentComplete = false; + + QDeclarativeXmlQueryEngine *queryEngine = QDeclarativeXmlQueryEngine::instance(qmlEngine(this)); + connect(queryEngine, SIGNAL(queryCompleted(QDeclarativeXmlQueryResult)), + SLOT(queryCompleted(QDeclarativeXmlQueryResult))); + connect(queryEngine, SIGNAL(error(void*,QString)), + SLOT(queryError(void*,QString))); } void QDeclarativeXmlListModel::componentComplete() @@ -881,7 +997,7 @@ void QDeclarativeXmlListModel::reload() if (!d->isComponentComplete) return; - globalXmlQuery()->abort(d->queryId); + QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->abort(d->queryId); d->queryId = -1; if (d->size < 0) @@ -889,15 +1005,11 @@ void QDeclarativeXmlListModel::reload() if (d->reply) { d->reply->abort(); - if (d->reply) { - // abort will generally have already done this (and more) - d->reply->deleteLater(); - d->reply = 0; - } + d->deleteReply(); } if (!d->xml.isEmpty()) { - d->queryId = globalXmlQuery()->doQuery(d->query, d->namespaces, d->xml.toUtf8(), &d->roleObjects, d->keyRoleResultsCache); + d->queryId = QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, d->xml.toUtf8(), &d->roleObjects, d->keyRoleResultsCache); d->notifyQueryStarted(false); } else if (d->src.isEmpty()) { @@ -927,8 +1039,7 @@ void QDeclarativeXmlListModel::requestFinished() QVariant redirect = d->reply->attribute(QNetworkRequest::RedirectionTargetAttribute); if (redirect.isValid()) { QUrl url = d->reply->url().resolved(redirect.toUrl()); - d->reply->deleteLater(); - d->reply = 0; + d->deleteReply(); setSource(url); return; } @@ -937,9 +1048,7 @@ void QDeclarativeXmlListModel::requestFinished() if (d->reply->error() != QNetworkReply::NoError) { d->errorString = d->reply->errorString(); - disconnect(d->reply, 0, this, 0); - d->reply->deleteLater(); - d->reply = 0; + d->deleteReply(); int count = this->count(); d->data.clear(); @@ -958,11 +1067,9 @@ void QDeclarativeXmlListModel::requestFinished() d->queryId = XMLLISTMODEL_CLEAR_ID; QTimer::singleShot(0, this, SLOT(dataCleared())); } else { - d->queryId = globalXmlQuery()->doQuery(d->query, d->namespaces, data, &d->roleObjects, d->keyRoleResultsCache); + d->queryId = QDeclarativeXmlQueryEngine::instance(qmlEngine(this))->doQuery(d->query, d->namespaces, data, &d->roleObjects, d->keyRoleResultsCache); } - disconnect(d->reply, 0, this, 0); - d->reply->deleteLater(); - d->reply = 0; + d->deleteReply(); d->progress = 1.0; emit progressChanged(d->progress); diff --git a/src/gui/accessible/qaccessible_unix.cpp b/src/gui/accessible/qaccessible_unix.cpp index 19fbe78..1c1eb2a 100644 --- a/src/gui/accessible/qaccessible_unix.cpp +++ b/src/gui/accessible/qaccessible_unix.cpp @@ -96,7 +96,7 @@ void QAccessible::updateAccessibility(QObject *o, int who, Event reason) } initialize(); - if (bridges()->isEmpty()) + if (!bridges() || bridges()->isEmpty()) return; QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(o); diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp index 79ac442..caabae5 100644 --- a/src/gui/accessible/qaccessible_win.cpp +++ b/src/gui/accessible/qaccessible_win.cpp @@ -600,6 +600,35 @@ HRESULT STDMETHODCALLTYPE QWindowsEnumerate::Skip(unsigned long celt) return S_OK; } +struct AccessibleElement { + AccessibleElement(int entryId, QAccessibleInterface *accessible) { + if (entryId < 0) { + QPair<QObject*, int> ref = qAccessibleRecentSentEvents()->value(entryId); + iface = QAccessible::queryAccessibleInterface(ref.first); + entry = ref.second; + cleanupInterface = true; + } else { + iface = accessible; + entry = entryId; + cleanupInterface = false; + } + } + + QString text(QAccessible::Text t) const { + return iface ? iface->text(t, entry) : QString(); + } + + ~AccessibleElement() { + if (cleanupInterface) + delete iface; + } + + QAccessibleInterface *iface; + int entry; +private: + bool cleanupInterface; +}; + /* */ class QWindowsAccessible : public IAccessible, IOleWindow, QAccessible @@ -998,7 +1027,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accLocation(long *pxLeft, long *py if (!accessible->isValid()) return E_FAIL; - QRect rect = accessible->rect(varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QRect rect = elem.iface ? elem.iface->rect(elem.entry) : QRect(); if (rect.isValid()) { *pxLeft = rect.x(); *pyTop = rect.y(); @@ -1101,25 +1131,12 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accChild(VARIANT varChildID, I int childIndex = varChildID.lVal; QAccessibleInterface *acc = 0; - if (childIndex < 0) { - const int entry = childIndex; - QPair<QObject*, int> ref = qAccessibleRecentSentEvents()->value(entry); - if (ref.first) { - acc = queryAccessibleInterface(ref.first); - if (acc && ref.second) { - if (ref.second) { - QAccessibleInterface *res; - int index = acc->navigate(Child, ref.second, &res); - delete acc; - if (index == -1) - return E_INVALIDARG; - acc = res; - } - } - } - } else { - RelationFlag rel = childIndex ? Child : Self; - accessible->navigate(rel, childIndex, &acc); + AccessibleElement elem(childIndex, accessible); + if (elem.iface) { + RelationFlag rel = elem.entry ? Child : Self; + int index = elem.iface->navigate(rel, elem.entry, &acc); + if (index == -1) + return E_INVALIDARG; } if (acc) { @@ -1171,7 +1188,9 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accDoDefaultAction(VARIANT varID) if (!accessible->isValid()) return E_FAIL; - return accessible->doAction(DefaultAction, varID.lVal, QVariantList()) ? S_OK : S_FALSE; + AccessibleElement elem(varID.lVal, accessible); + const bool res = elem.iface ? elem.iface->doAction(DefaultAction, elem.entry, QVariantList()) : false; + return res ? S_OK : S_FALSE; } HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accDefaultAction(VARIANT varID, BSTR* pszDefaultAction) @@ -1180,7 +1199,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accDefaultAction(VARIANT varID if (!accessible->isValid()) return E_FAIL; - QString def = accessible->actionText(DefaultAction, Name, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString def = elem.iface ? elem.iface->actionText(DefaultAction, Name, elem.entry) : QString(); if (def.isEmpty()) { *pszDefaultAction = 0; return S_FALSE; @@ -1196,7 +1216,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accDescription(VARIANT varID, if (!accessible->isValid()) return E_FAIL; - QString descr = accessible->text(Description, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString descr = elem.text(Description); if (descr.size()) { *pszDescription = QStringToBSTR(descr); return S_OK; @@ -1212,7 +1233,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accHelp(VARIANT varID, BSTR *p if (!accessible->isValid()) return E_FAIL; - QString help = accessible->text(Help, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString help = elem.text(Help); if (help.size()) { *pszHelp = QStringToBSTR(help); return S_OK; @@ -1233,7 +1255,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accKeyboardShortcut(VARIANT va if (!accessible->isValid()) return E_FAIL; - QString sc = accessible->text(Accelerator, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString sc = elem.text(Accelerator); if (sc.size()) { *pszKeyboardShortcut = QStringToBSTR(sc); return S_OK; @@ -1249,7 +1272,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accName(VARIANT varID, BSTR* p if (!accessible->isValid()) return E_FAIL; - QString n = accessible->text(Name, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString n = elem.text(Name); if (n.size()) { *pszName = QStringToBSTR(n); return S_OK; @@ -1271,7 +1295,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accRole(VARIANT varID, VARIANT if (!accessible->isValid()) return E_FAIL; - Role role = accessible->role(varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + Role role = elem.iface ? elem.iface->role(elem.entry) : NoRole; if (role != NoRole) { if (role == LayeredPane) role = QAccessible::Pane; @@ -1290,7 +1315,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accState(VARIANT varID, VARIAN return E_FAIL; (*pvarState).vt = VT_I4; - (*pvarState).lVal = accessible->state(varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + (*pvarState).lVal = elem.iface ? elem.iface->state(elem.entry) : 0; return S_OK; } @@ -1300,7 +1326,8 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::get_accValue(VARIANT varID, BSTR* if (!accessible->isValid()) return E_FAIL; - QString value = accessible->text(Value, varID.lVal); + AccessibleElement elem(varID.lVal, accessible); + QString value = elem.text(Value); if (!value.isNull()) { *pszValue = QStringToBSTR(value); return S_OK; @@ -1324,19 +1351,23 @@ HRESULT STDMETHODCALLTYPE QWindowsAccessible::accSelect(long flagsSelect, VARIAN bool res = false; - if (flagsSelect & SELFLAG_TAKEFOCUS) - res = accessible->doAction(SetFocus, varID.lVal, QVariantList()); - if (flagsSelect & SELFLAG_TAKESELECTION) { - accessible->doAction(ClearSelection, 0, QVariantList()); - res = accessible->doAction(AddToSelection, varID.lVal, QVariantList()); + AccessibleElement elem(varID.lVal, accessible); + QAccessibleInterface *acc = elem.iface; + if (acc) { + const int entry = elem.entry; + if (flagsSelect & SELFLAG_TAKEFOCUS) + res = acc->doAction(SetFocus, entry, QVariantList()); + if (flagsSelect & SELFLAG_TAKESELECTION) { + acc->doAction(ClearSelection, 0, QVariantList()); //### bug, 0 should be entry?? + res = acc->doAction(AddToSelection, entry, QVariantList()); + } + if (flagsSelect & SELFLAG_EXTENDSELECTION) + res = acc->doAction(ExtendSelection, entry, QVariantList()); + if (flagsSelect & SELFLAG_ADDSELECTION) + res = acc->doAction(AddToSelection, entry, QVariantList()); + if (flagsSelect & SELFLAG_REMOVESELECTION) + res = acc->doAction(RemoveSelection, entry, QVariantList()); } - if (flagsSelect & SELFLAG_EXTENDSELECTION) - res = accessible->doAction(ExtendSelection, varID.lVal, QVariantList()); - if (flagsSelect & SELFLAG_ADDSELECTION) - res = accessible->doAction(AddToSelection, varID.lVal, QVariantList()); - if (flagsSelect & SELFLAG_REMOVESELECTION) - res = accessible->doAction(RemoveSelection, varID.lVal, QVariantList()); - return res ? S_OK : S_FALSE; } diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index cd020f6..1ffbf1d 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -44,7 +44,7 @@ #ifndef QT_NO_FILEDIALOG #include <private/qfiledialog_p.h> -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) #include <driveinfo.h> #include <AknCommonDialogsDynMem.h> #include <CAknMemorySelectionDialogMultiDrive.h> @@ -58,7 +58,7 @@ extern QStringList qt_make_filter_list(const QString &filter); // defined in qfi extern QStringList qt_clean_filter_list(const QString &filter); // defined in qfiledialog.cpp enum DialogMode { DialogOpen, DialogSave, DialogFolder }; -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) class CExtensionFilter : public CBase, public MAknFileFilter { public: @@ -104,7 +104,7 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st const QString filter, DialogMode dialogMode) { QString selection; -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) TFileName startFolder; if (!startDirectory.isEmpty()) { QString dir = QDir::toNativeSeparators(QFileDialogPrivate::workingDirectory(startDirectory)); diff --git a/src/gui/dialogs/qfiledialog_win_p.h b/src/gui/dialogs/qfiledialog_win_p.h index 1ff29d2..1408057 100644 --- a/src/gui/dialogs/qfiledialog_win_p.h +++ b/src/gui/dialogs/qfiledialog_win_p.h @@ -240,4 +240,4 @@ DECLARE_INTERFACE_(IFileOpenDialog, IFileDialog) STDMETHOD(GetResults)(THIS_ IShellItemArray **ppenum) PURE; STDMETHOD(GetSelectedItems)(THIS_ IShellItemArray **ppsai) PURE; }; -#endif
\ No newline at end of file +#endif diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 2f2f772..2a37d45 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -94,6 +94,7 @@ QEglContext::QEglContext() , current(false) , ownsContext(true) , sharing(false) + , apiChanged(false) { QEglContextTracker::ref(); } @@ -435,9 +436,20 @@ bool QEglContext::makeCurrent(EGLSurface surface) return false; } +#ifdef Q_OS_SYMBIAN + apiChanged = false; + if (currentContext(apiType) + && currentContext(apiType)->ctx != eglGetCurrentContext()) { + // some other EGL based API active. Complete its rendering + eglWaitClient(); + apiChanged = true; + } +#endif + // If lazyDoneCurrent() was called on the surface, then we may be able // to assume that it is still current within the thread. - if (surface == currentSurface && currentContext(apiType) == this) { + if (surface == currentSurface && currentContext(apiType) == this + && !apiChanged) { current = true; return true; } @@ -512,6 +524,13 @@ bool QEglContext::swapBuffers(EGLSurface surface) bool ok = eglSwapBuffers(QEgl::display(), surface); if (!ok) qWarning() << "QEglContext::swapBuffers():" << QEgl::errorString(); + +#ifdef Q_OS_SYMBIAN + if (apiChanged) { + eglWaitClient(); + apiChanged = false; + } +#endif return ok; } diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index 6cd76b3..0cdaae7 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -104,6 +104,7 @@ private: bool current; bool ownsContext; bool sharing; + bool apiChanged; static QEglContext *currentContext(QEgl::API api); static void setCurrentContext(QEgl::API api, QEglContext *context); diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index ef53963..2ac2bdf 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3297,7 +3297,7 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim } if (climb) { - while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible()) + while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible() && f->d_ptr->focusScopeItem != f) f = f->d_ptr->focusScopeItem; } diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index 673a6d6..8fea456 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -74,6 +74,11 @@ extern "C" { #endif } +#if defined(JPEG_TRUE) && !defined(HAVE_BOOLEAN) +// this jpeglib.h uses JPEG_boolean +typedef JPEG_boolean boolean; +#endif + QT_BEGIN_NAMESPACE void QT_FASTCALL convert_rgb888_to_rgb32_C(quint32 *dst, const uchar *src, int len) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index bdf1f90..47b6eef 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -851,7 +851,33 @@ static void qt_mac_grabDisplayRect(CGDirectDisplayID display, const QRect &displ ptrCGLDestroyContext(glContextObj); // and destroy the context } +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) // Returns a pixmap containing the screen contents at rect. +static QPixmap qt_mac_grabScreenRect_10_6(const QRect &rect) +{ + const int maxDisplays = 128; // 128 displays should be enough for everyone. + CGDirectDisplayID displays[maxDisplays]; + CGDisplayCount displayCount; + const CGRect cgRect = CGRectMake(rect.x(), rect.y(), rect.width(), rect.height()); + const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount); + + if (err && displayCount == 0) + return QPixmap(); + QPixmap windowPixmap(rect.size()); + for (uint i = 0; i < displayCount; ++i) { + const CGRect bounds = CGDisplayBounds(displays[i]); + // Translate to display-local coordinates + QRect displayRect = rect.translated(qRound(-bounds.origin.x), qRound(-bounds.origin.y)); + QCFType<CGImageRef> image = CGDisplayCreateImageForRect(displays[i], + CGRectMake(displayRect.x(), displayRect.y(), displayRect.width(), displayRect.height())); + QPixmap pix = QPixmap::fromMacCGImageRef(image); + QPainter painter(&windowPixmap); + painter.drawPixmap(-bounds.origin.x, -bounds.origin.y, pix); + } + return windowPixmap; +} +#endif + static QPixmap qt_mac_grabScreenRect(const QRect &rect) { if (!resolveOpenGLSymbols()) @@ -927,7 +953,12 @@ QPixmap QPixmap::grabWindow(WId window, int x, int y, int w, int h) QRect rect(globalCoord.x() + x, globalCoord.y() + y, w, h); #ifdef QT_MAC_USE_COCOA - return qt_mac_grabScreenRect(rect); +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) + return qt_mac_grabScreenRect_10_6(rect); + else +#endif + return qt_mac_grabScreenRect(rect); #else #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_4) { diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index cd13894..15d37c3 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -3321,7 +3321,7 @@ bool QApplication::desktopSettingsAware() one of the above events. If no keys are being held Qt::NoModifier is returned. - \sa mouseButtons() + \sa mouseButtons(), queryKeyboardModifiers() */ Qt::KeyboardModifiers QApplication::keyboardModifiers() @@ -3330,6 +3330,25 @@ Qt::KeyboardModifiers QApplication::keyboardModifiers() } /*! + \fn Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() + + Queries and returns the state of the modifier keys on the keyboard. + Unlike keyboardModifiers, this method returns the actual keys held + on the input device at the time of calling the method. + + It does not rely on the keypress events having been received by this + process, which makes it possible to check the modifiers while moving + a window, for instance. Note that in most cases, you should use + keyboardModifiers(), which is faster and more accurate since it contains + the state of the modifiers as they were when the currently processed + event was received. + + \sa keyboardModifiers() + + \since 4.8 +*/ + +/*! Returns the current state of the buttons on the mouse. The current state is updated syncronously as the event queue is emptied of events that will spontaneously change the mouse state (QEvent::MouseButtonPress and diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 01a246a..1548849 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -198,6 +198,7 @@ public: static void alert(QWidget *widget, int duration = 0); static Qt::KeyboardModifiers keyboardModifiers(); + static Qt::KeyboardModifiers queryKeyboardModifiers(); static Qt::MouseButtons mouseButtons(); static void setDesktopSettingsAware(bool); diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index c5ff799..1f75f09 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -1395,6 +1395,11 @@ void QApplication::restoreOverrideCursor() } #endif // QT_NO_CURSOR +Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() +{ + return qt_mac_get_modifiers(GetCurrentEventKeyModifiers()); +} + QWidget *QApplication::topLevelAt(const QPoint &p) { #ifndef QT_MAC_USE_COCOA diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 3b6a075..193dfcd 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -2699,6 +2699,11 @@ void QApplication::alert(QWidget *, int) { } +Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() +{ + return keyboardModifiers(); // TODO proper implementation +} + int QApplication::qwsProcessEvent(QWSEvent* event) { Q_D(QApplication); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 5ac9803..da1c778 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -115,6 +115,8 @@ QWidget *qt_button_down = 0; // widget got last button-down QSymbianControl *QSymbianControl::lastFocusedControl = 0; +static Qt::KeyboardModifiers app_keyboardModifiers = Qt::NoModifier; + QS60Data* qGlobalS60Data() { return qt_s60Data(); @@ -735,6 +737,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) Qt::MouseButton button; mapS60MouseEventTypeToQt(&type, &button, &pEvent); Qt::KeyboardModifiers modifiers = mapToQtModifiers(pEvent.iModifiers); + app_keyboardModifiers = modifiers; QPoint widgetPos = translatePointForFixedNativeOrientation(pEvent.iPosition); TPoint controlScreenPos = PositionRelativeToScreen(); @@ -2590,6 +2593,11 @@ void QApplication::setEffectEnabled(Qt::UIEffect /* effect */, bool /* enable */ // TODO: Implement QApplication::setEffectEnabled(Qt::UIEffect effect, bool enable) } +Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() +{ + return app_keyboardModifiers; +} + TUint QApplicationPrivate::resolveS60ScanCode(TInt scanCode, TUint keysym) { if (!scanCode) @@ -2752,9 +2760,6 @@ QS60ThreadLocalData::QS60ThreadLocalData() QS60ThreadLocalData::~QS60ThreadLocalData() { - for (int i = 0; i < releaseFuncs.count(); ++i) - releaseFuncs[i](); - releaseFuncs.clear(); if (!usingCONEinstances) { delete screenDevice; wsSession.Close(); diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index c34e75f..756cb56 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -1319,6 +1319,11 @@ Qt::KeyboardModifiers qt_win_getKeyboardModifiers() return modifiers; } +Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() +{ + return qt_win_getKeyboardModifiers(); +} + /***************************************************************************** Routines to find a Qt widget from a screen position *****************************************************************************/ diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 666fe85..ef8e2b8 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3058,6 +3058,21 @@ void QApplicationPrivate::_q_alertTimeOut() } } +Qt::KeyboardModifiers QApplication::queryKeyboardModifiers() +{ + Window root; + Window child; + int root_x, root_y, win_x, win_y; + uint keybstate; + for (int i = 0; i < ScreenCount(X11->display); ++i) { + if (XQueryPointer(X11->display, QX11Info::appRootWindow(i), &root, &child, + &root_x, &root_y, &win_x, &win_y, &keybstate)) + return X11->translateModifiers(keybstate & 0x00ff); + } + return 0; + +} + /***************************************************************************** Special lookup functions for windows that have been reparented recently *****************************************************************************/ diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index e32fdeb..0fbae59 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -66,9 +66,14 @@ #include <qdebug.h> @interface NSEvent (Qt_Compile_Leopard_DeviceDelta) + // SnowLeopard: - (CGFloat)deviceDeltaX; - (CGFloat)deviceDeltaY; - (CGFloat)deviceDeltaZ; + // Lion: + - (CGFloat)scrollingDeltaX; + - (CGFloat)scrollingDeltaY; + - (CGFloat)scrollingDeltaZ; @end @interface NSEvent (Qt_Compile_Leopard_Gestures) @@ -614,7 +619,6 @@ static int qCocoaViewCount = 0; int deltaX = 0; int deltaY = 0; - int deltaZ = 0; const EventRef carbonEvent = (EventRef)[theEvent eventRef]; const UInt32 carbonEventKind = carbonEvent ? ::GetEventKind(carbonEvent) : 0; @@ -627,15 +631,20 @@ static int qCocoaViewCount = 0; // It looks like 1/4 degrees per pixel behaves most native. // (NB: Qt expects the unit for delta to be 8 per degree): const int pixelsToDegrees = 2; // 8 * 1/4 - deltaX = [theEvent deviceDeltaX] * pixelsToDegrees; - deltaY = [theEvent deviceDeltaY] * pixelsToDegrees; - deltaZ = [theEvent deviceDeltaZ] * pixelsToDegrees; + if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6) { + // Mac OS 10.6 + deltaX = [theEvent deviceDeltaX] * pixelsToDegrees; + deltaY = [theEvent deviceDeltaY] * pixelsToDegrees; + } else { + // Mac OS 10.7+ + deltaX = [theEvent scrollingDeltaX] * pixelsToDegrees; + deltaY = [theEvent scrollingDeltaY] * pixelsToDegrees; + } } else { // carbonEventKind == kEventMouseWheelMoved // Remove acceleration, and use either -120 or 120 as delta: deltaX = qBound(-120, int([theEvent deltaX] * 10000), 120); deltaY = qBound(-120, int([theEvent deltaY] * 10000), 120); - deltaZ = qBound(-120, int([theEvent deltaZ] * 10000), 120); } #ifndef QT_NO_WHEELEVENT @@ -654,13 +663,6 @@ static int qCocoaViewCount = 0; qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); } - if (deltaZ != 0) { - // Qt doesn't explicitly support wheels with a Z component. In a misguided attempt to - // try to be ahead of the pack, I'm adding this extra value. - QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); - qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); - } - if (deltaX != 0 && deltaY != 0) QMacScrollOptimization::performDelayedScroll(); #endif //QT_NO_WHEELEVENT diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp index 9f0c516..cef83f5 100644 --- a/src/gui/kernel/qcursor_win.cpp +++ b/src/gui/kernel/qcursor_win.cpp @@ -477,6 +477,7 @@ void QCursorData::update() QPixmap pixmap = QApplicationPrivate::instance()->getPixmapCursor(cshape); hcurs = create32BitCursor(pixmap, hx, hy); } + break; default: qWarning("QCursor::update: Invalid cursor shape %d", cshape); return; diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index 0c683b4..5847021 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -1112,21 +1112,6 @@ void qt_xdnd_send_leave() waiting_for_status = false; } -// TODO: remove and use QApplication::currentKeyboardModifiers() in Qt 4.8. -static Qt::KeyboardModifiers currentKeyboardModifiers() -{ - Window root; - Window child; - int root_x, root_y, win_x, win_y; - uint keybstate; - for (int i = 0; i < ScreenCount(X11->display); ++i) { - if (XQueryPointer(X11->display, QX11Info::appRootWindow(i), &root, &child, - &root_x, &root_y, &win_x, &win_y, &keybstate)) - return X11->translateModifiers(keybstate & 0x00ff); - } - return 0; -} - void QX11Data::xdndHandleDrop(QWidget *, const XEvent * xe, bool passive) { DEBUG("xdndHandleDrop"); @@ -1183,7 +1168,7 @@ void QX11Data::xdndHandleDrop(QWidget *, const XEvent * xe, bool passive) // Drop coming from another app? Update keyboard modifiers. if (!qt_xdnd_dragging) { - QApplicationPrivate::modifier_buttons = currentKeyboardModifiers(); + QApplicationPrivate::modifier_buttons = QApplication::queryKeyboardModifiers(); } QDropEvent de(qt_xdnd_current_position, possible_actions, dropData, diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 5fc72d4..117b72f 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -933,7 +933,7 @@ QKeySequence::QKeySequence(const QString &key) } /*! - \since 4.7 + \since 4.x Creates a key sequence from the \a key string based on \a format. */ QKeySequence::QKeySequence(const QString &key, QKeySequence::SequenceFormat format) @@ -1130,7 +1130,7 @@ int QKeySequence::assign(const QString &ks) /*! \fn int QKeySequence::assign(const QString &keys, QKeySequence::SequenceFormat format) - \since 4.7 + \since 4.x Adds the given \a keys to the key sequence (based on \a format). \a keys may contain up to four key codes, provided they are diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 500bcff..510705f 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -102,7 +102,7 @@ QSoftKeyManager::QSoftKeyManager() : QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget) { QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget); -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) int key = 0; switch (standardKey) { case OkSoftKey: @@ -168,7 +168,7 @@ void QSoftKeyManager::cleanupHash(QObject *obj) Q_D(QSoftKeyManager); QAction *action = qobject_cast<QAction*>(obj); d->keyedActions.remove(action); -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) d->softKeyCommandActions.remove(action); #endif } diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h index e9cbd7d..9a11eec 100644 --- a/src/gui/kernel/qsoftkeymanager_common_p.h +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -72,7 +72,7 @@ protected: QMultiHash<int, QAction*> requestedSoftKeyActions; QWidget *initialSoftKeySource; bool pendingUpdate; -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) QHash<QAction*, int> softKeyCommandActions; #endif }; diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index b5d0101..999fccc 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -117,7 +117,7 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba) { -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) QT_TRAP_THROWING( //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3 cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC); @@ -317,7 +317,7 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, QString text = softkeyText(*action); TPtrC nativeText = qt_QString2TPtrC(text); int command = S60_COMMAND_START + position; -#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) if (softKeyCommandActions.contains(action)) command = softKeyCommandActions.value(action); #endif diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index c429b04..ada52a0 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -77,8 +77,8 @@ #include <akncontext.h> // CAknContextPane #include <eikspane.h> // CEikStatusPane #include <AknPopupFader.h> // MAknFadedComponent and TAknPopupFader -#include <gfxtranseffect/gfxtranseffect.h> // BeginFullScreen #ifdef QT_SYMBIAN_HAVE_AKNTRANSEFFECT_H +#include <gfxtranseffect/gfxtranseffect.h> // BeginFullScreen #include <akntranseffect.h> // BeginFullScreen #endif #endif @@ -97,10 +97,6 @@ static const int qt_symbian_max_screens = 4; //this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2 #define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13) -class QSymbianTypeFaceExtras; -typedef QHash<QString, const QSymbianTypeFaceExtras *> QSymbianTypeFaceExtrasHash; -typedef void (*QThreadLocalReleaseFunc)(); - class Q_AUTOTEST_EXPORT QS60ThreadLocalData { public: @@ -109,8 +105,6 @@ public: bool usingCONEinstances; RWsSession wsSession; CWsScreenDevice *screenDevice; - QSymbianTypeFaceExtrasHash fontData; - QVector<QThreadLocalReleaseFunc> releaseFuncs; }; class QS60Data @@ -184,8 +178,6 @@ public: inline CWsScreenDevice* screenDevice(const QWidget *widget); inline CWsScreenDevice* screenDevice(int screenNumber); static inline int screenNumberForWidget(const QWidget *widget); - inline QSymbianTypeFaceExtrasHash& fontData(); - inline void addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func); static inline CCoeAppUi* appUi(); static inline CEikMenuBar* menuBar(); #ifdef Q_WS_S60 @@ -486,24 +478,6 @@ inline int QS60Data::screenNumberForWidget(const QWidget *widget) return qt_widget_private(const_cast<QWidget *>(w))->symbianScreenNumber; } -inline QSymbianTypeFaceExtrasHash& QS60Data::fontData() -{ - if (!tls.hasLocalData()) { - tls.setLocalData(new QS60ThreadLocalData); - } - return tls.localData()->fontData; -} - -inline void QS60Data::addThreadLocalReleaseFunc(QThreadLocalReleaseFunc func) -{ - if (!tls.hasLocalData()) { - tls.setLocalData(new QS60ThreadLocalData); - } - QS60ThreadLocalData *data = tls.localData(); - if (!data->releaseFuncs.contains(func)) - data->releaseFuncs.append(func); -} - inline CCoeAppUi* QS60Data::appUi() { return CCoeEnv::Static()-> AppUi(); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index d6aaa3f..256e34b 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -235,22 +235,11 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) QSize oldSize(q->size()); QRect oldGeom(data.crect); - bool checkExtra = true; - if (q->isWindow() && (data.window_state & (Qt::WindowFullScreen | Qt::WindowMaximized))) { - // Do not allow fullscreen/maximized windows to expand beyond client rect - TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); - w = qMin(w, r.Width()); - h = qMin(h, r.Height()); - - if (w == r.Width() && h == r.Height()) - checkExtra = false; - } - // Lose maximized status if deliberate resize if (w != oldSize.width() || h != oldSize.height()) data.window_state &= ~Qt::WindowMaximized; - if (checkExtra && extra) { // any size restrictions? + if (extra) { // any size restrictions? w = qMin(w,extra->maxw); h = qMin(h,extra->maxh); w = qMax(w,extra->minw); diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index dbe957e..3528e6f 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -425,13 +425,12 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal swapped = true; qSwap(y1, y2); qSwap(x1, x2); - --x1; --x2; --y1; --y2; } int xinc = F16Dot16FixedDiv(x2 - x1, y2 - y1); int x = x1 << 10; - int y = (y1+32) >> 6; - int ys = (y2+32) >> 6; + int y = y1 >> 6; + int ys = y2 >> 6; if (y != ys) { x += ( ((((y << 6) + 32 - y1))) * xinc ) >> 6; @@ -457,13 +456,12 @@ void QCosmeticStroker::calculateLastPoint(qreal rx1, qreal ry1, qreal rx2, qreal swapped = true; qSwap(x1, x2); qSwap(y1, y2); - --x1; --x2; --y1; --y2; } int yinc = F16Dot16FixedDiv(y2 - y1, x2 - x1); int y = y1 << 10; - int x = (x1+32) >> 6; - int xs = (x2+32) >> 6; + int x = x1 >> 6; + int xs = x2 >> 6; if (x != xs) { y += ( ((((x << 6) + 32 - x1))) * yinc ) >> 6; @@ -716,10 +714,11 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, QCosmeticStroker::Point last = stroker->lastPixel; -// qDebug() << "stroke" << x1/64. << y1/64. << x2/64. << y2/64. << capString(caps); +// qDebug() << "stroke" << x1/64. << y1/64. << x2/64. << y2/64.; if (dx < dy) { // vertical + QCosmeticStroker::Direction dir = QCosmeticStroker::TopToBottom; bool swapped = false; if (y1 > y2) { @@ -727,30 +726,31 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qSwap(y1, y2); qSwap(x1, x2); caps = swapCaps(caps); - --x1; --x2; --y1; --y2; + dir = QCosmeticStroker::BottomToTop; } int xinc = F16Dot16FixedDiv(x2 - x1, y2 - y1); int x = x1 << 10; + if ((stroker->lastDir ^ QCosmeticStroker::VerticalMask) == dir) + caps |= swapped ? QCosmeticStroker::CapEnd : QCosmeticStroker::CapBegin; + capAdjust(caps, y1, y2, x, xinc); - int y = (y1+32) >> 6; - int ys = (y2+32) >> 6; + int y = y1 >> 6; + int ys = y2 >> 6; if (y != ys) { x += ( ((((y << 6) + 32 - y1))) * xinc ) >> 6; // calculate first and last pixel and perform dropout control - QCosmeticStroker::Direction dir = QCosmeticStroker::TopToBottom; QCosmeticStroker::Point first; first.x = x >> 16; first.y = y; last.x = (x + (ys - y - 1)*xinc) >> 16; last.y = ys - 1; - if (swapped) { + if (swapped) qSwap(first, last); - dir = QCosmeticStroker::BottomToTop; - } + bool axisAligned = qAbs(xinc) < (1 << 14); if (stroker->lastPixel.x >= 0) { if (first.x == stroker->lastPixel.x && @@ -765,7 +765,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, } else if (stroker->lastDir != dir && (((axisAligned && stroker->lastAxisAligned) && stroker->lastPixel.x != first.x && stroker->lastPixel.y != first.y) || - (qAbs(stroker->lastPixel.x - first.x) > 1 && + (qAbs(stroker->lastPixel.x - first.x) > 1 || qAbs(stroker->lastPixel.y - first.y) > 1))) { // have a missing pixel, insert it if (swapped) { @@ -793,37 +793,39 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, if (!dx) return; + QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight; + bool swapped = false; if (x1 > x2) { swapped = true; qSwap(x1, x2); qSwap(y1, y2); caps = swapCaps(caps); - --x1; --x2; --y1; --y2; + dir = QCosmeticStroker::RightToLeft; } int yinc = F16Dot16FixedDiv(y2 - y1, x2 - x1); int y = y1 << 10; - capAdjust(caps, x1, x2, y, yinc); + if ((stroker->lastDir ^ QCosmeticStroker::HorizontalMask) == dir) + caps |= swapped ? QCosmeticStroker::CapEnd : QCosmeticStroker::CapBegin; - int x = (x1+32) >> 6; - int xs = (x2+32) >> 6; + capAdjust(caps, x1, x2, y, yinc); + int x = x1 >> 6; + int xs = x2 >> 6; if (x != xs) { y += ( ((((x << 6) + 32 - x1))) * yinc ) >> 6; // calculate first and last pixel to perform dropout control - QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight; QCosmeticStroker::Point first; first.x = x; first.y = y >> 16; last.x = xs - 1; last.y = (y + (xs - x - 1)*yinc) >> 16; - if (swapped) { + if (swapped) qSwap(first, last); - dir = QCosmeticStroker::RightToLeft; - } + bool axisAligned = qAbs(yinc) < (1 << 14); if (stroker->lastPixel.x >= 0) { if (first.x == stroker->lastPixel.x && first.y == stroker->lastPixel.y) { @@ -837,7 +839,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, } else if (stroker->lastDir != dir && (((axisAligned && stroker->lastAxisAligned) && stroker->lastPixel.x != first.x && stroker->lastPixel.y != first.y) || - (qAbs(stroker->lastPixel.x - first.x) > 1 && + (qAbs(stroker->lastPixel.x - first.x) > 1 || qAbs(stroker->lastPixel.y - first.y) > 1))) { // have a missing pixel, insert it if (swapped) { diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h index d7bd79a..53cdf2c 100644 --- a/src/gui/painting/qcosmeticstroker_p.h +++ b/src/gui/painting/qcosmeticstroker_p.h @@ -78,10 +78,12 @@ public: // used to avoid drop outs or duplicated points enum Direction { - TopToBottom, - BottomToTop, - LeftToRight, - RightToLeft + TopToBottom = 0x1, + BottomToTop = 0x2, + LeftToRight = 0x4, + RightToLeft = 0x8, + VerticalMask = 0x3, + HorizontalMask = 0xc }; QCosmeticStroker(QRasterPaintEngineState *s, const QRect &dr) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 76d7316..9826689 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3098,7 +3098,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte ensurePen(); ensureState(); -#if defined (Q_WS_WIN) || defined(Q_WS_MAC) +#if defined (Q_WS_WIN) || defined(Q_WS_MAC) || (defined(Q_OS_MAC) && defined(Q_WS_QPA)) if (!supportsTransformations(ti.fontEngine)) { QVarLengthArray<QFixedPoint> positions; @@ -3438,7 +3438,7 @@ bool QRasterPaintEngine::supportsTransformations(const QFontEngine *fontEngine) bool QRasterPaintEngine::supportsTransformations(qreal pixelSize, const QTransform &m) const { -#if defined(Q_WS_MAC) +#if defined(Q_WS_MAC) || (defined(Q_OS_MAC) && defined(Q_WS_QPA)) // Mac font engines don't support scaling and rotation if (m.type() > QTransform::TxTranslate) #else diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index d972384..15ff044 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -229,7 +229,6 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi QRegion wrgn(rgn); if (!wOffset.isNull()) wrgn.translate(-wOffset); - QRect wbr = wrgn.boundingRect(); if (wrgn.rectCount() != 1) { int num; @@ -237,23 +236,25 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi XSetClipRectangles(X11->display, d_ptr->gc, 0, 0, rects, num, YXBanded); } - QRect br = rgn.boundingRect().translated(offset); + QPoint widgetOffset = offset + wOffset; + QRect clipRect = widget->rect().translated(widgetOffset).intersected(d_ptr->image->image.rect()); + + QRect br = rgn.boundingRect().translated(offset).intersected(clipRect); + QPoint wpos = br.topLeft() - widgetOffset; + #ifndef QT_NO_MITSHM if (d_ptr->image->xshmpm) { XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, - br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); + br.x(), br.y(), br.width(), br.height(), wpos.x(), wpos.y()); d_ptr->needsSync = true; } else if (d_ptr->image->xshmimg) { - const QImage &src = d->image->image; - br = br.intersected(src.rect()); XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, - br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); + br.x(), br.y(), wpos.x(), wpos.y(), br.width(), br.height(), False); d_ptr->needsSync = true; } else #endif { const QImage &src = d->image->image; - br = br.intersected(src.rect()); if (src.format() != QImage::Format_RGB32 || widget->x11Info().depth() < 24) { Q_ASSERT(src.depth() >= 16); const QImage sub_src(src.scanLine(br.y()) + br.x() * (uint(src.depth()) / 8), @@ -262,11 +263,11 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi data->xinfo = widget->x11Info(); data->fromImage(sub_src, Qt::NoOpaqueDetection); QPixmap pm = QPixmap(data); - XCopyArea(X11->display, pm.handle(), widget->handle(), d_ptr->gc, 0 , 0 , br.width(), br.height(), wbr.x(), wbr.y()); + XCopyArea(X11->display, pm.handle(), widget->handle(), d_ptr->gc, 0 , 0 , br.width(), br.height(), wpos.x(), wpos.y()); } else { // qpaintengine_x11.cpp extern void qt_x11_drawImage(const QRect &rect, const QPoint &pos, const QImage &image, Drawable hd, GC gc, Display *dpy, Visual *visual, int depth); - qt_x11_drawImage(br, wbr.topLeft(), src, widget->handle(), d_ptr->gc, X11->display, (Visual *)widget->x11Info().visual(), widget->x11Info().depth()); + qt_x11_drawImage(br, wpos, src, widget->handle(), d_ptr->gc, X11->display, (Visual *)widget->x11Info().visual(), widget->x11Info().depth()); } } @@ -311,7 +312,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi } CGContextClip(context); - QRect r = rgn.boundingRect(); + QRect r = rgn.boundingRect().intersected(d->image->image.rect()); const CGRect area = CGRectMake(r.x(), r.y(), r.width(), r.height()); CGImageRef image = CGBitmapContextCreateImage(d->image->cg); CGImageRef subImage = CGImageCreateWithImageInRect(image, area); diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index e30d2c0..4e94c21 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -2,8 +2,7 @@ SOURCES += s60framework/qs60mainapplication.cpp \ s60framework/qs60mainappui.cpp \ s60framework/qs60maindocument.cpp \ s60framework/qs60keycapture.cpp -HEADERS += qs60keycapture_p.h \ - s60framework/qs60mainapplication_p.h \ +HEADERS += s60framework/qs60mainapplication_p.h \ s60framework/qs60mainapplication.h \ s60framework/qs60mainappui.h \ s60framework/qs60maindocument.h \ diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 8436856..1c1713c 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -1063,7 +1063,7 @@ bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOpti { QMacStyle *macStyle = qobject_cast<QMacStyle *>(pushButton->style()); if (!macStyle) - return false; + return true; // revert to 'flat' behavior if not Mac style HIThemeButtonDrawInfo bdi; macStyle->d->initHIThemePushButton(option, pushButton, kThemeStateActive, &bdi); return bdi.kind == kThemeBevelButton; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 913352a..33619d6 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -91,6 +91,7 @@ enum TSupportRelease { ES60_5_1 = 0x0008, ES60_5_2 = 0x0010, ES60_5_3 = 0x0020, + ES60_5_4 = 0x0040, ES60_3_X = ES60_3_1 | ES60_3_2, // Releases before Symbian Foundation ES60_PreSF = ES60_3_1 | ES60_3_2 | ES60_5_0, @@ -98,8 +99,10 @@ enum TSupportRelease { ES60_Pre52 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1, // Releases before S60 5.3 ES60_Pre53 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2, + // Releases before S60 5.4 + ES60_Pre54 = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 | ES60_5_3, // Add all new releases here - ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 | ES60_5_3 + ES60_All = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 | ES60_5_3 | ES60_5_4 }; typedef struct { @@ -707,7 +710,7 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsLX( colorIndex, icon, iconMask, - AknIconUtils::AvkonIconFileName(), + (fallbackGraphicID != KErrNotFound ? AknIconUtils::AvkonIconFileName() : KNullDesC), fallbackGraphicID, fallbackGraphicsMaskID, defaultColor); @@ -922,7 +925,7 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX( skinId, icon, iconMask, - AknIconUtils::AvkonIconFileName(), + (fallbackGraphicID != KErrNotFound ? AknIconUtils::AvkonIconFileName() : KNullDesC), fallbackGraphicID , fallbackGraphicsMaskID); @@ -1016,7 +1019,7 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsLX( KAknsIIDDefault, //animation is not themed, lets force fallback graphics animationFrame, frameMask, - AknIconUtils::AvkonIconFileName(), + (fallbackGraphicID != KErrNotFound ? AknIconUtils::AvkonIconFileName() : KNullDesC), fallbackGraphicID , fallbackGraphicsMaskID); } @@ -1228,7 +1231,8 @@ bool QS60StyleModeSpecifics::checkSupport(const int supportedRelease) (currentRelease == QSysInfo::SV_S60_5_0 && supportedRelease & ES60_5_0) || (currentRelease == QSysInfo::SV_S60_5_1 && supportedRelease & ES60_5_1) || (currentRelease == QSysInfo::SV_S60_5_2 && supportedRelease & ES60_5_2) || - (currentRelease == QSysInfo::SV_S60_5_3 && supportedRelease & ES60_5_3) ); + (currentRelease == QSysInfo::SV_S60_5_3 && supportedRelease & ES60_5_3) || + (currentRelease == QSysInfo::SV_S60_5_4 && supportedRelease & ES60_5_4) ); } TAknsItemID QS60StyleModeSpecifics::partSpecificThemeId(int part) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index c099273..9732c7e 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -177,11 +177,14 @@ bool QWindowsStyle::eventFilter(QObject *o, QEvent *e) // Alt has been pressed - find all widgets that care QList<QWidget *> l = widget->findChildren<QWidget *>(); - for (int pos=0 ; pos < l.size() ; ++pos) { + for (int pos=0 ; pos < l.size() ;) { QWidget *w = l.at(pos); if (w->isWindow() || !w->isVisible() || - w->style()->styleHint(SH_UnderlineShortcut, 0, w)) + w->style()->styleHint(SH_UnderlineShortcut, 0, w)) { l.removeAt(pos); + continue; + } + pos++; } // Update states before repainting d->seenAlt.append(widget); diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index cf96733..8400feb 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -58,7 +58,7 @@ #endif // SYMBIAN_ENABLE_SPLIT_HEADERS #endif // QT_NO_FREETYPE -#ifndef SYMBIAN_VERSION_9_4 +#if !defined(SYMBIAN_VERSION_9_4) && !defined(SYMBIAN_VERSION_9_3) && !defined(SYMBIAN_VERSION_9_2) #define SYMBIAN_LINKEDFONTS_SUPPORTED #endif // !SYMBIAN_VERSION_9_4 @@ -166,6 +166,7 @@ public: COpenFontRasterizer *m_rasterizer; mutable QList<const QSymbianTypeFaceExtras *> m_extras; + mutable QHash<QString, const QSymbianTypeFaceExtras *> m_extrasHash; mutable QSet<QString> m_applicationFontFamilies; }; @@ -268,9 +269,8 @@ void QSymbianFontDatabaseExtrasImplementation::clear() static_cast<const QSymbianFontDatabaseExtrasImplementation*>(db->symbianExtras); if (!dbExtras) return; // initializeDb() has never been called - QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData(); if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { - qDeleteAll(extrasHash); + qDeleteAll(dbExtras->m_extrasHash); } else { typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator; for (iterator p = dbExtras->m_extras.begin(); p != dbExtras->m_extras.end(); ++p) { @@ -279,16 +279,11 @@ void QSymbianFontDatabaseExtrasImplementation::clear() } dbExtras->m_extras.clear(); } - extrasHash.clear(); + dbExtras->m_extrasHash.clear(); } void qt_cleanup_symbianFontDatabase() { - static bool cleanupDone = false; - if (cleanupDone) - return; - cleanupDone = true; - QFontDatabasePrivate *db = privateDb(); if (!db) return; @@ -339,12 +334,9 @@ COpenFont* OpenFontFromBitmapFont(const CBitmapFont* aBitmapFont) const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(const QString &aTypeface, bool bold, bool italic) const { - QSymbianTypeFaceExtrasHash &extrasHash = S60->fontData(); - if (extrasHash.isEmpty() && QThread::currentThread() != QApplication::instance()->thread()) - S60->addThreadLocalReleaseFunc(clear); const QString typeface = qt_symbian_fontNameWithAppFontMarker(aTypeface); const QString searchKey = typeface + QString::number(int(bold)) + QString::number(int(italic)); - if (!extrasHash.contains(searchKey)) { + if (!m_extrasHash.contains(searchKey)) { TFontSpec searchSpec(qt_QString2TPtrC(typeface), 1); if (bold) searchSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold); @@ -358,7 +350,7 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font); QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font); sFont.take(); - extrasHash.insert(searchKey, extras); + m_extrasHash.insert(searchKey, extras); } else { const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec); Q_ASSERT(err == KErrNone && font); @@ -372,20 +364,20 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib(); const QString foundKey = QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length()); - if (!extrasHash.contains(foundKey)) { + if (!m_extrasHash.contains(foundKey)) { QScopedPointer<CFont, CFontFromFontStoreReleaser> sFont(font); QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont); sFont.take(); m_extras.append(extras); - extrasHash.insert(searchKey, extras); - extrasHash.insert(foundKey, extras); + m_extrasHash.insert(searchKey, extras); + m_extrasHash.insert(foundKey, extras); } else { m_store->ReleaseFont(font); - extrasHash.insert(searchKey, extrasHash.value(foundKey)); + m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey)); } } } - return extrasHash.value(searchKey); + return m_extrasHash.value(searchKey); } void QSymbianFontDatabaseExtrasImplementation::removeAppFontData( @@ -981,7 +973,7 @@ bool QFontDatabase::removeAllApplicationFonts() bool QFontDatabase::supportsThreadedFontRendering() { - return QSymbianTypeFaceExtras::symbianFontTableApiAvailable(); + return false; } static diff --git a/src/gui/text/qfontengine_coretext.mm b/src/gui/text/qfontengine_coretext.mm index 64d4a24..153451e 100644 --- a/src/gui/text/qfontengine_coretext.mm +++ b/src/gui/text/qfontengine_coretext.mm @@ -135,7 +135,7 @@ void QCoreTextFontEngineMulti::init(bool kerning) attributeDict = CFDictionaryCreateMutable(0, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionaryAddValue(attributeDict, NSFontAttributeName, ctfont); + CFDictionaryAddValue(attributeDict, kCTFontAttributeName, ctfont); if (!kerning) { float zero = 0.0; QCFType<CFNumberRef> noKern = CFNumberCreate(kCFAllocatorDefault, kCFNumberFloatType, &zero); @@ -257,7 +257,7 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay //NSLog(@"Dictionary %@", runAttribs); if (!runAttribs) runAttribs = attributeDict; - CTFontRef runFont = static_cast<CTFontRef>(CFDictionaryGetValue(runAttribs, NSFontAttributeName)); + CTFontRef runFont = static_cast<CTFontRef>(CFDictionaryGetValue(runAttribs, kCTFontAttributeName)); uint fontIndex = fontIndexForFont(runFont); const QFontEngine *engine = engineAt(fontIndex); fontIndex <<= 24; @@ -547,7 +547,6 @@ glyph_metrics_t QCoreTextFontEngine::boundingBox(glyph_t glyph) ret.xoff = ret.xoff.round(); ret.yoff = ret.yoff.round(); } - return ret; } @@ -723,7 +722,12 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition QImage im(qRound(br.width) + 2, qRound(br.height) + 2, QImage::Format_RGB32); im.fill(0); - CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); + CGColorSpaceRef colorspace = +#ifdef Q_WS_MAC + CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); +#else + CGColorSpaceCreateDeviceRGB(); +#endif uint cgflags = kCGImageAlphaNoneSkipFirst; #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version cgflags |= kCGBitmapByteOrder32Host; diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h index efe8295..0a2ae1f 100644 --- a/src/gui/text/qfontengine_coretext_p.h +++ b/src/gui/text/qfontengine_coretext_p.h @@ -44,6 +44,12 @@ #include <private/qfontengine_p.h> +#ifdef QT_NO_CORESERVICES +#include <CoreText/CoreText.h> +#include <CoreGraphics/CoreGraphics.h> +#include <private/qcore_mac_p.h> +#endif + #if !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) class QRawFontPrivate; diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index aacac04..bde2c34 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -680,20 +680,30 @@ void QTextControlPrivate::extendWordwiseSelection(int suggestedNewPosition, qrea if (!wordSelectionEnabled && (mouseXPosition < wordStartX || mouseXPosition > wordEndX)) return; - // keep the already selected word even when moving to the left - // (#39164) - if (suggestedNewPosition < selectedWordOnDoubleClick.position()) - cursor.setPosition(selectedWordOnDoubleClick.selectionEnd()); - else - cursor.setPosition(selectedWordOnDoubleClick.selectionStart()); + if (wordSelectionEnabled) { + if (suggestedNewPosition < selectedWordOnDoubleClick.position()) { + cursor.setPosition(selectedWordOnDoubleClick.selectionEnd()); + setCursorPosition(wordStartPos, QTextCursor::KeepAnchor); + } else { + cursor.setPosition(selectedWordOnDoubleClick.selectionStart()); + setCursorPosition(wordEndPos, QTextCursor::KeepAnchor); + } + } else { + // keep the already selected word even when moving to the left + // (#39164) + if (suggestedNewPosition < selectedWordOnDoubleClick.position()) + cursor.setPosition(selectedWordOnDoubleClick.selectionEnd()); + else + cursor.setPosition(selectedWordOnDoubleClick.selectionStart()); - const qreal differenceToStart = mouseXPosition - wordStartX; - const qreal differenceToEnd = wordEndX - mouseXPosition; + const qreal differenceToStart = mouseXPosition - wordStartX; + const qreal differenceToEnd = wordEndX - mouseXPosition; - if (differenceToStart < differenceToEnd) - setCursorPosition(wordStartPos, QTextCursor::KeepAnchor); - else - setCursorPosition(wordEndPos, QTextCursor::KeepAnchor); + if (differenceToStart < differenceToEnd) + setCursorPosition(wordStartPos, QTextCursor::KeepAnchor); + else + setCursorPosition(wordEndPos, QTextCursor::KeepAnchor); + } if (interactionFlags & Qt::TextSelectableByMouse) { #ifndef QT_NO_CLIPBOARD @@ -1665,8 +1675,10 @@ void QTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button, cons #endif //QT_NO_IM } else { //emit q->visibilityRequest(QRectF(mousePos, QSizeF(1, 1))); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } } selectionChanged(true); repaintOldAndNewSelection(oldSelection); @@ -1710,8 +1722,10 @@ void QTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton button, c repaintOldAndNewSelection(oldSelection); - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } if (interactionFlags & Qt::LinksAccessibleByMouse) { if (!(button & Qt::LeftButton)) diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index f4cb742..39d0e6c 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -540,6 +540,7 @@ int QTextDocumentPrivate::remove_block(int pos, int *blockFormat, int command, Q int n = blocks.next(b); Q_ASSERT((int)blocks.position(n) == pos + 1); blocks.setSize(b, blocks.size(b) + blocks.size(n) - 1); + blocks.fragment(b)->userState = blocks.fragment(n)->userState; b = n; } *blockFormat = blocks.fragment(b)->format; diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 093b43d..aa4a20d 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1532,33 +1532,38 @@ void QTextEngine::itemize() const const ushort *e = uc + length; int lastScript = QUnicodeTables::Common; while (uc < e) { - int script = QUnicodeTables::script(*uc); - if (script == QUnicodeTables::Inherited) - script = lastScript; - analysis->flags = QScriptAnalysis::None; - if (*uc == QChar::ObjectReplacementCharacter) { - if (analysis->bidiLevel % 2) - --analysis->bidiLevel; + switch (*uc) { + case QChar::ObjectReplacementCharacter: analysis->script = QUnicodeTables::Common; analysis->flags = QScriptAnalysis::Object; - } else if (*uc == QChar::LineSeparator) { + break; + case QChar::LineSeparator: if (analysis->bidiLevel % 2) --analysis->bidiLevel; analysis->script = QUnicodeTables::Common; analysis->flags = QScriptAnalysis::LineOrParagraphSeparator; if (option.flags() & QTextOption::ShowLineAndParagraphSeparators) *const_cast<ushort*>(uc) = 0x21B5; // visual line separator - } else if (*uc == 9) { + break; + case 9: // Tab analysis->script = QUnicodeTables::Common; analysis->flags = QScriptAnalysis::Tab; analysis->bidiLevel = control.baseLevel(); - } else if ((*uc == 32 || *uc == QChar::Nbsp) - && (option.flags() & QTextOption::ShowTabsAndSpaces)) { - analysis->script = QUnicodeTables::Common; - analysis->flags = QScriptAnalysis::Space; - analysis->bidiLevel = control.baseLevel(); - } else { - analysis->script = script; + break; + case 32: // Space + case QChar::Nbsp: + if (option.flags() & QTextOption::ShowTabsAndSpaces) { + analysis->script = QUnicodeTables::Common; + analysis->flags = QScriptAnalysis::Space; + analysis->bidiLevel = control.baseLevel(); + break; + } + // fall through + default: + int script = QUnicodeTables::script(*uc); + analysis->script = script == QUnicodeTables::Inherited ? lastScript : script; + analysis->flags = QScriptAnalysis::None; + break; } lastScript = analysis->script; ++uc; @@ -2082,7 +2087,8 @@ void QTextEngine::justify(const QScriptLine &line) } } - QFixed need = line.width - line.textWidth; + QFixed leading = leadingSpaceWidth(line); + QFixed need = line.width - line.textWidth - leading; if (need < 0) { // line overflows already! const_cast<QScriptLine &>(line).justified = true; @@ -2426,7 +2432,7 @@ void QTextEngine::indexAdditionalFormats() between the text that gets truncated and the ellipsis. This is important to get correctly shaped results for arabic text. */ -static bool nextCharJoins(const QString &string, int pos) +static inline bool nextCharJoins(const QString &string, int pos) { while (pos < string.length() && string.at(pos).category() == QChar::Mark_NonSpacing) ++pos; @@ -2435,13 +2441,14 @@ static bool nextCharJoins(const QString &string, int pos) return string.at(pos).joining() != QChar::OtherJoining; } -static bool prevCharJoins(const QString &string, int pos) +static inline bool prevCharJoins(const QString &string, int pos) { while (pos > 0 && string.at(pos - 1).category() == QChar::Mark_NonSpacing) --pos; if (pos == 0) return false; - return (string.at(pos - 1).joining() == QChar::Dual || string.at(pos - 1).joining() == QChar::Center); + QChar::Joining joining = string.at(pos - 1).joining(); + return (joining == QChar::Dual || joining == QChar::Center); } QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags) const diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 515915a..4fd6ddf 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1928,12 +1928,8 @@ found: if (line.textWidth > 0 && item < eng->layoutData->items.size()) eng->maxWidth += lbh.spaceData.textWidth; - // In the latter case, text are drawn with trailing spaces at the beginning - // of a line, so the naturalTextWidth should contain the space width - if ((eng->option.flags() & QTextOption::IncludeTrailingSpaces) || - (line.width == QFIXED_MAX && eng->isRightToLeft())) { + if (eng->option.flags() & QTextOption::IncludeTrailingSpaces) line.textWidth += lbh.spaceData.textWidth; - } if (lbh.spaceData.length) { line.length += lbh.spaceData.length; line.hasTrailingSpaces = true; diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index b6cdc52..1cfacf7 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -106,14 +106,17 @@ unix:x11 { !embedded:!qpa:!x11:mac { HEADERS += \ text/qfontengine_mac_p.h - OBJECTIVE_HEADERS += \ - text/qfontengine_coretext_p.h SOURCES += \ text/qfont_mac.cpp \ text/qrawfont_mac.cpp OBJECTIVE_SOURCES += \ - text/qfontengine_coretext.mm \ text/qfontengine_mac.mm +} +!embedded:!x11:mac { + OBJECTIVE_HEADERS += \ + text/qfontengine_coretext_p.h + OBJECTIVE_SOURCES += \ + text/qfontengine_coretext.mm contains(QT_CONFIG, harfbuzz) { DEFINES += QT_ENABLE_HARFBUZZ_FOR_MAC } diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 41394e3..fc251bf 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -2497,7 +2497,7 @@ void QComboBox::showPopup() } else { TRect staConTopRect = TRect(); AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, staConTopRect); - listRect.setWidth(listRect.height()); + listRect.setWidth(screen.height()); //by default popup is centered on screen in landscape listRect.moveCenter(screen.center()); if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) { diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 84674a5..b6e2f90 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -1442,9 +1442,9 @@ bool QLineControl::processEvent(QEvent* ev) case QEvent::GraphicsSceneMouseRelease: case QEvent::GraphicsSceneMousePress:{ QGraphicsSceneMouseEvent *gvEv = static_cast<QGraphicsSceneMouseEvent*>(ev); - QMouseEvent* mouse = new QMouseEvent(ev->type(), + QMouseEvent mouse(ev->type(), gvEv->pos().toPoint(), gvEv->button(), gvEv->buttons(), gvEv->modifiers()); - processMouseEvent(mouse); break; + processMouseEvent(&mouse); break; } #endif case QEvent::MouseButtonPress: diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 61d4fed..2670089 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -2472,8 +2472,6 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options) and the text edit will try to guess the right format. Use setHtml() or setPlainText() directly to avoid text edit's guessing. - - \sa toPlainText(), toHtml() */ void QTextEdit::setText(const QString &text) { diff --git a/src/imports/imports.pro b/src/imports/imports.pro index c1298e2..d0e24b0 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -1,5 +1,5 @@ TEMPLATE = subdirs SUBDIRS += folderlistmodel particles gestures -contains(QT_CONFIG, opengl): SUBDIRS += shaders +contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1): SUBDIRS += shaders diff --git a/src/imports/shaders/shadereffectitem.cpp b/src/imports/shaders/shadereffectitem.cpp index ca5c9a3..b954e5a 100644..100755 --- a/src/imports/shaders/shadereffectitem.cpp +++ b/src/imports/shaders/shadereffectitem.cpp @@ -199,8 +199,13 @@ Rectangle { */ +#ifdef Q_OS_SYMBIAN +#define OBSERVE_GL_CONTEXT_LOSS 1 +#endif + ShaderEffectItem::ShaderEffectItem(QDeclarativeItem *parent) : QDeclarativeItem(parent) + , m_program(0) , m_meshResolution(1, 1) , m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 4) , m_blending(true) @@ -214,15 +219,21 @@ ShaderEffectItem::ShaderEffectItem(QDeclarativeItem *parent) , m_hasShaderPrograms(false) , m_mirrored(false) , m_defaultVertexShader(true) + , m_contextObserver(0) { setFlag(QGraphicsItem::ItemHasNoContents, false); connect(this, SIGNAL(visibleChanged()), this, SLOT(handleVisibilityChange())); m_active = isVisible(); + +#ifndef OBSERVE_GL_CONTEXT_LOSS + m_program = new QGLShaderProgram(this); +#endif } ShaderEffectItem::~ShaderEffectItem() { reset(); + delete m_contextObserver; } @@ -402,10 +413,38 @@ void ShaderEffectItem::renderEffect(QPainter *painter, const QMatrix4x4 &matrix) if (!painter || !painter->device()) return; - if (!m_program.isLinked() || m_program_dirty) +#ifdef OBSERVE_GL_CONTEXT_LOSS + QGLContext *context = const_cast <QGLContext*> (QGLContext::currentContext()); + if (!m_program || !m_contextObserver || !m_contextObserver->isValid()) { + // Context has changed, re-create QGLShaderProgram + if (context) { + delete m_program; + m_program = 0; + + delete m_contextObserver; + m_contextObserver = 0; + + m_program = new QGLShaderProgram(this); + m_contextObserver = new QGLFramebufferObject(QSize(2,2)); + + if (!m_contextObserver || !m_program) { + delete m_program; + m_program = 0; + delete m_contextObserver; + m_contextObserver = 0; + qWarning() << "ShaderEffectItem::renderEffect - Creating QGLShaderProgram or QGLFrameBufferObject failed!"; + } + } + } +#endif + + if (!m_program) + return; + + if (!m_program->isLinked() || m_program_dirty) updateShaderProgram(); - m_program.bind(); + m_program->bind(); QMatrix4x4 combinedMatrix; combinedMatrix.scale(2.0 / painter->device()->width(), -2.0 / painter->device()->height(), 1.0); @@ -414,7 +453,7 @@ void ShaderEffectItem::renderEffect(QPainter *painter, const QMatrix4x4 &matrix) updateEffectState(combinedMatrix); for (int i = 0; i < m_attributeNames.size(); ++i) { - m_program.enableAttributeArray(m_geometry.attributes()[i].position); + m_program->enableAttributeArray(m_geometry.attributes()[i].position); } bindGeometry(); @@ -452,11 +491,14 @@ void ShaderEffectItem::renderEffect(QPainter *painter, const QMatrix4x4 &matrix) glDisable(GL_DEPTH_TEST); for (int i = 0; i < m_attributeNames.size(); ++i) - m_program.disableAttributeArray(m_geometry.attributes()[i].position); + m_program->disableAttributeArray(m_geometry.attributes()[i].position); } void ShaderEffectItem::updateEffectState(const QMatrix4x4 &matrix) { + if (!m_program) + return; + for (int i = m_sources.size() - 1; i >= 0; --i) { const ShaderEffectItem::SourceData &source = m_sources.at(i); if (!source.source) @@ -467,10 +509,10 @@ void ShaderEffectItem::updateEffectState(const QMatrix4x4 &matrix) } if (m_respectsOpacity) - m_program.setUniformValue("qt_Opacity", static_cast<float> (effectiveOpacity())); + m_program->setUniformValue("qt_Opacity", static_cast<float> (effectiveOpacity())); if (m_respectsMatrix){ - m_program.setUniformValue("qt_ModelViewProjectionMatrix", matrix); + m_program->setUniformValue("qt_ModelViewProjectionMatrix", matrix); } QSet<QByteArray>::const_iterator it; @@ -480,37 +522,37 @@ void ShaderEffectItem::updateEffectState(const QMatrix4x4 &matrix) switch (v.type()) { case QVariant::Color: - m_program.setUniformValue(name.constData(), qvariant_cast<QColor>(v)); + m_program->setUniformValue(name.constData(), qvariant_cast<QColor>(v)); break; case QVariant::Double: - m_program.setUniformValue(name.constData(), (float) qvariant_cast<double>(v)); + m_program->setUniformValue(name.constData(), (float) qvariant_cast<double>(v)); break; case QVariant::Transform: - m_program.setUniformValue(name.constData(), qvariant_cast<QTransform>(v)); + m_program->setUniformValue(name.constData(), qvariant_cast<QTransform>(v)); break; case QVariant::Int: - m_program.setUniformValue(name.constData(), v.toInt()); + m_program->setUniformValue(name.constData(), GLint(v.toInt())); break; case QVariant::Bool: - m_program.setUniformValue(name.constData(), GLint(v.toBool())); + m_program->setUniformValue(name.constData(), GLint(v.toBool())); break; case QVariant::Size: case QVariant::SizeF: - m_program.setUniformValue(name.constData(), v.toSizeF()); + m_program->setUniformValue(name.constData(), v.toSizeF()); break; case QVariant::Point: case QVariant::PointF: - m_program.setUniformValue(name.constData(), v.toPointF()); + m_program->setUniformValue(name.constData(), v.toPointF()); break; case QVariant::Rect: case QVariant::RectF: { QRectF r = v.toRectF(); - m_program.setUniformValue(name.constData(), r.x(), r.y(), r.width(), r.height()); + m_program->setUniformValue(name.constData(), r.x(), r.y(), r.width(), r.height()); } break; case QVariant::Vector3D: - m_program.setUniformValue(name.constData(), qvariant_cast<QVector3D>(v)); + m_program->setUniformValue(name.constData(), qvariant_cast<QVector3D>(v)); break; default: break; @@ -538,6 +580,9 @@ static inline int size_of_type(GLenum type) void ShaderEffectItem::bindGeometry() { + if (!m_program) + return; + char const *const *attrNames = m_attributeNames.constData(); int offset = 0; for (int j = 0; j < m_attributeNames.size(); ++j) { @@ -554,7 +599,7 @@ void ShaderEffectItem::bindGeometry() if (normalize) qWarning() << "ShaderEffectItem::bindGeometry() - non supported attribute type!"; - m_program.setAttributeArray(a.position, (GLfloat*) (((char*) m_geometry.vertexData()) + offset), a.tupleSize, m_geometry.stride()); + m_program->setAttributeArray(a.position, (GLfloat*) (((char*) m_geometry.vertexData()) + offset), a.tupleSize, m_geometry.stride()); //glVertexAttribPointer(a.position, a.tupleSize, a.type, normalize, m_geometry.stride(), (char *) m_geometry.vertexData() + offset); offset += a.tupleSize * size_of_type(a.type); } @@ -637,6 +682,16 @@ void ShaderEffectItem::setActive(bool enable) } } + // QGLShaderProgram is deleted when not active (to minimize GPU memory usage). +#ifdef OBSERVE_GL_CONTEXT_LOSS + if (!m_active && m_program) { + delete m_program; + m_program = 0; + delete m_contextObserver; + m_contextObserver = 0; + } +#endif + emit activeChanged(); markDirty(); } @@ -756,7 +811,9 @@ void ShaderEffectItem::reset() { disconnectPropertySignals(); - m_program.removeAllShaders(); + if (m_program) + m_program->removeAllShaders(); + m_attributeNames.clear(); m_uniformNames.clear(); for (int i = 0; i < m_sources.size(); ++i) { @@ -801,6 +858,9 @@ void ShaderEffectItem::updateProperties() void ShaderEffectItem::updateShaderProgram() { + if (!m_program) + return; + QString vertexCode = m_vertex_code; QString fragmentCode = m_fragment_code; @@ -810,16 +870,16 @@ void ShaderEffectItem::updateShaderProgram() if (fragmentCode.isEmpty()) fragmentCode = QString::fromLatin1(qt_default_fragment_code); - m_program.addShaderFromSourceCode(QGLShader::Vertex, vertexCode); - m_program.addShaderFromSourceCode(QGLShader::Fragment, fragmentCode); + m_program->addShaderFromSourceCode(QGLShader::Vertex, vertexCode); + m_program->addShaderFromSourceCode(QGLShader::Fragment, fragmentCode); for (int i = 0; i < m_attributeNames.size(); ++i) { - m_program.bindAttributeLocation(m_attributeNames.at(i), m_geometry.attributes()[i].position); + m_program->bindAttributeLocation(m_attributeNames.at(i), m_geometry.attributes()[i].position); } - if (!m_program.link()) { + if (!m_program->link()) { qWarning("ShaderEffectItem: Shader compilation failed:"); - qWarning() << m_program.log(); + qWarning() << m_program->log(); } if (!m_attributeNames.contains(qt_postion_attribute_name)) @@ -829,10 +889,10 @@ void ShaderEffectItem::updateShaderProgram() if (!m_respectsMatrix) qWarning("ShaderEffectItem: Missing reference to \'qt_ModelViewProjectionMatrix\'."); - if (m_program.isLinked()) { - m_program.bind(); + if (m_program->isLinked()) { + m_program->bind(); for (int i = 0; i < m_sources.size(); ++i) - m_program.setUniformValue(m_sources.at(i).name.constData(), i); + m_program->setUniformValue(m_sources.at(i).name.constData(), (GLint) i); } m_program_dirty = false; diff --git a/src/imports/shaders/shadereffectitem.h b/src/imports/shaders/shadereffectitem.h index aebe897..6c225a2 100644 --- a/src/imports/shaders/shadereffectitem.h +++ b/src/imports/shaders/shadereffectitem.h @@ -115,7 +115,7 @@ private: private: QString m_fragment_code; QString m_vertex_code; - QGLShaderProgram m_program; + QGLShaderProgram* m_program; QVector<const char *> m_attributeNames; QSet<QByteArray> m_uniformNames; QSize m_meshResolution; @@ -143,6 +143,8 @@ private: bool m_hasShaderPrograms : 1; bool m_mirrored : 1; bool m_defaultVertexShader : 1; + + QGLFramebufferObject* m_contextObserver; }; QT_END_HEADER diff --git a/src/imports/shaders/shadereffectsource.cpp b/src/imports/shaders/shadereffectsource.cpp index 7916538..f7a8a93 100644 --- a/src/imports/shaders/shadereffectsource.cpp +++ b/src/imports/shaders/shadereffectsource.cpp @@ -160,15 +160,11 @@ void ShaderEffectSource::setSourceRect(const QRectF &rect) return; m_sourceRect = rect; updateSizeAndTexture(); - updateBackbuffer(); emit sourceRectChanged(); emit repaintRequired(); - if (m_sourceItem) { - ShaderEffect* effect = qobject_cast<ShaderEffect*> (m_sourceItem->graphicsEffect()); - if (effect) - effect->m_changed = true; - } + m_dirtyTexture = true; + markSourceItemDirty(); } /*! @@ -192,11 +188,8 @@ void ShaderEffectSource::setTextureSize(const QSize &size) emit textureSizeChanged(); emit repaintRequired(); - if (m_sourceItem) { - ShaderEffect* effect = qobject_cast<ShaderEffect*> (m_sourceItem->graphicsEffect()); - if (effect) - effect->m_changed = true; - } + m_dirtyTexture = true; + markSourceItemDirty(); } /*! @@ -264,8 +257,10 @@ void ShaderEffectSource::setWrapMode(WrapMode mode) return; m_wrapMode = mode; - updateBackbuffer(); emit wrapModeChanged(); + + m_dirtyTexture = true; + markSourceItemDirty(); } /*! @@ -284,7 +279,7 @@ void ShaderEffectSource::grab() emit repaintRequired(); } -void ShaderEffectSource::bind() const +void ShaderEffectSource::bind() { GLint filtering = smooth() ? GL_LINEAR : GL_NEAREST; GLuint hwrap = (m_wrapMode == Repeat || m_wrapMode == RepeatHorizontally) ? GL_REPEAT : GL_CLAMP_TO_EDGE; @@ -293,9 +288,13 @@ void ShaderEffectSource::bind() const #if !defined(QT_OPENGL_ES_2) glEnable(GL_TEXTURE_2D); #endif - if (m_fbo) { + + if (m_fbo && m_fbo->isValid()) { glBindTexture(GL_TEXTURE_2D, m_fbo->texture()); } else { + m_dirtyTexture = true; + emit repaintRequired(); + markSourceItemDirty(); glBindTexture(GL_TEXTURE_2D, 0); } @@ -324,7 +323,7 @@ void ShaderEffectSource::derefFromEffectItem() void ShaderEffectSource::updateBackbuffer() { - if (!m_sourceItem) + if (!m_sourceItem || !QGLContext::currentContext()) return; // Multisampling is not (for now) supported. @@ -340,7 +339,7 @@ void ShaderEffectSource::updateBackbuffer() if (!m_fbo) { m_fbo = new ShaderEffectBuffer(size, format); } else { - if (m_fbo->size() != size || m_fbo->format().internalTextureFormat() != GLenum(m_format)) { + if (!m_fbo->isValid() || m_fbo->size() != size || m_fbo->format().internalTextureFormat() != GLenum(m_format)) { delete m_fbo; m_fbo = 0; m_fbo = new ShaderEffectBuffer(size, format); @@ -367,6 +366,16 @@ void ShaderEffectSource::markSourceSizeDirty() emit repaintRequired(); } +void ShaderEffectSource::markSourceItemDirty() +{ + m_dirtyTexture = true; + if (m_sourceItem) { + ShaderEffect* effect = qobject_cast<ShaderEffect*> (m_sourceItem->graphicsEffect()); + if (effect) + effect->m_changed = true; + } +} + void ShaderEffectSource::updateSizeAndTexture() { if (m_sourceItem) { @@ -377,7 +386,7 @@ void ShaderEffectSource::updateSizeAndTexture() size.setWidth(1); if (size.height() < 1) size.setHeight(1); - if (m_fbo && m_fbo->size() != size) { + if (m_fbo && (m_fbo->size() != size || !m_fbo->isValid())) { delete m_fbo; m_fbo = 0; delete m_multisampledFbo; diff --git a/src/imports/shaders/shadereffectsource.h b/src/imports/shaders/shadereffectsource.h index 0f03a6a..af8a815 100644 --- a/src/imports/shaders/shadereffectsource.h +++ b/src/imports/shaders/shadereffectsource.h @@ -99,7 +99,7 @@ public: void setWrapMode(WrapMode mode); bool isActive() const { return m_refs; } - void bind() const; + void bind(); void refFromEffectItem(); void derefFromEffectItem(); void updateBackbuffer(); @@ -124,6 +124,7 @@ Q_SIGNALS: public Q_SLOTS: void markSceneGraphDirty(); void markSourceSizeDirty(); + void markSourceItemDirty(); private: void updateSizeAndTexture(); diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index 7d49648..8a247ce 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -961,9 +961,9 @@ bool QNetworkAccessHttpBackend::sendCacheContents(const QNetworkCacheMetaData &m // This needs to be emitted in the event loop because it can be reached at // the direct code path of qnam.get(...) before the user has a chance // to connect any signals. - QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection); + QMetaObject::invokeMethod(this, "metaDataChanged", isSynchronous() ? Qt::DirectConnection : Qt::QueuedConnection); qRegisterMetaType<QIODevice*>("QIODevice*"); - QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents)); + QMetaObject::invokeMethod(this, "writeDownstreamData", isSynchronous() ? Qt::DirectConnection : Qt::QueuedConnection, Q_ARG(QIODevice*, contents)); #if defined(QNETWORKACCESSHTTPBACKEND_DEBUG) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 4f7f4ed..0423e22 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -395,7 +395,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt case Basic: if(realm.isEmpty()) this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); - if (user.isEmpty()) + if (user.isEmpty() && password.isEmpty()) phase = Done; break; case Ntlm: @@ -406,7 +406,7 @@ void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByt this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm")); if (options.value("stale").toLower() == "true") phase = Start; - if (user.isEmpty()) + if (user.isEmpty() && password.isEmpty()) phase = Done; break; } diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 71ed690..0f33cab 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -4536,11 +4536,14 @@ struct QGLGlyphCoord { }; struct QGLFontTexture { + QGLFontTexture() : data(0) { } + ~QGLFontTexture() { free(data); } int x_offset; // glyph offset within the int y_offset; GLuint texture; int width; int height; + uchar *data; }; typedef QHash<glyph_t, QGLGlyphCoord*> QGLGlyphHash; @@ -4563,7 +4566,7 @@ public: QGLGlyphCoord *lookup(QFontEngine *, glyph_t); void cacheGlyphs(QGLContext *, QFontEngine *, glyph_t *glyphs, int numGlyphs); void cleanCache(); - void allocTexture(int width, int height, GLuint texture); + void allocTexture(QGLFontTexture *); public slots: void cleanupContext(const QGLContext *); @@ -4681,19 +4684,18 @@ void QGLGlyphCache::cleanCache() qt_context_cache.clear(); } -void QGLGlyphCache::allocTexture(int width, int height, GLuint texture) +void QGLGlyphCache::allocTexture(QGLFontTexture *font_tex) { - uchar *tex_data = (uchar *) malloc(width*height*2); - memset(tex_data, 0, width*height*2); - glBindTexture(GL_TEXTURE_2D, texture); + font_tex->data = (uchar *) malloc(font_tex->width*font_tex->height*2); + memset(font_tex->data, 0, font_tex->width*font_tex->height*2); + glBindTexture(GL_TEXTURE_2D, font_tex->texture); #ifndef QT_OPENGL_ES glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE8_ALPHA8, - width, height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, tex_data); + font_tex->width, font_tex->height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, font_tex->data); #else glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, - width, height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, tex_data); + font_tex->width, font_tex->height, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, font_tex->data); #endif - free(tex_data); } #if 0 @@ -4777,13 +4779,13 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, Q_ASSERT(max_tex_size > 0); if (tex_width > max_tex_size) tex_width = max_tex_size; - allocTexture(tex_width, tex_height, font_texture); font_tex = new QGLFontTexture; font_tex->texture = font_texture; font_tex->x_offset = x_margin; font_tex->y_offset = y_margin; font_tex->width = tex_width; font_tex->height = tex_height; + allocTexture(font_tex); // qDebug() << "new font tex - width:" << tex_width << "height:"<< tex_height // << hex << "tex id:" << font_tex->texture << "key:" << font_key << "num cached:" << qt_font_textures.size(); qt_font_textures.insert(font_key, font_tex); @@ -4806,21 +4808,19 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, font_tex->y_offset += strip_height; if (font_tex->y_offset >= font_tex->height) { // get hold of the old font texture - uchar *old_tex_data = (uchar *) malloc(font_tex->width*font_tex->height*2); + uchar *old_tex_data = font_tex->data; int old_tex_height = font_tex->height; -#ifndef QT_OPENGL_ES - glGetTexImage(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, old_tex_data); -#endif // realloc a larger texture glDeleteTextures(1, &font_tex->texture); glGenTextures(1, &font_tex->texture); font_tex->height = qt_next_power_of_two(font_tex->height + strip_height); - allocTexture(font_tex->width, font_tex->height, font_tex->texture); + allocTexture(font_tex); // write back the old texture data glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, font_tex->width, old_tex_height, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, old_tex_data); + memcpy(font_tex->data, old_tex_data, font_tex->width*old_tex_height*2); free(old_tex_data); // update the texture coords and the y offset for the existing glyphs in @@ -4868,8 +4868,10 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, } #endif glyph_im = glyph_im.convertToFormat(QImage::Format_Indexed8); + int cacheLineStart = (font_tex->x_offset + font_tex->y_offset*font_tex->width)*2; for (int y=0; y<glyph_im.height(); ++y) { uchar *s = (uchar *) glyph_im.scanLine(y); + int lineStart = idx; for (int x=0; x<glyph_im.width(); ++x) { uchar alpha = is8BitGray ? *s : qAlpha(glyph_im.color(*s)); tex_data[idx] = alpha; @@ -4879,6 +4881,9 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, } if (glyph_im.width()%2 != 0) idx += 2; + // update cache + memcpy(font_tex->data+cacheLineStart, tex_data+lineStart, glyph_width*2); + cacheLineStart += font_tex->width*2; } glTexSubImage2D(GL_TEXTURE_2D, 0, font_tex->x_offset, font_tex->y_offset, glyph_width, glyph_im.height(), @@ -4950,7 +4955,7 @@ void QOpenGLPaintEngine::drawStaticTextItem(QStaticTextItem *textItem) glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); bool antialias = !(textItem->fontEngine()->fontDef.styleStrategy & QFont::NoAntialias) - && (d->matrix.type() > QTransform::TxTranslate); + && (d->matrix.type() > QTransform::TxTranslate); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, antialias ? GL_LINEAR : GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, antialias ? GL_LINEAR : GL_NEAREST); diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp index 60e4640..62dec62 100644 --- a/src/plugins/bearer/icd/dbusdispatcher.cpp +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp @@ -195,7 +195,7 @@ static bool appendVariantToDBusMessage(const QVariant& argument, break; case QVariant::String: { - QByteArray data = argument.toString().toLatin1(); + QByteArray data = argument.toString().toUtf8(); str_data = data.data(); dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, &str_data); @@ -363,7 +363,7 @@ static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { case DBUS_TYPE_STRING: { dbus_message_iter_get_basic(iter, &str_data); - QString str(str_data); + QString str(QString::fromUtf8(str_data)); QVariant variant(str); return variant; } diff --git a/src/plugins/bearer/icd/iapconf.cpp b/src/plugins/bearer/icd/iapconf.cpp index a29e326..e326edf 100644 --- a/src/plugins/bearer/icd/iapconf.cpp +++ b/src/plugins/bearer/icd/iapconf.cpp @@ -143,7 +143,7 @@ QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) return QVariant(value->value.bool_val ? true : false); case CONN_SETTINGS_VALUE_STRING: - return QVariant(QString(value->value.string_val)); + return QVariant(QString::fromUtf8(value->value.string_val)); case CONN_SETTINGS_VALUE_DOUBLE: return QVariant(value->value.double_val); diff --git a/src/plugins/platforms/uikit/README b/src/plugins/platforms/uikit/README index 8b43201..a8031e6 100644 --- a/src/plugins/platforms/uikit/README +++ b/src/plugins/platforms/uikit/README @@ -1,8 +1,36 @@ This is a proof-of-concept implemenation of a UIKit based QPA plugin. Note that this is completely unsupported, and it is probable that many parts of QtCore and other Qt Modules don't work properly. +There have no tests been run whatsoever. -1) Build Qt +0) What the platform plugin provides + +* Open GL ES 1/2 based backend +* Single touch +* Text/font drawing using system fonts (CoreText) +* Text input (Opening/closing software input panel + Application has to perform necessary layout changes itself.) +* Initial showing/hiding of status bar (as defined in the Info.plist) +* Interface orientations as defined in the Info.plist of the application +* Sound via phonon + +Only Declarative/QML/Qt Quick based UI has been verified working quite well, no +idea about the state of widgets. + +Building/Deploying the application has to be done in Xcode. You need to generate +necessary moc_ files in advance and add these to the Xcode project. More details +on the Xcode setup see below. + +1) Known Issues + +* Console message + "QEventDispatcherUNIX: internal error, wakeUps.testAndSetRelease(1, 0) failed!" + seems to appear sometimes for some people for unknown reasons and + unknown effect +* JavaScript XmlHttpRequest doesn't work reliably even though networking + in general seems to + +2) Build Qt The example Xcode project in the examples subdirectory requires that you do shadow builds of Qt in qt-lighthouse-ios-simulator and qt-lighthouse-ios-device directories @@ -11,20 +39,20 @@ configuration *and* the simulator specific target are active. To build for devic make sure that both the Device configuration *and* the device specific target are active. -The setup is configured to use the iOS 4.2 SDKs, you might want to edit the mkspecs +The setup is configured to use the iOS 4.3 SDKs, you might want to edit the mkspecs to fit your need. After configuring and building Qt you need to also build src/plugins/platforms/uikit. Simulator: ---------- -configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonesimulator-g++ -arch i386 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations Device: ------- -configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-svg -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations +configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -no-neon -developer-build -release -opengl es2 -no-accessibility -no-qt3support -no-multimedia -no-phonon-backend -no-webkit -no-scripttools -no-openssl -no-sql-mysql -no-sql-odbc -no-cups -no-iconv -no-dbus -static -nomake tools -nomake demos -nomake docs -nomake examples -nomake translations -2) XCode setup: +3) XCode setup: - there are examples in the examples subdirectory of the platform plugin - to create something fresh do something like: - Xcode: Create a "View-based Appplication" @@ -43,6 +71,7 @@ configure -qpa -xplatform qpa/macx-iphonedevice-g++ -arch armv7 -developer-build - to use sound in your application, Q_IMPORT_PLUGIN(phonon_av), #include <phonon/private/factory_p.h>, and call Phonon::Factory::setBackend(qt_plugin_instance_phonon_av()); + Link to libphonon and to plugins/phonon/phonon_av -3) Done: Build and Run. +4) Done: Build and Run. diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist index 5bc1ac9..3c45823 100644 --- a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist +++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo-Info.plist @@ -6,6 +6,8 @@ <string>English</string> <key>CFBundleDisplayName</key> <string>${PRODUCT_NAME}</string> + <key>CFBundleDocumentTypes</key> + <array/> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> @@ -20,6 +22,8 @@ <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> + <key>CFBundleURLTypes</key> + <array/> <key>CFBundleVersion</key> <string>1.0</string> <key>LSRequiresIPhoneOS</key> @@ -37,5 +41,9 @@ <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> + <key>UTExportedTypeDeclarations</key> + <array/> + <key>UTImportedTypeDeclarations</key> + <array/> </dict> </plist> diff --git a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj index 59aa398..dedc462 100755 --- a/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj +++ b/src/plugins/platforms/uikit/examples/flickrdemo/flickrdemo.xcodeproj/project.pbxproj @@ -10,13 +10,23 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; + D307DEAE13EBCF5500399BD4 /* libQtCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEA513EBCF5500399BD4 /* libQtCore.a */; }; + D307DEAF13EBCF5500399BD4 /* libQtDeclarative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEA613EBCF5500399BD4 /* libQtDeclarative.a */; }; + D307DEB013EBCF5500399BD4 /* libQtGui.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEA713EBCF5500399BD4 /* libQtGui.a */; }; + D307DEB113EBCF5500399BD4 /* libQtNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEA813EBCF5500399BD4 /* libQtNetwork.a */; }; + D307DEB213EBCF5500399BD4 /* libQtOpenGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEA913EBCF5500399BD4 /* libQtOpenGL.a */; }; + D307DEB313EBCF5500399BD4 /* libQtScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEAA13EBCF5500399BD4 /* libQtScript.a */; }; + D307DEB413EBCF5500399BD4 /* libQtSql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEAB13EBCF5500399BD4 /* libQtSql.a */; }; + D307DEB613EBCF5500399BD4 /* libQtXmlPatterns.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEAD13EBCF5500399BD4 /* libQtXmlPatterns.a */; }; + D307DEB813EBCF6400399BD4 /* libquikit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEB713EBCF6400399BD4 /* libquikit.a */; }; D333CCF213B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */; }; D333CCF313B88A4D0070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */; }; D333CCF413B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */; }; D333CCF513B88A4D0070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */; }; + D36D346513F3CD7E00EC5A41 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36D346413F3CD7E00EC5A41 /* CoreText.framework */; }; + D36D346613F3CD8800EC5A41 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36D346413F3CD7E00EC5A41 /* CoreText.framework */; }; D3A51610134B03DE00E30E2F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A5160F134B03DE00E30E2F /* OpenGLES.framework */; }; D3A51612134B03E900E30E2F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51611134B03E900E30E2F /* QuartzCore.framework */; }; - D3A51614134B040600E30E2F /* libQtOpenGL_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */; }; D3A51615134B041500E30E2F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51611134B03E900E30E2F /* QuartzCore.framework */; }; D3A51616134B041500E30E2F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A5160F134B03DE00E30E2F /* OpenGLES.framework */; }; D3A51618134B042A00E30E2F /* libQtOpenGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A51617134B042A00E30E2F /* libQtOpenGL.a */; }; @@ -27,26 +37,14 @@ D3CAA7F213264F52008BB877 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; }; D3CAA81113264FF0008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; }; - D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81613265056008BB877 /* libQtCore_debug.a */; }; - D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */; }; - D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81813265056008BB877 /* libQtGui_debug.a */; }; - D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81913265056008BB877 /* libQtScript_debug.a */; }; - D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81A13265056008BB877 /* libQtSql_debug.a */; }; - D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA8201326507D008BB877 /* libquikit_debug.a */; }; - D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA82713265220008BB877 /* libQtNetwork_debug.a */; }; - D3CAA88A132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; }; - D3CAA88B132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; }; D3D815F31329339300CDE422 /* flickr in Resources */ = {isa = PBXBuildFile; fileRef = D3D815D31329339300CDE422 /* flickr */; }; D3D815F4132933AB00CDE422 /* flickr in Resources */ = {isa = PBXBuildFile; fileRef = D3D815D31329339300CDE422 /* flickr */; }; - D3D8160A13293C9B00CDE422 /* libQtXml_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8160813293C9B00CDE422 /* libQtXml_debug.a */; }; - D3D8160B13293C9B00CDE422 /* libQtXmlPatterns_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */; }; D3D81758132A184300CDE422 /* libQtCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81752132A184300CDE422 /* libQtCore.a */; }; D3D81759132A184300CDE422 /* libQtDeclarative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81753132A184300CDE422 /* libQtDeclarative.a */; }; D3D8175A132A184300CDE422 /* libQtGui.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81754132A184300CDE422 /* libQtGui.a */; }; D3D8175B132A184300CDE422 /* libQtNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81755132A184300CDE422 /* libQtNetwork.a */; }; D3D8175C132A184300CDE422 /* libQtScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81756132A184300CDE422 /* libQtScript.a */; }; D3D8175D132A184300CDE422 /* libQtSql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81757132A184300CDE422 /* libQtSql.a */; }; - D3D81760132A185A00CDE422 /* libQtXml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8175E132A185A00CDE422 /* libQtXml.a */; }; D3D81761132A185A00CDE422 /* libQtXmlPatterns.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */; }; D3D81763132A186B00CDE422 /* libquikit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D81762132A186B00CDE422 /* libquikit.a */; }; /* End PBXBuildFile section */ @@ -58,34 +56,32 @@ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 32CA4F630368D1EE00C91783 /* flickrdemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = flickrdemo_Prefix.pch; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* flickrdemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "flickrdemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; + D307DEA513EBCF5500399BD4 /* libQtCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtCore.a"; sourceTree = "<group>"; }; + D307DEA613EBCF5500399BD4 /* libQtDeclarative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtDeclarative.a"; sourceTree = "<group>"; }; + D307DEA713EBCF5500399BD4 /* libQtGui.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtGui.a"; sourceTree = "<group>"; }; + D307DEA813EBCF5500399BD4 /* libQtNetwork.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtNetwork.a"; sourceTree = "<group>"; }; + D307DEA913EBCF5500399BD4 /* libQtOpenGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtOpenGL.a"; sourceTree = "<group>"; }; + D307DEAA13EBCF5500399BD4 /* libQtScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtScript.a"; sourceTree = "<group>"; }; + D307DEAB13EBCF5500399BD4 /* libQtSql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtSql.a"; sourceTree = "<group>"; }; + D307DEAD13EBCF5500399BD4 /* libQtXmlPatterns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXmlPatterns.a"; sourceTree = "<group>"; }; + D307DEB713EBCF6400399BD4 /* libquikit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit.a; path = "../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms/libquikit.a"; sourceTree = "<group>"; }; D333CCEF13B88A4D0070E08E /* moc_qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/moc_qmlapplicationviewer.cpp; sourceTree = "<group>"; }; D333CCF013B88A4D0070E08E /* qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/qmlapplicationviewer.cpp; sourceTree = "<group>"; }; D333CCF113B88A4D0070E08E /* qmlapplicationviewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qmlapplicationviewer.h; path = ../share/qmlapplicationviewer/qmlapplicationviewer.h; sourceTree = "<group>"; }; + D36D346413F3CD7E00EC5A41 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; D3A5160F134B03DE00E30E2F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; D3A51611134B03E900E30E2F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtOpenGL_debug.a"; sourceTree = "<group>"; }; D3A51617134B042A00E30E2F /* libQtOpenGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtOpenGL.a"; sourceTree = "<group>"; }; D3CAA7C713264AAD008BB877 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; }; D3CAA7F613264F52008BB877 /* flickrdemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flickrdemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.2.3.dylib; path = usr/lib/libz.1.2.3.dylib; sourceTree = SDKROOT; }; - D3CAA81613265056008BB877 /* libQtCore_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtCore_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtDeclarative_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81813265056008BB877 /* libQtGui_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtGui_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81913265056008BB877 /* libQtScript_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtScript_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81A13265056008BB877 /* libQtSql_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtSql_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA8201326507D008BB877 /* libquikit_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms/libquikit_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA82713265220008BB877 /* libQtNetwork_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtNetwork_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA836132652E5008BB877 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../../../../../../lib/fonts; sourceTree = SOURCE_ROOT; }; D3D815D31329339300CDE422 /* flickr */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flickr; path = ../../../../../../demos/declarative/flickr; sourceTree = SOURCE_ROOT; }; - D3D8160813293C9B00CDE422 /* libQtXml_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXml_debug.a"; sourceTree = SOURCE_ROOT; }; - D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXmlPatterns_debug.a"; sourceTree = SOURCE_ROOT; }; D3D81752132A184300CDE422 /* libQtCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtCore.a"; sourceTree = SOURCE_ROOT; }; D3D81753132A184300CDE422 /* libQtDeclarative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtDeclarative.a"; sourceTree = SOURCE_ROOT; }; D3D81754132A184300CDE422 /* libQtGui.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtGui.a"; sourceTree = SOURCE_ROOT; }; D3D81755132A184300CDE422 /* libQtNetwork.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtNetwork.a"; sourceTree = SOURCE_ROOT; }; D3D81756132A184300CDE422 /* libQtScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtScript.a"; sourceTree = SOURCE_ROOT; }; D3D81757132A184300CDE422 /* libQtSql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtSql.a"; sourceTree = SOURCE_ROOT; }; - D3D8175E132A185A00CDE422 /* libQtXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXml.a"; sourceTree = SOURCE_ROOT; }; D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXmlPatterns.a"; sourceTree = SOURCE_ROOT; }; D3D81762132A186B00CDE422 /* libquikit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit.a; path = "../../../../../../../qt-lighthouse-ios-device/plugins/platforms/libquikit.a"; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ @@ -95,22 +91,22 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D3A51614134B040600E30E2F /* libQtOpenGL_debug.a in Frameworks */, + D36D346613F3CD8800EC5A41 /* CoreText.framework in Frameworks */, D3A51612134B03E900E30E2F /* QuartzCore.framework in Frameworks */, D3A51610134B03DE00E30E2F /* OpenGLES.framework in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */, - D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */, - D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */, - D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */, - D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */, - D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */, - D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */, - D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */, - D3D8160A13293C9B00CDE422 /* libQtXml_debug.a in Frameworks */, - D3D8160B13293C9B00CDE422 /* libQtXmlPatterns_debug.a in Frameworks */, + D307DEAE13EBCF5500399BD4 /* libQtCore.a in Frameworks */, + D307DEAF13EBCF5500399BD4 /* libQtDeclarative.a in Frameworks */, + D307DEB013EBCF5500399BD4 /* libQtGui.a in Frameworks */, + D307DEB113EBCF5500399BD4 /* libQtNetwork.a in Frameworks */, + D307DEB213EBCF5500399BD4 /* libQtOpenGL.a in Frameworks */, + D307DEB313EBCF5500399BD4 /* libQtScript.a in Frameworks */, + D307DEB413EBCF5500399BD4 /* libQtSql.a in Frameworks */, + D307DEB613EBCF5500399BD4 /* libQtXmlPatterns.a in Frameworks */, + D307DEB813EBCF6400399BD4 /* libquikit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -118,6 +114,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D36D346513F3CD7E00EC5A41 /* CoreText.framework in Frameworks */, D3A51618134B042A00E30E2F /* libQtOpenGL.a in Frameworks */, D3CAA7F013264F52008BB877 /* Foundation.framework in Frameworks */, D3CAA7F113264F52008BB877 /* UIKit.framework in Frameworks */, @@ -131,7 +128,6 @@ D3D8175B132A184300CDE422 /* libQtNetwork.a in Frameworks */, D3D8175C132A184300CDE422 /* libQtScript.a in Frameworks */, D3D8175D132A184300CDE422 /* libQtSql.a in Frameworks */, - D3D81760132A185A00CDE422 /* libQtXml.a in Frameworks */, D3D81761132A185A00CDE422 /* libQtXmlPatterns.a in Frameworks */, D3D81763132A186B00CDE422 /* libquikit.a in Frameworks */, ); @@ -174,7 +170,6 @@ isa = PBXGroup; children = ( D3D815D31329339300CDE422 /* flickr */, - D3CAA836132652E5008BB877 /* fonts */, 8D1107310486CEB800E47090 /* flickrdemo-Info.plist */, ); name = Resources; @@ -190,6 +185,7 @@ 288765A40DF7441C002DB57D /* CoreGraphics.framework */, D3A51611134B03E900E30E2F /* QuartzCore.framework */, D3A5160F134B03DE00E30E2F /* OpenGLES.framework */, + D36D346413F3CD7E00EC5A41 /* CoreText.framework */, D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */, ); name = Frameworks; @@ -216,7 +212,6 @@ D3A51617134B042A00E30E2F /* libQtOpenGL.a */, D3D81756132A184300CDE422 /* libQtScript.a */, D3D81757132A184300CDE422 /* libQtSql.a */, - D3D8175E132A185A00CDE422 /* libQtXml.a */, D3D8175F132A185A00CDE422 /* libQtXmlPatterns.a */, ); name = Device; @@ -225,16 +220,15 @@ D3CAA81513265035008BB877 /* Simulator */ = { isa = PBXGroup; children = ( - D3CAA8201326507D008BB877 /* libquikit_debug.a */, - D3CAA81613265056008BB877 /* libQtCore_debug.a */, - D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */, - D3CAA81813265056008BB877 /* libQtGui_debug.a */, - D3CAA82713265220008BB877 /* libQtNetwork_debug.a */, - D3A51613134B040600E30E2F /* libQtOpenGL_debug.a */, - D3CAA81913265056008BB877 /* libQtScript_debug.a */, - D3CAA81A13265056008BB877 /* libQtSql_debug.a */, - D3D8160813293C9B00CDE422 /* libQtXml_debug.a */, - D3D8160913293C9B00CDE422 /* libQtXmlPatterns_debug.a */, + D307DEB713EBCF6400399BD4 /* libquikit.a */, + D307DEA513EBCF5500399BD4 /* libQtCore.a */, + D307DEA613EBCF5500399BD4 /* libQtDeclarative.a */, + D307DEA713EBCF5500399BD4 /* libQtGui.a */, + D307DEA813EBCF5500399BD4 /* libQtNetwork.a */, + D307DEA913EBCF5500399BD4 /* libQtOpenGL.a */, + D307DEAA13EBCF5500399BD4 /* libQtScript.a */, + D307DEAB13EBCF5500399BD4 /* libQtSql.a */, + D307DEAD13EBCF5500399BD4 /* libQtXmlPatterns.a */, ); name = Simulator; sourceTree = "<group>"; @@ -306,7 +300,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D3CAA88A132652E5008BB877 /* fonts in Resources */, D3D815F31329339300CDE422 /* flickr in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -315,7 +308,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D3CAA88B132652E5008BB877 /* fonts in Resources */, D3D815F4132933AB00CDE422 /* flickr in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmltest-Info.plist b/src/plugins/platforms/uikit/examples/qmltest/qmltest-Info.plist index 1566585..531d93d 100644 --- a/src/plugins/platforms/uikit/examples/qmltest/qmltest-Info.plist +++ b/src/plugins/platforms/uikit/examples/qmltest/qmltest-Info.plist @@ -6,6 +6,8 @@ <string>English</string> <key>CFBundleDisplayName</key> <string>${PRODUCT_NAME}</string> + <key>CFBundleDocumentTypes</key> + <array/> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> @@ -20,9 +22,15 @@ <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> + <key>CFBundleURLTypes</key> + <array/> <key>CFBundleVersion</key> <string>1.0</string> <key>LSRequiresIPhoneOS</key> <true/> + <key>UTExportedTypeDeclarations</key> + <array/> + <key>UTImportedTypeDeclarations</key> + <array/> </dict> </plist> diff --git a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj index 96c1932..021eed2 100755 --- a/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj +++ b/src/plugins/platforms/uikit/examples/qmltest/qmltest.xcodeproj/project.pbxproj @@ -10,13 +10,21 @@ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - D316594E1338B29E00760B02 /* libQtXml_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D31659431338B21000760B02 /* libQtXml_debug.a */; }; - D316594F1338B29E00760B02 /* libQtXmlPatterns_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D31659441338B21000760B02 /* libQtXmlPatterns_debug.a */; }; + D307DEC513EBD04100399BD4 /* libquikit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEC413EBD04100399BD4 /* libquikit.a */; }; + D307DECF13EBD05900399BD4 /* libQtCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEC613EBD05900399BD4 /* libQtCore.a */; }; + D307DED013EBD05900399BD4 /* libQtDeclarative.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEC713EBD05900399BD4 /* libQtDeclarative.a */; }; + D307DED113EBD05900399BD4 /* libQtGui.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEC813EBD05900399BD4 /* libQtGui.a */; }; + D307DED213EBD05900399BD4 /* libQtNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DEC913EBD05900399BD4 /* libQtNetwork.a */; }; + D307DED313EBD05900399BD4 /* libQtOpenGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DECA13EBD05900399BD4 /* libQtOpenGL.a */; }; + D307DED413EBD05900399BD4 /* libQtScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DECB13EBD05900399BD4 /* libQtScript.a */; }; + D307DED513EBD05900399BD4 /* libQtSql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DECC13EBD05900399BD4 /* libQtSql.a */; }; + D307DED713EBD05900399BD4 /* libQtXmlPatterns.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D307DECE13EBD05900399BD4 /* libQtXmlPatterns.a */; }; D333CCF913B88A690070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF613B88A690070E08E /* moc_qmlapplicationviewer.cpp */; }; D333CCFA13B88A690070E08E /* moc_qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF613B88A690070E08E /* moc_qmlapplicationviewer.cpp */; }; D333CCFB13B88A690070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF713B88A690070E08E /* qmlapplicationviewer.cpp */; }; D333CCFC13B88A690070E08E /* qmlapplicationviewer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D333CCF713B88A690070E08E /* qmlapplicationviewer.cpp */; }; - D35784241345D8C90046D202 /* libQtOpenGL_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D35784231345D8C90046D202 /* libQtOpenGL_debug.a */; }; + D34F290413F29AF400E4F9AC /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D34F290313F29AF400E4F9AC /* CoreText.framework */; }; + D34F290713F29B0A00E4F9AC /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D34F290613F29B0300E4F9AC /* CoreText.framework */; }; D35784261345D9940046D202 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D35784251345D9940046D202 /* OpenGLES.framework */; }; D35784281345D9E00046D202 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D35784271345D9E00046D202 /* QuartzCore.framework */; }; D3578436134A09990046D202 /* libQtOpenGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3578435134A09990046D202 /* libQtOpenGL.a */; }; @@ -29,15 +37,6 @@ D3CAA7F213264F52008BB877 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; }; D3CAA81113264FF0008BB877 /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */; }; - D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81613265056008BB877 /* libQtCore_debug.a */; }; - D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */; }; - D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81813265056008BB877 /* libQtGui_debug.a */; }; - D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81913265056008BB877 /* libQtScript_debug.a */; }; - D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA81A13265056008BB877 /* libQtSql_debug.a */; }; - D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA8201326507D008BB877 /* libquikit_debug.a */; }; - D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3CAA82713265220008BB877 /* libQtNetwork_debug.a */; }; - D3CAA88A132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; }; - D3CAA88B132652E5008BB877 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA836132652E5008BB877 /* fonts */; }; D3CAA89113265310008BB877 /* qml in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA88E13265310008BB877 /* qml */; }; D3CAA89213265310008BB877 /* qml in Resources */ = {isa = PBXBuildFile; fileRef = D3CAA88E13265310008BB877 /* qml */; }; D3D817B2132A2CFD00CDE422 /* libQtCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817AA132A2CFD00CDE422 /* libQtCore.a */; }; @@ -46,7 +45,6 @@ D3D817B5132A2CFD00CDE422 /* libQtNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817AD132A2CFD00CDE422 /* libQtNetwork.a */; }; D3D817B6132A2CFD00CDE422 /* libQtScript.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817AE132A2CFD00CDE422 /* libQtScript.a */; }; D3D817B7132A2CFD00CDE422 /* libQtSql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817AF132A2CFD00CDE422 /* libQtSql.a */; }; - D3D817B8132A2CFD00CDE422 /* libQtXml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817B0132A2CFD00CDE422 /* libQtXml.a */; }; D3D817B9132A2CFD00CDE422 /* libQtXmlPatterns.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817B1132A2CFD00CDE422 /* libQtXmlPatterns.a */; }; D3D817BB132A2D0E00CDE422 /* libquikit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D3D817BA132A2D0E00CDE422 /* libquikit.a */; }; /* End PBXBuildFile section */ @@ -58,26 +56,26 @@ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 32CA4F630368D1EE00C91783 /* qmltest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = qmltest_Prefix.pch; sourceTree = "<group>"; }; 8D1107310486CEB800E47090 /* qmltest-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "qmltest-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; }; - D31659431338B21000760B02 /* libQtXml_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXml_debug.a"; sourceTree = SOURCE_ROOT; }; - D31659441338B21000760B02 /* libQtXmlPatterns_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXmlPatterns_debug.a"; sourceTree = SOURCE_ROOT; }; + D307DEC413EBD04100399BD4 /* libquikit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit.a; path = "../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms/libquikit.a"; sourceTree = "<group>"; }; + D307DEC613EBD05900399BD4 /* libQtCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtCore.a"; sourceTree = "<group>"; }; + D307DEC713EBD05900399BD4 /* libQtDeclarative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtDeclarative.a"; sourceTree = "<group>"; }; + D307DEC813EBD05900399BD4 /* libQtGui.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtGui.a"; sourceTree = "<group>"; }; + D307DEC913EBD05900399BD4 /* libQtNetwork.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtNetwork.a"; sourceTree = "<group>"; }; + D307DECA13EBD05900399BD4 /* libQtOpenGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtOpenGL.a"; sourceTree = "<group>"; }; + D307DECB13EBD05900399BD4 /* libQtScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtScript.a"; sourceTree = "<group>"; }; + D307DECC13EBD05900399BD4 /* libQtSql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtSql.a"; sourceTree = "<group>"; }; + D307DECE13EBD05900399BD4 /* libQtXmlPatterns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtXmlPatterns.a"; sourceTree = "<group>"; }; D333CCF613B88A690070E08E /* moc_qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/moc_qmlapplicationviewer.cpp; sourceTree = "<group>"; }; D333CCF713B88A690070E08E /* qmlapplicationviewer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = qmlapplicationviewer.cpp; path = ../share/qmlapplicationviewer/qmlapplicationviewer.cpp; sourceTree = "<group>"; }; D333CCF813B88A690070E08E /* qmlapplicationviewer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qmlapplicationviewer.h; path = ../share/qmlapplicationviewer/qmlapplicationviewer.h; sourceTree = "<group>"; }; - D35784231345D8C90046D202 /* libQtOpenGL_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtOpenGL_debug.a"; sourceTree = "<group>"; }; + D34F290313F29AF400E4F9AC /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; + D34F290613F29B0300E4F9AC /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; D35784251345D9940046D202 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; D35784271345D9E00046D202 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; D3578435134A09990046D202 /* libQtOpenGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtOpenGL.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtOpenGL.a"; sourceTree = "<group>"; }; D3CAA7C713264AAD008BB877 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; }; D3CAA7F613264F52008BB877 /* qmltest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = qmltest.app; sourceTree = BUILT_PRODUCTS_DIR; }; D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.2.3.dylib; path = usr/lib/libz.1.2.3.dylib; sourceTree = SDKROOT; }; - D3CAA81613265056008BB877 /* libQtCore_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtCore_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtDeclarative_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81813265056008BB877 /* libQtGui_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtGui_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtGui_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81913265056008BB877 /* libQtScript_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtScript_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA81A13265056008BB877 /* libQtSql_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtSql_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA8201326507D008BB877 /* libquikit_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/plugins/platforms/libquikit_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA82713265220008BB877 /* libQtNetwork_debug.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork_debug.a; path = "../../../../../../../qt-lighthouse-ios-simulator/lib/libQtNetwork_debug.a"; sourceTree = SOURCE_ROOT; }; - D3CAA836132652E5008BB877 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../../../../../../lib/fonts; sourceTree = SOURCE_ROOT; }; D3CAA88E13265310008BB877 /* qml */ = {isa = PBXFileReference; lastKnownFileType = folder; path = qml; sourceTree = SOURCE_ROOT; }; D3D817AA132A2CFD00CDE422 /* libQtCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtCore.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtCore.a"; sourceTree = SOURCE_ROOT; }; D3D817AB132A2CFD00CDE422 /* libQtDeclarative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtDeclarative.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtDeclarative.a"; sourceTree = SOURCE_ROOT; }; @@ -85,7 +83,6 @@ D3D817AD132A2CFD00CDE422 /* libQtNetwork.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtNetwork.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtNetwork.a"; sourceTree = SOURCE_ROOT; }; D3D817AE132A2CFD00CDE422 /* libQtScript.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtScript.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtScript.a"; sourceTree = SOURCE_ROOT; }; D3D817AF132A2CFD00CDE422 /* libQtSql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtSql.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtSql.a"; sourceTree = SOURCE_ROOT; }; - D3D817B0132A2CFD00CDE422 /* libQtXml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXml.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXml.a"; sourceTree = SOURCE_ROOT; }; D3D817B1132A2CFD00CDE422 /* libQtXmlPatterns.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libQtXmlPatterns.a; path = "../../../../../../../qt-lighthouse-ios-device/lib/libQtXmlPatterns.a"; sourceTree = SOURCE_ROOT; }; D3D817BA132A2D0E00CDE422 /* libquikit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libquikit.a; path = "../../../../../../../qt-lighthouse-ios-device/plugins/platforms/libquikit.a"; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ @@ -95,22 +92,22 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D34F290413F29AF400E4F9AC /* CoreText.framework in Frameworks */, D35784281345D9E00046D202 /* QuartzCore.framework in Frameworks */, 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, D35784261345D9940046D202 /* OpenGLES.framework in Frameworks */, D3CAA7FA13264F8A008BB877 /* libz.1.2.3.dylib in Frameworks */, - D3CAA81B13265056008BB877 /* libQtCore_debug.a in Frameworks */, - D3CAA81C13265056008BB877 /* libQtDeclarative_debug.a in Frameworks */, - D3CAA81D13265056008BB877 /* libQtGui_debug.a in Frameworks */, - D3CAA81E13265056008BB877 /* libQtScript_debug.a in Frameworks */, - D3CAA81F13265056008BB877 /* libQtSql_debug.a in Frameworks */, - D3CAA8211326507D008BB877 /* libquikit_debug.a in Frameworks */, - D3CAA82813265220008BB877 /* libQtNetwork_debug.a in Frameworks */, - D316594E1338B29E00760B02 /* libQtXml_debug.a in Frameworks */, - D316594F1338B29E00760B02 /* libQtXmlPatterns_debug.a in Frameworks */, - D35784241345D8C90046D202 /* libQtOpenGL_debug.a in Frameworks */, + D307DECF13EBD05900399BD4 /* libQtCore.a in Frameworks */, + D307DED013EBD05900399BD4 /* libQtDeclarative.a in Frameworks */, + D307DED113EBD05900399BD4 /* libQtGui.a in Frameworks */, + D307DED213EBD05900399BD4 /* libQtNetwork.a in Frameworks */, + D307DED313EBD05900399BD4 /* libQtOpenGL.a in Frameworks */, + D307DED413EBD05900399BD4 /* libQtScript.a in Frameworks */, + D307DED513EBD05900399BD4 /* libQtSql.a in Frameworks */, + D307DED713EBD05900399BD4 /* libQtXmlPatterns.a in Frameworks */, + D307DEC513EBD04100399BD4 /* libquikit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -118,6 +115,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D34F290713F29B0A00E4F9AC /* CoreText.framework in Frameworks */, D357843A134A0AB10046D202 /* QuartzCore.framework in Frameworks */, D3578439134A0AAE0046D202 /* OpenGLES.framework in Frameworks */, D3CAA7F013264F52008BB877 /* Foundation.framework in Frameworks */, @@ -130,7 +128,6 @@ D3D817B5132A2CFD00CDE422 /* libQtNetwork.a in Frameworks */, D3D817B6132A2CFD00CDE422 /* libQtScript.a in Frameworks */, D3D817B7132A2CFD00CDE422 /* libQtSql.a in Frameworks */, - D3D817B8132A2CFD00CDE422 /* libQtXml.a in Frameworks */, D3D817B9132A2CFD00CDE422 /* libQtXmlPatterns.a in Frameworks */, D3D817BB132A2D0E00CDE422 /* libquikit.a in Frameworks */, D3578436134A09990046D202 /* libQtOpenGL.a in Frameworks */, @@ -152,6 +149,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + D34F290313F29AF400E4F9AC /* CoreText.framework */, 29B97315FDCFA39411CA2CEA /* Other Sources */, 29B97317FDCFA39411CA2CEA /* Resources */, D3CAA7E213264E8C008BB877 /* QMLApplicationViewer */, @@ -174,7 +172,6 @@ isa = PBXGroup; children = ( D3CAA88E13265310008BB877 /* qml */, - D3CAA836132652E5008BB877 /* fonts */, 8D1107310486CEB800E47090 /* qmltest-Info.plist */, ); name = Resources; @@ -190,6 +187,7 @@ 288765A40DF7441C002DB57D /* CoreGraphics.framework */, D35784251345D9940046D202 /* OpenGLES.framework */, D35784271345D9E00046D202 /* QuartzCore.framework */, + D34F290613F29B0300E4F9AC /* CoreText.framework */, D3CAA7F913264F8A008BB877 /* libz.1.2.3.dylib */, ); name = Frameworks; @@ -216,7 +214,6 @@ D3578435134A09990046D202 /* libQtOpenGL.a */, D3D817AE132A2CFD00CDE422 /* libQtScript.a */, D3D817AF132A2CFD00CDE422 /* libQtSql.a */, - D3D817B0132A2CFD00CDE422 /* libQtXml.a */, D3D817B1132A2CFD00CDE422 /* libQtXmlPatterns.a */, ); name = Device; @@ -225,16 +222,15 @@ D3CAA81513265035008BB877 /* Simulator */ = { isa = PBXGroup; children = ( - D3CAA8201326507D008BB877 /* libquikit_debug.a */, - D3CAA81613265056008BB877 /* libQtCore_debug.a */, - D3CAA81713265056008BB877 /* libQtDeclarative_debug.a */, - D3CAA81813265056008BB877 /* libQtGui_debug.a */, - D3CAA82713265220008BB877 /* libQtNetwork_debug.a */, - D35784231345D8C90046D202 /* libQtOpenGL_debug.a */, - D3CAA81913265056008BB877 /* libQtScript_debug.a */, - D3CAA81A13265056008BB877 /* libQtSql_debug.a */, - D31659431338B21000760B02 /* libQtXml_debug.a */, - D31659441338B21000760B02 /* libQtXmlPatterns_debug.a */, + D307DEC413EBD04100399BD4 /* libquikit.a */, + D307DEC613EBD05900399BD4 /* libQtCore.a */, + D307DEC713EBD05900399BD4 /* libQtDeclarative.a */, + D307DEC813EBD05900399BD4 /* libQtGui.a */, + D307DEC913EBD05900399BD4 /* libQtNetwork.a */, + D307DECA13EBD05900399BD4 /* libQtOpenGL.a */, + D307DECB13EBD05900399BD4 /* libQtScript.a */, + D307DECC13EBD05900399BD4 /* libQtSql.a */, + D307DECE13EBD05900399BD4 /* libQtXmlPatterns.a */, ); name = Simulator; sourceTree = "<group>"; @@ -306,7 +302,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D3CAA88A132652E5008BB877 /* fonts in Resources */, D3CAA89113265310008BB877 /* qml in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -315,7 +310,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D3CAA88B132652E5008BB877 /* fonts in Resources */, D3CAA89213265310008BB877 /* qml in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm index 388866f..9cbddc0 100644 --- a/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm +++ b/src/plugins/platforms/uikit/phonon_av/avmediaobject.mm @@ -60,7 +60,7 @@ - (id)initWithMediaObject:(AVMediaObject *)obj { - if (self = [self init]) { + if ((self = [self init])) { mediaObject = obj; } return self; diff --git a/src/plugins/platforms/uikit/platform.pro b/src/plugins/platforms/uikit/platform.pro index 273c00d..b5ff62f 100644 --- a/src/plugins/platforms/uikit/platform.pro +++ b/src/plugins/platforms/uikit/platform.pro @@ -2,7 +2,7 @@ TARGET = quikit include(../../qpluginbase.pri) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms -QT += opengl +QT += opengl declarative OBJECTIVE_SOURCES = main.mm \ quikitintegration.mm \ @@ -17,11 +17,19 @@ OBJECTIVE_HEADERS = quikitintegration.h \ quikiteventloop.h \ quikitwindowsurface.h -HEADERS = quikitsoftwareinputhandler.h +HEADERS = quikitsoftwareinputhandler.h \ + qcoretextfontdatabase.h + +SOURCES += \ + qcoretextfontdatabase.cpp + +#needed for qcoretextfontengine even if it's not used +INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src #add libz for freetype. LIBS += -lz -include(../fontdatabases/genericunix/genericunix.pri) target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target + + diff --git a/src/plugins/platforms/uikit/qcoretextfontdatabase.cpp b/src/plugins/platforms/uikit/qcoretextfontdatabase.cpp new file mode 100644 index 0000000..76ad936 --- /dev/null +++ b/src/plugins/platforms/uikit/qcoretextfontdatabase.cpp @@ -0,0 +1,156 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qcoretextfontdatabase.h" + +#include <CoreText/CoreText.h> + +#include <private/qcore_mac_p.h> +#include <private/qfontengine_coretext_p.h> + +#include <QtDebug> + +QT_BEGIN_NAMESPACE + +void QCoreTextFontDatabase::populateFontDatabase() +{ + QCFType<CTFontCollectionRef> collection = CTFontCollectionCreateFromAvailableFonts(0); + if(!collection) + return; + QCFType<CFArrayRef> fonts = CTFontCollectionCreateMatchingFontDescriptors(collection); + if(!fonts) + return; + QSupportedWritingSystems supportedWritingSystems; + for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) + supportedWritingSystems.setSupported((QFontDatabase::WritingSystem)i, true); + QString foundry_name = "CoreText"; + const int numFonts = CFArrayGetCount(fonts); + for(int i = 0; i < numFonts; ++i) { + CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i); + + QCFString family_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontFamilyNameAttribute); +// QCFString style_name = (CFStringRef)CTFontDescriptorCopyAttribute(font, kCTFontStyleNameAttribute); + + QFont::Weight fontWeight = QFont::Normal; + QFont::Style fontStyle = QFont::StyleNormal; + if(QCFType<CFDictionaryRef> styles = (CFDictionaryRef)CTFontDescriptorCopyAttribute(font, kCTFontTraitsAttribute)) { + if(CFNumberRef weight = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontWeightTrait)) { + Q_ASSERT(CFNumberIsFloatType(weight)); + double d; + if(CFNumberGetValue(weight, kCFNumberDoubleType, &d)) { + if (d > 0.0) + fontWeight = QFont::Bold; + } + } + if(CFNumberRef italic = (CFNumberRef)CFDictionaryGetValue(styles, kCTFontSlantTrait)) { + Q_ASSERT(CFNumberIsFloatType(italic)); + double d; + if(CFNumberGetValue(italic, kCFNumberDoubleType, &d)) { + if (d > 0.0) + fontStyle = QFont::StyleItalic; + } + } + } + + int pixelSize = 0; + if(QCFType<CFNumberRef> size = (CFNumberRef)CTFontDescriptorCopyAttribute(font, kCTFontSizeAttribute)) { + if(CFNumberIsFloatType(size)) { + double d; + CFNumberGetValue(size, kCFNumberDoubleType, &d); + pixelSize = d; + } else { + CFNumberGetValue(size, kCFNumberIntType, &pixelSize); + } + } + registerFont(QString(family_name), + foundry_name, + fontWeight, + fontStyle, + QFont::Unstretched, + true, + true, + pixelSize, + supportedWritingSystems, + 0); + } +} + +QFontEngine *QCoreTextFontDatabase::fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle) +{ + Q_UNUSED(script) + Q_UNUSED(handle) + CTFontSymbolicTraits symbolicTraits = 0; + if (fontDef.weight >= QFont::Bold) + symbolicTraits |= kCTFontBoldTrait; + switch (fontDef.style) { + case QFont::StyleNormal: + break; + case QFont::StyleItalic: + case QFont::StyleOblique: + symbolicTraits |= kCTFontItalicTrait; + break; + } + + CGAffineTransform transform = CGAffineTransformIdentity; + if (fontDef.stretch != 100) { + transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1); + } + + QCFType<CTFontRef> baseFont = CTFontCreateWithName(QCFString(fontDef.family), fontDef.pixelSize, &transform); + QCFType<CTFontRef> ctFont = NULL; + // There is a side effect in Core Text: if we apply 0 as symbolic traits to a font in normal weight, + // we will get the light version of that font (while the way supposed to work doesn't: + // setting kCTFontWeightTrait to some value between -1.0 to 0.0 has no effect on font selection) + if (fontDef.weight != QFont::Normal || symbolicTraits) + ctFont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, &transform, symbolicTraits, symbolicTraits); + + // CTFontCreateCopyWithSymbolicTraits returns NULL if we ask for a trait that does + // not exist for the given font. (for example italic) + if (ctFont == 0) { + ctFont = baseFont; + } + + if (ctFont) + return new QCoreTextFontEngine(ctFont, fontDef); + return 0; +} + +QT_END_NAMESPACE diff --git a/src/plugins/platforms/uikit/qcoretextfontdatabase.h b/src/plugins/platforms/uikit/qcoretextfontdatabase.h new file mode 100644 index 0000000..f4fcb20 --- /dev/null +++ b/src/plugins/platforms/uikit/qcoretextfontdatabase.h @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QCORETEXTFONTDATABASE_H +#define QCORETEXTFONTDATABASE_H + +#include <QtGui/QPlatformFontDatabase> + +QT_BEGIN_NAMESPACE + +class QCoreTextFontDatabase : public QPlatformFontDatabase +{ +public: + void populateFontDatabase(); + QFontEngine *fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle); +}; + +QT_END_NAMESPACE + +#endif // QCORETEXTFONTDATABASE_H diff --git a/src/plugins/platforms/uikit/quikiteventloop.mm b/src/plugins/platforms/uikit/quikiteventloop.mm index 01ecf3f..152a34a 100644 --- a/src/plugins/platforms/uikit/quikiteventloop.mm +++ b/src/plugins/platforms/uikit/quikiteventloop.mm @@ -49,6 +49,8 @@ #include <QtGui/QApplication> #include <QtGui/QWidget> +#include <QtDeclarative/QDeclarativeView> +#include <QtDeclarative/QDeclarativeItem> #include <QtDebug> @interface QUIKitAppDelegate : NSObject <UIApplicationDelegate> { @@ -65,7 +67,6 @@ - (id)initWithEventLoopIntegration:(QUIKitEventLoop *)integration; -- (void)processEvents; - (void)processEventsAndSchedule; @end @@ -158,17 +159,11 @@ return self; } -- (void)processEvents -{ - QPlatformEventLoopIntegration::processEvents(); -} - - (void)processEventsAndSchedule { QPlatformEventLoopIntegration::processEvents(); - qint64 nextTime = qMin((qint64)33, mIntegration->nextTimerEvent()); // at least 30fps NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - NSDate *nextDate = [[NSDate date] dateByAddingTimeInterval:((double)nextTime/1000)]; + NSDate *nextDate = [[NSDate date] dateByAddingTimeInterval:((double)mIntegration->nextTimerEvent()/1000.)]; [mIntegration->mTimer setFireDate:nextDate]; [pool release]; } @@ -209,27 +204,72 @@ void QUIKitEventLoop::quitEventLoop() void QUIKitEventLoop::qtNeedsToProcessEvents() { - [mHelper performSelectorOnMainThread:@selector(processEvents) withObject:nil waitUntilDone:NO]; + [mHelper performSelectorOnMainThread:@selector(processEventsAndSchedule) withObject:nil waitUntilDone:NO]; +} + +static UIReturnKeyType keyTypeForObject(QObject *obj) +{ + if (strcmp(obj->metaObject()->className(), "QDeclarativeTextEdit") == 0) + return UIReturnKeyDefault; + return UIReturnKeyDone; } bool QUIKitSoftwareInputHandler::eventFilter(QObject *obj, QEvent *event) { if (event->type() == QEvent::RequestSoftwareInputPanel) { + UIReturnKeyType returnKeyType = UIReturnKeyDone; + if (QDeclarativeView *declarativeView = qobject_cast<QDeclarativeView *>(obj)) { + // register on loosing the focus, so we can auto-remove the input panel again + QGraphicsScene *scene = declarativeView->scene(); + if (scene) { + if (mCurrentFocusObject) + disconnect(mCurrentFocusObject, 0, this, SLOT(activeFocusChanged(bool))); + QDeclarativeItem *focus = static_cast<QDeclarativeItem *>(scene->focusItem()); + mCurrentFocusObject = focus; + if (focus) { + connect(mCurrentFocusObject, SIGNAL(activeFocusChanged(bool)), this, SLOT(activeFocusChanged(bool))); + returnKeyType = keyTypeForObject(mCurrentFocusObject); + } + } + } QWidget *widget = qobject_cast<QWidget *>(obj); if (widget) { + mCurrentFocusWidget = widget; QUIKitWindow *platformWindow = static_cast<QUIKitWindow *>(widget->window()->platformWindow()); - if (platformWindow) [platformWindow->nativeView() becomeFirstResponder]; + if (platformWindow) { + platformWindow->nativeView().returnKeyType = returnKeyType; + [platformWindow->nativeView() becomeFirstResponder]; + } return true; } } else if (event->type() == QEvent::CloseSoftwareInputPanel) { QWidget *widget = qobject_cast<QWidget *>(obj); - if (widget) { - QUIKitWindow *platformWindow = static_cast<QUIKitWindow *>(widget->window()->platformWindow()); - if (platformWindow) [platformWindow->nativeView() resignFirstResponder]; - return true; + return closeSoftwareInputPanel(widget); + } + return false; +} + +bool QUIKitSoftwareInputHandler::closeSoftwareInputPanel(QWidget *widget) +{ + if (widget) { + QUIKitWindow *platformWindow = static_cast<QUIKitWindow *>(widget->window()->platformWindow()); + if (platformWindow) { + [platformWindow->nativeView() resignFirstResponder]; + mCurrentFocusWidget = 0; + if (mCurrentFocusObject) + disconnect(mCurrentFocusObject, 0, this, SLOT(activeFocusChanged(bool))); + mCurrentFocusObject = 0; } + return true; } return false; } +void QUIKitSoftwareInputHandler::activeFocusChanged(bool focus) +{ + if (!focus && mCurrentFocusWidget && mCurrentFocusObject) { + closeSoftwareInputPanel(mCurrentFocusWidget); + } +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/uikit/quikitintegration.mm b/src/plugins/platforms/uikit/quikitintegration.mm index ca020c9..02da97c 100644 --- a/src/plugins/platforms/uikit/quikitintegration.mm +++ b/src/plugins/platforms/uikit/quikitintegration.mm @@ -44,7 +44,7 @@ #include "quikitwindowsurface.h" #include "quikitscreen.h" #include "quikiteventloop.h" -#include "qgenericunixfontdatabase.h" +#include "qcoretextfontdatabase.h" #include <QtGui/QApplication> @@ -56,16 +56,6 @@ QT_BEGIN_NAMESPACE -class QUIKitFontDatabase : public QGenericUnixFontDatabase -{ -public: - virtual QString fontDir() const - { - return QString( [[[[NSBundle mainBundle] bundlePath] - stringByAppendingPathComponent:@"fonts"] UTF8String] ); - } -}; - static QUIKitIntegration *m_instance = 0; QUIKitIntegration * QUIKitIntegration::instance() @@ -74,7 +64,7 @@ QUIKitIntegration * QUIKitIntegration::instance() } QUIKitIntegration::QUIKitIntegration() - :mFontDb(new QUIKitFontDatabase() ) + :mFontDb(new QCoreTextFontDatabase) { if (!m_instance) m_instance = this; diff --git a/src/plugins/platforms/uikit/quikitscreen.mm b/src/plugins/platforms/uikit/quikitscreen.mm index d7d8207..6d24193 100644 --- a/src/plugins/platforms/uikit/quikitscreen.mm +++ b/src/plugins/platforms/uikit/quikitscreen.mm @@ -56,14 +56,13 @@ QUIKitScreen::QUIKitScreen(int screenIndex) CGRect bounds = [uiScreen() bounds]; m_geometry = QRect(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); - m_format = QImage::Format_ARGB32; + m_format = QImage::Format_ARGB32_Premultiplied; m_depth = 24; const qreal inch = 25.4; qreal dpi = 160.; int dragDistance = 12; - int defaultFontPixelSize = 14; if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { dpi = 132.; dragDistance = 10; @@ -71,8 +70,8 @@ QUIKitScreen::QUIKitScreen(int screenIndex) m_physicalSize = QSize(qRound(bounds.size.width * inch / dpi), qRound(bounds.size.height * inch / dpi)); qApp->setStartDragDistance(dragDistance); - QFont font(QLatin1String("Bitstream Vera Sans")); - font.setPixelSize(defaultFontPixelSize); + QFont font; // system font is helvetica, so that is fine already + font.setPixelSize([UIFont systemFontSize]); qApp->setFont(font); [pool release]; diff --git a/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h b/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h index 7e4f8e9..3f64bf5 100644 --- a/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h +++ b/src/plugins/platforms/uikit/quikitsoftwareinputhandler.h @@ -45,6 +45,8 @@ #define QUIKITSOFTWAREINPUTHANDLER_H #include <QtCore/QObject> +#include <QtCore/QPointer> +#include <QtGui/QWidget> QT_BEGIN_NAMESPACE @@ -53,7 +55,17 @@ class QUIKitSoftwareInputHandler : public QObject Q_OBJECT public: + QUIKitSoftwareInputHandler() : mCurrentFocusWidget(0), mCurrentFocusObject(0) {} bool eventFilter(QObject *obj, QEvent *event); + +private slots: + void activeFocusChanged(bool focus); + +private: + bool closeSoftwareInputPanel(QWidget *widget); + + QPointer<QWidget> mCurrentFocusWidget; + QPointer<QObject> mCurrentFocusObject; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/uikit/quikitwindow.mm b/src/plugins/platforms/uikit/quikitwindow.mm index 6e018fe..640b92e 100644 --- a/src/plugins/platforms/uikit/quikitwindow.mm +++ b/src/plugins/platforms/uikit/quikitwindow.mm @@ -53,6 +53,23 @@ #include <QtDebug> +static GLint stencilBits() +{ + static GLint bits; + static bool initialized = false; + if (!initialized) { + glGetIntegerv(GL_STENCIL_BITS, &bits); + initialized = true; + } + return bits; +} + +static GLint depthBits() +{ + // we can choose between GL_DEPTH24_STENCIL8_OES and GL_DEPTH_COMPONENT16 + return stencilBits() > 0 ? 24 : 16; +} + class EAGLPlatformContext : public QPlatformGLContext { public: @@ -60,13 +77,13 @@ public: : mView(view) { mFormat.setWindowApi(QPlatformWindowFormat::OpenGL); - mFormat.setDepthBufferSize(24); + mFormat.setDepthBufferSize(depthBits()); mFormat.setAccumBufferSize(0); mFormat.setRedBufferSize(8); mFormat.setGreenBufferSize(8); mFormat.setBlueBufferSize(8); mFormat.setAlphaBufferSize(8); - mFormat.setStencilBufferSize(8); + mFormat.setStencilBufferSize(stencilBits()); mFormat.setSamples(0); mFormat.setSampleBuffers(false); mFormat.setDoubleBuffer(true); @@ -74,7 +91,7 @@ public: mFormat.setRgba(true); mFormat.setAlpha(true); mFormat.setAccum(false); - mFormat.setStencil(true); + mFormat.setStencil(stencilBits() > 0); mFormat.setStereo(false); mFormat.setDirectRendering(false); @@ -203,9 +220,13 @@ private: glGenRenderbuffers(1, &mDepthRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, mDepthRenderbuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + if (stencilBits() > 0) { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, mFramebufferWidth, mFramebufferHeight); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); + } else { + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, mFramebufferWidth, mFramebufferHeight); + } glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepthRenderbuffer); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro index 5b20a87..cbd67ea 100644 --- a/src/plugins/platforms/wayland/wayland.pro +++ b/src/plugins/platforms/wayland/wayland.pro @@ -33,7 +33,7 @@ INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND LIBS += $$QMAKE_LIBS_WAYLAND QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND -!isEmpty(QMAKE_LFLAGS_RPATH) { +!isEmpty(QMAKE_LFLAGS_RPATH):!contains(QT_CONFIG, no-pkg-config) { WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-client) !isEmpty(WAYLAND_NEEDS_RPATH) { !isEmpty(QMAKE_LIBDIR_WAYLAND):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${QMAKE_LIBDIR_WAYLAND} diff --git a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp index 3323d54..abd78f9 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp +++ b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.cpp @@ -42,7 +42,6 @@ #include "abstractviewinspector.h" #include "abstracttool.h" -#include "editor/qmltoolbar.h" #include "qdeclarativeinspectorprotocol.h" #include <QtDeclarative/QDeclarativeEngine> @@ -52,55 +51,12 @@ #include <QtGui/QVBoxLayout> #include <QtGui/QMouseEvent> -#include <QtCore/QSettings> - -static inline void initEditorResource() { Q_INIT_RESOURCE(editor); } +#include <QtGui/QWidget> namespace QmlJSDebugger { -const char * const KEY_TOOLBOX_GEOMETRY = "toolBox/geometry"; - - -class ToolBox : public QWidget -{ - Q_OBJECT - -public: - ToolBox(QWidget *parent = 0); - ~ToolBox(); - - QmlToolBar *toolBar() const { return m_toolBar; } - -private: - QSettings m_settings; - QmlToolBar *m_toolBar; -}; - -ToolBox::ToolBox(QWidget *parent) - : QWidget(parent, Qt::Tool) - , m_settings(QLatin1String("Nokia"), QLatin1String("QmlInspector"), this) - , m_toolBar(new QmlToolBar) -{ - setWindowFlags((windowFlags() & ~Qt::WindowCloseButtonHint) | Qt::CustomizeWindowHint); - setWindowTitle(tr("Qt Quick Toolbox")); - - QVBoxLayout *verticalLayout = new QVBoxLayout; - verticalLayout->setMargin(0); - verticalLayout->addWidget(m_toolBar); - setLayout(verticalLayout); - - restoreGeometry(m_settings.value(QLatin1String(KEY_TOOLBOX_GEOMETRY)).toByteArray()); -} - -ToolBox::~ToolBox() -{ - m_settings.setValue(QLatin1String(KEY_TOOLBOX_GEOMETRY), saveGeometry()); -} - - AbstractViewInspector::AbstractViewInspector(QObject *parent) : QObject(parent), - m_toolBox(0), m_currentTool(0), m_showAppOnTop(false), m_designModeBehavior(false), @@ -108,8 +64,6 @@ AbstractViewInspector::AbstractViewInspector(QObject *parent) : m_slowDownFactor(1.0), m_debugService(0) { - initEditorResource(); - m_debugService = QDeclarativeInspectorService::instance(); connect(m_debugService, SIGNAL(gotMessage(QByteArray)), this, SLOT(handleMessage(QByteArray))); @@ -214,59 +168,6 @@ void AbstractViewInspector::setShowAppOnTop(bool appOnTop) emit showAppOnTopChanged(appOnTop); } -void AbstractViewInspector::setToolBoxVisible(bool visible) -{ -#if !defined(Q_OS_SYMBIAN) && !defined(Q_WS_MAEMO_5) && !defined(Q_WS_SIMULATOR) - if (!m_toolBox && visible) - createToolBox(); - if (m_toolBox) - m_toolBox->setVisible(visible); -#else - Q_UNUSED(visible) -#endif -} - -void AbstractViewInspector::createToolBox() -{ - m_toolBox = new ToolBox(viewWidget()); - - QmlToolBar *toolBar = m_toolBox->toolBar(); - - QObject::connect(this, SIGNAL(selectedColorChanged(QColor)), - toolBar, SLOT(setColorBoxColor(QColor))); - - QObject::connect(this, SIGNAL(designModeBehaviorChanged(bool)), - toolBar, SLOT(setDesignModeBehavior(bool))); - - QObject::connect(toolBar, SIGNAL(designModeBehaviorChanged(bool)), - this, SLOT(setDesignModeBehavior(bool))); - QObject::connect(toolBar, SIGNAL(animationSpeedChanged(qreal)), this, SLOT(setAnimationSpeed(qreal))); - QObject::connect(toolBar, SIGNAL(animationPausedChanged(bool)), this, SLOT(setAnimationPaused(bool))); - QObject::connect(toolBar, SIGNAL(colorPickerSelected()), this, SLOT(changeToColorPickerTool())); - QObject::connect(toolBar, SIGNAL(zoomToolSelected()), this, SLOT(changeToZoomTool())); - QObject::connect(toolBar, SIGNAL(selectToolSelected()), this, SLOT(changeToSingleSelectTool())); - QObject::connect(toolBar, SIGNAL(marqueeSelectToolSelected()), - this, SLOT(changeToMarqueeSelectTool())); - - QObject::connect(toolBar, SIGNAL(applyChangesFromQmlFileSelected()), - this, SLOT(applyChangesFromClient())); - - QObject::connect(this, SIGNAL(animationSpeedChanged(qreal)), toolBar, SLOT(setAnimationSpeed(qreal))); - QObject::connect(this, SIGNAL(animationPausedChanged(bool)), toolBar, SLOT(setAnimationPaused(bool))); - - QObject::connect(this, SIGNAL(selectToolActivated()), toolBar, SLOT(activateSelectTool())); - - // disabled features - //connect(d->m_toolBar, SIGNAL(applyChangesToQmlFileSelected()), SLOT(applyChangesToClient())); - //connect(q, SIGNAL(resizeToolActivated()), d->m_toolBar, SLOT(activateSelectTool())); - //connect(q, SIGNAL(moveToolActivated()), d->m_toolBar, SLOT(activateSelectTool())); - - QObject::connect(this, SIGNAL(colorPickerActivated()), toolBar, SLOT(activateColorPicker())); - QObject::connect(this, SIGNAL(zoomToolActivated()), toolBar, SLOT(activateZoom())); - QObject::connect(this, SIGNAL(marqueeSelectToolActivated()), - toolBar, SLOT(activateMarqueeSelectTool())); -} - void AbstractViewInspector::changeToColorPickerTool() { changeTool(InspectorProtocol::ColorPickerTool); @@ -608,4 +509,3 @@ QString AbstractViewInspector::idStringForObject(QObject *obj) const } // namespace QmlJSDebugger -#include "abstractviewinspector.moc" diff --git a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h index 7202bcc..07a52f3 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h +++ b/src/plugins/qmltooling/qmldbg_inspector/abstractviewinspector.h @@ -61,7 +61,6 @@ QT_END_NAMESPACE namespace QmlJSDebugger { class AbstractTool; -class ToolBox; /* * The common code between QSGView and QDeclarativeView inspectors lives here, @@ -157,10 +156,6 @@ private: void animationSpeedChangeRequested(qreal factor); void animationPausedChangeRequested(bool paused); - void setToolBoxVisible(bool visible); - void createToolBox(); - - ToolBox *m_toolBox; AbstractTool *m_currentTool; bool m_showAppOnTop; diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp index 72e1380..efb5471 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp +++ b/src/plugins/qmltooling/qmldbg_inspector/editor/colorpickertool.cpp @@ -75,7 +75,9 @@ void ColorPickerTool::mouseMoveEvent(QMouseEvent *event) void ColorPickerTool::clear() { +#ifndef QT_NO_CURSOR view()->setCursor(Qt::CrossCursor); +#endif } void ColorPickerTool::pickColor(const QPoint &pos) diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc b/src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc deleted file mode 100644 index fb2393c..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/editor.qrc +++ /dev/null @@ -1,24 +0,0 @@ -<RCC> - <qresource prefix="/qml"> - <file>images/resize_handle.png</file> - <file>images/select.png</file> - <file>images/select-marquee.png</file> - <file>images/color-picker.png</file> - <file>images/play.png</file> - <file>images/pause.png</file> - <file>images/from-qml.png</file> - <file>images/to-qml.png</file> - <file>images/color-picker-hicontrast.png</file> - <file>images/zoom.png</file> - <file>images/color-picker-24.png</file> - <file>images/from-qml-24.png</file> - <file>images/pause-24.png</file> - <file>images/play-24.png</file> - <file>images/to-qml-24.png</file> - <file>images/zoom-24.png</file> - <file>images/select-24.png</file> - <file>images/select-marquee-24.png</file> - <file>images/inspectormode.png</file> - <file>images/inspectormode-24.png</file> - </qresource> -</RCC> diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png Binary files differdeleted file mode 100644 index cff4721..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png Binary files differdeleted file mode 100644 index b953d08..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker-hicontrast.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png Binary files differdeleted file mode 100644 index 026c31b..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/color-picker.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png Binary files differdeleted file mode 100644 index 0ad21f3..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png Binary files differdeleted file mode 100644 index 666382c..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/from-qml.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png Binary files differdeleted file mode 100644 index 5e74d86..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png Binary files differdeleted file mode 100644 index daed21c..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/inspectormode.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png Binary files differdeleted file mode 100644 index d9a2f6f..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png Binary files differdeleted file mode 100644 index 114d89b..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/pause.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png Binary files differdeleted file mode 100644 index e2b9fbc..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/play-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png Binary files differdeleted file mode 100644 index 011598a..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/play.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png Binary files differdeleted file mode 100644 index 7042bec..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/reload.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png Binary files differdeleted file mode 100644 index 2934f25..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/resize_handle.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png Binary files differdeleted file mode 100644 index 5388a9d..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png Binary files differdeleted file mode 100644 index 0111dda..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png Binary files differdeleted file mode 100644 index 92fe40d..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select-marquee.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png Binary files differdeleted file mode 100644 index 6722855..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/select.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png Binary files differdeleted file mode 100644 index b72450d..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png Binary files differdeleted file mode 100644 index 2ab951f..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/to-qml.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png Binary files differdeleted file mode 100644 index 0346200..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom-24.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png b/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png Binary files differdeleted file mode 100644 index 17f0da6..0000000 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/images/zoom.png +++ /dev/null diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp index 6085d81..3b2493a 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp +++ b/src/plugins/qmltooling/qmldbg_inspector/editor/liveselectiontool.cpp @@ -363,7 +363,9 @@ void LiveSelectionTool::setSelectOnlyContentItems(bool selectOnlyContentItems) void LiveSelectionTool::clear() { +#ifndef QT_NO_CURSOR view()->setCursor(Qt::ArrowCursor); +#endif m_rubberbandSelectionManipulator.clear(), m_singleSelectionManipulator.clear(); m_selectionIndicator.clear(); diff --git a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp index c8ade82..b66bc14 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp +++ b/src/plugins/qmltooling/qmldbg_inspector/editor/zoomtool.cpp @@ -244,7 +244,9 @@ void ZoomTool::keyReleaseEvent(QKeyEvent *event) void ZoomTool::clear() { +#ifndef QT_NO_CURSOR view()->setCursor(Qt::ArrowCursor); +#endif } void ZoomTool::scaleView(const QPointF ¢erPos) diff --git a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro index 0116441..e441a78 100644 --- a/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro +++ b/src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro @@ -21,8 +21,6 @@ SOURCES += \ editor/subcomponentmasklayeritem.cpp \ editor/zoomtool.cpp \ editor/colorpickertool.cpp \ - editor/qmltoolbar.cpp \ - editor/toolbarcolorbox.cpp \ abstracttool.cpp HEADERS += \ @@ -43,12 +41,8 @@ HEADERS += \ editor/subcomponentmasklayeritem.h \ editor/zoomtool.h \ editor/colorpickertool.h \ - editor/qmltoolbar.h \ - editor/toolbarcolorbox.h \ abstracttool.h -RESOURCES += editor/editor.qrc - target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index ff29c0a..35f4e6c 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4882,4 +4882,6 @@ EXPORTS ?resultsReadyAt@QFutureWatcherBase@@IAEXHH@Z @ 4881 NONAME ; void QFutureWatcherBase::resultsReadyAt(int, int) ?started@QFutureWatcherBase@@IAEXXZ @ 4882 NONAME ; void QFutureWatcherBase::started(void) ?resetInternalData@QAbstractItemModel@@IAEXXZ @ 4883 NONAME ; void QAbstractItemModel::resetInternalData(void) + ?toLower@QLocale@@QBE?AVQString@@ABV2@@Z @ 4884 NONAME ; class QString QLocale::toLower(class QString const &) const + ?toUpper@QLocale@@QBE?AVQString@@ABV2@@Z @ 4885 NONAME ; class QString QLocale::toUpper(class QString const &) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index b763848..e05f0b8 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -14045,4 +14045,57 @@ EXPORTS ?setStyleName@QFont@@QAEXABVQString@@@Z @ 14044 NONAME ; void QFont::setStyleName(class QString const &) ?styleName@QFont@@QBE?AVQString@@XZ @ 14045 NONAME ; class QString QFont::styleName(void) const ?styleName@QFontInfo@@QBE?AVQString@@XZ @ 14046 NONAME ; class QString QFontInfo::styleName(void) const + ?initialize@QTreeViewPrivate@@QAEXXZ @ 14047 NONAME ; void QTreeViewPrivate::initialize(void) + ?expand@QTreeViewPrivate@@QAEXH_N@Z @ 14048 NONAME ; void QTreeViewPrivate::expand(int, bool) + ?removeViewItems@QTreeViewPrivate@@QAEXHH@Z @ 14049 NONAME ; void QTreeViewPrivate::removeViewItems(int, int) + ?drawAnimatedOperation@QTreeViewPrivate@@QBEXPAVQPainter@@@Z @ 14050 NONAME ; void QTreeViewPrivate::drawAnimatedOperation(class QPainter *) const + ?firstVisibleItem@QTreeViewPrivate@@QBEHPAH@Z @ 14051 NONAME ; int QTreeViewPrivate::firstVisibleItem(int *) const + ?hasFamily@QFontDatabase@@QBE_NABVQString@@@Z @ 14052 NONAME ; bool QFontDatabase::hasFamily(class QString const &) const + ?insertViewItems@QTreeViewPrivate@@QAEXHHABUQTreeViewItem@@@Z @ 14053 NONAME ; void QTreeViewPrivate::insertViewItems(int, int, struct QTreeViewItem const &) + ??0QTreeViewPrivate@@QAE@XZ @ 14054 NONAME ; QTreeViewPrivate::QTreeViewPrivate(void) + ??_EQTreeViewPrivate@@UAE@I@Z @ 14055 NONAME ; QTreeViewPrivate::~QTreeViewPrivate(unsigned int) + ?q_func@QTreeViewPrivate@@ABEPBVQTreeView@@XZ @ 14056 NONAME ; class QTreeView const * QTreeViewPrivate::q_func(void) const + ?viewIndex@QTreeViewPrivate@@QBEHABVQModelIndex@@@Z @ 14057 NONAME ; int QTreeViewPrivate::viewIndex(class QModelIndex const &) const + ?q_func@QTreeViewPrivate@@AAEPAVQTreeView@@XZ @ 14058 NONAME ; class QTreeView * QTreeViewPrivate::q_func(void) + ?updateScrollBars@QTreeViewPrivate@@QAEXXZ @ 14059 NONAME ; void QTreeViewPrivate::updateScrollBars(void) + ?indentationForItem@QTreeViewPrivate@@QBEHH@Z @ 14060 NONAME ; int QTreeViewPrivate::indentationForItem(int) const + ?above@QTreeViewPrivate@@QBEHH@Z @ 14061 NONAME ; int QTreeViewPrivate::above(int) const + ?_q_columnsRemoved@QTreeViewPrivate@@UAEXABVQModelIndex@@HH@Z @ 14062 NONAME ; void QTreeViewPrivate::_q_columnsRemoved(class QModelIndex const &, int, int) + ?columnRanges@QTreeViewPrivate@@QBE?AV?$QList@U?$QPair@HH@@@@ABVQModelIndex@@0@Z @ 14063 NONAME ; class QList<struct QPair<int, int> > QTreeViewPrivate::columnRanges(class QModelIndex const &, class QModelIndex const &) const + ?_q_modelDestroyed@QTreeViewPrivate@@UAEXXZ @ 14064 NONAME ; void QTreeViewPrivate::_q_modelDestroyed(void) + ?coordinateForItem@QTreeViewPrivate@@QBEHH@Z @ 14065 NONAME ; int QTreeViewPrivate::coordinateForItem(int) const + ?accessibleTable2Index@QTreeViewPrivate@@QBEHABVQModelIndex@@@Z @ 14066 NONAME ; int QTreeViewPrivate::accessibleTable2Index(class QModelIndex const &) const + ?select@QTreeViewPrivate@@QAEXABVQModelIndex@@0V?$QFlags@W4SelectionFlag@QItemSelectionModel@@@@@Z @ 14067 NONAME ; void QTreeViewPrivate::select(class QModelIndex const &, class QModelIndex const &, class QFlags<enum QItemSelectionModel::SelectionFlag>) + ?drawPixmapFragments@QPaintEngineEx@@UAEXPBVQRectF@@0HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 14068 NONAME ; void QPaintEngineEx::drawPixmapFragments(class QRectF const *, class QRectF const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>) + ?draggablePaintPairs@QTreeViewPrivate@@UBE?AV?$QList@U?$QPair@VQRect@@VQModelIndex@@@@@@ABV?$QList@VQModelIndex@@@@PAVQRect@@@Z @ 14069 NONAME ; class QList<struct QPair<class QRect, class QModelIndex> > QTreeViewPrivate::draggablePaintPairs(class QList<class QModelIndex> const &, class QRect *) const + ?beginAnimatedOperation@QTreeViewPrivate@@QAEXXZ @ 14070 NONAME ; void QTreeViewPrivate::beginAnimatedOperation(void) + ?columnAt@QTreeViewPrivate@@QBEHH@Z @ 14071 NONAME ; int QTreeViewPrivate::columnAt(int) const + ?pageUp@QTreeViewPrivate@@QBEHH@Z @ 14072 NONAME ; int QTreeViewPrivate::pageUp(int) const + ?isItemHiddenOrDisabled@QTreeViewPrivate@@QBE_NH@Z @ 14073 NONAME ; bool QTreeViewPrivate::isItemHiddenOrDisabled(int) const + ?expandOrCollapseItemAtPos@QTreeViewPrivate@@QAE_NABVQPoint@@@Z @ 14074 NONAME ; bool QTreeViewPrivate::expandOrCollapseItemAtPos(class QPoint const &) + ?paintAlternatingRowColors@QTreeViewPrivate@@QBEXPAVQPainter@@PAVQStyleOptionViewItemV4@@HH@Z @ 14075 NONAME ; void QTreeViewPrivate::paintAlternatingRowColors(class QPainter *, class QStyleOptionViewItemV4 *, int, int) const + ?drawPixmapFragments@QPainter@@QAEXPBVQRectF@@0HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 14076 NONAME ; void QPainter::drawPixmapFragments(class QRectF const *, class QRectF const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>) + ?itemDecorationRect@QTreeViewPrivate@@QBE?AVQRect@@ABVQModelIndex@@@Z @ 14077 NONAME ; class QRect QTreeViewPrivate::itemDecorationRect(class QModelIndex const &) const + ??1QTreeViewPrivate@@UAE@XZ @ 14078 NONAME ; QTreeViewPrivate::~QTreeViewPrivate(void) + ?storeExpanded@QTreeViewPrivate@@QAE_NABVQPersistentModelIndex@@@Z @ 14079 NONAME ; bool QTreeViewPrivate::storeExpanded(class QPersistentModelIndex const &) + ?hasVisibleChildren@QTreeViewPrivate@@QBE_NABVQModelIndex@@@Z @ 14080 NONAME ; bool QTreeViewPrivate::hasVisibleChildren(class QModelIndex const &) const + ?itemAtCoordinate@QTreeViewPrivate@@QBEHH@Z @ 14081 NONAME ; int QTreeViewPrivate::itemAtCoordinate(int) const + ?renderTreeToPixmapForAnimation@QTreeViewPrivate@@QBE?AVQPixmap@@ABVQRect@@@Z @ 14082 NONAME ; class QPixmap QTreeViewPrivate::renderTreeToPixmapForAnimation(class QRect const &) const + ?prepareAnimatedOperation@QTreeViewPrivate@@QAEXHW4Direction@QAbstractAnimation@@@Z @ 14083 NONAME ; void QTreeViewPrivate::prepareAnimatedOperation(int, enum QAbstractAnimation::Direction) + ?_q_endAnimatedOperation@QTreeViewPrivate@@QAEXXZ @ 14084 NONAME ; void QTreeViewPrivate::_q_endAnimatedOperation(void) + ?startAndEndColumns@QTreeViewPrivate@@QBE?AU?$QPair@HH@@ABVQRect@@@Z @ 14085 NONAME ; struct QPair<int, int> QTreeViewPrivate::startAndEndColumns(class QRect const &) const + ?invalidateHeightCache@QTreeViewPrivate@@QBEXH@Z @ 14086 NONAME ; void QTreeViewPrivate::invalidateHeightCache(int) const + ?isIndexExpanded@QTreeViewPrivate@@QBE_NABVQModelIndex@@@Z @ 14087 NONAME ; bool QTreeViewPrivate::isIndexExpanded(class QModelIndex const &) const + ?layout@QTreeViewPrivate@@QAEXH_N0@Z @ 14088 NONAME ; void QTreeViewPrivate::layout(int, bool, bool) + ?cancelPasswordEchoTimer@QLineControl@@AAEXXZ @ 14089 NONAME ; void QLineControl::cancelPasswordEchoTimer(void) + ?collapse@QTreeViewPrivate@@QAEXH_N@Z @ 14090 NONAME ; void QTreeViewPrivate::collapse(int, bool) + ?modelIndex@QTreeViewPrivate@@QBE?AVQModelIndex@@HH@Z @ 14091 NONAME ; class QModelIndex QTreeViewPrivate::modelIndex(int, int) const + ?itemHeight@QTreeViewPrivate@@QBEHH@Z @ 14092 NONAME ; int QTreeViewPrivate::itemHeight(int) const + ?isRowHidden@QTreeViewPrivate@@QBE_NABVQModelIndex@@@Z @ 14093 NONAME ; bool QTreeViewPrivate::isRowHidden(class QModelIndex const &) const + ?_q_sortIndicatorChanged@QTreeViewPrivate@@QAEXHW4SortOrder@Qt@@@Z @ 14094 NONAME ; void QTreeViewPrivate::_q_sortIndicatorChanged(int, enum Qt::SortOrder) + ?pageDown@QTreeViewPrivate@@QBEHH@Z @ 14095 NONAME ; int QTreeViewPrivate::pageDown(int) const + ?_q_modelAboutToBeReset@QTreeViewPrivate@@QAEXXZ @ 14096 NONAME ; void QTreeViewPrivate::_q_modelAboutToBeReset(void) + ?itemDecorationAt@QTreeViewPrivate@@QBEHABVQPoint@@@Z @ 14097 NONAME ; int QTreeViewPrivate::itemDecorationAt(class QPoint const &) const + ?below@QTreeViewPrivate@@QBEHH@Z @ 14098 NONAME ; int QTreeViewPrivate::below(int) const + ?_q_columnsAboutToBeRemoved@QTreeViewPrivate@@UAEXABVQModelIndex@@HH@Z @ 14099 NONAME ; void QTreeViewPrivate::_q_columnsAboutToBeRemoved(class QModelIndex const &, int, int) diff --git a/src/s60installs/bwins/QtSqlu.def b/src/s60installs/bwins/QtSqlu.def index 586850a..3e726e8 100644 --- a/src/s60installs/bwins/QtSqlu.def +++ b/src/s60installs/bwins/QtSqlu.def @@ -470,4 +470,5 @@ EXPORTS ?qt_static_metacall@QSqlRelationalTableModel@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPAX@Z @ 469 NONAME ; void QSqlRelationalTableModel::qt_static_metacall(class QObject *, enum QMetaObject::Call, int, void * *) ?staticMetaObjectExtraData@QSqlRelationalTableModel@@0UQMetaObjectExtraData@@B @ 470 NONAME ; struct QMetaObjectExtraData const QSqlRelationalTableModel::staticMetaObjectExtraData ?qt_static_metacall@QSqlDriverPlugin@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPAX@Z @ 471 NONAME ; void QSqlDriverPlugin::qt_static_metacall(class QObject *, enum QMetaObject::Call, int, void * *) + ?setJoinMode@QSqlRelationalTableModel@@QAEXW4JoinMode@1@@Z @ 472 NONAME ; void QSqlRelationalTableModel::setJoinMode(enum QSqlRelationalTableModel::JoinMode) diff --git a/src/s60installs/bwins/QtTestu.def b/src/s60installs/bwins/QtTestu.def index 486984a..5365850 100644 --- a/src/s60installs/bwins/QtTestu.def +++ b/src/s60installs/bwins/QtTestu.def @@ -170,4 +170,5 @@ EXPORTS ?qt_static_metacall@QTestEventLoop@@CAXPAVQObject@@W4Call@QMetaObject@@HPAPAX@Z @ 169 NONAME ; void QTestEventLoop::qt_static_metacall(class QObject *, enum QMetaObject::Call, int, void * *) ?startLogging@QTestLog@@SAXI@Z @ 170 NONAME ; void QTestLog::startLogging(unsigned int) ?staticMetaObjectExtraData@QTestEventLoop@@0UQMetaObjectExtraData@@B @ 171 NONAME ; struct QMetaObjectExtraData const QTestEventLoop::staticMetaObjectExtraData + ?printAvailableTags@QTest@@3_NA @ 172 NONAME ; bool QTest::printAvailableTags diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index f0bf9fc..3abcf98 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -4163,4 +4163,6 @@ EXPORTS _ZNK5QUuid11toByteArrayEv @ 4162 NONAME _ZNK5QUuid9toRfc4122Ev @ 4163 NONAME _ZN18QAbstractItemModel17resetInternalDataEv @ 4164 NONAME + _ZNK7QLocale7toLowerERK7QString @ 4165 NONAME + _ZNK7QLocale7toUpperERK7QString @ 4166 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 01b3772..38c67b9 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12758,4 +12758,45 @@ EXPORTS _ZN5QFont12setStyleNameERK7QString @ 12757 NONAME _ZNK5QFont9styleNameEv @ 12758 NONAME _ZNK9QFontInfo9styleNameEv @ 12759 NONAME + _ZN14QPaintEngineEx19drawPixmapFragmentsEPK6QRectFS2_iRK7QPixmap6QFlagsIN8QPainter18PixmapFragmentHintEE @ 12760 NONAME + _ZN16QTreeViewPrivate10initializeEv @ 12761 NONAME + _ZN16QTreeViewPrivate15insertViewItemsEiiRK13QTreeViewItem @ 12762 NONAME + _ZN16QTreeViewPrivate15removeViewItemsEii @ 12763 NONAME + _ZN16QTreeViewPrivate16updateScrollBarsEv @ 12764 NONAME + _ZN16QTreeViewPrivate17_q_columnsRemovedERK11QModelIndexii @ 12765 NONAME + _ZN16QTreeViewPrivate17_q_modelDestroyedEv @ 12766 NONAME + _ZN16QTreeViewPrivate22_q_modelAboutToBeResetEv @ 12767 NONAME + _ZN16QTreeViewPrivate22beginAnimatedOperationEv @ 12768 NONAME + _ZN16QTreeViewPrivate23_q_endAnimatedOperationEv @ 12769 NONAME + _ZN16QTreeViewPrivate23_q_sortIndicatorChangedEiN2Qt9SortOrderE @ 12770 NONAME + _ZN16QTreeViewPrivate24prepareAnimatedOperationEiN18QAbstractAnimation9DirectionE @ 12771 NONAME + _ZN16QTreeViewPrivate25expandOrCollapseItemAtPosERK6QPoint @ 12772 NONAME + _ZN16QTreeViewPrivate26_q_columnsAboutToBeRemovedERK11QModelIndexii @ 12773 NONAME + _ZN16QTreeViewPrivate6expandEib @ 12774 NONAME + _ZN16QTreeViewPrivate6layoutEibb @ 12775 NONAME + _ZN16QTreeViewPrivate6selectERK11QModelIndexS2_6QFlagsIN19QItemSelectionModel13SelectionFlagEE @ 12776 NONAME + _ZN16QTreeViewPrivate8collapseEib @ 12777 NONAME + _ZN8QPainter19drawPixmapFragmentsEPK6QRectFS2_iRK7QPixmap6QFlagsINS_18PixmapFragmentHintEE @ 12778 NONAME + _ZNK13QFontDatabase9hasFamilyERK7QString @ 12779 NONAME + _ZNK16QTreeViewPrivate10itemHeightEi @ 12780 NONAME + _ZNK16QTreeViewPrivate10modelIndexEii @ 12781 NONAME + _ZNK16QTreeViewPrivate12columnRangesERK11QModelIndexS2_ @ 12782 NONAME + _ZNK16QTreeViewPrivate16firstVisibleItemEPi @ 12783 NONAME + _ZNK16QTreeViewPrivate16itemAtCoordinateEi @ 12784 NONAME + _ZNK16QTreeViewPrivate16itemDecorationAtERK6QPoint @ 12785 NONAME + _ZNK16QTreeViewPrivate17coordinateForItemEi @ 12786 NONAME + _ZNK16QTreeViewPrivate18hasVisibleChildrenERK11QModelIndex @ 12787 NONAME + _ZNK16QTreeViewPrivate18indentationForItemEi @ 12788 NONAME + _ZNK16QTreeViewPrivate18itemDecorationRectERK11QModelIndex @ 12789 NONAME + _ZNK16QTreeViewPrivate18startAndEndColumnsERK5QRect @ 12790 NONAME + _ZNK16QTreeViewPrivate19draggablePaintPairsERK5QListI11QModelIndexEP5QRect @ 12791 NONAME + _ZNK16QTreeViewPrivate21drawAnimatedOperationEP8QPainter @ 12792 NONAME + _ZNK16QTreeViewPrivate25paintAlternatingRowColorsEP8QPainterP22QStyleOptionViewItemV4ii @ 12793 NONAME + _ZNK16QTreeViewPrivate30renderTreeToPixmapForAnimationERK5QRect @ 12794 NONAME + _ZNK16QTreeViewPrivate6pageUpEi @ 12795 NONAME + _ZNK16QTreeViewPrivate8columnAtEi @ 12796 NONAME + _ZNK16QTreeViewPrivate8pageDownEi @ 12797 NONAME + _ZNK16QTreeViewPrivate9viewIndexERK11QModelIndex @ 12798 NONAME + _ZTI16QTreeViewPrivate @ 12799 NONAME + _ZTV16QTreeViewPrivate @ 12800 NONAME diff --git a/src/s60installs/eabi/QtSqlu.def b/src/s60installs/eabi/QtSqlu.def index 21782b8..4867d10 100644 --- a/src/s60installs/eabi/QtSqlu.def +++ b/src/s60installs/eabi/QtSqlu.def @@ -477,4 +477,5 @@ EXPORTS _ZN16QSqlDriverPlugin25staticMetaObjectExtraDataE @ 476 NONAME DATA 8 _ZN24QSqlRelationalTableModel18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 477 NONAME _ZN24QSqlRelationalTableModel25staticMetaObjectExtraDataE @ 478 NONAME DATA 8 + _ZN24QSqlRelationalTableModel11setJoinModeENS_8JoinModeE @ 479 NONAME diff --git a/src/s60installs/eabi/QtTestu.def b/src/s60installs/eabi/QtTestu.def index ce98aa6..454292c 100644 --- a/src/s60installs/eabi/QtTestu.def +++ b/src/s60installs/eabi/QtTestu.def @@ -166,4 +166,5 @@ EXPORTS _ZN8QTestLog12startLoggingEj @ 165 NONAME _ZN14QTestEventLoop18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv @ 166 NONAME _ZN14QTestEventLoop25staticMetaObjectExtraDataE @ 167 NONAME DATA 8 + _ZN5QTest18printAvailableTagsE @ 168 NONAME DATA 1 diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 0164141..a43c3df 100755 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -10,10 +10,10 @@ symbian: { TARGET = "Qt$${QT_LIBINFIX}" isEmpty(QT_LIBINFIX) { - TARGET.UID3 = 0x2001e61c + TARGET.UID3 = 0x2001E61C } else { # Always use experimental UID for infixed configuration to avoid UID clash - TARGET.UID3 = 0xe001e61c + TARGET.UID3 = 0xE001E61C } VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} @@ -103,7 +103,7 @@ symbian: { # Support backup & restore for Qt libraries qtbackup.files = backup_registration.xml - qtbackup.path = c:/private/10202d56/import/packages/$$replace(TARGET.UID3, 0x,) + qtbackup.path = c:/private/10202d56/import/packages/$$lower($$replace(TARGET.UID3, 0x,)) DEPLOYMENT += qtlibraries \ qtbackup \ diff --git a/src/svg/qsvgstructure.cpp b/src/svg/qsvgstructure.cpp index cc158ba..4d9fad5 100644 --- a/src/svg/qsvgstructure.cpp +++ b/src/svg/qsvgstructure.cpp @@ -369,7 +369,7 @@ QSvgNode * QSvgStructureNode::previousSiblingNode(QSvgNode *n) const { QSvgNode *prev = 0; QList<QSvgNode*>::const_iterator itr = m_renderers.constBegin(); - while (itr != m_renderers.constEnd()) { + for (; itr != m_renderers.constEnd(); ++itr) { QSvgNode *node = *itr; if (node == n) return prev; diff --git a/src/xmlpatterns/expr/qevaluationcache.cpp b/src/xmlpatterns/expr/qevaluationcache.cpp index 67109eb..3b6fc92 100644 --- a/src/xmlpatterns/expr/qevaluationcache.cpp +++ b/src/xmlpatterns/expr/qevaluationcache.cpp @@ -49,10 +49,9 @@ template<bool IsForGlobal> EvaluationCache<IsForGlobal>::EvaluationCache(const Expression::Ptr &op, const VariableDeclaration *varDecl, const VariableSlotID aSlot) : SingleContainer(op) - , m_declaration(varDecl) + , m_declarationUsedByMany(varDecl->usedByMany()) , m_varSlot(aSlot) { - Q_ASSERT(m_declaration); Q_ASSERT(m_varSlot > -1); } @@ -199,7 +198,7 @@ Expression::Ptr EvaluationCache<IsForGlobal>::compress(const StaticContext::Ptr if(m_operand->is(IDRangeVariableReference)) return m_operand; - if(m_declaration->usedByMany()) + if (m_declarationUsedByMany) { /* If it's only an atomic value an EvaluationCache is overkill. However, * it's still needed for functions like fn:current-time() that must adhere to diff --git a/src/xmlpatterns/expr/qevaluationcache_p.h b/src/xmlpatterns/expr/qevaluationcache_p.h index 4111634..67ee5c2 100644 --- a/src/xmlpatterns/expr/qevaluationcache_p.h +++ b/src/xmlpatterns/expr/qevaluationcache_p.h @@ -125,6 +125,7 @@ namespace QPatternist private: static DynamicContext::Ptr topFocusContext(const DynamicContext::Ptr &context); const VariableDeclaration* m_declaration; + bool m_declarationUsedByMany; /** * This variable must not be called m_slot. If it so, a compiler bug on * HP-UX-aCC-64 is triggered in the constructor initializor. See the diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 48456e3..6241f60 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -172,27 +172,31 @@ const char *BaselineHandler::logtime() bool BaselineHandler::establishConnection() { - if (!proto.acceptConnection(&plat)) { + if (!proto.acceptConnection(&clientInfo)) { qWarning() << runId << logtime() << "Accepting new connection from" << proto.socket.peerAddress().toString() << "failed." << proto.errorMessage(); proto.sendBlock(BaselineProtocol::Abort, proto.errorMessage().toLatin1()); // In case the client can hear us, tell it what's wrong. proto.socket.disconnectFromHost(); return false; } QString logMsg; - foreach (QString key, plat.keys()) { + foreach (QString key, clientInfo.keys()) { if (key != PI_HostName && key != PI_HostAddress) - logMsg += key + QLS(": '") + plat.value(key) + QLS("', "); + logMsg += key + QLS(": '") + clientInfo.value(key) + QLS("', "); } - qDebug() << runId << logtime() << "Connection established with" << plat.value(PI_HostName) - << "[" << qPrintable(plat.value(PI_HostAddress)) << "]" << logMsg; + qDebug() << runId << logtime() << "Connection established with" << clientInfo.value(PI_HostName) + << "[" << qPrintable(clientInfo.value(PI_HostAddress)) << "]" << logMsg + << "Overrides:" << clientInfo.overrides() << "AdHoc-Run:" << clientInfo.isAdHocRun(); + + //### Temporarily override the client setting, for client compatibility: + if (!clientInfo.isAdHocRun()) + clientInfo.setAdHocRun(clientInfo.value(PI_PulseGitBranch).isEmpty() && clientInfo.value(PI_PulseTestrBranch).isEmpty()); settings->beginGroup("ClientFilters"); - if (!settings->childKeys().isEmpty() && !plat.value(PI_PulseGitBranch).isEmpty()) { // i.e. not adhoc client - // Abort if client does not match the filters + if (!clientInfo.isAdHocRun()) { // for CI runs, allow filtering of clients. TBD: different filters (settings file) per testCase foreach (QString filterKey, settings->childKeys()) { QString filter = settings->value(filterKey).toString(); - QString platVal = plat.value(filterKey); - if (filter.isEmpty() || platVal.isEmpty()) + QString platVal = clientInfo.value(filterKey); + if (filter.isEmpty()) continue; // tbd: add a syntax for specifying a "value-must-be-present" filter if (!platVal.contains(filter)) { qDebug() << runId << logtime() << "Did not pass client filter on" << filterKey << "; disconnecting."; @@ -206,7 +210,7 @@ bool BaselineHandler::establishConnection() proto.sendBlock(BaselineProtocol::Ack, QByteArray()); - report.init(this, runId, plat); + report.init(this, runId, clientInfo); return true; } @@ -297,6 +301,12 @@ void BaselineHandler::storeImage(const QByteArray &itemBlock, bool isBaseline) ImageItem item; ds >> item; + if (isBaseline && !clientInfo.overrides().isEmpty()) { + qDebug() << runId << logtime() << "Received baseline from client with override info, ignoring. Item:" << item.itemName; + proto.sendBlock(BaselineProtocol::UnknownError, "New baselines not accepted from client with override info."); + return; + } + QString prefix = pathForItem(item, isBaseline); qDebug() << runId << logtime() << "Received" << (isBaseline ? "baseline" : "mismatched") << "image for:" << item.itemName << "Storing in" << prefix; @@ -313,7 +323,7 @@ void BaselineHandler::storeImage(const QByteArray &itemBlock, bool isBaseline) cwd.mkpath(dir); item.image.save(prefix + QLS(FileFormat), FileFormat); - PlatformInfo itemData = plat; + PlatformInfo itemData = clientInfo; itemData.insert(PI_ImageChecksum, QString::number(item.imageChecksums.at(0), 16)); //# Only the first is stored. TBD: get rid of list itemData.insert(PI_RunId, runId); itemData.insert(PI_CreationDate, QDateTime::currentDateTime().toString()); @@ -366,17 +376,16 @@ void BaselineHandler::receiveDisconnect() } -void BaselineHandler::mapPlatformInfo() const +PlatformInfo BaselineHandler::mapPlatformInfo(const PlatformInfo& orig) const { - mapped = plat; + PlatformInfo mapped = orig; // Map hostname - QString host = plat.value(PI_HostName).section(QLC('.'), 0, 0); // Filter away domain, if any + QString host = orig.value(PI_HostName).section(QLC('.'), 0, 0); // Filter away domain, if any if (host.isEmpty() || host == QLS("localhost")) { - host = plat.value(PI_HostAddress); + host = orig.value(PI_HostAddress); } else { - if (!plat.value(PI_PulseGitBranch).isEmpty()) { - // i.e. pulse run, so remove index postfix typical of vm hostnames + if (!orig.isAdHocRun()) { // i.e. CI system run, so remove index postfix typical of vm hostnames host.remove(QRegExp(QLS("\\d+$"))); if (host.endsWith(QLC('-'))) host.chop(1); @@ -387,18 +396,28 @@ void BaselineHandler::mapPlatformInfo() const mapped.insert(PI_HostName, host); // Map qmakespec - QString mkspec = plat.value(PI_QMakeSpec); + QString mkspec = orig.value(PI_QMakeSpec); mapped.insert(PI_QMakeSpec, mkspec.replace(QLC('/'), QLC('_'))); // Map Qt version - QString ver = plat.value(PI_QtVersion); + QString ver = orig.value(PI_QtVersion); mapped.insert(PI_QtVersion, ver.prepend(QLS("Qt-"))); + + return mapped; } + QString BaselineHandler::pathForItem(const ImageItem &item, bool isBaseline, bool absolute) const { - if (mapped.isEmpty()) - mapPlatformInfo(); + if (mappedClientInfo.isEmpty()) { + mappedClientInfo = mapPlatformInfo(clientInfo); + PlatformInfo oraw = clientInfo; + for (int i = 0; i < clientInfo.overrides().size()-1; i+=2) + oraw.insert(clientInfo.overrides().at(i), clientInfo.overrides().at(i+1)); + overriddenMappedClientInfo = mapPlatformInfo(oraw); + } + + const PlatformInfo& mapped = isBaseline ? overriddenMappedClientInfo : mappedClientInfo; QString itemName = item.itemName.simplified(); itemName.replace(QLC(' '), QLC('_')); @@ -512,13 +531,13 @@ void BaselineHandler::testPathMapping() item.imageChecksums << 0x0123456789abcdefULL; item.itemChecksum = 0x0123; - plat.insert(PI_QtVersion, QLS("4.8.0")); - plat.insert(PI_BuildKey, QLS("(nobuildkey)")); - plat.insert(PI_QMakeSpec, QLS("linux-g++")); - plat.insert(PI_PulseGitBranch, QLS("somebranch")); + clientInfo.insert(PI_QtVersion, QLS("4.8.0")); + clientInfo.insert(PI_BuildKey, QLS("(nobuildkey)")); + clientInfo.insert(PI_QMakeSpec, QLS("linux-g++")); + clientInfo.insert(PI_PulseGitBranch, QLS("somebranch")); foreach(const QString& host, hosts) { - mapped.clear(); - plat.insert(PI_HostName, host); + mappedClientInfo.clear(); + clientInfo.insert(PI_HostName, host); qDebug() << "Baseline from" << host << "->" << pathForItem(item, true); qDebug() << "Mismatch from" << host << "->" << pathForItem(item, false); } diff --git a/tests/arthur/baselineserver/src/baselineserver.h b/tests/arthur/baselineserver/src/baselineserver.h index d73bb97..333d9ed 100644 --- a/tests/arthur/baselineserver/src/baselineserver.h +++ b/tests/arthur/baselineserver/src/baselineserver.h @@ -125,13 +125,14 @@ private: void storeImage(const QByteArray &itemBlock, bool isBaseline); void storeItemMetadata(const PlatformInfo &metadata, const QString &path); PlatformInfo fetchItemMetadata(const QString &path); - void mapPlatformInfo() const; + PlatformInfo mapPlatformInfo(const PlatformInfo& orig) const; const char *logtime(); QString computeMismatchScore(const QImage& baseline, const QImage& rendered); BaselineProtocol proto; - PlatformInfo plat; - mutable PlatformInfo mapped; + PlatformInfo clientInfo; + mutable PlatformInfo mappedClientInfo; + mutable PlatformInfo overriddenMappedClientInfo; QString runId; bool connectionEstablished; Report report; diff --git a/tests/arthur/baselineserver/src/report.cpp b/tests/arthur/baselineserver/src/report.cpp index 7c2d6ac..16f061c 100644 --- a/tests/arthur/baselineserver/src/report.cpp +++ b/tests/arthur/baselineserver/src/report.cpp @@ -66,12 +66,13 @@ void Report::init(const BaselineHandler *h, const QString &r, const PlatformInfo runId = r; plat = p; rootDir = BaselineServer::storagePath() + QLC('/'); - reportDir = plat.value(PI_TestCase) + QLC('/') + (plat.value(PI_PulseGitBranch).isEmpty() ? QLS("reports/adhoc/") : QLS("reports/pulse/")); + reportDir = plat.value(PI_TestCase) + QLC('/') + (plat.isAdHocRun() ? QLS("reports/adhoc/") : QLS("reports/pulse/")); QString dir = rootDir + reportDir; QDir cwd; if (!cwd.exists(dir)) cwd.mkpath(dir); path = reportDir + QLS("Report_") + runId + QLS(".html"); + hasOverride = !plat.overrides().isEmpty(); } void Report::addItems(const ImageItemList &items) @@ -141,11 +142,19 @@ void Report::writeHeader() << "<p>Note: This is a <i>static</i> page, generated at " << QDateTime::currentDateTime().toString() << " for the test run with id " << runId << "</p>\n" << "<p>Summary: <b><span style=\"color:red\">" << numMismatches << " of " << numItems << "</b></span> items reported mismatching</p>\n\n"; - out << "<h3>Platform Info:</h3>\n" + out << "<h3>Testing Client Platform Info:</h3>\n" << "<table>\n"; foreach (QString key, plat.keys()) - out << "<tr><td>" << key << "</td><td>" << plat.value(key) << "</td></tr>\n"; + out << "<tr><td>" << key << ":</td><td>" << plat.value(key) << "</td></tr>\n"; out << "</table>\n\n"; + if (hasOverride) { + out << "<span style=\"color:red\"><h4>Note! Platform Override Info:</h4></span>\n" + << "<p>The client's output has been compared to baselines created on a different platform. Differences:</p>\n" + << "<table>\n"; + for (int i = 0; i < plat.overrides().size()-1; i+=2) + out << "<tr><td>" << plat.overrides().at(i) << ":</td><td>" << plat.overrides().at(i+1) << "</td></tr>\n"; + out << "</table>\n\n"; + } } @@ -158,10 +167,12 @@ void Report::writeFunctionResults(const ImageItemList &list) out << "\n<p> </p><h3>Test function: " << testFunction << "</h3>\n"; - out << "<p><a href=\"/cgi-bin/server.cgi?cmd=clearAllBaselines&context=" << ctx << "&url=" << pageUrl - << "\"><b>Clear all baselines</b></a> for this testfunction (They will be recreated by the next run)</p>\n"; - out << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateAllBaselines&context=" << ctx << "&mismatchContext=" << misCtx << "&url=" << pageUrl - << "\"><b>Let these mismatching images be the new baselines</b></a> for this testfunction</p>\n\n"; + if (!hasOverride) { + out << "<p><a href=\"/cgi-bin/server.cgi?cmd=clearAllBaselines&context=" << ctx << "&url=" << pageUrl + << "\"><b>Clear all baselines</b></a> for this testfunction (They will be recreated by the next run)</p>\n"; + out << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateAllBaselines&context=" << ctx << "&mismatchContext=" << misCtx << "&url=" << pageUrl + << "\"><b>Let these mismatching images be the new baselines</b></a> for this testfunction</p>\n\n"; + } out << "<table border=\"2\">\n" "<tr>\n" @@ -192,10 +203,12 @@ void Report::writeFunctionResults(const ImageItemList &list) out << "Baseline not found/regenerated"; break; case ImageItem::IgnoreItem: - out << "<span style=\"background-color:yellow\">Blacklisted</span> " - << "<a href=\"/cgi-bin/server.cgi?cmd=whitelist&context=" << ctx - << "&itemId=" << item.itemName << "&url=" << pageUrl - << "\">Whitelist this item</a>"; + out << "<span style=\"background-color:yellow\">Blacklisted</span> "; + if (!hasOverride) { + out << "<a href=\"/cgi-bin/server.cgi?cmd=whitelist&context=" << ctx + << "&itemId=" << item.itemName << "&url=" << pageUrl + << "\">Whitelist this item</a>"; + } break; case ImageItem::Ok: out << "<span style=\"color:green\"><small>No mismatch reported</small></span>"; @@ -224,12 +237,14 @@ void Report::writeItem(const QString &baseline, const QString &rendered, const I out << "<td align=center>\n" << "<p><span style=\"color:red\">Mismatch reported</span></p>\n" - << "<p><a href=\"/" << metadata << "\">Baseline Info</a>\n" - << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateSingleBaseline&context=" << ctx << "&mismatchContext=" << misCtx - << "&itemFile=" << itemFile << "&url=" << pageUrl << "\">Let this be the new baseline</a></p>\n" - << "<p><a href=\"/cgi-bin/server.cgi?cmd=blacklist&context=" << ctx - << "&itemId=" << item.itemName << "&url=" << pageUrl << "\">Blacklist this item</a></p>\n" - << "<p><a href=\"/cgi-bin/server.cgi?cmd=view&baseline=" << baseline << "&rendered=" << rendered + << "<p><a href=\"/" << metadata << "\">Baseline Info</a>\n"; + if (!hasOverride) { + out << "<p><a href=\"/cgi-bin/server.cgi?cmd=updateSingleBaseline&context=" << ctx << "&mismatchContext=" << misCtx + << "&itemFile=" << itemFile << "&url=" << pageUrl << "\">Let this be the new baseline</a></p>\n" + << "<p><a href=\"/cgi-bin/server.cgi?cmd=blacklist&context=" << ctx + << "&itemId=" << item.itemName << "&url=" << pageUrl << "\">Blacklist this item</a></p>\n"; + } + out << "<p><a href=\"/cgi-bin/server.cgi?cmd=view&baseline=" << baseline << "&rendered=" << rendered << "&compared=" << compared << "&url=" << pageUrl << "\">Inspect</a></p>\n" << "</td>\n"; } diff --git a/tests/arthur/baselineserver/src/report.h b/tests/arthur/baselineserver/src/report.h index d21102d..610497c 100644 --- a/tests/arthur/baselineserver/src/report.h +++ b/tests/arthur/baselineserver/src/report.h @@ -86,6 +86,7 @@ private: int numItems; int numMismatches; QTextStream out; + bool hasOverride; }; #endif // REPORT_H diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index 0fe3aa2..630ca88 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -83,7 +83,7 @@ void BaselineProtocol::sysSleep(int ms) } PlatformInfo::PlatformInfo() - : QMap<QString, QString>(), replaceDefault(false) + : QMap<QString, QString>(), adHoc(true) { } @@ -134,11 +134,15 @@ PlatformInfo PlatformInfo::localHostInfo() pi.insert(PI_GitCommit, QLS("Unknown")); QByteArray gb = qgetenv("PULSE_GIT_BRANCH"); - if (!gb.isEmpty()) + if (!gb.isEmpty()) { pi.insert(PI_PulseGitBranch, QString::fromLatin1(gb)); + pi.setAdHocRun(false); + } QByteArray tb = qgetenv("PULSE_TESTR_BRANCH"); - if (!tb.isEmpty()) + if (!tb.isEmpty()) { pi.insert(PI_PulseTestrBranch, QString::fromLatin1(tb)); + pi.setAdHocRun(false); + } return pi; } @@ -147,43 +151,49 @@ PlatformInfo PlatformInfo::localHostInfo() PlatformInfo::PlatformInfo(const PlatformInfo &other) : QMap<QString, QString>(other) { - sigKeys = other.sigKeys; - replaceDefault = other.replaceDefault; + orides = other.orides; + adHoc = other.adHoc; } PlatformInfo &PlatformInfo::operator=(const PlatformInfo &other) { QMap<QString, QString>::operator=(other); - sigKeys = other.sigKeys; - replaceDefault = other.replaceDefault; + orides = other.orides; + adHoc = other.adHoc; return *this; } -void PlatformInfo::addSignificantKeys(const QStringList &keys, bool replaceDefaultKeys) +void PlatformInfo::addOverride(const QString& key, const QString& value) +{ + orides.append(key); + orides.append(value); +} + + +QStringList PlatformInfo::overrides() const { - sigKeys = keys; - replaceDefault = replaceDefaultKeys; + return orides; } -QStringList PlatformInfo::addedKeys() const +void PlatformInfo::setAdHocRun(bool isAdHoc) { - return sigKeys; + adHoc = isAdHoc; } -bool PlatformInfo::addedKeysReplaceDefault() const +bool PlatformInfo::isAdHocRun() const { - return replaceDefault; + return adHoc; } QDataStream & operator<< (QDataStream &stream, const PlatformInfo &pi) { stream << static_cast<const QMap<QString, QString>&>(pi); - stream << pi.sigKeys << pi.replaceDefault; + stream << pi.orides << pi.adHoc; return stream; } @@ -191,7 +201,7 @@ QDataStream & operator<< (QDataStream &stream, const PlatformInfo &pi) QDataStream & operator>> (QDataStream &stream, PlatformInfo &pi) { stream >> static_cast<QMap<QString, QString>&>(pi); - stream >> pi.sigKeys >> pi.replaceDefault; + stream >> pi.orides >> pi.adHoc; return stream; } @@ -346,7 +356,7 @@ BaselineProtocol::~BaselineProtocol() } -bool BaselineProtocol::connect(const QString &testCase, bool *dryrun) +bool BaselineProtocol::connect(const QString &testCase, bool *dryrun, const PlatformInfo& clientInfo) { errMsg.clear(); QByteArray serverName(qgetenv("QT_LANCELOT_SERVER")); @@ -362,7 +372,7 @@ bool BaselineProtocol::connect(const QString &testCase, bool *dryrun) } } - PlatformInfo pi = PlatformInfo::localHostInfo(); + PlatformInfo pi = clientInfo.isEmpty() ? PlatformInfo::localHostInfo() : clientInfo; pi.insert(PI_TestCase, testCase); QByteArray block; QDataStream ds(&block, QIODevice::ReadWrite); diff --git a/tests/arthur/common/baselineprotocol.h b/tests/arthur/common/baselineprotocol.h index 2d09e68..0b08e44 100644 --- a/tests/arthur/common/baselineprotocol.h +++ b/tests/arthur/common/baselineprotocol.h @@ -78,13 +78,14 @@ public: static PlatformInfo localHostInfo(); - void addSignificantKeys(const QStringList& keys, bool replaceDefaultKeys=false); - QStringList addedKeys() const; - bool addedKeysReplaceDefault() const; + void addOverride(const QString& key, const QString& value); + QStringList overrides() const; + bool isAdHocRun() const; + void setAdHocRun(bool isAdHoc); private: - QStringList sigKeys; - bool replaceDefault; + QStringList orides; + bool adHoc; friend QDataStream & operator<< (QDataStream &stream, const PlatformInfo &pi); friend QDataStream & operator>> (QDataStream &stream, PlatformInfo& pi); }; @@ -165,7 +166,7 @@ public: // For client: // For advanced client: - bool connect(const QString &testCase, bool *dryrun = 0); + bool connect(const QString &testCase, bool *dryrun = 0, const PlatformInfo& clientInfo = PlatformInfo()); bool requestBaselineChecksums(const QString &testFunction, ImageItemList *itemList); bool submitNewBaseline(const ImageItem &item, QByteArray *serverMsg); bool submitMismatch(const ImageItem &item, QByteArray *serverMsg); diff --git a/tests/arthur/common/paintcommands.cpp b/tests/arthur/common/paintcommands.cpp index 298c699..f54d942 100644 --- a/tests/arthur/common/paintcommands.cpp +++ b/tests/arthur/common/paintcommands.cpp @@ -2454,7 +2454,11 @@ void PaintCommands::command_gradient_setRadialExtended(QRegExp re) "focal radius=%.2f, spread=%d\n", cx, cy, rad, fx, fy, frad, m_gradientSpread); +#if QT_VERSION >= 0x040800 QRadialGradient rg(QPointF(cx, cy), rad, QPointF(fx, fy), frad); +#else + QRadialGradient rg(QPointF(cx, cy), rad, QPointF(fx, fy)); +#endif rg.setStops(m_gradientStops); rg.setSpread(m_gradientSpread); rg.setCoordinateMode(m_gradientCoordinate); diff --git a/tests/auto/declarative/qdeclarativeanimations/data/transitionAssignmentBug.qml b/tests/auto/declarative/qdeclarativeanimations/data/transitionAssignmentBug.qml new file mode 100644 index 0000000..99b9ac5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeanimations/data/transitionAssignmentBug.qml @@ -0,0 +1,12 @@ +import QtQuick 1.0 + +Rectangle { + width: 400 + height: 400 + + property bool nullObject + Component.onCompleted: nullObject = transitions.length > 0 && transitions[0] === null + + property list<Transition> myTransitions: [Transition {}, Transition {}] + transitions: myTransitions +} diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index 00db2d4..5d90597 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -88,6 +88,7 @@ private slots: void registrationBug(); void doubleRegistrationBug(); void alwaysRunToEndRestartBug(); + void transitionAssignmentBug(); }; #define QTIMED_COMPARE(lhs, rhs) do { \ @@ -844,6 +845,18 @@ void tst_qdeclarativeanimations::alwaysRunToEndRestartBug() QCOMPARE(static_cast<QDeclarativeAbstractAnimation*>(&animation)->qtAnimation()->state(), QAbstractAnimation::Stopped); } +//QTBUG-20227 +void tst_qdeclarativeanimations::transitionAssignmentBug() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/transitionAssignmentBug.qml"); + QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create()); + QVERIFY(rect != 0); + + QCOMPARE(rect->property("nullObject").toBool(), false); +} + QTEST_MAIN(tst_qdeclarativeanimations) #include "tst_qdeclarativeanimations.moc" diff --git a/tests/auto/declarative/qdeclarativebinding/data/deletedObject.qml b/tests/auto/declarative/qdeclarativebinding/data/deletedObject.qml new file mode 100644 index 0000000..ba4c9f6 --- /dev/null +++ b/tests/auto/declarative/qdeclarativebinding/data/deletedObject.qml @@ -0,0 +1,24 @@ +import QtQuick 1.0 + +Rectangle { + id: wrapper + width: 400 + height: 400 + + property bool activateBinding: false + + Binding { + id: binding + target: Qt.createQmlObject('import QtQuick 1.0; Item { property real value: 10 }', wrapper) + property: "value" + when: activateBinding + value: x + y + } + + Component.onCompleted: binding.target.destroy(); + +// MouseArea { +// anchors.fill: parent +// onClicked: activateBinding = true; +// } +} diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp index 6305cd3..ca394b0 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp @@ -60,6 +60,7 @@ public: private slots: void binding(); void whenAfterValue(); + void deletedObject(); private: QDeclarativeEngine engine; @@ -113,6 +114,22 @@ void tst_qdeclarativebinding::whenAfterValue() delete rect; } +//QTBUG-20692 +void tst_qdeclarativebinding::deletedObject() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/deletedObject.qml")); + QDeclarativeRectangle *rect = qobject_cast<QDeclarativeRectangle*>(c.create()); + QVERIFY(rect != 0); + + QApplication::sendPostedEvents(0, QEvent::DeferredDelete); + + //don't crash + rect->setProperty("activateBinding", true); + + delete rect; +} + QTEST_MAIN(tst_qdeclarativebinding) #include "tst_qdeclarativebinding.moc" diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_20648.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_20648.qml new file mode 100644 index 0000000..40f21ef --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_20648.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +QtObject { + property bool hd: true + + property real test: ((hd ? 100 : 20) + 0) +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 71214a3..bf7c9a4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -177,6 +177,7 @@ private slots: void aliasWritesOverrideBindings(); void pushCleanContext(); void realToInt(); + void qtbug_20648(); void include(); @@ -3090,6 +3091,15 @@ void tst_qdeclarativeecmascript::realToInt() QCOMPARE(object->value(), int(8)); } +void tst_qdeclarativeecmascript::qtbug_20648() +{ + QDeclarativeComponent component(&engine, TEST_FILE("qtbug_20648.qml")); + QObject *o = component.create(); + QVERIFY(o != 0); + QCOMPARE(o->property("test").toInt(), 100); + delete o; +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" diff --git a/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml index 43ea8d8..6e739bf 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml @@ -18,6 +18,7 @@ Rectangle { objectName: "text" anchors.fill: parent text: top.text + focus: true } } } diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false_words.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false_words.qml index 22a9871..f8d2e4e 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false_words.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false_words.qml @@ -1,7 +1,8 @@ -import QtQuick 1.0 +import QtQuick 1.1 TextEdit { focus: true - text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + text: "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ" selectByMouse: false + mouseSelectionMode: TextEdit.SelectWords } diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true_words.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true_words.qml index d61da46..f58fd45 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true_words.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true_words.qml @@ -1,7 +1,8 @@ -import QtQuick 1.0 +import QtQuick 1.1 TextEdit { focus: true - text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + text: "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ" selectByMouse: true + mouseSelectionMode: TextEdit.SelectWords } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 8530c7f..fde0588 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -454,6 +454,8 @@ void tst_qdeclarativetextedit::hAlign_RightToLeft() QVERIFY(textEdit != 0); canvas->show(); + const QString rtlText = textEdit->text(); + // implicit alignment should follow the reading direction of text QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignRight); QVERIFY(textEdit->positionToRectangle(0).x() > canvas->width()/2); @@ -530,6 +532,16 @@ void tst_qdeclarativetextedit::hAlign_RightToLeft() QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignLeft); QVERIFY(textEdit->positionToRectangle(0).x() < canvas->width()/2); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas)); + + textEdit->setText(QString()); + { QInputMethodEvent ev(rtlText, QList<QInputMethodEvent::Attribute>()); QApplication::sendEvent(canvas, &ev); } + QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignRight); + { QInputMethodEvent ev("Hello world!", QList<QInputMethodEvent::Attribute>()); QApplication::sendEvent(canvas, &ev); } + QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignLeft); + #ifndef Q_OS_MAC // QTBUG-18040 // empty text with implicit alignment follows the system locale-based // keyboard input direction from QApplication::keyboardInputDirection @@ -1315,20 +1327,32 @@ void tst_qdeclarativetextedit::moveCursorSelectionSequence() void tst_qdeclarativetextedit::mouseSelection_data() { QTest::addColumn<QString>("qmlfile"); - QTest::addColumn<bool>("expectSelection"); + QTest::addColumn<int>("from"); + QTest::addColumn<int>("to"); + QTest::addColumn<QString>("selectedText"); // import installed - QTest::newRow("on") << SRCDIR "/data/mouseselection_true.qml" << true; - QTest::newRow("off") << SRCDIR "/data/mouseselection_false.qml" << false; - QTest::newRow("default") << SRCDIR "/data/mouseselection_default.qml" << false; - QTest::newRow("on word selection") << SRCDIR "/data/mouseselection_true_words.qml" << true; - QTest::newRow("off word selection") << SRCDIR "/data/mouseselection_false_words.qml" << false; + QTest::newRow("on") << SRCDIR "/data/mouseselection_true.qml" << 4 << 9 << "45678"; + QTest::newRow("off") << SRCDIR "/data/mouseselection_false.qml" << 4 << 9 << QString(); + QTest::newRow("default") << SRCDIR "/data/mouseselection_default.qml" << 4 << 9 << QString(); + QTest::newRow("off word selection") << SRCDIR "/data/mouseselection_false_words.qml" << 4 << 9 << QString(); + QTest::newRow("on word selection (4,9)") << SRCDIR "/data/mouseselection_true_words.qml" << 4 << 9 << "0123456789"; + QTest::newRow("on word selection (2,13)") << SRCDIR "/data/mouseselection_true_words.qml" << 2 << 13 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (2,30)") << SRCDIR "/data/mouseselection_true_words.qml" << 2 << 30 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (9,13)") << SRCDIR "/data/mouseselection_true_words.qml" << 9 << 13 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (9,30)") << SRCDIR "/data/mouseselection_true_words.qml" << 9 << 30 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (13,2)") << SRCDIR "/data/mouseselection_true_words.qml" << 13 << 2 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (20,2)") << SRCDIR "/data/mouseselection_true_words.qml" << 20 << 2 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (12,9)") << SRCDIR "/data/mouseselection_true_words.qml" << 12 << 9 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + QTest::newRow("on word selection (30,9)") << SRCDIR "/data/mouseselection_true_words.qml" << 30 << 9 << "0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ"; } void tst_qdeclarativetextedit::mouseSelection() { QFETCH(QString, qmlfile); - QFETCH(bool, expectSelection); + QFETCH(int, from); + QFETCH(int, to); + QFETCH(QString, selectedText); QDeclarativeView *canvas = createView(qmlfile); @@ -1342,25 +1366,20 @@ void tst_qdeclarativetextedit::mouseSelection() QVERIFY(textEditObject != 0); // press-and-drag-and-release from x1 to x2 - int x1 = 10; - int x2 = 70; - int y = textEditObject->height()/2; - QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y))); + QPoint p1 = canvas->mapFromScene(textEditObject->positionToRectangle(from).center()); + QPoint p2 = canvas->mapFromScene(textEditObject->positionToRectangle(to).center()); + QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, p1); //QTest::mouseMove(canvas->viewport(), canvas->mapFromScene(QPoint(x2,y))); // doesn't work - QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(p2), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); QApplication::sendEvent(canvas->viewport(), &mv); - QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y))); - QString str = textEditObject->selectedText(); - if (expectSelection) - QVERIFY(str.length() > 3); // don't reallly care *what* was selected (and it's too sensitive to platform) - else - QVERIFY(str.isEmpty()); + QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, p2); + QCOMPARE(textEditObject->selectedText(), selectedText); // Clicking and shift to clicking between the same points should select the same text. textEditObject->setCursorPosition(0); - QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, canvas->mapFromScene(QPoint(x1,y))); - QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, canvas->mapFromScene(QPoint(x2,y))); - QCOMPARE(textEditObject->selectedText(), str); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, p1); + QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, p2); + QCOMPARE(textEditObject->selectedText(), selectedText); delete canvas; } @@ -1679,15 +1698,26 @@ void tst_qdeclarativetextedit::cursorDelegate() QInputMethodEvent event; QApplication::sendEvent(view, &event); + // Test delegate gets moved on mouse press. textEditObject->setSelectByMouse(true); textEditObject->setCursorPosition(0); - qDebug() << textEditObject->boundingRect() << textEditObject->positionToRectangle(5).center() << view->mapFromScene(textEditObject->positionToRectangle(5).center()); - QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, view->mapFromScene(textEditObject->positionToRectangle(5).center())); + const QPoint point1 = view->mapFromScene(textEditObject->positionToRectangle(5).center()); + QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, point1); QVERIFY(textEditObject->cursorPosition() != 0); QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + // Test delegate gets moved on mouse drag + textEditObject->setCursorPosition(0); + const QPoint point2 = view->mapFromScene(textEditObject->positionToRectangle(10).center()); + QTest::mousePress(view->viewport(), Qt::LeftButton, 0, point1); + QMouseEvent mv(QEvent::MouseMove, point2, Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QApplication::sendEvent(view->viewport(), &mv); + QTest::mouseRelease(view->viewport(), Qt::LeftButton, 0, point2); + QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); + QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + textEditObject->setReadOnly(true); textEditObject->setCursorPosition(0); QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, view->mapFromScene(textEditObject->positionToRectangle(5).center())); @@ -1696,6 +1726,12 @@ void tst_qdeclarativetextedit::cursorDelegate() QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); textEditObject->setCursorPosition(0); + QTest::mouseClick(view->viewport(), Qt::LeftButton, 0, view->mapFromScene(textEditObject->positionToRectangle(5).center())); + QVERIFY(textEditObject->cursorPosition() != 0); + QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); + QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); + + textEditObject->setCursorPosition(0); QCOMPARE(textEditObject->cursorRectangle().x(), qRound(delegateObject->x())); QCOMPARE(textEditObject->cursorRectangle().y(), qRound(delegateObject->y())); QVERIFY(textEditObject->cursorRectangle().y() >= 0); diff --git a/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml index b11535e..7f27bbe 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml @@ -18,6 +18,7 @@ Rectangle { objectName: "text" anchors.fill: parent text: top.text + focus: true } } } diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 280f952..bb895bf 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -1198,6 +1198,8 @@ void tst_qdeclarativetextinput::horizontalAlignment_RightToLeft() QVERIFY(textInput != 0); canvas->show(); + const QString rtlText = textInput->text(); + QDeclarativeTextInputPrivate *textInputPrivate = QDeclarativeTextInputPrivate::get(textInput); QVERIFY(textInputPrivate != 0); QVERIFY(-textInputPrivate->hscroll > canvas->width()/2); @@ -1262,6 +1264,17 @@ void tst_qdeclarativetextinput::horizontalAlignment_RightToLeft() QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignLeft); QVERIFY(-textInputPrivate->hscroll < canvas->width()/2); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(canvas)); + + // If there is no committed text, the preedit text should determine the alignment. + textInput->setText(QString()); + { QInputMethodEvent ev(rtlText, QList<QInputMethodEvent::Attribute>()); QApplication::sendEvent(canvas, &ev); } + QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignRight); + { QInputMethodEvent ev("Hello world!", QList<QInputMethodEvent::Attribute>()); QApplication::sendEvent(canvas, &ev); } + QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignLeft); + #ifndef Q_OS_MAC // QTBUG-18040 // empty text with implicit alignment follows the system locale-based // keyboard input direction from QApplication::keyboardInputDirection diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp index 39c3a94..ec22768 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include "../../../shared/util.h" #include <qtest.h> #include <QtTest/QSignalSpy> #include <QStandardItemModel> @@ -87,6 +88,13 @@ public: list << "one" << "two" << "three" << "four"; } + void emitMove(int sourceFirst, int sourceLast, int destinationChild) { + emit beginMoveRows(QModelIndex(), sourceFirst, sourceLast, QModelIndex(), destinationChild); + emit endMoveRows(); + } + + QStringList list; + public slots: void set(int idx, QString string) { list[idx] = string; @@ -102,9 +110,6 @@ protected: return list.at(index.row()); return QVariant(); } - -private: - QStringList list; }; @@ -122,6 +127,8 @@ private slots: void singleRole(); void modelProperties(); void noDelegate(); + void qaimRowsMoved(); + void qaimRowsMoved_data(); private: QDeclarativeEngine engine; @@ -501,6 +508,72 @@ void tst_qdeclarativevisualdatamodel::noDelegate() } +void tst_qdeclarativevisualdatamodel::qaimRowsMoved() +{ + // Test parameters passed in QAIM::rowsMoved() signal are converted correctly + // when translated and emitted as the QListModelInterface::itemsMoved() signal + QFETCH(int, sourceFirst); + QFETCH(int, sourceLast); + QFETCH(int, destinationChild); + QFETCH(int, expectFrom); + QFETCH(int, expectTo); + QFETCH(int, expectCount); + + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/visualdatamodel.qml")); + + SingleRoleModel model; + model.list.clear(); + for (int i=0; i<30; i++) + model.list << ("item " + i); + engine.rootContext()->setContextProperty("myModel", &model); + + QDeclarativeVisualDataModel *obj = qobject_cast<QDeclarativeVisualDataModel*>(c.create()); + QVERIFY(obj != 0); + + QSignalSpy spy(obj, SIGNAL(itemsMoved(int,int,int))); + model.emitMove(sourceFirst, sourceLast, destinationChild); + QTRY_COMPARE(spy.count(), 1); + + QCOMPARE(spy[0].count(), 3); + QCOMPARE(spy[0][0].toInt(), expectFrom); + QCOMPARE(spy[0][1].toInt(), expectTo); + QCOMPARE(spy[0][2].toInt(), expectCount); + + delete obj; +} + +void tst_qdeclarativevisualdatamodel::qaimRowsMoved_data() +{ + QTest::addColumn<int>("sourceFirst"); + QTest::addColumn<int>("sourceLast"); + QTest::addColumn<int>("destinationChild"); + QTest::addColumn<int>("expectFrom"); + QTest::addColumn<int>("expectTo"); + QTest::addColumn<int>("expectCount"); + + QTest::newRow("move 1 forward") + << 1 << 1 << 6 + << 1 << 5 << 1; + + QTest::newRow("move 1 backwards") + << 4 << 4 << 1 + << 4 << 1 << 1; + + QTest::newRow("move multiple forwards") + << 0 << 2 << 13 + << 0 << 10 << 3; + + QTest::newRow("move multiple forwards, with same to") + << 0 << 1 << 3 + << 0 << 1 << 2; + + QTest::newRow("move multiple backwards") + << 10 << 14 << 1 + << 10 << 1 << 5; +} + + template<typename T> T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QString &objectName, int index) { diff --git a/tests/auto/lancelot/tst_lancelot.cpp b/tests/auto/lancelot/tst_lancelot.cpp index cba5fab..256ff29 100644 --- a/tests/auto/lancelot/tst_lancelot.cpp +++ b/tests/auto/lancelot/tst_lancelot.cpp @@ -62,6 +62,7 @@ public: tst_Lancelot(); static bool simfail; + static PlatformInfo clientInfo; private: enum GraphicsEngine { @@ -98,6 +99,7 @@ private slots: }; bool tst_Lancelot::simfail = false; +PlatformInfo tst_Lancelot::clientInfo; tst_Lancelot::tst_Lancelot() { @@ -112,7 +114,7 @@ void tst_Lancelot::initTestCase() #if defined(Q_OS_SOMEPLATFORM) QSKIP("This test is not supported on this platform.", SkipAll); #endif - if (!proto.connect(QLatin1String("tst_Lancelot"), &dryRunMode)) + if (!proto.connect(QLatin1String("tst_Lancelot"), &dryRunMode, clientInfo)) QSKIP(qPrintable(proto.errorMessage()), SkipAll); #if defined(USE_RUNTIME_DIR) @@ -329,13 +331,26 @@ QTEST_MAIN(tst_Lancelot) int main(int argc, char *argv[]) { + tst_Lancelot::clientInfo = PlatformInfo::localHostInfo(); + char *fargv[20]; int fargc = 0; for (int i = 0; i < qMin(argc, 19); i++) { - if (!qstrcmp(argv[i], "-simfail")) + if (!qstrcmp(argv[i], "-simfail")) { tst_Lancelot::simfail = true; - else + } else if (!qstrcmp(argv[i], "-compareto") && i < argc-1) { + QString arg = QString::fromLocal8Bit(argv[++i]); + int split = arg.indexOf(QLC('=')); + if (split < 0) + continue; + QString key = arg.left(split).trimmed(); + QString value = arg.mid(split+1).trimmed(); + if (key.isEmpty() || value.isEmpty()) + continue; + tst_Lancelot::clientInfo.addOverride(key, value); + } else { fargv[fargc++] = argv[i]; + } } fargv[fargc] = 0; return rmain(fargc, fargv); diff --git a/tests/auto/qabstractspinbox/tst_qabstractspinbox.cpp b/tests/auto/qabstractspinbox/tst_qabstractspinbox.cpp index d14c75b..4e93663 100644 --- a/tests/auto/qabstractspinbox/tst_qabstractspinbox.cpp +++ b/tests/auto/qabstractspinbox/tst_qabstractspinbox.cpp @@ -154,7 +154,7 @@ void tst_QAbstractSpinBox::task228728_cssselector() { //QAbstractSpinBox does some call to stylehint into his constructor. //so while the stylesheet want to access property, it should not crash - qApp->setStyleSheet("[alignement=\"1\"], [text=\"foo\"] { color:black; }" ); + qApp->setStyleSheet("[alignment=\"1\"], [text=\"foo\"] { color:black; }" ); QSpinBox box; } diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp index 6025bdb..0004c42 100644 --- a/tests/auto/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp @@ -86,14 +86,14 @@ void tst_QAudioInput::initTestCase() // Only perform tests if audio input device exists! QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); - if(devices.size() > 0) + if (devices.size() > 0) available = true; else { qWarning()<<"NOTE: no audio input device found, no test will be performed"; available = false; } - if(available) + if (available) audio = new QAudioInput(format, this); } @@ -124,6 +124,9 @@ void tst_QAudioInput::invalidFormat_data() void tst_QAudioInput::invalidFormat() { + if (!available) + QSKIP("No audio input device found, no test will be performed", SkipAll); + QFETCH(QAudioFormat, invalidFormat); QAudioInput audioInput(invalidFormat, this); @@ -140,81 +143,85 @@ void tst_QAudioInput::invalidFormat() void tst_QAudioInput::settings() { - if(available) { - // Confirm the setting we added in the init function. - QAudioFormat f = audio->format(); - - QVERIFY(format.channels() == f.channels()); - QVERIFY(format.frequency() == f.frequency()); - QVERIFY(format.sampleSize() == f.sampleSize()); - QVERIFY(format.codec() == f.codec()); - QVERIFY(format.byteOrder() == f.byteOrder()); - QVERIFY(format.sampleType() == f.sampleType()); - } + if (!available) + QSKIP("No audio input device found, no test will be performed", SkipAll); + + // Confirm the setting we added in the init function. + QAudioFormat f = audio->format(); + + QVERIFY(format.channels() == f.channels()); + QVERIFY(format.frequency() == f.frequency()); + QVERIFY(format.sampleSize() == f.sampleSize()); + QVERIFY(format.codec() == f.codec()); + QVERIFY(format.byteOrder() == f.byteOrder()); + QVERIFY(format.sampleType() == f.sampleType()); } void tst_QAudioInput::buffers() { - if(available) { - // Should always have a buffer size greater than zero. - int store = audio->bufferSize(); - audio->setBufferSize(4096); - QVERIFY(audio->bufferSize() > 0); - audio->setBufferSize(store); - QVERIFY(audio->bufferSize() == store); - } + if (!available) + QSKIP("No audio input device found, no test will be performed", SkipAll); + + // Should always have a buffer size greater than zero. + int store = audio->bufferSize(); + audio->setBufferSize(4096); + QVERIFY(audio->bufferSize() > 0); + audio->setBufferSize(store); + QVERIFY(audio->bufferSize() == store); } void tst_QAudioInput::notifyInterval() { - if(available) { - QVERIFY(audio->notifyInterval() == 1000); // Default + if (!available) + QSKIP("No audio input device found, no test will be performed", SkipAll); - audio->setNotifyInterval(500); - QVERIFY(audio->notifyInterval() == 500); // Custom + QVERIFY(audio->notifyInterval() == 1000); // Default - audio->setNotifyInterval(1000); // reset - } + audio->setNotifyInterval(500); + QVERIFY(audio->notifyInterval() == 500); // Custom + + audio->setNotifyInterval(1000); // reset } void tst_QAudioInput::pullFile() { - if(available) { - QFile filename(SRCDIR"test.raw"); - filename.open( QIODevice::WriteOnly | QIODevice::Truncate ); - - QSignalSpy readSignal(audio, SIGNAL(notify())); - QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State))); - - // Always have default states, before start - QVERIFY(audio->state() == QAudio::StoppedState); - QVERIFY(audio->error() == QAudio::NoError); - QVERIFY(audio->elapsedUSecs() == 0); - - audio->start(&filename); - QTest::qWait(20); - // Check state and periodSize() are valid non-zero values. - QVERIFY(audio->state() == QAudio::ActiveState); - QVERIFY(audio->error() == QAudio::NoError); - QVERIFY(audio->elapsedUSecs() > 10000 && audio->elapsedUSecs() < 800000); - QVERIFY(audio->periodSize() > 0); - QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState - - // Wait until finished... - QTest::qWait(5000); - - QVERIFY(readSignal.count() > 0); - QVERIFY(audio->processedUSecs() > 0); - - audio->stop(); - QTest::qWait(20); - QVERIFY(audio->state() == QAudio::StoppedState); - QVERIFY(audio->elapsedUSecs() == 0); - // Can only check to make sure we got at least 1 more signal, but can be more. - QVERIFY(stateSignal.count() > 1); - - filename.close(); - } + if (!available) + QSKIP("No audio input device found, no test will be performed", SkipAll); + + QFile filename(SRCDIR"test.raw"); + filename.open( QIODevice::WriteOnly | QIODevice::Truncate ); + + QSignalSpy readSignal(audio, SIGNAL(notify())); + QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State))); + + // Always have default states, before start + QVERIFY(audio->state() == QAudio::StoppedState); + QVERIFY(audio->error() == QAudio::NoError); + QVERIFY(audio->elapsedUSecs() == 0); + + audio->start(&filename); + QTest::qWait(20); + // Check state and periodSize() are valid non-zero values. + QVERIFY(audio->state() == QAudio::ActiveState); + QVERIFY(audio->error() == QAudio::NoError); + QVERIFY(audio->elapsedUSecs() > 10000 && audio->elapsedUSecs() < 800000); + QVERIFY(audio->periodSize() > 0); + QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState + + // Wait until finished... + QTest::qWait(5000); + + QVERIFY(readSignal.count() > 0); + QVERIFY(audio->processedUSecs() > 0); + + audio->stop(); + QTest::qWait(20); + QVERIFY(audio->state() == QAudio::StoppedState); + QVERIFY(audio->elapsedUSecs() == 0); + // Can only check to make sure we got at least 1 more signal, but can be more. + QVERIFY(stateSignal.count() > 1); + + filename.close(); } QTEST_MAIN(tst_QAudioInput) diff --git a/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml b/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml index 1667591..d945ec9 100644 --- a/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml +++ b/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml @@ -15,6 +15,10 @@ <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="RegisteredType"/> </signal> <method name="voidMethod" /> + <method name="sleepMethod"> + <arg type="i" /> + <arg type="i" direction="out"/> + </method> <method name="stringMethod"> <arg type="s" direction="out"/> </method> diff --git a/tests/auto/qdbusabstractinterface/interface.cpp b/tests/auto/qdbusabstractinterface/interface.cpp index 0326177..849db93 100644 --- a/tests/auto/qdbusabstractinterface/interface.cpp +++ b/tests/auto/qdbusabstractinterface/interface.cpp @@ -40,9 +40,23 @@ ****************************************************************************/ #include "interface.h" +#include <QThread> Interface::Interface() { } +// Export the sleep function +// TODO QT5: remove this class, QThread::msleep is now public +class FriendlySleepyThread : public QThread { +public: + using QThread::msleep; +}; + +int Interface::sleepMethod(int msec) +{ + FriendlySleepyThread::msleep(msec); + return 42; +} + #include "moc_interface.cpp" diff --git a/tests/auto/qdbusabstractinterface/interface.h b/tests/auto/qdbusabstractinterface/interface.h index b840a38..0fb15fe 100644 --- a/tests/auto/qdbusabstractinterface/interface.h +++ b/tests/auto/qdbusabstractinterface/interface.h @@ -101,6 +101,7 @@ public: public slots: Q_SCRIPTABLE void voidMethod() {} + Q_SCRIPTABLE int sleepMethod(int); Q_SCRIPTABLE QString stringMethod() { return "Hello, world"; } Q_SCRIPTABLE RegisteredType complexMethod() { return RegisteredType("Hello, world"); } Q_SCRIPTABLE QString multiOutMethod(int &value) { value = 42; return "Hello, world"; } diff --git a/tests/auto/qdbusabstractinterface/pinger.h b/tests/auto/qdbusabstractinterface/pinger.h index 6245a5a..739a142 100644 --- a/tests/auto/qdbusabstractinterface/pinger.h +++ b/tests/auto/qdbusabstractinterface/pinger.h @@ -117,6 +117,13 @@ public Q_SLOTS: // METHODS return reply; } + inline QDBusPendingReply<int> sleepMethod(int in0) + { + QList<QVariant> argumentList; + argumentList << qVariantFromValue(in0); + return asyncCallWithArgumentList(QLatin1String("sleepMethod"), argumentList); + } + inline QDBusPendingReply<QString> stringMethod() { QList<QVariant> argumentList; diff --git a/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp index 00e3a76..994df05 100644 --- a/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp +++ b/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp @@ -111,6 +111,8 @@ private slots: void makeAsyncComplexCallPeer(); void makeAsyncMultiOutCallPeer(); + void callWithTimeout(); + void stringPropRead(); void stringPropWrite(); void variantPropRead(); @@ -458,6 +460,96 @@ void tst_QDBusAbstractInterface::makeAsyncMultiOutCallPeer() QCoreApplication::instance()->processEvents(); } +static const char server_serviceName[] = "com.trolltech.autotests.dbusserver"; +static const char server_objectPath[] = "/com/trolltech/server"; +static const char server_interfaceName[] = "com.trolltech.QtDBus.Pinger"; + +class DBusServerThread : public QThread +{ +public: + DBusServerThread() { + start(); + m_ready.acquire(); + } + ~DBusServerThread() { + quit(); + wait(); + } + + void run() + { + QDBusConnection con = QDBusConnection::connectToBus(QDBusConnection::SessionBus, "ThreadConnection"); + if (!con.isConnected()) + qWarning("Error registering to DBus"); + if (!con.registerService(server_serviceName)) + qWarning("Error registering service name"); + Interface targetObj; + con.registerObject(server_objectPath, &targetObj, QDBusConnection::ExportScriptableContents); + m_ready.release(); + exec(); + + QDBusConnection::disconnectFromBus( con.name() ); + } +private: + QSemaphore m_ready; +}; + +void tst_QDBusAbstractInterface::callWithTimeout() +{ + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY2(con.isConnected(), "Not connected to D-Bus"); + + DBusServerThread serverThread; + + QDBusMessage msg = QDBusMessage::createMethodCall(server_serviceName, + server_objectPath, server_interfaceName, "sleepMethod"); + msg << 100; + + { + // Call with no timeout -> works + QDBusMessage reply = con.call(msg); + QCOMPARE((int)reply.type(), (int)QDBusMessage::ReplyMessage); + QCOMPARE(reply.arguments().at(0).toInt(), 42); + } + + { + // Call with 1 sec timeout -> fails + QDBusMessage reply = con.call(msg, QDBus::Block, 1); + QCOMPARE(reply.type(), QDBusMessage::ErrorMessage); + } + + // Now using QDBusInterface + + QDBusInterface iface(server_serviceName, server_objectPath, server_interfaceName, con); + { + // Call with no timeout + QDBusMessage reply = iface.call("sleepMethod", 100); + QCOMPARE(reply.type(), QDBusMessage::ReplyMessage); + QCOMPARE(reply.arguments().at(0).toInt(), 42); + } + { + // Call with 1 sec timeout -> fails + iface.setTimeout(1); + QDBusMessage reply = iface.call("sleepMethod", 100); + QCOMPARE(reply.type(), QDBusMessage::ErrorMessage); + } + + // Now using generated code + com::trolltech::QtDBus::Pinger p(server_serviceName, server_objectPath, QDBusConnection::sessionBus()); + { + // Call with no timeout + QDBusReply<int> reply = p.sleepMethod(100); + QVERIFY(reply.isValid()); + QCOMPARE(int(reply), 42); + } + { + // Call with 1 sec timeout -> fails + p.setTimeout(1); + QDBusReply<int> reply = p.sleepMethod(100); + QVERIFY(!reply.isValid()); + } +} + void tst_QDBusAbstractInterface::stringPropRead() { Pinger p = getPinger(); diff --git a/tests/auto/qdialog/tst_qdialog.cpp b/tests/auto/qdialog/tst_qdialog.cpp index 6d9f798..86dde21 100644 --- a/tests/auto/qdialog/tst_qdialog.cpp +++ b/tests/auto/qdialog/tst_qdialog.cpp @@ -467,6 +467,22 @@ void tst_QDialog::throwInExec() #if defined(Q_WS_MAC) || (defined(Q_WS_WINCE) && defined(_ARM_)) QSKIP("Throwing exceptions in exec() is not supported on this platform.", SkipAll); #endif + +#if defined(Q_OS_LINUX) + // C++ exceptions can't be passed through glib callbacks. Skip the test if + // we're using the glib event loop. + QByteArray dispatcher = QAbstractEventDispatcher::instance()->metaObject()->className(); + if (dispatcher.contains("Glib")) { + QSKIP( + qPrintable(QString( + "Throwing exceptions in exec() won't work if %1 event dispatcher is used.\n" + "Try running with QT_NO_GLIB=1 in environment." + ).arg(QString::fromLatin1(dispatcher))), + SkipAll + ); + } +#endif + int caughtExceptions = 0; try { ExceptionDialog dialog; diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index 0a42a97..419eaae 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -444,9 +444,15 @@ void tst_QDir::QDir_default() void tst_QDir::compare() { // operator== + + // Not using QCOMPARE to test result of QDir::operator== + QDir dir; dir.makeAbsolute(); QVERIFY(dir == QDir::currentPath()); + + QVERIFY(QDir() == QDir(QDir::currentPath())); + QVERIFY(QDir("../") == QDir(QDir::currentPath() + "/..")); } static QStringList filterLinks(const QStringList &list) diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 08d2e88..81da8a3 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -80,7 +80,9 @@ # define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/" #elif defined(Q_OS_UNIX) #ifdef QT_BUILD_INTERNAL +QT_BEGIN_NAMESPACE extern Q_GUI_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded = 0); +QT_END_NAMESPACE #endif #endif diff --git a/tests/auto/qpushbutton/tst_qpushbutton.cpp b/tests/auto/qpushbutton/tst_qpushbutton.cpp index 7742f6b..db4f385 100644 --- a/tests/auto/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/qpushbutton/tst_qpushbutton.cpp @@ -91,6 +91,9 @@ private slots: void animateClick(); void toggle(); void clicked(); +#ifdef Q_OS_MAC + void macClicked(); +#endif void toggled(); void isEnabled(); void defaultAndAutoDefault(); @@ -469,6 +472,34 @@ void tst_QPushButton::clicked() QCOMPARE( release_count, (uint)10 ); } +#ifdef Q_OS_MAC +// test that the corners of a mac style button are not treated as clicks. +// but that if a style is applied, they are. +void tst_QPushButton::macClicked() +{ + QPushButton *macTestWidget = new QPushButton( "Push button" ); + macTestWidget->show(); + connect( macTestWidget, SIGNAL(clicked()), this, SLOT(onClicked()) ); + + QTest::mouseClick( macTestWidget, Qt::LeftButton, 0, QPoint(1,1) ); + QVERIFY( click_count == 0 ); + + QTest::mouseClick( macTestWidget, Qt::LeftButton, 0, macTestWidget->rect().center() ); + QVERIFY( click_count == 1 ); + + resetCounters(); + macTestWidget->setStyleSheet("background: white;"); + + QTest::mouseClick( macTestWidget, Qt::LeftButton, 0, QPoint(1,1) ); + QVERIFY( click_count == 1 ); + + QTest::mouseClick( macTestWidget, Qt::LeftButton, 0, macTestWidget->rect().center() ); + QVERIFY( click_count == 2 ); + + delete macTestWidget; +} +#endif + /* void tst_QPushButton::group() { diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp index 2edb93a..c9d4ba4 100644 --- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp @@ -69,13 +69,7 @@ class tst_QTemporaryFile : public QObject { Q_OBJECT -public: - tst_QTemporaryFile(); - virtual ~tst_QTemporaryFile(); public slots: - void init(); - void cleanup(); - void initTestCase(); void cleanupTestCase(); @@ -100,22 +94,17 @@ private slots: void resetTemplateAfterError(); void setTemplateAfterOpen(); void autoRemoveAfterFailedRename(); - - void QTBUG_4796_data(); - void QTBUG_4796(); - -public: }; void tst_QTemporaryFile::initTestCase() { - // For QTBUG_4796 + // For fileTemplate tests QVERIFY(QDir("test-XXXXXX").exists() || QDir().mkdir("test-XXXXXX")); } void tst_QTemporaryFile::cleanupTestCase() { - // From QTBUG_4796 + // From fileTemplate tests QVERIFY(QDir().rmdir("test-XXXXXX")); } @@ -139,76 +128,6 @@ void tst_QTemporaryFile::getSetCheck() QCOMPARE(true, obj1.autoRemove()); } -tst_QTemporaryFile::tst_QTemporaryFile() -{ -} - -tst_QTemporaryFile::~tst_QTemporaryFile() -{ - -} - -void tst_QTemporaryFile::init() -{ -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. -} - -void tst_QTemporaryFile::cleanup() -{ -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. -} - -void tst_QTemporaryFile::fileTemplate_data() -{ - QTest::addColumn<QString>("constructorTemplate"); - QTest::addColumn<QString>("prefix"); - QTest::addColumn<QString>("suffix"); - QTest::addColumn<QString>("fileTemplate"); - - QTest::newRow("constructor default") << "" << "." << "" << ""; - QTest::newRow("constructor with xxx sufix") << "qt_XXXXXXxxx" << "qt_" << "xxx" << ""; - QTest::newRow("constructor with xXx sufix") << "qt_XXXXXXxXx" << "qt_" << "xXx" << ""; - QTest::newRow("constructor with no sufix") << "qt_XXXXXX" << "qt_" << "" << ""; - QTest::newRow("constructor with >6 X's and xxx suffix") << "qt_XXXXXXXXXXxxx" << "qt_" << "xxx" << ""; - QTest::newRow("constructor with >6 X's, no suffix") << "qt_XXXXXXXXXX" << "qt_" << "" << ""; - - QTest::newRow("constructor with XXXX suffix") << "qt_XXXXXX_XXXX" << "qt_" << "_XXXX" << ""; - QTest::newRow("constructor with XXXXX suffix") << "qt_XXXXXX_XXXXX" << "qt_" << "_XXXXX" << ""; - QTest::newRow("constructor with XXXX prefix") << "qt_XXXX" << "qt_XXXX." << "" << ""; - QTest::newRow("constructor with XXXXX prefix") << "qt_XXXXX" << "qt_XXXXX." << "" << ""; - QTest::newRow("constructor with XXXX prefix and suffix") << "qt_XXXX_XXXXXX_XXXX" << "qt_XXXX_" << "_XXXX" << ""; - QTest::newRow("constructor with XXXXX prefix and suffix") << "qt_XXXXX_XXXXXX_XXXXX" << "qt_XXXXX_" << "_XXXXX" << ""; - - QTest::newRow("set template, no suffix") << "" << "foo" << "" << "foo"; - QTest::newRow("set template, with lowercase XXXXXX") << "" << "qt_" << "xxxxxx" << "qt_XXXXXXxxxxxx"; - QTest::newRow("set template, with xxx") << "" << "qt_" << ".xxx" << "qt_XXXXXX.xxx"; - QTest::newRow("set template, with >6 X's") << "" << "qt_" << ".xxx" << "qt_XXXXXXXXXXXXXX.xxx"; - QTest::newRow("set template, with >6 X's, no suffix") << "" << "qt_" << "" << "qt_XXXXXXXXXXXXXX"; -} - -void tst_QTemporaryFile::fileTemplate() -{ - QFETCH(QString, constructorTemplate); - QFETCH(QString, prefix); - QFETCH(QString, suffix); - QFETCH(QString, fileTemplate); - - QTemporaryFile file(constructorTemplate); - if (!fileTemplate.isEmpty()) - file.setFileTemplate(fileTemplate); - - QCOMPARE(file.open(), true); - - if (prefix.length()) - QCOMPARE(file.fileName().left(prefix.length()), prefix); - - if (suffix.length()) - QCOMPARE(file.fileName().right(suffix.length()), suffix); -} - - /* This tests whether the temporary file really gets placed in QDir::tempPath */ @@ -411,11 +330,11 @@ void tst_QTemporaryFile::rename() { QTemporaryFile file(dir.filePath("temporary-file.XXXXXX")); - QVERIFY(file.open()); + QVERIFY2(file.open(), qPrintable(file.errorString())); tempname = file.fileName(); QVERIFY(dir.exists(tempname)); - QVERIFY(file.rename("temporary-file.txt")); + QVERIFY2(file.rename("temporary-file.txt"), qPrintable(file.errorString())); QVERIFY(!dir.exists(tempname)); QVERIFY(dir.exists("temporary-file.txt")); QCOMPARE(file.fileName(), QString("temporary-file.txt")); @@ -622,7 +541,7 @@ void tst_QTemporaryFile::autoRemoveAfterFailedRename() cleaner.reset(); } -void tst_QTemporaryFile::QTBUG_4796_data() +void tst_QTemporaryFile::fileTemplate_data() { QTest::addColumn<QString>("prefix"); QTest::addColumn<QString>("suffix"); @@ -631,15 +550,33 @@ void tst_QTemporaryFile::QTBUG_4796_data() QString unicode = QString::fromUtf8("\xc3\xa5\xc3\xa6\xc3\xb8"); QTest::newRow("<empty>") << QString() << QString() << true; + + QTest::newRow(".") << QString(".") << QString() << true; + QTest::newRow("..") << QString("..") << QString() << true; + + QTest::newRow("foo") << QString("foo") << QString() << true; + QTest::newRow("qt_ ... xxxxxx") << QString("qt_") << QString("xxxxxx") << true; + QTest::newRow("qt_ ... xxx") << QString("qt_") << QString("xxx") << true; + QTest::newRow("qt_ ... xXx") << QString("qt_") << QString("xXx") << true; + QTest::newRow("qt_ ...") << QString("qt_") << QString() << true; + QTest::newRow("qt_ ... _XXXX") << QString("qt_") << QString("_XXXX") << true; + QTest::newRow("qt_ ... _XXXXX") << QString("qt_") << QString("_XXXXX") << true; + QTest::newRow("qt_XXXX_ ...") << QString("qt_XXXX_") << QString() << true; + QTest::newRow("qt_XXXXX_ ...") << QString("qt_XXXXX_") << QString() << true; + QTest::newRow("qt_XXXX_ ... _XXXX") << QString("qt_XXXX_") << QString("_XXXX") << true; + QTest::newRow("qt_XXXXX_ ... _XXXXX") << QString("qt_XXXXX_") << QString("_XXXXX") << true; + QTest::newRow("blaXXXXXX") << QString("bla") << QString() << true; QTest::newRow("XXXXXXbla") << QString() << QString("bla") << true; + QTest::newRow("does-not-exist/qt_temp.XXXXXX") << QString("does-not-exist/qt_temp") << QString() << false; + QTest::newRow("XXXXXX<unicode>") << QString() << unicode << true; QTest::newRow("<unicode>XXXXXX") << unicode << QString() << true; QTest::newRow("<unicode>XXXXXX<unicode>") << unicode << unicode << true; } -void tst_QTemporaryFile::QTBUG_4796() +void tst_QTemporaryFile::fileTemplate() { QVERIFY(QDir("test-XXXXXX").exists()); @@ -665,25 +602,56 @@ void tst_QTemporaryFile::QTBUG_4796() QFETCH(QString, suffix); QFETCH(bool, openResult); + enum IterationType { + UseConstructor, + UseSetFileTemplate, + Done + }; + + for (IterationType setFileTemplate = UseConstructor; setFileTemplate != Done; + setFileTemplate = IterationType(int(setFileTemplate) + 1)) { + Q_FOREACH(QString const &tempName, cleaner.tempNames) + QVERIFY( !QFile::exists(tempName) ); + + cleaner.reset(); + QString fileTemplate1 = prefix + QString("XX") + suffix; QString fileTemplate2 = prefix + QString("XXXX") + suffix; QString fileTemplate3 = prefix + QString("XXXXXX") + suffix; QString fileTemplate4 = prefix + QString("XXXXXXXX") + suffix; - QTemporaryFile file1(fileTemplate1); - QTemporaryFile file2(fileTemplate2); - QTemporaryFile file3(fileTemplate3); - QTemporaryFile file4(fileTemplate4); - QTemporaryFile file5("test-XXXXXX/" + fileTemplate1); - QTemporaryFile file6("test-XXXXXX/" + fileTemplate3); + QTemporaryFile file1(setFileTemplate ? QString() : fileTemplate1); + QTemporaryFile file2(setFileTemplate ? QString() : fileTemplate2); + QTemporaryFile file3(setFileTemplate ? QString() : fileTemplate3); + QTemporaryFile file4(setFileTemplate ? QString() : fileTemplate4); + QTemporaryFile file5(setFileTemplate ? QString() : "test-XXXXXX/" + fileTemplate1); + QTemporaryFile file6(setFileTemplate ? QString() : "test-XXXXXX/" + fileTemplate3); + + if (setFileTemplate) { + file1.setFileTemplate(fileTemplate1); + file2.setFileTemplate(fileTemplate2); + file3.setFileTemplate(fileTemplate3); + file4.setFileTemplate(fileTemplate4); + file5.setFileTemplate("test-XXXXXX/" + fileTemplate1); + file6.setFileTemplate("test-XXXXXX/" + fileTemplate3); + } - QCOMPARE(file1.open(), openResult); - QCOMPARE(file2.open(), openResult); - QCOMPARE(file3.open(), openResult); - QCOMPARE(file4.open(), openResult); - QCOMPARE(file5.open(), openResult); - QCOMPARE(file6.open(), openResult); + if (openResult) { + QVERIFY2(file1.open(), qPrintable(file1.errorString())); + QVERIFY2(file2.open(), qPrintable(file2.errorString())); + QVERIFY2(file3.open(), qPrintable(file3.errorString())); + QVERIFY2(file4.open(), qPrintable(file4.errorString())); + QVERIFY2(file5.open(), qPrintable(file5.errorString())); + QVERIFY2(file6.open(), qPrintable(file6.errorString())); + } else { + QVERIFY(!file1.open()); + QVERIFY(!file2.open()); + QVERIFY(!file3.open()); + QVERIFY(!file4.open()); + QVERIFY(!file5.open()); + QVERIFY(!file6.open()); + } QCOMPARE(file1.exists(), openResult); QCOMPARE(file2.exists(), openResult); @@ -701,28 +669,31 @@ void tst_QTemporaryFile::QTBUG_4796() << file5.fileName() << file6.fileName(); - QVERIFY(file1.fileName().startsWith(fileTemplate1 + QLatin1Char('.'))); - QVERIFY(file2.fileName().startsWith(fileTemplate2 + QLatin1Char('.'))); - QVERIFY(file5.fileName().startsWith("test-XXXXXX/" + fileTemplate1 + QLatin1Char('.'))); - QVERIFY(file6.fileName().startsWith("test-XXXXXX/" + prefix)); + QDir currentDir; + QString fileName1 = currentDir.relativeFilePath(file1.fileName()); + QString fileName2 = currentDir.relativeFilePath(file2.fileName()); + QString fileName3 = currentDir.relativeFilePath(file3.fileName()); + QString fileName4 = currentDir.relativeFilePath(file4.fileName()); + QString fileName5 = currentDir.relativeFilePath(file5.fileName()); + QString fileName6 = currentDir.relativeFilePath(file6.fileName()); + + QVERIFY2(fileName1.startsWith(fileTemplate1 + QLatin1Char('.')), qPrintable(file1.fileName())); + QVERIFY2(fileName2.startsWith(fileTemplate2 + QLatin1Char('.')), qPrintable(file2.fileName())); + QVERIFY2(fileName5.startsWith("test-XXXXXX/" + fileTemplate1 + QLatin1Char('.')), qPrintable(file5.fileName())); + QVERIFY2(fileName6.startsWith("test-XXXXXX/" + prefix), qPrintable(file6.fileName())); if (!prefix.isEmpty()) { - QVERIFY(file3.fileName().startsWith(prefix)); - QVERIFY(file4.fileName().startsWith(prefix)); + QVERIFY2(fileName3.startsWith(prefix), qPrintable(file3.fileName())); + QVERIFY2(fileName4.startsWith(prefix), qPrintable(file4.fileName())); } if (!suffix.isEmpty()) { - QVERIFY(file3.fileName().endsWith(suffix)); - QVERIFY(file4.fileName().endsWith(suffix)); - QVERIFY(file6.fileName().endsWith(suffix)); + QVERIFY2(fileName3.endsWith(suffix), qPrintable(file3.fileName())); + QVERIFY2(fileName4.endsWith(suffix), qPrintable(file4.fileName())); + QVERIFY2(fileName6.endsWith(suffix), qPrintable(file6.fileName())); } } } - - Q_FOREACH(QString const &tempName, cleaner.tempNames) - QVERIFY( !QFile::exists(tempName) ); - - cleaner.reset(); } QTEST_MAIN(tst_QTemporaryFile) diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp index 2b0ba42..cc3b1dc 100644 --- a/tests/auto/qtextcursor/tst_qtextcursor.cpp +++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp @@ -50,6 +50,7 @@ #include <qabstracttextdocumentlayout.h> #include <qtextlayout.h> #include <qtextcursor.h> +#include <qtextobject.h> #include <qdebug.h> //TESTED_FILES=gui/text/qtextcursor.cpp gui/text/qtextcursor_p.h @@ -154,6 +155,8 @@ private slots: void cursorPositionWithBlockUndoAndRedo2(); void cursorPositionWithBlockUndoAndRedo3(); + void joinNonEmptyRemovedBlockUserState(); + private: int blockCount(); @@ -1858,5 +1861,20 @@ void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo3() QCOMPARE(cursor.position(), cursorPositionBefore); } +void tst_QTextCursor::joinNonEmptyRemovedBlockUserState() +{ + cursor.insertText("Hello"); + cursor.insertBlock(); + cursor.insertText("World"); + cursor.block().setUserState(10); + + cursor.movePosition(QTextCursor::EndOfBlock); + cursor.movePosition(QTextCursor::PreviousBlock, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor); + cursor.removeSelectedText(); + + QCOMPARE(cursor.block().userState(), 10); +} + QTEST_MAIN(tst_QTextCursor) #include "tst_qtextcursor.moc" diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp index 1a9a6ab..156f1de 100644 --- a/tools/macdeployqt/shared/shared.cpp +++ b/tools/macdeployqt/shared/shared.cpp @@ -127,7 +127,7 @@ FrameworkInfo parseOtoolLibraryLine(const QString &line, bool useDebugLibs) while (part < parts.count()) { const QString currentPart = parts.at(part).simplified() ; ++part; - if (currentPart == "") + if (currentPart.isEmpty()) continue; if (state == QtPath) { diff --git a/tools/macdeployqt/tests/tst_deployment_mac.cpp b/tools/macdeployqt/tests/tst_deployment_mac.cpp index 858dc45..5921199 100644 --- a/tools/macdeployqt/tests/tst_deployment_mac.cpp +++ b/tools/macdeployqt/tests/tst_deployment_mac.cpp @@ -230,4 +230,4 @@ void tst_deployment_mac::testFindAppBinarty() QTEST_MAIN(tst_deployment_mac) -#include "tst_deployment_mac.moc"
\ No newline at end of file +#include "tst_deployment_mac.moc" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 585d6ce..b3dc31a 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -955,7 +955,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, ident += ch; finish = i; readChar(); - } while (ch >= 0 && isalnum(ch) || ch == '_'); + } while (isalnum(ch) || ch == '_'); if (classRegExp.exactMatch(ident)) { tag = QLatin1String("type"); diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9f512d3..fc66923 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -62,6 +62,25 @@ QT_BEGIN_NAMESPACE #define COMMAND_VERSION Doc::alias("version") int DitaXmlGenerator::id = 0; +QString DitaXmlGenerator::sinceTitles[] = + { + " New Namespaces", + " New Classes", + " New Member Functions", + " New Functions in Namespaces", + " New Global Functions", + " New Macros", + " New Enum Types", + " New Typedefs", + " New Properties", + " New Variables", + " New QML Elements", + " New Qml Properties", + " New Qml Signals", + " New Qml Methods", + "" + }; + /* The strings in this array must appear in the same order as the values in enum DitaXmlGenerator::DitaTag. @@ -3934,6 +3953,70 @@ void DitaXmlGenerator::findAllClasses(const InnerNode* node) } } +/*! + For generating the "New Classes... in 4.x" section on the + What's New in 4.x" page. + */ +void DitaXmlGenerator::findAllSince(const InnerNode* node) +{ + NodeList::const_iterator child = node->childNodes().constBegin(); + while (child != node->childNodes().constEnd()) { + QString sinceVersion = (*child)->since(); + if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) { + NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion); + if (nsmap == newSinceMaps.end()) + nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap()); + NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); + if (ncmap == newClassMaps.end()) + ncmap = newClassMaps.insert(sinceVersion,NodeMap()); + NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); + if (nqcmap == newQmlClassMaps.end()) + nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); + + if ((*child)->type() == Node::Function) { + FunctionNode *func = static_cast<FunctionNode *>(*child); + if ((func->status() > Node::Obsolete) && + (func->metaness() != FunctionNode::Ctor) && + (func->metaness() != FunctionNode::Dtor)) { + nsmap.value().insert(func->name(),(*child)); + } + } + else if ((*child)->url().isEmpty()) { + if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + ncmap.value().insert(className,(*child)); + } + else if ((*child)->subType() == Node::QmlClass) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + nqcmap.value().insert(className,(*child)); + } + } + else { + QString name = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + name = (*child)->parent()->name()+"::"+name; + nsmap.value().insert(name,(*child)); + } + if ((*child)->isInnerNode()) { + findAllSince(static_cast<InnerNode *>(*child)); + } + } + ++child; + } +} + void DitaXmlGenerator::findAllFunctions(const InnerNode* node) { NodeList::ConstIterator c = node->childNodes().begin(); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index d8d3563..408f46c 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -51,6 +51,12 @@ QT_BEGIN_NAMESPACE +typedef QMultiMap<QString, Node*> NodeMultiMap; +typedef QMap<QString, NodeMultiMap> NewSinceMaps; +typedef QMap<Node*, NodeMultiMap> ParentMaps; +typedef QMap<QString, const Node*> NodeMap; +typedef QMap<QString, NodeMap> NewClassMaps; + typedef QMap<QString, QString> GuidMap; typedef QMap<QString, GuidMap*> GuidMaps; @@ -412,6 +418,7 @@ class DitaXmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); + void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); virtual QString getLink(const Atom *atom, @@ -508,6 +515,10 @@ class DitaXmlGenerator : public PageGenerator #endif QMap<QString, NodeMap > funcIndex; QMap<Text, const Node*> legaleseTexts; + NewSinceMaps newSinceMaps; + static QString sinceTitles[]; + NewClassMaps newClassMaps; + NewClassMaps newQmlClassMaps; static int id; static QString ditaTags[]; QStack<QXmlStreamWriter*> xmlWriterStack; diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 37f68f8..479931d 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -828,7 +828,7 @@ void DocParser::parse(const QString& source, append(Atom::AnnotatedList, getArgument()); break; case CMD_SINCELIST: - append(Atom::SinceList, getRestOfLine().simplified()); + append(Atom::SinceList, getArgument()); break; case CMD_GENERATELIST: append(Atom::GeneratedList, getArgument()); diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index c20d2b4..3367301 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -77,25 +77,6 @@ QString Generator::outDir; QString Generator::project; QHash<QString, QString> Generator::outputPrefixes; -QString Generator::sinceTitles[] = - { - " New Namespaces", - " New Classes", - " New Member Functions", - " New Functions in Namespaces", - " New Global Functions", - " New Macros", - " New Enum Types", - " New Typedefs", - " New Properties", - " New Variables", - " New QML Elements", - " New QML Properties", - " New QML Signals", - " New QML Methods", - "" - }; - static void singularPlural(Text& text, const NodeList& nodes) { if (nodes.count() == 1) @@ -779,18 +760,8 @@ QString Generator::typeString(const Node *node) case Node::Class: return "class"; case Node::Fake: - { - switch (node->subType()) { - case Node::QmlClass: - return "element"; - case Node::QmlPropertyGroup: - return "property group"; - case Node::QmlBasicType: - return "type"; - default: - return "documentation"; - } - } + default: + return "documentation"; case Node::Enum: return "enum"; case Node::Typedef: @@ -799,8 +770,6 @@ QString Generator::typeString(const Node *node) return "function"; case Node::Property: return "property"; - default: - return "documentation"; } } @@ -1122,21 +1091,11 @@ void Generator::generateSince(const Node *node, CodeMarker *marker) text << " was introduced or modified in "; else text << " was introduced in "; - - QStringList since = node->since().split(" "); - if (since.count() == 1) { - // Handle legacy use of \since <version>. - if (project.isEmpty()) - text << "version"; - else - text << project; - text << " " << since[0]; - } else { - // Reconstruct the <project> <version> string. - text << " " << since.join(" "); - } - - text << "." << Atom::ParaRight; + if (project.isEmpty()) + text << "version"; + else + text << project; + text << " " << node->since() << "." << Atom::ParaRight; generateText(text, node, marker); } } @@ -1387,91 +1346,4 @@ QStringList Generator::getMetadataElements(const InnerNode* inner, const QString return s; } -/*! - For generating the "New Classes... in 4.6" section on the - What's New in 4.6" page. - */ -void Generator::findAllSince(const InnerNode *node) -{ - NodeList::const_iterator child = node->childNodes().constBegin(); - - // Traverse the tree, starting at the node supplied. - - while (child != node->childNodes().constEnd()) { - - QString sinceString = (*child)->since(); - - if (((*child)->access() != Node::Private) && !sinceString.isEmpty()) { - - // Insert a new entry into each map for each new since string found. - NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceString); - if (nsmap == newSinceMaps.end()) - nsmap = newSinceMaps.insert(sinceString,NodeMultiMap()); - - NewClassMaps::iterator ncmap = newClassMaps.find(sinceString); - if (ncmap == newClassMaps.end()) - ncmap = newClassMaps.insert(sinceString,NodeMap()); - - NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceString); - if (nqcmap == newQmlClassMaps.end()) - nqcmap = newQmlClassMaps.insert(sinceString,NodeMap()); - - if ((*child)->type() == Node::Function) { - // Insert functions into the general since map. - FunctionNode *func = static_cast<FunctionNode *>(*child); - if ((func->status() > Node::Obsolete) && - (func->metaness() != FunctionNode::Ctor) && - (func->metaness() != FunctionNode::Dtor)) { - nsmap.value().insert(func->name(),(*child)); - } - } - else if ((*child)->url().isEmpty()) { - if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { - // Insert classes into the since and class maps. - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - - nsmap.value().insert(className,(*child)); - ncmap.value().insert(className,(*child)); - } - else if ((*child)->subType() == Node::QmlClass) { - // Insert QML elements into the since and element maps. - QString className = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - className = (*child)->parent()->name()+"::"+className; - - nsmap.value().insert(className,(*child)); - nqcmap.value().insert(className,(*child)); - } - else if ((*child)->type() == Node::QmlProperty) { - // Insert QML properties into the since map. - QString propertyName = (*child)->name(); - nsmap.value().insert(propertyName,(*child)); - } - } - else { - // Insert external documents into the general since map. - QString name = (*child)->name(); - if ((*child)->parent() && - (*child)->parent()->type() == Node::Namespace && - !(*child)->parent()->name().isEmpty()) - name = (*child)->parent()->name()+"::"+name; - - nsmap.value().insert(name,(*child)); - } - - // Find child nodes with since commands. - if ((*child)->isInnerNode()) { - findAllSince(static_cast<InnerNode *>(*child)); - } - } - ++child; - } -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index e66915b..e5e9747 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -57,12 +57,6 @@ QT_BEGIN_NAMESPACE -typedef QMap<QString, const Node*> NodeMap; -typedef QMultiMap<QString, Node*> NodeMultiMap; -typedef QMap<QString, NodeMultiMap> NewSinceMaps; -typedef QMap<Node*, NodeMultiMap> ParentMaps; -typedef QMap<QString, NodeMap> NewClassMaps; - class ClassNode; class Config; class CodeMarker; @@ -158,7 +152,6 @@ class Generator QString getMetadataElement(const InnerNode* inner, const QString& t); QStringList getMetadataElements(const InnerNode* inner, const QString& t); - void findAllSince(const InnerNode *node); private: void generateReimplementedFrom(const FunctionNode *func, @@ -187,11 +180,6 @@ class Generator const NodeList& subs, CodeMarker *marker); - static QString sinceTitles[]; - NewSinceMaps newSinceMaps; - NewClassMaps newClassMaps; - NewClassMaps newQmlClassMaps; - private: QString amp; QString lt; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 655c3b4..52da178 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -66,6 +66,25 @@ bool HtmlGenerator::debugging_on = false; QString HtmlGenerator::divNavTop = ""; +QString HtmlGenerator::sinceTitles[] = + { + " New Namespaces", + " New Classes", + " New Member Functions", + " New Functions in Namespaces", + " New Global Functions", + " New Macros", + " New Enum Types", + " New Typedefs", + " New Properties", + " New Variables", + " New QML Elements", + " New QML Properties", + " New QML Signals", + " New QML Methods", + "" + }; + static bool showBrokenLinks = false; static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)"); @@ -587,18 +606,14 @@ int HtmlGenerator::generateAtom(const Atom *atom, ncmap = newClassMaps.find(atom->string()); NewClassMaps::const_iterator nqcmap; nqcmap = newQmlClassMaps.find(atom->string()); - if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) { QList<Section> sections; QList<Section>::ConstIterator s; - for (int i=0; i<LastSinceType; ++i) sections.append(Section(sinceTitle(i),QString(),QString(),QString())); NodeMultiMap::const_iterator n = nsmap.value().constBegin(); - while (n != nsmap.value().constEnd()) { - const Node* node = n.value(); switch (node->type()) { case Node::Fake: @@ -1331,7 +1346,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); - generateSince(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { out() << "<a name=\"" << registerRef("namespaces") << "\"></a>" << divNavTop << "\n"; @@ -1348,7 +1362,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) // Generate brief text and status for modules. generateBrief(fake, marker); generateStatus(fake, marker); - generateSince(fake, marker); out() << "<ul>\n"; @@ -1380,7 +1393,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateQmlInherits(qml_cn, marker); generateQmlInheritedBy(qml_cn, marker); generateQmlInstantiates(qml_cn, marker); - generateSince(qml_cn, marker); QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker); if (!allQmlMembersLink.isEmpty()) { @@ -2230,6 +2242,9 @@ void HtmlGenerator::generateCompactList(const Node *relative, for (int i=0; i<NumParagraphs; i++) // i = 0..36 paragraphOffset[i+1] = paragraphOffset[i] + paragraph[i].count(); + int curParNr = 0; + int curParOffset = 0; + /* Output the alphabet as a row of links. */ @@ -2247,12 +2262,8 @@ void HtmlGenerator::generateCompactList(const Node *relative, Output a <div> element to contain all the <dl> elements. */ out() << "<div class=\"flowListDiv\">\n"; - numTableRows = 0; - - int curParNr = 0; - int curParOffset = 0; - for (int i=0; i<classMap.count(); i++) { + for (int i=0; i<classMap.count()-1; i++) { while ((curParNr < NumParagraphs) && (curParOffset == paragraph[curParNr].count())) { ++curParNr; @@ -2313,9 +2324,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, out() << "</dd>\n"; curParOffset++; } - if (classMap.count() > 0) - out() << "</dl>\n"; - + out() << "</dl>\n"; out() << "</div>\n"; } @@ -3348,6 +3357,70 @@ void HtmlGenerator::findAllClasses(const InnerNode *node) } } +/*! + For generating the "New Classes... in 4.6" section on the + What's New in 4.6" page. + */ +void HtmlGenerator::findAllSince(const InnerNode *node) +{ + NodeList::const_iterator child = node->childNodes().constBegin(); + while (child != node->childNodes().constEnd()) { + QString sinceVersion = (*child)->since(); + if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) { + NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion); + if (nsmap == newSinceMaps.end()) + nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap()); + NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); + if (ncmap == newClassMaps.end()) + ncmap = newClassMaps.insert(sinceVersion,NodeMap()); + NewClassMaps::iterator nqcmap = newQmlClassMaps.find(sinceVersion); + if (nqcmap == newQmlClassMaps.end()) + nqcmap = newQmlClassMaps.insert(sinceVersion,NodeMap()); + + if ((*child)->type() == Node::Function) { + FunctionNode *func = static_cast<FunctionNode *>(*child); + if ((func->status() > Node::Obsolete) && + (func->metaness() != FunctionNode::Ctor) && + (func->metaness() != FunctionNode::Dtor)) { + nsmap.value().insert(func->name(),(*child)); + } + } + else if ((*child)->url().isEmpty()) { + if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + ncmap.value().insert(className,(*child)); + } + else if ((*child)->subType() == Node::QmlClass) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + nqcmap.value().insert(className,(*child)); + } + } + else { + QString name = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + name = (*child)->parent()->name()+"::"+name; + nsmap.value().insert(name,(*child)); + } + if ((*child)->isInnerNode()) { + findAllSince(static_cast<InnerNode *>(*child)); + } + } + ++child; + } +} + void HtmlGenerator::findAllFunctions(const InnerNode *node) { NodeList::ConstIterator c = node->childNodes().begin(); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index e36c562..70ec0b7 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -56,6 +56,12 @@ QT_BEGIN_NAMESPACE +typedef QMultiMap<QString, Node*> NodeMultiMap; +typedef QMap<QString, NodeMultiMap> NewSinceMaps; +typedef QMap<Node*, NodeMultiMap> ParentMaps; +typedef QMap<QString, const Node*> NodeMap; +typedef QMap<QString, NodeMap> NewClassMaps; + class HelpProjectWriter; class HtmlGenerator : public PageGenerator @@ -218,6 +224,7 @@ class HtmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); + void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); virtual QString getLink(const Atom *atom, @@ -285,6 +292,10 @@ class HtmlGenerator : public PageGenerator NodeMap qmlClasses; QMap<QString, NodeMap > funcIndex; QMap<Text, const Node *> legaleseTexts; + NewSinceMaps newSinceMaps; + static QString sinceTitles[]; + NewClassMaps newClassMaps; + NewClassMaps newQmlClassMaps; static int id; public: static bool debugging_on; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 87bbd93..56d76d3 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -157,16 +157,6 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc) } /*! - Sets the information about the project and version a node was introduced - in. The string is simplified, removing excess whitespace before being - stored. -*/ -void Node::setSince(const QString &since) -{ - sinc = since.simplified(); -} - -/*! Returns a string representing the access specifier. */ QString Node::accessString() const @@ -555,7 +545,8 @@ void InnerNode::removeFromRelated() */ void InnerNode::deleteChildren() { - qDeleteAll(children); + NodeList childrenCopy = children; // `children` will be changed in ~Node() + qDeleteAll(childrenCopy); } /*! diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index cb16bea..e1e9440 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -151,7 +151,7 @@ class Node void setDoc(const Doc& doc, bool replace = false); void setStatus(Status status) { sta = status; } void setThreadSafeness(ThreadSafeness safeness) { saf = safeness; } - void setSince(const QString &since); + void setSince(const QString &since) { sinc = since; } void setRelates(InnerNode* pseudoParent); void setModuleName(const QString &module) { mod = module; } void setLink(LinkType linkType, const QString &link, const QString &desc); diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 4b0f2d5..f9961bc 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1393,6 +1393,7 @@ void QDeclarativeViewer::appAboutToQuit() loggerWindow = 0; delete tester; tester = 0; + close(); } void QDeclarativeViewer::autoStartRecording() diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index ae06d02..6bef8d4 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -147,7 +147,7 @@ QByteArray convertToId(const QByteArray &cppName) return cppToId.value(cppName, cppName); } -QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode, QDeclarativeEngine *engine) +QSet<const QMetaObject *> collectReachableMetaObjects(const QList<QDeclarativeType *> &skip = QList<QDeclarativeType *>()) { QSet<const QMetaObject *> metas; metas.insert(FriendlyQObject::qtMeta()); @@ -195,7 +195,9 @@ QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode, // find even more QMetaObjects by instantiating QML types and running // over the instances - foreach (const QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + foreach (QDeclarativeType *ty, QDeclarativeMetaType::qmlTypes()) { + if (skip.contains(ty)) + continue; if (ty->isExtendedType()) continue; if (!ty->isCreatable()) @@ -208,21 +210,14 @@ QSet<const QMetaObject *> collectReachableMetaObjects(const QString &importCode, if (tyName.isEmpty()) continue; - QByteArray code = importCode.toUtf8(); - code += tyName; - code += " {}\n"; - - QDeclarativeComponent c(engine); - c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typeinstance.qml")); - inObjectInstantiation = tyName; - QObject *object = c.create(); + QObject *object = ty->create(); inObjectInstantiation.clear(); if (object) collectReachableMetaObjects(object, &metas); else - qWarning() << "Could not create" << tyName << ":" << c.errorString(); + qWarning() << "Could not create" << tyName; } return metas; @@ -548,8 +543,8 @@ int main(int argc, char *argv[]) } // find all QMetaObjects reachable from the builtin module - QByteArray importCode("import QtQuick 1.0\n"); - QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, engine); + QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(); + QList<QDeclarativeType *> defaultTypes = QDeclarativeMetaType::qmlTypes(); // this will hold the meta objects we want to dump information of QSet<const QMetaObject *> metas; @@ -557,6 +552,20 @@ int main(int argc, char *argv[]) if (action == Builtins) { metas = defaultReachable; } else { + // find a valid QtQuick import + QByteArray importCode; + QDeclarativeType *qtObjectType = QDeclarativeMetaType::qmlType(&QObject::staticMetaObject); + if (!qtObjectType) { + qWarning() << "Could not find QtObject type"; + importCode = QByteArray("import QtQuick 1.0\n"); + } else { + QByteArray module = qtObjectType->qmlTypeName(); + module = module.mid(0, module.lastIndexOf('/')); + importCode = QString("import %1 %2.%3\n").arg(module, + QString::number(qtObjectType->majorVersion()), + QString::number(qtObjectType->minorVersion())).toUtf8(); + } + // find all QMetaObjects reachable when the specified module is imported if (action != Path) { importCode += QString("import %0 %1\n").arg(pluginImportUri, pluginImportVersion).toAscii(); @@ -581,7 +590,7 @@ int main(int argc, char *argv[]) } } - QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, engine); + QSet<const QMetaObject *> candidates = collectReachableMetaObjects(defaultTypes); candidates.subtract(defaultReachable); // Also eliminate meta objects with the same classname. diff --git a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp index b8436b9..c81fe97 100644 --- a/tools/qtconcurrent/codegenerator/src/codegenerator.cpp +++ b/tools/qtconcurrent/codegenerator/src/codegenerator.cpp @@ -134,7 +134,7 @@ const Compound operator+(const Item &a, const char * const text) const Compound operator+(const char * const text, const Item &b) { - return Compound(Text(text), b); + return Compound(Text(text), b); } -}
\ No newline at end of file +} diff --git a/tools/qtestlib/wince/cetest/deployment.h b/tools/qtestlib/wince/cetest/deployment.h index f3645e0..a5ef32d 100644 --- a/tools/qtestlib/wince/cetest/deployment.h +++ b/tools/qtestlib/wince/cetest/deployment.h @@ -72,4 +72,4 @@ private: inline void DeploymentHandler::setConnection(AbstractRemoteConnection *connection) { m_connection = connection; } inline AbstractRemoteConnection* DeploymentHandler::connection() const { return m_connection; } -#endif
\ No newline at end of file +#endif diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 868a2a8..af349eb 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -65,7 +65,7 @@ void printUsage(QTextStream& outstream, QString exeName) << "-t, --timeout <milliseconds> terminate test if timeout occurs" << endl << "-v, --verbose show debugging output" << endl << "-q, --quiet hide progress messages" << endl - << "-u, --upload <local file> upload executable file to phone" << endl + << "-u, --upload <local file> <remote file> upload file to phone" << endl << "-d, --download <remote file> <local file> copy file from phone to PC after running test" << endl << "--nocrashlog Don't capture call stack if test crashes" << endl << "--crashlogpath <dir> Path to save crash logs (default=working dir)" << endl @@ -91,6 +91,7 @@ int main(int argc, char *argv[]) QTextStream outstream(stdout); QTextStream errstream(stderr); QString uploadLocalFile; + QString uploadRemoteFile; QString downloadRemoteFile; QString downloadLocalFile; int loglevel=1; @@ -127,10 +128,8 @@ int main(int argc, char *argv[]) errstream << "Executable file (" << uploadLocalFile << ") doesn't exist" << endl; return 1; } - if (!(QFileInfo(uploadLocalFile).suffix() == "exe")) { - errstream << "File (" << uploadLocalFile << ") must be an executable" << endl; - return 1; - } + CHECK_PARAMETER_EXISTS + uploadRemoteFile = it.next(); } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS @@ -174,7 +173,8 @@ int main(int argc, char *argv[]) } } - if (exeFile.isEmpty() && sisFile.isEmpty() && uploadLocalFile.isEmpty() && + if (exeFile.isEmpty() && sisFile.isEmpty() && + (uploadLocalFile.isEmpty() || uploadRemoteFile.isEmpty()) && (downloadLocalFile.isEmpty() || downloadRemoteFile.isEmpty())) { printUsage(outstream, args[0]); return 1; @@ -230,8 +230,7 @@ int main(int argc, char *argv[]) } else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { codaHandler.setActionType(ActionCopy); - QString dstName = QString("c:\\sys\\bin\\") + uploadInfo.fileName(); - codaHandler.setCopyFileName(uploadLocalFile, dstName); + codaHandler.setCopyFileName(uploadLocalFile, uploadRemoteFile); } if (!exeFile.isEmpty()) { codaHandler.setActionType(ActionRun); @@ -254,19 +253,20 @@ int main(int argc, char *argv[]) } else { launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly)); + QStringList srcNames, dstNames; if (!sisFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionCopyInstall); - QStringList srcName(sisFile); - QStringList dstName("c:\\data\\testtemp.sis"); - launcher->setCopyFileNames(srcName, dstName); - launcher->setInstallFileNames(dstName); + srcNames.append(sisFile); + QLatin1String dstName("c:\\data\\testtemp.sis"); + dstNames.append(dstName); + launcher->setInstallFileNames(QStringList(dstName)); } - else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { + if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { launcher->addStartupActions(trk::Launcher::ActionCopy); - QStringList srcName(uploadLocalFile); - QStringList dstName(QString("c:\\sys\\bin\\") + uploadInfo.fileName()); - launcher->setCopyFileNames(srcName, dstName); + srcNames.append(uploadLocalFile); + dstNames.append(uploadRemoteFile); } + launcher->setCopyFileNames(srcNames, dstNames); if (!exeFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionRun); launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName()); diff --git a/translations/qt_fa.ts b/translations/qt_fa.ts new file mode 100644 index 0000000..ec5df32 --- /dev/null +++ b/translations/qt_fa.ts @@ -0,0 +1,9800 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="fa"> +<context> + <name>CloseButton</name> + <message> + <source>Close Tab</source> + <translation>بستن برگه</translation> + </message> +</context> +<context> + <name>FakeReply</name> + <message> + <source>Fake error !</source> + <translation>خطای تقلبی!</translation> + </message> + <message> + <source>Invalid URL</source> + <translation>URL نامعتبر</translation> + </message> +</context> +<context> + <name>MAC_APPLICATION_MENU</name> + <message> + <source>Services</source> + <translation>خدمات</translation> + </message> + <message> + <source>Hide %1</source> + <translation> مخفی کردن %1</translation> + </message> + <message> + <source>Hide Others</source> + <translation>مخفی کردن بقیه</translation> + </message> + <message> + <source>Show All</source> + <translation>نمایش همه</translation> + </message> + <message> + <source>Preferences...</source> + <translation>ترجیهات...</translation> + </message> + <message> + <source>Quit %1</source> + <translation>اتمام %1</translation> + </message> + <message> + <source>About %1</source> + <translation>درباره %1</translation> + </message> +</context> +<context> + <name>Phonon::</name> + <message> + <source>Notifications</source> + <translation>اعلانات</translation> + </message> + <message> + <source>Music</source> + <translation>موسیقی</translation> + </message> + <message> + <source>Video</source> + <translation>ویدیو</translation> + </message> + <message> + <source>Communication</source> + <translation>ارتباطات</translation> + </message> + <message> + <source>Games</source> + <translation>بازیها</translation> + </message> + <message> + <source>Accessibility</source> + <translation>قابلیت دسترسی</translation> + </message> +</context> +<context> + <name>Phonon::AudioOutput</name> + <message> + <source><html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html></source> + <translation><html>دستگاه پخش صوت <b>%1</b> کار نمیکند.<br/>بازگشت به <b>%2</b>.</html></translation> + </message> + <message> + <source><html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html></source> + <translation><html>سوئیچ کردن به دستگاه پخش صوت <b>%1</b><br/>که تازه در دسترس قرار گرفته است و امکانات بیشتری دارد.</html></translation> + </message> + <message> + <source>Revert back to device '%1'</source> + <translation>بازگشت دوباره به دستگاه '%1'</translation> + </message> + <message> + <source><html>Switching to the audio playback device <b>%1</b><br/>which has higher preference or is specifically configured for this stream.</html></source> + <translation><html>سوئیچ کردن به دستگاه پخش صوت<b>%1</b><br/>که امکانات بیشتری دارد یا به طور مخصوص برای این نوع جریان پیکربندی شده است</html></translation> + </message> +</context> +<context> + <name>Phonon::Gstreamer::Backend</name> + <message> + <source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled.</source> + <translation>هشدار: به نظر میرسد شما بستهٔ gstreamer0.10-plugins-good را نصب نکردهاید. + بعضی از ویژگیهای ویدیویی غیرفعال شده اند.</translation> + </message> + <message> + <source>Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled</source> + <translation>هشدار: به نظر میرسد شما افزونههای پایه GStreamer را نصب نکردهاید. + تمامی پشتیبانیهای صوتی و تصویری غیرفعال شدهاند</translation> + </message> +</context> +<context> + <name>Phonon::Gstreamer::MediaObject</name> + <message> + <source>Cannot start playback. + +Check your GStreamer installation and make sure you +have libgstreamer-plugins-base installed.</source> + <translation>نمیتوان پخش را شروع کرد. + +وضعیت نصب GStreamer خود را بررسی کنید و اطمینان حاصل نمایید که libgstreamer-plugins-base را نصب کردهاید.</translation> + </message> + <message> + <source>Missing codec helper script assistant.</source> + <translation>اسکریپت کمکی کدک یافت نشد.</translation> + </message> + <message> + <source>Plugin codec installation failed for codec: %0</source> + <translation>نصب ناموفق افزونه دیکدر برای دیکد کردن: %0</translation> + </message> + <message> + <source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source> + <translation>رمزگشای مورد نیاز یافت نشد. شما میبایست رمز گشای ذیل را برای اجرای این مضمون نصب کنید: %0</translation> + </message> + <message> + <source>Could not open media source.</source> + <translation>نمیتوان منبع رسانه را باز کرد.</translation> + </message> + <message> + <source>Invalid source type.</source> + <translation>نوع منبع نامعتبر.</translation> + </message> + <message> + <source>Could not locate media source.</source> + <translation>نمیتوان محل منبع رسانهای را پیدا کرد.</translation> + </message> + <message> + <source>Could not open audio device. The device is already in use.</source> + <translation>نمیتوان دستگاه صوتی را باز کرد. دستگاه هماکنون در حال استفاده است.</translation> + </message> + <message> + <source>Could not decode media source.</source> + <translation>نمیتوان منبع رسانه را رمزگشایی کرد.</translation> + </message> +</context> +<context> + <name>Phonon::MMF</name> + <message> + <source>Audio Output</source> + <translation>خروجی صدا</translation> + </message> + <message> + <source>The audio output device</source> + <translation>دستگاه خروجی صدا</translation> + </message> + <message> + <source>No error</source> + <translation>خطایی وجود ندارد</translation> + </message> + <message> + <source>Not found</source> + <translation>پیدا نشد</translation> + </message> + <message> + <source>Out of memory</source> + <translation>خارج از حافظه</translation> + </message> + <message> + <source>Not supported</source> + <translation>پشتیبانی نشده</translation> + </message> + <message> + <source>Overflow</source> + <translation>سرریز</translation> + </message> + <message> + <source>Underflow</source> + <translation>فروریز</translation> + </message> + <message> + <source>Already exists</source> + <translation>از قبل موجود است</translation> + </message> + <message> + <source>Path not found</source> + <translation>مسیر پیدا نشد</translation> + </message> + <message> + <source>In use</source> + <translation>در حال استفاده</translation> + </message> + <message> + <source>Not ready</source> + <translation>آماده نیست</translation> + </message> + <message> + <source>Access denied</source> + <translation>دسترسی رد شد</translation> + </message> + <message> + <source>Could not connect</source> + <translation>عدم امکان اتصال</translation> + </message> + <message> + <source>Disconnected</source> + <translation>اتصال قطع شد</translation> + </message> + <message> + <source>Permission denied</source> + <translation>اجازه دسترسی رد شد</translation> + </message> + <message> + <source>Insufficient bandwidth</source> + <translation>پهنای باند ناکافی</translation> + </message> + <message> + <source>Network unavailable</source> + <translation>شبکه موجود نمیباشد</translation> + </message> + <message> + <source>Network communication error</source> + <translation>خطای اتصال به شبکه</translation> + </message> + <message> + <source>Streaming not supported</source> + <translation>جریاندهی پشتیبانی نشده است</translation> + </message> + <message> + <source>Server alert</source> + <translation>اخطار سرور</translation> + </message> + <message> + <source>Invalid protocol</source> + <translation>پروتکل نامعتبر</translation> + </message> + <message> + <source>Invalid URL</source> + <translation>URL نامعتبر</translation> + </message> + <message> + <source>Multicast error</source> + <translation>خطای قالببندی چندگانه</translation> + </message> + <message> + <source>Proxy server error</source> + <translation>خطای سرویسدهنده پروکسی</translation> + </message> + <message> + <source>Proxy server not supported</source> + <translation>سرویسدهنده پروکسی پشتیبانی نشده است</translation> + </message> + <message> + <source>Audio output error</source> + <translation>خطای خروجی صدا</translation> + </message> + <message> + <source>Video output error</source> + <translation>خطای خروجی تصویر</translation> + </message> + <message> + <source>Decoder error</source> + <translation>خطای رمزگشا</translation> + </message> + <message> + <source>Audio or video components could not be played</source> + <translation>اجزای صوتی یا تصویری نمیتوانند اجرا شوند</translation> + </message> + <message> + <source>DRM error</source> + <translation>خطای DRM</translation> + </message> + <message> + <source>Unknown error (%1)</source> + <translation>خطای ناشناخته (%1)</translation> + </message> +</context> +<context> + <name>Phonon::MMF::AbstractMediaPlayer</name> + <message> + <source>Not ready to play</source> + <translation>عدم آمادگی برای اجرا</translation> + </message> + <message> + <source>Error opening file</source> + <translation>خطای باز کردن پرونده</translation> + </message> + <message> + <source>Error opening URL</source> + <translation>خطای باز کردن URL</translation> + </message> + <message> + <source>Error opening resource</source> + <translation>خطای باز کردن منبع</translation> + </message> + <message> + <source>Error opening source: resource not opened</source> + <translation>خطای باز کردن منبع: منبع باز نشد</translation> + </message> + <message> + <source>Setting volume failed</source> + <translation>تنظیم حجم صدا انجام نشد</translation> + </message> + <message> + <source>Loading clip failed</source> + <translation>بارگذاری نماهنگ انجام نشد</translation> + </message> + <message> + <source>Playback complete</source> + <translation>پخش کامل شد</translation> + </message> + <message> + <source>Download error</source> + <translation>خطای دانلود</translation> + </message> +</context> +<context> + <name>Phonon::MMF::AbstractVideoPlayer</name> + <message> + <source>Pause failed</source> + <translation>توقف ناموفق</translation> + </message> + <message> + <source>Seek failed</source> + <translation>لغزش ناموفق</translation> + </message> + <message> + <source>Getting position failed</source> + <translation>بازیابی ناموفق موقعیت</translation> + </message> + <message> + <source>Opening clip failed</source> + <translation>باز کردن ناموفق نماهنگ</translation> + </message> +</context> +<context> + <name>Phonon::MMF::AudioEqualizer</name> + <message> + <source>%1 Hz</source> + <translation>%1 Hz</translation> + </message> +</context> +<context> + <name>Phonon::MMF::AudioPlayer</name> + <message> + <source>Getting position failed</source> + <translation>بازیابی ناموفق موقعیت</translation> + </message> +</context> +<context> + <name>Phonon::MMF::DsaVideoPlayer</name> + <message> + <source>Video display error</source> + <translation>خطای نمایش ویدیو</translation> + </message> +</context> +<context> + <name>Phonon::MMF::EffectFactory</name> + <message> + <source>Enabled</source> + <translation>فعال شد</translation> + </message> +</context> +<context> + <name>Phonon::MMF::EnvironmentalReverb</name> + <message> + <source>Decay HF ratio (%)</source> + <extracomment>DecayHFRatio: Ratio of high-frequency decay time to the value specified by DecayTime.</extracomment> + <translation>ضعیف شدن نسبت HF (٪)</translation> + </message> + <message> + <source>Decay time (ms)</source> + <extracomment>DecayTime: Time over which reverberation is diminished.</extracomment> + <translatorcomment>زمانی که طول میکشد تا پژواک موج تقلیل یابد</translatorcomment> + <translation>زمان کاهش یافتن (میلیثانیه)</translation> + </message> + <message> + <source>Density (%)</source> + <extracomment>Density Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Diffusion value.</extracomment> + <translatorcomment>تأخیر تراکم میان انعکاس اول و انعکاس بعدی. توجه کنید که مستندات پلتفرم S60 فرق میان این مقدار و مقدار نفوذ را مشخص نمیکند.</translatorcomment> + <translation>تراکم (٪)</translation> + </message> + <message> + <source>Diffusion (%)</source> + <extracomment>Diffusion: Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Density value.</extracomment> + <translatorcomment>تأخیر نفوذ میان انعکاس اول و انعکاس بعدی. توجه کنید که مستندات پلتفرم S60 فرق میان این مقدار و مقدار انعکاس را مشخص نمیکند.</translatorcomment> + <translation>نفوذ (٪)</translation> + </message> + <message> + <source>Reflections delay (ms)</source> + <extracomment>ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection.</extracomment> + <translation>تأخیر بازتابها (میلیثانیه)</translation> + </message> + <message> + <source>Reflections level (mB)</source> + <extracomment>ReflectionsLevel: Amplitude of reflections. This value is corrected by the RoomLevel to give the final reflection amplitude.</extracomment> + <translation>سطح بازتابها (میلیبل)</translation> + </message> + <message> + <source>Reverb delay (ms)</source> + <extracomment>ReverbDelay: Amount of time between arrival of the first reflection and start of the late reverberation.</extracomment> + <translation>تأخیر انعکاس(میلیثانیه)</translation> + </message> + <message> + <source>Reverb level (mB)</source> + <extracomment>ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude.</extracomment> + <translation>سطح انعکاس (میلیبل)</translation> + </message> + <message> + <source>Room HF level</source> + <extracomment>RoomHFLevel: Amplitude of low-pass filter used to attenuate the high frequency component of reflected sound.</extracomment> + <translation>سطح HF فضا</translation> + </message> + <message> + <source>Room level (mB)</source> + <extracomment>RoomLevel: Master volume control for all reflected sound.</extracomment> + <translation>سطح فضا (میلیبل)</translation> + </message> +</context> +<context> + <name>Phonon::MMF::MediaObject</name> + <message> + <source>Error opening source: type not supported</source> + <translation>خطای باز کردن منبع: نوع پشتیبانی نشده</translation> + </message> + <message> + <source>Error opening source: resource is compressed</source> + <translation>خطای باز کردن منبع: منبع فشرده شده است</translation> + </message> + <message> + <source>Error opening source: resource not valid</source> + <translation>خطای باز کردن منبع: منبع نامعتبر است</translation> + </message> + <message> + <source>Error opening source: media type could not be determined</source> + <translation>خطای باز کردن منبع: نمیتوان نوع رسانه را تعیین کرد</translation> + </message> + <message> + <source>Failed to set requested IAP</source> + <translation>نمیتوان IAP درخواست شده را تنظیم کرد</translation> + </message> +</context> +<context> + <name>Phonon::MMF::StereoWidening</name> + <message> + <source>Level (%)</source> + <translation>سطح (%)</translation> + </message> +</context> +<context> + <name>Phonon::MMF::SurfaceVideoPlayer</name> + <message> + <source>Video display error</source> + <translation>خطای نمایش ویدیو</translation> + </message> +</context> +<context> + <name>Phonon::VolumeSlider</name> + <message> + <source>Volume: %1%</source> + <translation>حجم صدا:%1%</translation> + </message> + <message> + <source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source> + <translation>این لغزنده را برای تنظیم صدا استفاده کنید. سمت چپترین حالت %، سمت راستترین حالت %1%</translation> + </message> + <message> + <source>Muted</source> + <translation>مات</translation> + </message> +</context> +<context> + <name>Q3Accel</name> + <message> + <source>%1, %2 not defined</source> + <translation>%1، %2 تعریف نشده</translation> + </message> + <message> + <source>Ambiguous %1 not handled</source> + <translation>ابهام %1 برطرف نشده</translation> + </message> +</context> +<context> + <name>Q3DataTable</name> + <message> + <source>True</source> + <translation>درست</translation> + </message> + <message> + <source>False</source> + <translation>نادرست</translation> + </message> + <message> + <source>Insert</source> + <translation>درج</translation> + </message> + <message> + <source>Update</source> + <translation>بهروزرسانی</translation> + </message> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> +</context> +<context> + <name>Q3FileDialog</name> + <message> + <source>Copy or Move a File</source> + <translation>کپی با جابهجایی یک پرونده</translation> + </message> + <message> + <source>Read: %1</source> + <translation>خواندن: %1</translation> + </message> + <message> + <source>Write: %1</source> + <translation>نوشتن: %1</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> + <message> + <source>All Files (*)</source> + <translation>تمام پروندهها (*)</translation> + </message> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <source>Type</source> + <translation>نوع</translation> + </message> + <message> + <source>Date</source> + <translation>تاریخ</translation> + </message> + <message> + <source>Attributes</source> + <translation>ویژگیها</translation> + </message> + <message> + <source>&OK</source> + <translation>&تأیید</translation> + </message> + <message> + <source>Look &in:</source> + <translation>جستجو &در:</translation> + </message> + <message> + <source>File &name:</source> + <translation>&نام پرونده:</translation> + </message> + <message> + <source>File &type:</source> + <translation>&نوع پرونده:</translation> + </message> + <message> + <source>Back</source> + <translation>عقب</translation> + </message> + <message> + <source>One directory up</source> + <translation>یک پوشه بالاتر</translation> + </message> + <message> + <source>Create New Folder</source> + <translation>ایجاد پوشه جدید</translation> + </message> + <message> + <source>List View</source> + <translation>نمایش سیاهه</translation> + </message> + <message> + <source>Detail View</source> + <translation>نمایش جزئیات</translation> + </message> + <message> + <source>Preview File Info</source> + <translation>مشاهده اطلاعات پرونده</translation> + </message> + <message> + <source>Preview File Contents</source> + <translation>مشاهده محتویات پرونده</translation> + </message> + <message> + <source>Read-write</source> + <translation>خواندن-نوشتن</translation> + </message> + <message> + <source>Read-only</source> + <translation>فقط-خواندنی</translation> + </message> + <message> + <source>Write-only</source> + <translation>فقط-نوشتنی</translation> + </message> + <message> + <source>Inaccessible</source> + <translation>غیر قابل دسترس</translation> + </message> + <message> + <source>Symlink to File</source> + <translation>لینک سمبلیک به فایل</translation> + </message> + <message> + <source>Symlink to Directory</source> + <translation>لینک سمبلیک به پوشه</translation> + </message> + <message> + <source>Symlink to Special</source> + <translation>لینک سمبلیک خاص</translation> + </message> + <message> + <source>File</source> + <translation>پرونده</translation> + </message> + <message> + <source>Dir</source> + <translation>مسیر</translation> + </message> + <message> + <source>Special</source> + <translation>ویژه</translation> + </message> + <message> + <source>Open</source> + <translation>باز کردن</translation> + </message> + <message> + <source>Save As</source> + <translation>ذخیره به عنوان</translation> + </message> + <message> + <source>&Open</source> + <translation>&بازکردن</translation> + </message> + <message> + <source>&Save</source> + <translation>&ذخیره</translation> + </message> + <message> + <source>&Rename</source> + <translation>&تغییر نام</translation> + </message> + <message> + <source>&Delete</source> + <translation>&حذف</translation> + </message> + <message> + <source>R&eload</source> + <translation>بارگذاری &مجدد</translation> + </message> + <message> + <source>Sort by &Name</source> + <translation>مرتبسازی بر حسب &نام</translation> + </message> + <message> + <source>Sort by &Size</source> + <translation>مرتبسازی بر حسب &اندازه</translation> + </message> + <message> + <source>Sort by &Date</source> + <translation>مرتبسازی بر حسب &تاریخ</translation> + </message> + <message> + <source>&Unsorted</source> + <translation>.&مرتب نشده</translation> + </message> + <message> + <source>Sort</source> + <translation>مرتبسازی</translation> + </message> + <message> + <source>Show &hidden files</source> + <translation>نمایش پروندههای م&خفی</translation> + </message> + <message> + <source>the file</source> + <translation>پرونده</translation> + </message> + <message> + <source>the directory</source> + <translation>پوشه</translation> + </message> + <message> + <source>the symlink</source> + <translation>لینک سمبلیک</translation> + </message> + <message> + <source>Delete %1</source> + <translation>حذف %1</translation> + </message> + <message> + <source><qt>Are you sure you wish to delete %1 "%2"?</qt></source> + <translation><qt>آیا مطمئن هستید که میخواهید حذف کنید %1 "%2"?</qt></translation> + </message> + <message> + <source>&Yes</source> + <translation>&بله</translation> + </message> + <message> + <source>&No</source> + <translation>&نه</translation> + </message> + <message> + <source>New Folder 1</source> + <translation>پوشهٔ جدید ۱</translation> + </message> + <message> + <source>New Folder</source> + <translation>پوشهٔ جدید</translation> + </message> + <message> + <source>New Folder %1</source> + <translation>پوشهٔ جدید %1</translation> + </message> + <message> + <source>Find Directory</source> + <translation>پیدا کردن پوشه</translation> + </message> + <message> + <source>Directories</source> + <translation>پوشهها</translation> + </message> + <message> + <source>Directory:</source> + <translation>پوشه:</translation> + </message> + <message> + <source>Error</source> + <translation>خطا</translation> + </message> + <message> + <source>%1 +File not found. +Check path and filename.</source> + <translation>%1 +پرونده پیدا نشد +مسیر و نام پرونده را بررسی کنید.</translation> + </message> + <message> + <source>All Files (*.*)</source> + <translation>تمام پروندهها (*.*)</translation> + </message> + <message> + <source>Open </source> + <translation>بازکردن</translation> + </message> + <message> + <source>Select a Directory</source> + <translation>انتخاب یک پوشه</translation> + </message> +</context> +<context> + <name>Q3LocalFs</name> + <message> + <source>Could not read directory +%1</source> + <translation>نمیتوان پوشه +%1 +را خواند</translation> + </message> + <message> + <source>Could not create directory +%1</source> + <translation>نمیتوان پوشه +%1 +را ایجاد کرد</translation> + </message> + <message> + <source>Could not remove file or directory +%1</source> + <translation>نمیتوان پوشه یا پرونده +%1 +را پاک کرد</translation> + </message> + <message> + <source>Could not rename +%1 +to +%2</source> + <translation>نمیتوان + %1 +را به +%2 +تغییر نام داد</translation> + </message> + <message> + <source>Could not open +%1</source> + <translation>نمیتوان باز کرد +%1</translation> + </message> + <message> + <source>Could not write +%1</source> + <translation>نمیتوان در +%1 +نوشت</translation> + </message> +</context> +<context> + <name>Q3MainWindow</name> + <message> + <source>Line up</source> + <translation>به خط شدن</translation> + </message> + <message> + <source>Customize...</source> + <translation>سفارشی کردن...</translation> + </message> +</context> +<context> + <name>Q3NetworkProtocol</name> + <message> + <source>Operation stopped by the user</source> + <translation>عملیات توسط کاربر متوقف شد</translation> + </message> +</context> +<context> + <name>Q3ProgressDialog</name> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> +</context> +<context> + <name>Q3TabDialog</name> + <message> + <source>OK</source> + <translation>تأیید</translation> + </message> + <message> + <source>Apply</source> + <translation>اعمال.کردن</translation> + </message> + <message> + <source>Help</source> + <translation>کمک</translation> + </message> + <message> + <source>Defaults</source> + <translation>پیشفرضها</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> +</context> +<context> + <name>Q3TextEdit</name> + <message> + <source>&Undo</source> + <translation>&خنثیسازی</translation> + </message> + <message> + <source>&Redo</source> + <translation>&بازانجام</translation> + </message> + <message> + <source>Cu&t</source> + <translation>&برش</translation> + </message> + <message> + <source>&Copy</source> + <translation>&کپی</translation> + </message> + <message> + <source>&Paste</source> + <translation>&چسباندن</translation> + </message> + <message> + <source>Clear</source> + <translation>پاک کردن</translation> + </message> + <message> + <source>Select All</source> + <translation>انتخاب همه</translation> + </message> +</context> +<context> + <name>Q3TitleBar</name> + <message> + <source>System</source> + <translation>سیستم</translation> + </message> + <message> + <source>Restore up</source> + <translation>بازیابی به بالا</translation> + </message> + <message> + <source>Minimize</source> + <translation>کوچک کردن</translation> + </message> + <message> + <source>Restore down</source> + <translation>بازیابی به پایین</translation> + </message> + <message> + <source>Maximize</source> + <translation>بزرگ کردن</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Contains commands to manipulate the window</source> + <translation>حاوی دستوراتی برای دستکاری پنجره است</translation> + </message> + <message> + <source>Puts a minimized window back to normal</source> + <translation>پنجره کوچک شده را به اندازه عادی برمیگرداند</translation> + </message> + <message> + <source>Moves the window out of the way</source> + <translation>پنجره را به خارج از مسیر میبرد</translation> + </message> + <message> + <source>Puts a maximized window back to normal</source> + <translation>پنجرهٔ بزرگ شده را به اندازه عادی برمیگرداند</translation> + </message> + <message> + <source>Makes the window full screen</source> + <translation>پنجره را تمام صفحه میکند</translation> + </message> + <message> + <source>Closes the window</source> + <translation>پنجره را میبندد</translation> + </message> + <message> + <source>Displays the name of the window and contains controls to manipulate it</source> + <translation>نام پنجره را نمایش میدهد و حاوی کنترلهایی برای دستکاری آن است</translation> + </message> +</context> +<context> + <name>Q3ToolBar</name> + <message> + <source>More...</source> + <translation>بیشتر...</translation> + </message> +</context> +<context> + <name>Q3UrlOperator</name> + <message> + <source>The protocol `%1' is not supported</source> + <translation>پروتکل «%1» پشتیبانی نشده است</translation> + </message> + <message> + <source>The protocol `%1' does not support listing directories</source> + <translation>پروتکل «%1» سیاههبرداری پوشهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support creating new directories</source> + <translation>پروتکل «%1» ایجاد کردن پوشههای جدید را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support removing files or directories</source> + <translation>پروتکل «%1» پاک کردن پروندهها یا پوشهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support renaming files or directories</source> + <translation>پروتکل «%1» تغییر نام پروندهها یا پوشهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support getting files</source> + <translation>پروتکل «%1» گرفتن پروندهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support putting files</source> + <translation>پروتکل «%1» ثبت کردن پروندهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>The protocol `%1' does not support copying or moving files or directories</source> + <translation>پروتکل «%1» کپی یا انتقال پروندهها یا پوشهها را پشتیبانی نمیکند</translation> + </message> + <message> + <source>(unknown)</source> + <translation>(ناشناخته)</translation> + </message> +</context> +<context> + <name>Q3Wizard</name> + <message> + <source>&Cancel</source> + <translation>&لغو</translation> + </message> + <message> + <source>< &Back</source> + <translation>< &عقب</translation> + </message> + <message> + <source>&Next ></source> + <translation>بع&دی ></translation> + </message> + <message> + <source>&Finish</source> + <translation>پایا&ن</translation> + </message> + <message> + <source>&Help</source> + <translation>&کمک</translation> + </message> +</context> +<context> + <name>QAbstractSocket</name> + <message> + <source>Socket operation timed out</source> + <translation>پایان زمان عملیات سوکت</translation> + </message> + <message> + <source>Operation on socket is not supported</source> + <translation>عملیات روی سوکت پشتیبانی نمیشود</translation> + </message> + <message> + <source>Host not found</source> + <translation>میزبان یافت نشد</translation> + </message> + <message> + <source>Connection refused</source> + <translation>اتصال پذیرفته نشد</translation> + </message> + <message> + <source>Connection timed out</source> + <translation>پایان زمان اتصال</translation> + </message> + <message> + <source>Socket is not connected</source> + <translation>سوکت متصل نیست</translation> + </message> + <message> + <source>Network unreachable</source> + <translation>شبکه در دسترس نیست</translation> + </message> +</context> +<context> + <name>QAbstractSpinBox</name> + <message> + <source>&Select All</source> + <translation>انتخاب &همه</translation> + </message> + <message> + <source>&Step up</source> + <translation>&افزایش</translation> + </message> + <message> + <source>Step &down</source> + <translation>&کاهش</translation> + </message> +</context> +<context> + <name>QAccessibleButton</name> + <message> + <source>Press</source> + <translation>فشار دادن</translation> + </message> +</context> +<context> + <name>QApplication</name> + <message> + <source>Activate</source> + <translation>فعالسازی</translation> + </message> + <message> + <source>Activates the program's main window</source> + <translation>پنجره اصلی برنامه را فعال میکند</translation> + </message> + <message> + <source>Executable '%1' requires Qt %2, found Qt %3.</source> + <translation>برنامهٔ «%1»نیازمند کیوت %2 است، کیوت %3 یافت شد.</translation> + </message> + <message> + <source>Incompatible Qt Library Error</source> + <translation>خطای کتابخانه ناسازگار کیوت</translation> + </message> + <message> + <source>QT_LAYOUT_DIRECTION</source> + <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment> + <translation>RTL</translation> + </message> +</context> +<context> + <name>QAxSelect</name> + <message> + <source>Select ActiveX Control</source> + <translation>انتخاب کنترل ActiveX</translation> + </message> + <message> + <source>OK</source> + <translation>تأیید</translation> + </message> + <message> + <source>&Cancel</source> + <translation>&لغو</translation> + </message> + <message> + <source>COM &Object:</source> + <translation>شیء &COM:</translation> + </message> +</context> +<context> + <name>QCheckBox</name> + <message> + <source>Uncheck</source> + <translation>عدم انتخاب</translation> + </message> + <message> + <source>Check</source> + <translation>انتخاب</translation> + </message> + <message> + <source>Toggle</source> + <translation>ضامن</translation> + </message> +</context> +<context> + <name>QColorDialog</name> + <message> + <source>Hu&e:</source> + <translation>&شدت:</translation> + </message> + <message> + <source>&Sat:</source> + <translation>اشبا&ع:</translation> + </message> + <message> + <source>&Val:</source> + <translation>م&قدار:</translation> + </message> + <message> + <source>&Red:</source> + <translation>&قرمز:</translation> + </message> + <message> + <source>&Green:</source> + <translation>&سبز:</translation> + </message> + <message> + <source>Bl&ue:</source> + <translation>&آبی:</translation> + </message> + <message> + <source>A&lpha channel:</source> + <translation>&کانال آلفا:</translation> + </message> + <message> + <source>Select Color</source> + <translation>انتخاب رنگ</translation> + </message> + <message> + <source>&Basic colors</source> + <translation>رن&گهای پایه</translation> + </message> + <message> + <source>&Custom colors</source> + <translation>رنگهای &سفارشی</translation> + </message> + <message> + <source>&Add to Custom Colors</source> + <translation>&افزودن به رنگهای سفارشی</translation> + </message> +</context> +<context> + <name>QComboBox</name> + <message> + <source>False</source> + <translation>نادرست</translation> + </message> + <message> + <source>True</source> + <translation>درست</translation> + </message> + <message> + <source>Open</source> + <translation>باز کردن</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> +</context> +<context> + <name>QCoreApplication</name> + <message> + <source>%1: already exists</source> + <comment>QSystemSemaphore</comment> + <translation>%1: از قبل وجود دارد</translation> + </message> + <message> + <source>%1: does not exist</source> + <comment>QSystemSemaphore</comment> + <translation>%1: وجود ندارد</translation> + </message> + <message> + <source>%1: out of resources</source> + <comment>QSystemSemaphore</comment> + <translation>%1: خارج از منابع</translation> + </message> + <message> + <source>%1: permission denied</source> + <comment>QSystemSemaphore</comment> + <translation>%1:اجازه رد شد</translation> + </message> + <message> + <source>%1: unknown error %2</source> + <comment>QSystemSemaphore</comment> + <translation>%1: خطای ناشناخته %2</translation> + </message> + <message> + <source>%1: key is empty</source> + <comment>QSystemSemaphore</comment> + <translation>%1: کلید تهی است</translation> + </message> + <message> + <source>%1: unable to make key</source> + <comment>QSystemSemaphore</comment> + <translation>%1: نمیتوان کلید ایجاد کرد</translation> + </message> + <message> + <source>%1: ftok failed</source> + <comment>QSystemSemaphore</comment> + <translation>%1: عدم موفقیت ftok</translation> + </message> +</context> +<context> + <name>QDB2Driver</name> + <message> + <source>Unable to connect</source> + <translation>نمیتوان اتصال برقرار کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> + <message> + <source>Unable to set autocommit</source> + <translation>نمیتوان ارسال خودکار را برقرار کرد</translation> + </message> +</context> +<context> + <name>QDB2Result</name> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> + <message> + <source>Unable to prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> + <message> + <source>Unable to bind variable</source> + <translation>نمیتوان متغیر را مقید کرد</translation> + </message> + <message> + <source>Unable to fetch record %1</source> + <translation>نمیتوان رکورد %1 را واکشی کرد</translation> + </message> + <message> + <source>Unable to fetch next</source> + <translation>نمیتوان رکورد بعدی را واکشی کرد</translation> + </message> + <message> + <source>Unable to fetch first</source> + <translation>نمیتوان اولین رکورد را واکشی کرد</translation> + </message> +</context> +<context> + <name>QDateTimeEdit</name> + <message> + <source>AM</source> + <translation>قظ</translation> + </message> + <message> + <source>am</source> + <translation>قظ</translation> + </message> + <message> + <source>PM</source> + <translation>بظ</translation> + </message> + <message> + <source>pm</source> + <translation>بظ</translation> + </message> +</context> +<context> + <name>QDeclarativeAbstractAnimation</name> + <message> + <source>Cannot animate non-existent property "%1"</source> + <translation>نمیتوان ویژگی ناموجود %1 را متحرک سازی کرد</translation> + </message> + <message> + <source>Cannot animate read-only property "%1"</source> + <translation>نمیتوان ویژگی فقط خواندنی %1 را متحرک کرد</translation> + </message> + <message> + <source>Animation is an abstract class</source> + <translation>Animation یک کلاس انتزاعی است</translation> + </message> +</context> +<context> + <name>QDeclarativeAnchorAnimation</name> + <message> + <source>Cannot set a duration of < 0</source> + <translation>نمیتوان مدت زمانی کمتر از صفر را قرار داد</translation> + </message> +</context> +<context> + <name>QDeclarativeAnchors</name> + <message> + <source>Possible anchor loop detected on fill.</source> + <translation>حلقهٔ احتمالی تکیهگاه در «پر» تشخیص داده شد.</translation> + </message> + <message> + <source>Possible anchor loop detected on centerIn.</source> + <translation>حلقهٔ احتمالی تکیهگاه در «مرکز-داخل» تشخیص داده شد.</translation> + </message> + <message> + <source>Cannot anchor to an item that isn't a parent or sibling.</source> + <translation>نمیتوان به آیتمی که والد یا هم نوع نیست لنگر انداخت.</translation> + </message> + <message> + <source>Possible anchor loop detected on vertical anchor.</source> + <translation>گره ممکنهٔ محکم کردن روی حالت عمودی گرفته شد.</translation> + </message> + <message> + <source>Possible anchor loop detected on horizontal anchor.</source> + <translation>حلقهٔ احتمالی تکیهگاه در تکیهگاه «افقی» تشخیص داده شد.</translation> + </message> + <message> + <source>Cannot specify left, right, and hcenter anchors.</source> + <translation>نمیتوان تکیه گاه چپ ، راست و افقی-مرکزی معین کرد.</translation> + </message> + <message> + <source>Cannot anchor to a null item.</source> + <translation>نمیتوان به یک آیتم تهی لنگر انداخت.</translation> + </message> + <message> + <source>Cannot anchor a horizontal edge to a vertical edge.</source> + <translation>نمیتوان یک یال افقی را به یک یال عمودی تکیه داد.</translation> + </message> + <message> + <source>Cannot anchor item to self.</source> + <translation>نمیتوان یک آیتم را به خودش تکیه داد.</translation> + </message> + <message> + <source>Cannot specify top, bottom, and vcenter anchors.</source> + <translation>نمیتوان تکیهگاه بالا، کف و عمودی-مرکزی معین کرد.</translation> + </message> + <message> + <source>Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.</source> + <translation>تکیهگاه خط مبنا نمیتواند در اتصالات بالا ، کف و عمودی-مرکزی استفاده شود.</translation> + </message> + <message> + <source>Cannot anchor a vertical edge to a horizontal edge.</source> + <translation>نمیتوان یک یال عمودی را به یک یال افقی تکیه داد.</translation> + </message> +</context> +<context> + <name>QDeclarativeAnimatedImage</name> + <message> + <source>Qt was built without support for QMovie</source> + <translation>Qt بدون پشتیبانی از QMovie ساخته شده است</translation> + </message> +</context> +<context> + <name>QDeclarativeApplication</name> + <message> + <source>Application is an abstract class</source> + <translation>Application یک کلاس مجرد است</translation> + </message> +</context> +<context> + <name>QDeclarativeBehavior</name> + <message> + <source>Cannot change the animation assigned to a Behavior.</source> + <translation>نمیتوان انیمیشنی را که به رفتار اختصاص یافته تغییر داد.</translation> + </message> +</context> +<context> + <name>QDeclarativeBinding</name> + <message> + <source>Binding loop detected for property "%1"</source> + <translation>حلقهٔ مقیدسازی برای ویژگی «%1» تشخیص داده شد</translation> + </message> +</context> +<context> + <name>QDeclarativeCompiledBindings</name> + <message> + <source>Binding loop detected for property "%1"</source> + <translation>حلقهٔ مقیدسازی برای ویژگی "%1" تشخیص داده شد</translation> + </message> +</context> +<context> + <name>QDeclarativeCompiler</name> + <message> + <source>Invalid property assignment: "%1" is a read-only property</source> + <translation>تخصیص نامعتبر ویژگی: «%1» ویژگی فقط خواندنی است</translation> + </message> + <message> + <source>Invalid property assignment: unknown enumeration</source> + <translation>تخصیص نامعتبر ویژگی: شمارش ناشناخته</translation> + </message> + <message> + <source>Invalid property assignment: string expected</source> + <translation>تخصیص نامعتبر ویژگی: رشته مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: url expected</source> + <translation>تخصیص نامعتبر ویژگی: url مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: unsigned int expected</source> + <translation>تخصیص نامعتبر ویژگی: نوع unsigned int مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: int expected</source> + <translation>تخصیص نامعتبر ویژگی: نوع int مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: number expected</source> + <translation>تخصیص نامعتبر ویژگی: number مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: color expected</source> + <translation>تخصیص نامعتبر ویژگی: color مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: date expected</source> + <translation>تخصیص نامعتبر ویژگی: date مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: time expected</source> + <translation>تخصیص نامعتبر ویژگی: نوع time مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: datetime expected</source> + <translation>تخصیص نامعتبر ویژگی: نوع datetime مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: point expected</source> + <translation>تخصیص نامعتبر ویژگی: point مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: size expected</source> + <translation>تخصیص نامعتبر ویژگی: size مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: rect expected</source> + <translation>تخصیص نامعتبر ویژگی: rect مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: boolean expected</source> + <translation>تخصیص نامعتبر ویژگی: boolean مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: 3D vector expected</source> + <translation>تخصیص نامعتبر ویژگی: 3D vector مورد انتظار است</translation> + </message> + <message> + <source>Invalid property assignment: unsupported type "%1"</source> + <translation>تخصیص نامعتبر ویژگی: نوع پشتیبانی نشده «%1»</translation> + </message> + <message> + <source>Element is not creatable.</source> + <translation>عنصر قابل ایجاد نیست.</translation> + </message> + <message> + <source>Component elements may not contain properties other than id</source> + <translation>عناصر کامپوننت نمیتوانند دربردارنده ویژگیهایی به غیر از شناسه باشند</translation> + </message> + <message> + <source>Invalid component id specification</source> + <translation>مشخصه نامعتبر شناسه کامپوننت</translation> + </message> + <message> + <source>id is not unique</source> + <translation>شناسه یکتا نیست</translation> + </message> + <message> + <source>Invalid component body specification</source> + <translation>مشخصه نامعتبر بدنه کامپوننت</translation> + </message> + <message> + <source>Component objects cannot declare new properties.</source> + <translation>اشیاء کامپوننت نمیتوانند ویژگیهای جدید اعلان کنند.</translation> + </message> + <message> + <source>Component objects cannot declare new signals.</source> + <translation>اشیاء کامپوننت نمیتوانند سیگنالهای جدید اعلان کنند.</translation> + </message> + <message> + <source>Component objects cannot declare new functions.</source> + <translation>اشیاء کامپوننت نمیتوانند توابع جدید تعریف کند.</translation> + </message> + <message> + <source>Cannot create empty component specification</source> + <translation>نمیتوان مشخصه خالی کامپوننت ایجاد کرد</translation> + </message> + <message> + <source>"%1.%2" is not available in %3 %4.%5.</source> + <translation>«%1.%2» در %3 %4.%5 موجود نمیباشد.</translation> + </message> + <message> + <source>"%1.%2" is not available due to component versioning.</source> + <translation>«%1.%2» با توجه به نسخه کامپوننت در دسترس نیست.</translation> + </message> + <message> + <source>Incorrectly specified signal assignment</source> + <translation>تعیین نادرست تخصیص سیگنال</translation> + </message> + <message> + <source>Cannot assign a value to a signal (expecting a script to be run)</source> + <translation>نمیتوان یک مقدار را به یک سیگنال اختصاص داد (یک اسکریپت برای اجرا مورد نیاز است)</translation> + </message> + <message> + <source>Empty signal assignment</source> + <translation>تخصیص خالی سیگنال</translation> + </message> + <message> + <source>Empty property assignment</source> + <translation>تخصیص خالی ویژگی</translation> + </message> + <message> + <source>Attached properties cannot be used here</source> + <translation>ویژگیهای اتصال داده شده نمیتوانند اینجا استفاده شوند</translation> + </message> + <message> + <source>Non-existent attached object</source> + <translation>شیء اتصال داده شده ناموجود</translation> + </message> + <message> + <source>Invalid attached object assignment</source> + <translation>تخصیص نامعتبر شیء اتصال داده شده</translation> + </message> + <message> + <source>Cannot assign to non-existent default property</source> + <translation>نمیتوان به ویژگی پیشفرض ناموجود تخصیص داد</translation> + </message> + <message> + <source>Cannot assign to non-existent property "%1"</source> + <translation>نمیتوان ویژگی «%1» را به چیزی که وجود ندارد تخصیص داد</translation> + </message> + <message> + <source>Invalid use of namespace</source> + <translation>استفادهٔ نامعتبر از فضای نامی</translation> + </message> + <message> + <source>Not an attached property name</source> + <translation>نام یک ویژگی وابسته نیست</translation> + </message> + <message> + <source>Invalid use of id property</source> + <translation>استفاده نامعتبر از ویژگی شناسه</translation> + </message> + <message> + <source>Property has already been assigned a value</source> + <translation>از قبل به ویژگی یک مقدار اختصاص یافته است</translation> + </message> + <message> + <source>Invalid grouped property access</source> + <translation>دسترسی نامعتبر به ویژگی گروهی</translation> + </message> + <message> + <source>Cannot assign a value directly to a grouped property</source> + <translation>نمیتوان یک مقدار را به طور مستقیم به یک ویژگی گروهی اختصاص داد</translation> + </message> + <message> + <source>Invalid property use</source> + <translation>استفاده نامعتبر از ویژگی</translation> + </message> + <message> + <source>Property assignment expected</source> + <translation>اختصاص ویژگی مورد انتظار است</translation> + </message> + <message> + <source>Single property assignment expected</source> + <translation>اختصاص ویژگی تکی مورد انتظار است</translation> + </message> + <message> + <source>Unexpected object assignment</source> + <translation>اختصاص غیر منتظره شیء</translation> + </message> + <message> + <source>Cannot assign object to list</source> + <translation>نمیتوان به لیست شیء اختصاص داد</translation> + </message> + <message> + <source>Can only assign one binding to lists</source> + <translation>فقط یک قید را میتوان به شیء اختصاص داد</translation> + </message> + <message> + <source>Cannot assign primitives to lists</source> + <translation>نمیتوان انواع اولیه را به لیست اختصاص داد</translation> + </message> + <message> + <source>Cannot assign multiple values to a script property</source> + <translation>نمیتوان مقادیر مضاعف را به یک ویژگی اسکریپت اختصاص داد</translation> + </message> + <message> + <source>Invalid property assignment: script expected</source> + <translation>اختصاص نامعتبر ویژگی: اسکریپت مورد انتظار است</translation> + </message> + <message> + <source>Cannot assign multiple values to a singular property</source> + <translation>نمیتوان مقادیر چندگانه را به ویژگی یگانه نسبت داد</translation> + </message> + <message> + <source>Cannot assign object to property</source> + <translation>نمیتوان شیء به یک ویژگی اختصاص داد</translation> + </message> + <message> + <source>"%1" cannot operate on "%2"</source> + <translation>«%1» نمیتواند روی «%2» عمل کند</translation> + </message> + <message> + <source>Duplicate default property</source> + <translation>ویژگی پیشفرض تکراری</translation> + </message> + <message> + <source>Duplicate property name</source> + <translation>اسم ویژگی مضاعف</translation> + </message> + <message> + <source>Property names cannot begin with an upper case letter</source> + <translation>اسامی ویژگی نمیتوانند با حروف الفبای بزرگ شروع شوند</translation> + </message> + <message> + <source>Illegal property name</source> + <translation>نام غیرمجاز ویژگی</translation> + </message> + <message> + <source>Duplicate signal name</source> + <translation>نام تکی چندگانه</translation> + </message> + <message> + <source>Signal names cannot begin with an upper case letter</source> + <translation>اسامی سیگنالها نمیتوانند با حروف الفبای بزرگ شروع شوند</translation> + </message> + <message> + <source>Illegal signal name</source> + <translation>نام غیرمجاز سیگنال</translation> + </message> + <message> + <source>Duplicate method name</source> + <translation>نام تکراری متد</translation> + </message> + <message> + <source>Method names cannot begin with an upper case letter</source> + <translation>اسامی متدها نمیتوانند با حروف الفبای بزرگ شروع شوند</translation> + </message> + <message> + <source>Illegal method name</source> + <translation>نام غیرمجاز متد</translation> + </message> + <message> + <source>Property value set multiple times</source> + <translation>مقدار ویژگی چند بار تعیین شد</translation> + </message> + <message> + <source>Invalid property nesting</source> + <translation>تودرتویی غیر مجاز ویژگی</translation> + </message> + <message> + <source>Cannot override FINAL property</source> + <translation>نمیتوان ویژگی FINAL را لغو کرد</translation> + </message> + <message> + <source>Invalid property type</source> + <translation>نوع نامعتبر ویژگی</translation> + </message> + <message> + <source>Invalid empty ID</source> + <translation>شناسه خالی نامعتبر</translation> + </message> + <message> + <source>IDs cannot start with an uppercase letter</source> + <translation>شناسهها نمیتوانند با حروف الفبای بزرگ شروع شوند</translation> + </message> + <message> + <source>IDs must start with a letter or underscore</source> + <translation>شناسهها باید با یک حرف یا خط زیرین شروع شوند</translation> + </message> + <message> + <source>IDs must contain only letters, numbers, and underscores</source> + <translation>شناسهها فقط میتوانند شامل حرف ، عدد و خط زیرین باشند</translation> + </message> + <message> + <source>ID illegally masks global JavaScript property</source> + <translation>شناسه به طور غیرمجاز ویژگی JavaScript را پوشش میدهد</translation> + </message> + <message> + <source>No property alias location</source> + <translation>مکان نام مستعار ویژگی وجود ندارد</translation> + </message> + <message> + <source>Invalid alias location</source> + <translation>مکان نامعتبر نام مستعار</translation> + </message> + <message> + <source>Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property></source> + <translation>ارجاع نامعتبر اسم مستعار.یک ارجاع نام مستعار باید به شکل <شناسه>, <شناسه>.<ویژگی> یا <id>.<مقدار ویژگی>.<ویژگی> مشخص شود</translation> + </message> + <message> + <source>Invalid alias reference. Unable to find id "%1"</source> + <translation>مرجع نامعتبر نام مستعار. ناتوان در یافتن شناسه «%1»</translation> + </message> + <message> + <source>Alias property exceeds alias bounds</source> + <translation>ویژگی نام مستعار از حدود مجاز تجاوز میکند</translation> + </message> +</context> +<context> + <name>QDeclarativeComponent</name> + <message> + <source>Invalid empty URL</source> + <translation>URL خالی نامعتبر</translation> + </message> + <message> + <source>createObject: value is not an object</source> + <translation>createObject: مقدار یک شیء نیست</translation> + </message> +</context> +<context> + <name>QDeclarativeConnections</name> + <message> + <source>Cannot assign to non-existent property "%1"</source> + <translation>نمیتوان به ویژگی ناموجود «%1» نسبت داد</translation> + </message> + <message> + <source>Connections: nested objects not allowed</source> + <translation>اتصالات: اشیاء تودرتو مجاز نیستند</translation> + </message> + <message> + <source>Connections: syntax error</source> + <translation>اتصالات: خطای نحوی</translation> + </message> + <message> + <source>Connections: script expected</source> + <translation>اتصالات: اسکریپت مورد انتظار است</translation> + </message> +</context> +<context> + <name>QDeclarativeEngine</name> + <message> + <source>executeSql called outside transaction()</source> + <translation>executeSql خارج از transaction() صدا زده شده است</translation> + </message> + <message> + <source>Read-only Transaction</source> + <translation>تراکنش فقط خواندنی</translation> + </message> + <message> + <source>Version mismatch: expected %1, found %2</source> + <translation>عدم تطابق نسخه: مورد انتظار: %1؛ پیدا شده: %2</translation> + </message> + <message> + <source>SQL transaction failed</source> + <translation>تراکنش ناموفق SQL</translation> + </message> + <message> + <source>transaction: missing callback</source> + <translation>تراکنش: callback یافت نشد</translation> + </message> + <message> + <source>SQL: database version mismatch</source> + <translation>SQL: عدم تطابق نسخه پایگاه داده</translation> + </message> +</context> +<context> + <name>QDeclarativeFlipable</name> + <message> + <source>front is a write-once property</source> + <translation>front یک ویژگی یک بار نوشتنی است</translation> + </message> + <message> + <source>back is a write-once property</source> + <translation>back یک ویژگی یک بار نوشتنی است</translation> + </message> +</context> +<context> + <name>QDeclarativeImportDatabase</name> + <message> + <source>cannot load module "%1": File name case mismatch for "%2"</source> + <translation>نمیتوان ماژول «%1» را بارگذاری کرد: مورد نام پرونده با «%2» تطابق ندارد</translation> + </message> + <message> + <source>module "%1" definition "%2" not readable</source> + <translation>تعریف «%2» ماژول «%1» قابل خواندن نیست</translation> + </message> + <message> + <source>plugin cannot be loaded for module "%1": %2</source> + <translation>افزونه نمیتواند برای ماژول «%1» بارگذاری شود: %2</translation> + </message> + <message> + <source>module "%1" plugin "%2" not found</source> + <translation>افزونه «%2» ماژول «%1» پیدا نشد</translation> + </message> + <message> + <source>module "%1" version %2.%3 is not installed</source> + <translation>ماژول «%1» نسخه %2 %3 نصب نشده است</translation> + </message> + <message> + <source>module "%1" is not installed</source> + <translation>ماژول «%1» نصب نشده است</translation> + </message> + <message> + <source>"%1": no such directory</source> + <translation>«%1»: چنین پوشهای وجود ندارد</translation> + </message> + <message> + <source>import "%1" has no qmldir and no namespace</source> + <translation>در «%1» هیچ qmldir و فضای نامی وجود ندارد</translation> + </message> + <message> + <source>- %1 is not a namespace</source> + <translation>- %1 یک فضاینام نیست</translation> + </message> + <message> + <source>- nested namespaces not allowed</source> + <translation>- فضای نام تودرتو مجاز نیست</translation> + </message> + <message> + <source>local directory</source> + <translation>پوشه محلی</translation> + </message> + <message> + <source>is ambiguous. Found in %1 and in %2</source> + <translation>مبهم است. در %1 و %2 پیدا شد</translation> + </message> + <message> + <source>is ambiguous. Found in %1 in version %2.%3 and %4.%5</source> + <translation>مبهم است. در %1 در نسخه %2 %3 و %4 %5 پیدا شد</translation> + </message> + <message> + <source>is instantiated recursively</source> + <translation>به صورت بازگشتی معرفی شده است</translation> + </message> + <message> + <source>is not a type</source> + <translation>یک نوع نیست</translation> + </message> + <message> + <source>File name case mismatch for "%2"</source> + <translation>عدم تطابق حالت نام پرونده با «%2»</translation> + </message> +</context> +<context> + <name>QDeclarativeKeyNavigationAttached</name> + <message> + <source>KeyNavigation is only available via attached properties</source> + <translation>KeyNavigation فقط از طریق ویژگیهای ضمیمه شده موجود است</translation> + </message> +</context> +<context> + <name>QDeclarativeKeysAttached</name> + <message> + <source>Keys is only available via attached properties</source> + <translation>کلیدها فقط از طریق ویژگیهای وابسته در دسترس هستند</translation> + </message> +</context> +<context> + <name>QDeclarativeLayoutMirroringAttached</name> + <message> + <source>LayoutDirection attached property only works with Items</source> + <translation>ویژگی ضمیمهشده LayoutDirection تنها با Item ها کار میکند</translation> + </message> + <message> + <source>LayoutMirroring is only available via attached properties</source> + <translation>LayoutMirroring تنها بههمراه ویژگیهای ضمیمهشده موجود است</translation> + </message> +</context> +<context> + <name>QDeclarativeListModel</name> + <message> + <source>remove: index %1 out of range</source> + <translation>remove: شاخص %1 خارج از دامنه است</translation> + </message> + <message> + <source>insert: value is not an object</source> + <translation>insert: مقدار ، یک شی نیست</translation> + </message> + <message> + <source>insert: index %1 out of range</source> + <translation>insert: شاخص %1 خارج از دامنه است</translation> + </message> + <message> + <source>move: out of range</source> + <translation>move: خارج از دامنه</translation> + </message> + <message> + <source>append: value is not an object</source> + <translation>append: مقدار ، یک شی نیست</translation> + </message> + <message> + <source>set: value is not an object</source> + <translation>set: مقدار ، یک شی نیست</translation> + </message> + <message> + <source>set: index %1 out of range</source> + <translation>set: شاخص %1 خارج از دامنه است</translation> + </message> + <message> + <source>ListElement: cannot contain nested elements</source> + <translation>ListElement: نمیتواند دربردارنده عناصر تودرتو باشد</translation> + </message> + <message> + <source>ListElement: cannot use reserved "id" property</source> + <translation>ListElement: نمیتواند از ویژگی رزرو شده «id» استفاده کند</translation> + </message> + <message> + <source>ListElement: cannot use script for property value</source> + <translation>ListElement: نمیتوان از اسکریپت برای ویژگی مقدار استفاده کرد</translation> + </message> + <message> + <source>ListModel: undefined property '%1'</source> + <translation>ListElement: ویژگی «%1» تعریف نشده است</translation> + </message> +</context> +<context> + <name>QDeclarativeLoader</name> + <message> + <source>Loader does not support loading non-visual elements.</source> + <translation>بارکننده بار کردن عناصر غیربصری را پشتیبانی نمیکند.</translation> + </message> +</context> +<context> + <name>QDeclarativeParentAnimation</name> + <message> + <source>Unable to preserve appearance under complex transform</source> + <translation>نمیتوان ظاهر را تحت تبدیل پیچیده حفظ کرد</translation> + </message> + <message> + <source>Unable to preserve appearance under non-uniform scale</source> + <translation>نمیتوان ظاهر را تحت مقیاس غیر یکنواخت حفظ کرد</translation> + </message> + <message> + <source>Unable to preserve appearance under scale of 0</source> + <translation>نمیتوان ظاهر را تحت مقیاس صفر حفظ کرد</translation> + </message> +</context> +<context> + <name>QDeclarativeParentChange</name> + <message> + <source>Unable to preserve appearance under complex transform</source> + <translation>نمیتوان ظاهر را تحت تبدیل پیچیده حفظ کرد</translation> + </message> + <message> + <source>Unable to preserve appearance under non-uniform scale</source> + <translation>نمیتوان ظاهر را تحت مقیاس غیر یکنواخت حفظ کرد</translation> + </message> + <message> + <source>Unable to preserve appearance under scale of 0</source> + <translation>نمیتوان ظاهر را تحت مقیاس صفر حفظ کرد</translation> + </message> +</context> +<context> + <name>QDeclarativeParser</name> + <message> + <source>Illegal unicode escape sequence</source> + <translation>دنباله فرار یونیکد غیرمجاز</translation> + </message> + <message> + <source>Illegal character</source> + <translation>نویسه غیرمجاز</translation> + </message> + <message> + <source>Unclosed string at end of line</source> + <translation>رشته بسته نشده در انتهای خط</translation> + </message> + <message> + <source>Illegal escape sequence</source> + <translation>دنباله فرار غیر مجاز</translation> + </message> + <message> + <source>Unclosed comment at end of file</source> + <translation>توضیح بسته نشده در انتهای خط</translation> + </message> + <message> + <source>Illegal syntax for exponential number</source> + <translation>ترکیب غیرمجاز برای اعداد نمایی</translation> + </message> + <message> + <source>Identifier cannot start with numeric literal</source> + <translation>شناسه نمیتواند با عدد شروع شود</translation> + </message> + <message> + <source>Unterminated regular expression literal</source> + <translation>عبارت منظم پایان نیافته</translation> + </message> + <message> + <source>Invalid regular expression flag '%0'</source> + <translation>پرچم غیر مجاز عبارت منظم «%0»</translation> + </message> + <message> + <source>Unterminated regular expression backslash sequence</source> + <translation>دنباله backslash پایان نیافته عبارت منظم</translation> + </message> + <message> + <source>Unterminated regular expression class</source> + <translation>کلاس عبارت منظم پایان نیافته</translation> + </message> + <message> + <source>Syntax error</source> + <translation>خطای نحوی</translation> + </message> + <message> + <source>Unexpected token `%1'</source> + <translation>نشانه غیر منتظره «%1»</translation> + </message> + <message> + <source>Expected token `%1'</source> + <translation>نشانه مورد انتظار «%1»</translation> + </message> + <message> + <source>Property value set multiple times</source> + <translation>مقدار ویژگی چند بار تعیین شد</translation> + </message> + <message> + <source>Expected type name</source> + <translation>نام نوع مورد انتظار</translation> + </message> + <message> + <source>Invalid import qualifier ID</source> + <translation>شناسه نامعتبر توصیف کننده import</translation> + </message> + <message> + <source>Reserved name "Qt" cannot be used as an qualifier</source> + <translation>نام رزرو شده «Qt» نمیتواند به عنوان توصیفکننده مورد استفاده قرار گیرد</translation> + </message> + <message> + <source>Script import qualifiers must be unique.</source> + <translation>توصیفکننده وارد کردن اسکریپت باید یکتا باشد.</translation> + </message> + <message> + <source>Script import requires a qualifier</source> + <translation>وارد کردن اسکریپت یک توصیفکننده نیاز دارد</translation> + </message> + <message> + <source>Library import requires a version</source> + <translation>وارد کردن کتابخانه یک نسخه نیاز دارد</translation> + </message> + <message> + <source>Expected parameter type</source> + <translation>نوع پارامتر مورد انتظار</translation> + </message> + <message> + <source>Invalid property type modifier</source> + <translation>تغییردهنده غیرمجاز نوع ویژگی</translation> + </message> + <message> + <source>Unexpected property type modifier</source> + <translation>تغییردهنده غیرمنتظره نوع ویژگی</translation> + </message> + <message> + <source>Expected property type</source> + <translation>نوع ویژگی مورد انتظار</translation> + </message> + <message> + <source>Readonly not yet supported</source> + <translation>فقطخواندنی هنوز پشتیبانی نمیشود</translation> + </message> + <message> + <source>JavaScript declaration outside Script element</source> + <translation>اعلان JavaScript خارج از عنصر Script</translation> + </message> +</context> +<context> + <name>QDeclarativePauseAnimation</name> + <message> + <source>Cannot set a duration of < 0</source> + <translation>نمیتوان مدت زمان را کمتر از صفر قرار داد</translation> + </message> +</context> +<context> + <name>QDeclarativePixmap</name> + <message> + <source>Error decoding: %1: %2</source> + <translation>خطای رمزگشایی: %1: %2</translation> + </message> + <message> + <source>Failed to get image from provider: %1</source> + <translation>بازیابی ناموفق تصویر از سرویسدهنده: %1</translation> + </message> + <message> + <source>Cannot open: %1</source> + <translation>نمیتوان باز کرد: %1</translation> + </message> +</context> +<context> + <name>QDeclarativePropertyAnimation</name> + <message> + <source>Cannot set a duration of < 0</source> + <translation>نمیتوان مدت زمان را کمتر از صفر قرار داد</translation> + </message> +</context> +<context> + <name>QDeclarativePropertyChanges</name> + <message> + <source>PropertyChanges does not support creating state-specific objects.</source> + <translation>propertyChanges ایجاد اشیاء state-specific را پشتیبانی نمیکند.</translation> + </message> + <message> + <source>Cannot assign to non-existent property "%1"</source> + <translation>نمیتوان به ویژگی ناموجود «%1» اختصاص داد</translation> + </message> + <message> + <source>Cannot assign to read-only property "%1"</source> + <translation>نمیتوان به ویژگی فقط خواندنی «%1» اختصاص داد</translation> + </message> +</context> +<context> + <name>QDeclarativeTextInput</name> + <message> + <source>Could not load cursor delegate</source> + <translation>نمیتوان نماینده نشانگر را بارگذاری کرد</translation> + </message> + <message> + <source>Could not instantiate cursor delegate</source> + <translation>نمیتوان نماینده نشانگر را معرفی کرد</translation> + </message> +</context> +<context> + <name>QDeclarativeTypeLoader</name> + <message> + <source>Script %1 unavailable</source> + <translation>اسکریپت %1 در دسترس نیست</translation> + </message> + <message> + <source>Type %1 unavailable</source> + <translation>نوع %1 در دسترس نیست</translation> + </message> + <message> + <source>Namespace %1 cannot be used as a type</source> + <translation>فضای نام %1 نمیتواند به عنوان نوع استفاده شود</translation> + </message> + <message> + <source>%1 %2</source> + <translation>%1 %2</translation> + </message> +</context> +<context> + <name>QDeclarativeVME</name> + <message> + <source>Unable to create object of type %1</source> + <translation>نمیتوان شیء نوع %1 را ایجاد کرد</translation> + </message> + <message> + <source>Cannot assign value %1 to property %2</source> + <translation>نمیتوان مقدار %1 را به ویژگی %2 اختصاص داد</translation> + </message> + <message> + <source>Cannot assign object type %1 with no default method</source> + <translation>.نمیتوان شیء نوع %1 را بدون متد پیشفرض تعیین کرد</translation> + </message> + <message> + <source>Cannot connect mismatched signal/slot %1 %vs. %2</source> + <translation>نمیتوان سیگنال/اسلات نامناسب %1 / %2 را به هم متصل کرد</translation> + </message> + <message> + <source>Cannot assign an object to signal property %1</source> + <translation>نمیتوان یک شیء را به ویژگی سیگنال %1 اختصاص داد</translation> + </message> + <message> + <source>Cannot assign object to list</source> + <translation>نمیتوان شیء را به لیست اختصاص داد</translation> + </message> + <message> + <source>Cannot assign object to interface property</source> + <translation>نمیتوان شیء را به ویژگی interface اختصاص داد</translation> + </message> + <message> + <source>Unable to create attached object</source> + <translation>نمیتوان شیء وابسته ایجاد کرد</translation> + </message> + <message> + <source>Cannot set properties on %1 as it is null</source> + <translation>نمیتوان ویژگیها را روی %1 تنظیم کرد چون که تهی است</translation> + </message> +</context> +<context> + <name>QDeclarativeVisualDataModel</name> + <message> + <source>Delegate component must be Item type.</source> + <translation>جزء نماینده باید یک نوع آیتم باشد.</translation> + </message> +</context> +<context> + <name>QDeclarativeXmlListModel</name> + <message> + <source>Qt was built without support for xmlpatterns</source> + <translation>Qt بدون پشتیبانی از xmlpatterns ساخته شده است</translation> + </message> +</context> +<context> + <name>QDeclarativeXmlListModelRole</name> + <message> + <source>An XmlRole query must not start with '/'</source> + <translation>یک .پرسوجوی XmlRole نباید با «/» شروع شود</translation> + </message> +</context> +<context> + <name>QDeclarativeXmlRoleList</name> + <message> + <source>An XmlListModel query must start with '/' or "//"</source> + <translation>یک پرس و جوی XmlListModel باید با «/» یا «//» شروع شود</translation> + </message> +</context> +<context> + <name>QDial</name> + <message> + <source>QDial</source> + <translation>کلاس QDial</translation> + </message> + <message> + <source>SpeedoMeter</source> + <translation>سرعتسنج</translation> + </message> + <message> + <source>SliderHandle</source> + <translation>دستهلغزنده</translation> + </message> +</context> +<context> + <name>QDialog</name> + <message> + <source>Done</source> + <translation>انجام شد</translation> + </message> + <message> + <source>What's This?</source> + <translation>این چیست؟</translation> + </message> +</context> +<context> + <name>QDialogButtonBox</name> + <message> + <source>OK</source> + <translation>تأیید</translation> + </message> + <message> + <source>&OK</source> + <translation>&تأیید</translation> + </message> + <message> + <source>&Save</source> + <translation>&ذخیره</translation> + </message> + <message> + <source>Save</source> + <translation>ذخیره</translation> + </message> + <message> + <source>Open</source> + <translation>باز کردن</translation> + </message> + <message> + <source>&Cancel</source> + <translation>&لغو</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> + <message> + <source>&Close</source> + <translation>&بستن</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Apply</source> + <translation>اعمال کردن</translation> + </message> + <message> + <source>Reset</source> + <translation>بازتنظیم</translation> + </message> + <message> + <source>Help</source> + <translation>کمک</translation> + </message> + <message> + <source>Don't Save</source> + <translation>ذخیره نکن</translation> + </message> + <message> + <source>Close without Saving</source> + <translation>بستن بدون ذخیره</translation> + </message> + <message> + <source>Discard</source> + <translation>دورانداختن</translation> + </message> + <message> + <source>&Yes</source> + <translation>&بله</translation> + </message> + <message> + <source>Yes to &All</source> + <translation>&بله برای همه</translation> + </message> + <message> + <source>&No</source> + <translation>&نه</translation> + </message> + <message> + <source>N&o to All</source> + <translation>ن&ه برای همه</translation> + </message> + <message> + <source>Save All</source> + <translation>ذخیره همه</translation> + </message> + <message> + <source>Abort</source> + <translation>لغو کردن</translation> + </message> + <message> + <source>Retry</source> + <translation>تلاش دوباره</translation> + </message> + <message> + <source>Ignore</source> + <translation>نادیدهگرفتن</translation> + </message> + <message> + <source>Restore Defaults</source> + <translation>بازنشانی پیشفرضها</translation> + </message> +</context> +<context> + <name>QDirModel</name> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <source>Kind</source> + <comment>Match OS X Finder</comment> + <translation>نوع</translation> + </message> + <message> + <source>Type</source> + <comment>All other platforms</comment> + <translation>نوع</translation> + </message> + <message> + <source>Date Modified</source> + <translation>تاریخ تغییر</translation> + </message> +</context> +<context> + <name>QDockWidget</name> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Dock</source> + <translation>ثابت</translation> + </message> + <message> + <source>Float</source> + <translation>شناور</translation> + </message> +</context> +<context> + <name>QDoubleSpinBox</name> + <message> + <source>More</source> + <translation>بیشتر</translation> + </message> + <message> + <source>Less</source> + <translation>کمتر</translation> + </message> +</context> +<context> + <name>QErrorMessage</name> + <message> + <source>Debug Message:</source> + <translation>پیغام اشکالزدایی:</translation> + </message> + <message> + <source>Warning:</source> + <translation>هشدار:</translation> + </message> + <message> + <source>Fatal Error:</source> + <translation>خطای مهلک:</translation> + </message> + <message> + <source>&Show this message again</source> + <translation>این پیغام را &دوباره نمایش بده</translation> + </message> + <message> + <source>&OK</source> + <translation>&تأیید</translation> + </message> +</context> +<context> + <name>QFile</name> + <message> + <source>Destination file exists</source> + <translation>پرونده مقصد موجود است</translation> + </message> + <message> + <source>Will not rename sequential file using block copy</source> + <translation>پرونده ترتیبی با استفاده از کپی بلاکها تغییر نام داده نخواهد شد</translation> + </message> + <message> + <source>Cannot remove source file</source> + <translation>نمیتوان پرونده منبع را حذف کرد</translation> + </message> + <message> + <source>Cannot open %1 for input</source> + <translation>نمیتوان %1 را بهعنوان ورودی باز کرد</translation> + </message> + <message> + <source>Cannot open for output</source> + <translation>نمیتوان برای خروجی باز کرد</translation> + </message> + <message> + <source>Failure to write block</source> + <translation>نگارش ناموفق بلاک</translation> + </message> + <message> + <source>Cannot create %1 for output</source> + <translation>نمیتوان %1 را برای خروجی باز کرد</translation> + </message> +</context> +<context> + <name>QFileDialog</name> + <message> + <source>Look in:</source> + <translation>جستجو در:</translation> + </message> + <message> + <source>Back</source> + <translation>عقب</translation> + </message> + <message> + <source>Go back</source> + <translation>عقبگرد</translation> + </message> + <message> + <source>Forward</source> + <translation>جلوتر</translation> + </message> + <message> + <source>Go forward</source> + <translation>جلوگرد</translation> + </message> + <message> + <source>Parent Directory</source> + <translation>پوشه بالاتر</translation> + </message> + <message> + <source>Go to the parent directory</source> + <translation>برو به پوشه بالاتر</translation> + </message> + <message> + <source>Create New Folder</source> + <translation>ایجاد پوشه جدید</translation> + </message> + <message> + <source>Create a New Folder</source> + <translation>ایجاد یک پوشه جدید</translation> + </message> + <message> + <source>List View</source> + <translation>نمایش سیاهه</translation> + </message> + <message> + <source>Change to list view mode</source> + <translation>تغییر به حالت نمایش سیاهه</translation> + </message> + <message> + <source>Detail View</source> + <translation>نمایش با جزئیات</translation> + </message> + <message> + <source>Change to detail view mode</source> + <translation>تغییر به حالت نمایش با جزئیات</translation> + </message> + <message> + <source>Files of type:</source> + <translation>پروندههایی از نوع:</translation> + </message> + <message> + <source>Find Directory</source> + <translation>یافتن پوشه</translation> + </message> + <message> + <source>Open</source> + <translation>بازکردن</translation> + </message> + <message> + <source>Save As</source> + <translation>ذخیره به عنوان</translation> + </message> + <message> + <source>All Files (*)</source> + <translation>تمام پروندهها (*)</translation> + </message> + <message> + <source>Show </source> + <translation>نمایش</translation> + </message> + <message> + <source>&Rename</source> + <translation>&تغییر نام</translation> + </message> + <message> + <source>&Delete</source> + <translation>&حذف</translation> + </message> + <message> + <source>Show &hidden files</source> + <translation>نمایش پروندههای م&خفی</translation> + </message> + <message> + <source>&New Folder</source> + <translation>&پوشه جدید</translation> + </message> + <message> + <source>Directory:</source> + <translation>پوشه:</translation> + </message> + <message> + <source>File &name:</source> + <translation>&نام پرونده:</translation> + </message> + <message> + <source>&Open</source> + <translation>&بازکردن</translation> + </message> + <message> + <source>&Save</source> + <translation>&ذخیره</translation> + </message> + <message> + <source>Directories</source> + <translation>پوشهها</translation> + </message> + <message> + <source>&Choose</source> + <translation>&انتخاب</translation> + </message> + <message> + <source>%1 +Directory not found. +Please verify the correct directory name was given.</source> + <translation>%1 +پوشه یافت نشد +لطفا بررسی کنید که نام مسیر بهدرستی داده شده باشد.</translation> + </message> + <message> + <source>%1 already exists. +Do you want to replace it?</source> + <translation>%1 از قبل موجود است. +آیا مایل هستید جایگزین شود؟</translation> + </message> + <message> + <source>%1 +File not found. +Please verify the correct file name was given.</source> + <translation>%1 +پرونده یافت نشد. +لطفا درستی نام پرونده داده شده را بررسی کنید.</translation> + </message> + <message> + <source>New Folder</source> + <translation>پوشه جدید</translation> + </message> + <message> + <source>'%1' is write protected. +Do you want to delete it anyway?</source> + <translation>'%1' از حفاظت نوشتاری برخوردار است. +با این حال آیا مایل هستید حذف شود؟</translation> + </message> + <message> + <source>Are sure you want to delete '%1'?</source> + <translation>آیا مطمئن هستید میخواهید %1 را حذف کنید؟</translation> + </message> + <message> + <source>Could not delete directory.</source> + <translation>نمیتوان پوشه را حذف کرد.</translation> + </message> + <message> + <source>Recent Places</source> + <translation>مکانهای اخیر</translation> + </message> + <message> + <source>All Files (*.*)</source> + <translation>تمام پروندهها (*.*)</translation> + </message> + <message> + <source>Remove</source> + <translation>حذف</translation> + </message> + <message> + <source>My Computer</source> + <translation>رایانه من</translation> + </message> + <message> + <source>Drive</source> + <translation>درایو</translation> + </message> + <message> + <source>File</source> + <translation>پرونده</translation> + </message> + <message> + <source>File Folder</source> + <comment>Match Windows Explorer</comment> + <translation>پوشه پرونده</translation> + </message> + <message> + <source>Folder</source> + <comment>All other platforms</comment> + <translation>پوشه</translation> + </message> + <message> + <source>Alias</source> + <comment>Mac OS X Finder</comment> + <translation>نام مستعار</translation> + </message> + <message> + <source>Shortcut</source> + <comment>All other platforms</comment> + <translation>میانبر</translation> + </message> + <message> + <source>Unknown</source> + <translation>ناشناخته</translation> + </message> +</context> +<context> + <name>QFileSystemModel</name> + <message> + <source>%1 TB</source> + <translation>%1 ترابایت</translation> + </message> + <message> + <source>%1 GB</source> + <translation>%1 گیگابایت</translation> + </message> + <message> + <source>%1 MB</source> + <translation>%1 مگابایت</translation> + </message> + <message> + <source>%1 KB</source> + <translation>%1 کیلوبایت</translation> + </message> + <message> + <source>%1 bytes</source> + <translation>%1 بایت</translation> + </message> + <message> + <source>Invalid filename</source> + <translation>نام نامعتبر پرونده</translation> + </message> + <message> + <source><b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.</source> + <translation><b>نام "%1" نمیتواند مورد استفاده قرار گیرد.</b><p>نام دیگری با تعداد نویسههای کمتر یا نامی بدون علایم نگارشی را امتحان کنید.</translation> + </message> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Size</source> + <translation>حجم</translation> + </message> + <message> + <source>Kind</source> + <comment>Match OS X Finder</comment> + <translation>نوع</translation> + </message> + <message> + <source>Type</source> + <comment>All other platforms</comment> + <translation>نوع</translation> + </message> + <message> + <source>Date Modified</source> + <translation>تاریخ تغییر</translation> + </message> + <message> + <source>My Computer</source> + <translation>رایانه من</translation> + </message> + <message> + <source>Computer</source> + <translation>رایانه</translation> + </message> + <message> + <source>%1 byte(s)</source> + <translation>%1 بایت</translation> + </message> +</context> +<context> + <name>QFontDatabase</name> + <message> + <source>Normal</source> + <translation>عادی</translation> + </message> + <message> + <source>Bold</source> + <translation>توپر</translation> + </message> + <message> + <source>Demi Bold</source> + <translation>نیمهتوپر</translation> + </message> + <message> + <source>Black</source> + <translation>سیاه</translation> + </message> + <message> + <source>Demi</source> + <translation>نیمه</translation> + </message> + <message> + <source>Light</source> + <translation>سبک</translation> + </message> + <message> + <source>Italic</source> + <translation>کج</translation> + </message> + <message> + <source>Oblique</source> + <translation>اریب</translation> + </message> + <message> + <source>Any</source> + <translation>همه</translation> + </message> + <message> + <source>Latin</source> + <translation>لاتین</translation> + </message> + <message> + <source>Greek</source> + <translation>یونانی</translation> + </message> + <message> + <source>Cyrillic</source> + <translation>سیریلیک</translation> + </message> + <message> + <source>Armenian</source> + <translation>ارمنی</translation> + </message> + <message> + <source>Hebrew</source> + <translation>عبرانی</translation> + </message> + <message> + <source>Arabic</source> + <translation>عربی</translation> + </message> + <message> + <source>Syriac</source> + <translation>سریانی</translation> + </message> + <message> + <source>Thaana</source> + <translation>سانا</translation> + </message> + <message> + <source>Devanagari</source> + <translation>دوناگاری</translation> + </message> + <message> + <source>Bengali</source> + <translation>بنگالی</translation> + </message> + <message> + <source>Gurmukhi</source> + <translation>گورموخی</translation> + </message> + <message> + <source>Gujarati</source> + <translation>گوجارتی</translation> + </message> + <message> + <source>Oriya</source> + <translation>اوریا</translation> + </message> + <message> + <source>Tamil</source> + <translation>تامیل</translation> + </message> + <message> + <source>Telugu</source> + <translation>تلوگو</translation> + </message> + <message> + <source>Kannada</source> + <translation>کانادا</translation> + </message> + <message> + <source>Malayalam</source> + <translation>مالایی</translation> + </message> + <message> + <source>Sinhala</source> + <translation>سینهالا</translation> + </message> + <message> + <source>Thai</source> + <translation>تایلندی</translation> + </message> + <message> + <source>Lao</source> + <translation>لائوسی</translation> + </message> + <message> + <source>Tibetan</source> + <translation>تبتی</translation> + </message> + <message> + <source>Myanmar</source> + <translation>میانماری</translation> + </message> + <message> + <source>Georgian</source> + <translation>گرجی</translation> + </message> + <message> + <source>Khmer</source> + <translation>خیمر</translation> + </message> + <message> + <source>Simplified Chinese</source> + <translation>چینی ساده شده</translation> + </message> + <message> + <source>Traditional Chinese</source> + <translation>چینی تجاری</translation> + </message> + <message> + <source>Japanese</source> + <translation>ژاپنی</translation> + </message> + <message> + <source>Korean</source> + <translation>کرهای</translation> + </message> + <message> + <source>Vietnamese</source> + <translation>ویتنامی</translation> + </message> + <message> + <source>Symbol</source> + <translation>نشانه</translation> + </message> + <message> + <source>Ogham</source> + <translation>اوغام</translation> + </message> + <message> + <source>Runic</source> + <translation>رمزی</translation> + </message> + <message> + <source>N'Ko</source> + <translation>انکو</translation> + </message> +</context> +<context> + <name>QFontDialog</name> + <message> + <source>Select Font</source> + <translation>انتخاب فونت</translation> + </message> + <message> + <source>&Font</source> + <translation>&فونت</translation> + </message> + <message> + <source>Font st&yle</source> + <translation>&سبک فونت</translation> + </message> + <message> + <source>&Size</source> + <translation>&اندازه</translation> + </message> + <message> + <source>Effects</source> + <translation>جلوهها</translation> + </message> + <message> + <source>Stri&keout</source> + <translation>&خطزده</translation> + </message> + <message> + <source>&Underline</source> + <translation>&زیرخطدار</translation> + </message> + <message> + <source>Sample</source> + <translation>نمونه</translation> + </message> + <message> + <source>Wr&iting System</source> + <translation>سامانه &نوشتاری</translation> + </message> +</context> +<context> + <name>QFtp</name> + <message> + <source>Not connected</source> + <translation>متصل نمیباشد</translation> + </message> + <message> + <source>Host %1 not found</source> + <translation>میزبان %1 پیدا نشد</translation> + </message> + <message> + <source>Connection refused to host %1</source> + <translation>اتصال به میزبان %1 رد شد</translation> + </message> + <message> + <source>Connection timed out to host %1</source> + <translation>زمان اتصال به میزبان %1 به پایان رسید</translation> + </message> + <message> + <source>Connected to host %1</source> + <translation>اتصال به میزبان %1 برقرار شد</translation> + </message> + <message> + <source>Connection refused for data connection</source> + <translation>اتصال برقراری اتصال داده را رد کرد</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> + <message> + <source>Connecting to host failed: +%1</source> + <translation>اتصال ناموفق به میزبان: +%1</translation> + </message> + <message> + <source>Login failed: +%1</source> + <translation>ورود ناموفق: +%1</translation> + </message> + <message> + <source>Listing directory failed: +%1</source> + <translation>لیست کردن پوشه شکست خورد: +%1</translation> + </message> + <message> + <source>Changing directory failed: +%1</source> + <translation>تغییر پوشه انجام نشد: +%1</translation> + </message> + <message> + <source>Downloading file failed: +%1</source> + <translation>دانلود ناموفق پرونده: +%1</translation> + </message> + <message> + <source>Uploading file failed: +%1</source> + <translation>آپلود ناموفق پرونده: +%1</translation> + </message> + <message> + <source>Removing file failed: +%1</source> + <translation>حذف ناموفق پرونده: +%1</translation> + </message> + <message> + <source>Creating directory failed: +%1</source> + <translation>ایجاد پوشه انجام نشد: +%1</translation> + </message> + <message> + <source>Removing directory failed: +%1</source> + <translation>حدف پوشه انجام نشد: +%1</translation> + </message> + <message> + <source>Connection closed</source> + <translation>اتصال بسته شد</translation> + </message> + <message> + <source>Host %1 found</source> + <translation>میزبان پیدا %1 شد</translation> + </message> + <message> + <source>Connection to %1 closed</source> + <translation>اتصال به %1 بسته شد</translation> + </message> + <message> + <source>Host found</source> + <translation>میزبان پیدا شد</translation> + </message> + <message> + <source>Connected to host</source> + <translation>اتصال به میزبان برقرار شد</translation> + </message> +</context> +<context> + <name>QHostInfo</name> + <message> + <source>No host name given</source> + <translation>نام میزبان داده نشده است</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QHostInfoAgent</name> + <message> + <source>No host name given</source> + <translation>نام میزبان داده نشده است</translation> + </message> + <message> + <source>Invalid hostname</source> + <translation>نام نامعتبر میزبان</translation> + </message> + <message> + <source>Unknown address type</source> + <translation>نوع ناشناخته آدرس</translation> + </message> + <message> + <source>Host not found</source> + <translation>میزبان پیدا نشد</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QHttp</name> + <message> + <source>HTTPS connection requested but SSL support not compiled in</source> + <translation>اتصال HTTPS در خواست شد اما پشتیبانی SSL گردآوری نشد</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> + <message> + <source>Request aborted</source> + <translation>درخواست لغو شد</translation> + </message> + <message> + <source>No server set to connect to</source> + <translation>سرویسدهندهای برای اتصال تعیین نشده است</translation> + </message> + <message> + <source>Wrong content length</source> + <translation>طول اشتباه برای محتوا</translation> + </message> + <message> + <source>Server closed connection unexpectedly</source> + <translation>بسته شدن غیرمنتظره اتصال از سمت سرویسدهنده</translation> + </message> + <message> + <source>Connection refused (or timed out)</source> + <translation>اتصال رد شد (یا فرصت به اتمام رسید)</translation> + </message> + <message> + <source>Host %1 not found</source> + <translation>میزبان %1 پیدا نشد</translation> + </message> + <message> + <source>HTTP request failed</source> + <translation>درخواست HTTP انجام نشد</translation> + </message> + <message> + <source>Invalid HTTP response header</source> + <translation>سرآیند نامعتبر پاسخ HTTP</translation> + </message> + <message> + <source>Unknown authentication method</source> + <translation>روش اعتبارسنجی ناشناخته</translation> + </message> + <message> + <source>Proxy authentication required</source> + <translation>اعتبارسنجی پروکسی نیاز است</translation> + </message> + <message> + <source>Authentication required</source> + <translation>اعتبارسنجی نیاز است</translation> + </message> + <message> + <source>Invalid HTTP chunked body</source> + <translation>بدنه قطعهبندی شده نامعتبر HTTP</translation> + </message> + <message> + <source>Error writing response to device</source> + <translation>خطای نوشتن پاسخ روی دستگاه</translation> + </message> + <message> + <source>Connection refused</source> + <translation>اتصال رد شد</translation> + </message> + <message> + <source>Connection closed</source> + <translation>اتصال بسته شد</translation> + </message> + <message> + <source>Proxy requires authentication</source> + <translation>پروکسی به اعتبار سنجی نیاز دارد</translation> + </message> + <message> + <source>Host requires authentication</source> + <translation>میزبان به اعتبار سنجی نیاز دارد</translation> + </message> + <message> + <source>Data corrupted</source> + <translation>داده خراب است</translation> + </message> + <message> + <source>Unknown protocol specified</source> + <translation>پروتکل ناشناخته تعیین شده است</translation> + </message> + <message> + <source>SSL handshake failed</source> + <translation>دستدهی ناموفق SSL</translation> + </message> + <message> + <source>Host %1 found</source> + <translation>میزبان %1 پیدا شد</translation> + </message> + <message> + <source>Connected to host %1</source> + <translation>اتصال به میزبان %1 برقرار شد</translation> + </message> + <message> + <source>Connection to %1 closed</source> + <translation>اتصال به %1 بسته شد</translation> + </message> + <message> + <source>Host found</source> + <translation>میزبان پیدا شد</translation> + </message> + <message> + <source>Connected to host</source> + <translation>اتصال به میزبان برقرار شد</translation> + </message> +</context> +<context> + <name>QHttpSocketEngine</name> + <message> + <source>Did not receive HTTP response from proxy</source> + <translation>پاسخ HTTP از پروکسی دریافت نشد</translation> + </message> + <message> + <source>Error parsing authentication request from proxy</source> + <translation>درخواست خطای تجزیه اعتبارسنجی از پروکسی</translation> + </message> + <message> + <source>Authentication required</source> + <translation>اعتبارسنجی نیاز است</translation> + </message> + <message> + <source>Proxy denied connection</source> + <translation>پروکسی اتصال را رد کرد</translation> + </message> + <message> + <source>Error communicating with HTTP proxy</source> + <translation>خطای ارتباط با پروکسی HTTP</translation> + </message> + <message> + <source>Proxy server not found</source> + <translation>سرویسدهنده پروکسی پیدا نشد</translation> + </message> + <message> + <source>Proxy connection refused</source> + <translation>اتصال پروکسی رد شد</translation> + </message> + <message> + <source>Proxy server connection timed out</source> + <translation>زمان اتصال به سرویس دهنده پروکسی تمام شد</translation> + </message> + <message> + <source>Proxy connection closed prematurely</source> + <translation>اتصال پروکسی نابهنگام بسته شد</translation> + </message> +</context> +<context> + <name>QIBaseDriver</name> + <message> + <source>Error opening database</source> + <translation>خطا در باز کردن پایگاه داده</translation> + </message> + <message> + <source>Could not start transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> +</context> +<context> + <name>QIBaseResult</name> + <message> + <source>Unable to create BLOB</source> + <translation>نمیتوان BLOB را ایجاد کرد</translation> + </message> + <message> + <source>Unable to write BLOB</source> + <translation>نمیتوان در BLOB نوشت</translation> + </message> + <message> + <source>Unable to open BLOB</source> + <translation>نمیتوان BLOB را باز کرد</translation> + </message> + <message> + <source>Unable to read BLOB</source> + <translation>نمیتوان BLOB را خواند</translation> + </message> + <message> + <source>Could not find array</source> + <translation>نمیتوان آرایه را پیدا کرد</translation> + </message> + <message> + <source>Could not get array data</source> + <translation>نمیتوان دادههای آرایه را بازیابی کرد</translation> + </message> + <message> + <source>Could not get query info</source> + <translation>نمیتوان اطلاعات پرسوجو را بازیابی کرد</translation> + </message> + <message> + <source>Could not start transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Could not allocate statement</source> + <translation>نمیتوان عبارت را اختصاص داد</translation> + </message> + <message> + <source>Could not prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> + <message> + <source>Could not describe input statement</source> + <translation>نمیتوان عبارت ورودی را شرح داد</translation> + </message> + <message> + <source>Could not describe statement</source> + <translation>نمیتوان عبارت را شرح داد</translation> + </message> + <message> + <source>Unable to close statement</source> + <translation>نمیتوان عبارت را بست</translation> + </message> + <message> + <source>Unable to execute query</source> + <translation>نمیتوان پرسوجو را اجرا کرد</translation> + </message> + <message> + <source>Could not fetch next item</source> + <translation>نمیتوان آیتم بعدی را واکشی کرد</translation> + </message> + <message> + <source>Could not get statement info</source> + <translation>نمیتوان اطلاعات عبارت را بازیابی کرد</translation> + </message> +</context> +<context> + <name>QIODevice</name> + <message> + <source>Permission denied</source> + <translation>حق دسترسی رد شد</translation> + </message> + <message> + <source>Too many open files</source> + <translation>پروندههای زیادی باز است</translation> + </message> + <message> + <source>No such file or directory</source> + <translation>چنین پوشه یا پروندهای وجود ندارد</translation> + </message> + <message> + <source>No space left on device</source> + <translation>فضایی در دستگاه باقی نمانده است</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QInputContext</name> + <message> + <source>XIM</source> + <translation>XIM</translation> + </message> + <message> + <source>FEP</source> + <translation>FEP</translation> + </message> + <message> + <source>XIM input method</source> + <translation>روش ورودی XIM</translation> + </message> + <message> + <source>Windows input method</source> + <translation>روش ورودی ویندوز</translation> + </message> + <message> + <source>Mac OS X input method</source> + <translation>روش ورودی مکینتاش</translation> + </message> + <message> + <source>S60 FEP input method</source> + <translation>روش ورودی FEP S60</translation> + </message> +</context> +<context> + <name>QInputDialog</name> + <message> + <source>Enter a value:</source> + <translation>یک مقدار وارد کنید:</translation> + </message> +</context> +<context> + <name>QLibrary</name> + <message> + <source>Plugin verification data mismatch in '%1'</source> + <translation>داده اعتبارسنجی افزونه در «%1» تطابق ندارد</translation> + </message> + <message> + <source>The shared library was not found.</source> + <translation>کتابخانه اشتراکی پیدا نشد.</translation> + </message> + <message> + <source>The file '%1' is not a valid Qt plugin.</source> + <translation>پرونده «%1» یک افزونه معتبر Qt نیست.</translation> + </message> + <message> + <source>The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]</source> + <translation>افزونه «%1» از کتابخانه ناسازگار Qt استفاده میکند. (%2.%3.%4) [%5]</translation> + </message> + <message> + <source>The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"</source> + <translation>افزونه «%1» از کتابخانه ناسازگار Qt استفاده میکند. کلید ساخت «%2» مورد انتظار است، «%3» پیدا شد</translation> + </message> + <message> + <source>The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)</source> + <translation>افزونه «%1» از کتابخانه ناسازگار Qt استفاده میکند. (نمیتوان کتابخانههای اشکالزدایی و انتشار را ترکیب کرد.)</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> + <message> + <source>Cannot load library %1: %2</source> + <translation>نمیتوان کتابخانه %1 را بارگذاری کرد: %2</translation> + </message> + <message> + <source>Cannot unload library %1: %2</source> + <translation>نمیتوان کتابخانه %1 را تخلیه کرد: %2</translation> + </message> + <message> + <source>Cannot resolve symbol "%1" in %2: %3</source> + <translation>نمیتوان درباره نماد «%1» در %2 تصمیمگیری کرد: %3</translation> + </message> +</context> +<context> + <name>QLineEdit</name> + <message> + <source>&Undo</source> + <translation>&خنثیسازی</translation> + </message> + <message> + <source>&Redo</source> + <translation>&بازانجام</translation> + </message> + <message> + <source>Cu&t</source> + <translation>ب&رش</translation> + </message> + <message> + <source>&Copy</source> + <translation>&کپی</translation> + </message> + <message> + <source>&Paste</source> + <translation>&چسباندن</translation> + </message> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> + <message> + <source>Select All</source> + <translation>انتخاب همه</translation> + </message> +</context> +<context> + <name>QLocalServer</name> + <message> + <source>%1: Name error</source> + <translation>%1: خطای نام</translation> + </message> + <message> + <source>%1: Permission denied</source> + <translation>%1: حق دسترسی وجود ندارد</translation> + </message> + <message> + <source>%1: Address in use</source> + <translation>%1: آدرس در حال استفاده است</translation> + </message> + <message> + <source>%1: Unknown error %2</source> + <translation>%1: خطای ناشناخته %2</translation> + </message> +</context> +<context> + <name>QLocalSocket</name> + <message> + <source>%1: Connection refused</source> + <translation>%1: اتصال رد شد</translation> + </message> + <message> + <source>%1: Remote closed</source> + <translation>%1: فرمان از دور بسته شد</translation> + </message> + <message> + <source>%1: Invalid name</source> + <translation>%1: نام نامعتبر</translation> + </message> + <message> + <source>%1: Socket access error</source> + <translation>%1: خطای دسترسی به سوکت</translation> + </message> + <message> + <source>%1: Socket resource error</source> + <translation>%1: خطای منبع سوکت</translation> + </message> + <message> + <source>%1: Socket operation timed out</source> + <translation>%1: زمان عملیات سوکت به اتمام رسید</translation> + </message> + <message> + <source>%1: Datagram too large</source> + <translation>%1: دیتاگرام بیش از حد بزرگ است</translation> + </message> + <message> + <source>%1: Connection error</source> + <translation>%1: خطای اتصال</translation> + </message> + <message> + <source>%1: The socket operation is not supported</source> + <translation>%1: عملیات سوکت پشتیبانی نشده است</translation> + </message> + <message> + <source>%1: Unknown error</source> + <translation>%1: خطای ناشناخته</translation> + </message> + <message> + <source>%1: Unknown error %2</source> + <translation>%1: خطای ناشناخته %2</translation> + </message> +</context> +<context> + <name>QMYSQLDriver</name> + <message> + <source>Unable to open database '</source> + <translation>نمیتوان پایگاه داده را باز کرد '</translation> + </message> + <message> + <source>Unable to connect</source> + <translation>نمیتوان اتصال برقرار نمود</translation> + </message> + <message> + <source>Unable to begin transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> +</context> +<context> + <name>QMYSQLResult</name> + <message> + <source>Unable to fetch data</source> + <translation>عدم موفقیت در واکشی داده</translation> + </message> + <message> + <source>Unable to execute query</source> + <translation>نمیتوان پرسوجو را اجرا کرد</translation> + </message> + <message> + <source>Unable to store result</source> + <translation>نمیتوان نتیجه را ذخیره کرد</translation> + </message> + <message> + <source>Unable to execute next query</source> + <translation>نمیتوان درخواست بعدی را اجرا کرد</translation> + </message> + <message> + <source>Unable to store next result</source> + <translation>نمیتوان نتیجه بعدی را ذخیره کرد</translation> + </message> + <message> + <source>Unable to prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> + <message> + <source>Unable to reset statement</source> + <translation>نمیتوان عبارت را بازنشانی کرد</translation> + </message> + <message> + <source>Unable to bind value</source> + <translation>نمیتوان مقدار را مقید کرد</translation> + </message> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> + <message> + <source>Unable to bind outvalues</source> + <translation>نمیتوان مقادیر بیرونی را مقید کرد</translation> + </message> + <message> + <source>Unable to store statement results</source> + <translation>نمیتوان نتایج عبارت را ذخیره کرد</translation> + </message> +</context> +<context> + <name>QMdiArea</name> + <message> + <source>(Untitled)</source> + <translation>(بینام)</translation> + </message> +</context> +<context> + <name>QMdiSubWindow</name> + <message> + <source>- [%1]</source> + <translation>ـ [%1]</translation> + </message> + <message> + <source>%1 - [%2]</source> + <translation>%1 ـ [%2]</translation> + </message> + <message> + <source>Minimize</source> + <translation>کوچک کردن</translation> + </message> + <message> + <source>Maximize</source> + <translation>بزرگ کردن</translation> + </message> + <message> + <source>Unshade</source> + <translation>بازنشانی سایه</translation> + </message> + <message> + <source>Shade</source> + <translation>سایه</translation> + </message> + <message> + <source>Restore Down</source> + <translation>بازیابی به پایین</translation> + </message> + <message> + <source>Restore</source> + <translation>بازیابی</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Help</source> + <translation>کمک</translation> + </message> + <message> + <source>Menu</source> + <translation>منو</translation> + </message> + <message> + <source>&Restore</source> + <translation>با&زیابی</translation> + </message> + <message> + <source>&Move</source> + <translation>&حرکت</translation> + </message> + <message> + <source>&Size</source> + <translation>&اندازه</translation> + </message> + <message> + <source>Mi&nimize</source> + <translation>کوچ&ک کردن</translation> + </message> + <message> + <source>Ma&ximize</source> + <translation>بزر&گ کردن</translation> + </message> + <message> + <source>Stay on &Top</source> + <translation>بالاتر ب&ماند</translation> + </message> + <message> + <source>&Close</source> + <translation>&بستن</translation> + </message> +</context> +<context> + <name>QMenu</name> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Open</source> + <translation>بازکردن</translation> + </message> + <message> + <source>Execute</source> + <translation>اجرا</translation> + </message> +</context> +<context> + <name>QMenuBar</name> + <message> + <source>Actions</source> + <translation>عمل</translation> + </message> +</context> +<context> + <name>QMessageBox</name> + <message> + <source>Show Details...</source> + <translation>نمایش جزئیات...</translation> + </message> + <message> + <source>Hide Details...</source> + <translation>مخفی کردن جزئیات...</translation> + </message> + <message> + <source>OK</source> + <translation>تأیید</translation> + </message> + <message> + <source>Help</source> + <translation>کمک</translation> + </message> + <message> + <source><h3>About Qt</h3><p>This program uses Qt version %1.</p></source> + <translation><h3>دربارهٔ کیوت</h3><p>این برنامه از کیوت نسخهٔ %1 استفاده میکند.</p></translation> + </message> + <message> + <source><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p></source> + <translation><p dir="rtl">کیوت یک ابزار C++ است که برای توسعهٔ نرمافزار مستقل از پلتفرم به کار میرود</p><p dir="rtl">کیوت قابلیت حمل تکمنبع را برای مایکروسافت ویندوز، مکاواسایکس، لینوکس و تمام توزیعهای اصلی یونیکس پشتیبانی میکند. کیوت همچنین برای دستگاههای جانبی قابل استفاده است. از جمله کیوت برای لینوکس تعبیه شده و کیوت برای ویندوز CE.</p><p dir="rtl">به منظور پاسخدهی به نیاز کاربران مختلف، کیوت تحت سه اجازهنامهٔ متفاوت قابل دستیابی است.</p><p dir="rtl">Qt منتشر شده تحت اجازهنامه تجاری ما برای توسعهٔ تجاری نرمافزارهایی مناسب است که مایل نیستید کد منبع آنها را با اشخاص ثالث و یا دیگران به اشتراک بگذارید یا به هر دلیل نمیتوانید با شرایط GNU LGPL نسخهٔ ۲٫۱ یا GNU GPL نسخهٔ ۳ موافقت کنید.</p><p dir="rtl">Qt منتشر شده تحت اجازهنامهٔ GNU LGPL نسخهٔ ۲٫۱؛ در صورتی که بتوانید با مفاهیم و شرایط GNU LGPL نسخهٔ ۲٫۱ موافقت کنید، برای توسعهٔ برنامههای کاربردی متنباز قابل استفاده است.</p><p dir="rtl">Qt منتشر شده تحت اجازهنامهٔ GNU General Public License نسخهٔ ۳ برای توسعهٔ برنامههایی مناسب است که بخواهید از آنها در ترکیبهایی از نرمافزارهای تحت شمول شرایط GNU GPL نسخهٔ ۳٫۰ استفاده کنید یا مایل باشید با شرایط اجازهنامهٔ GNU GPL نسخهٔ ۳ موافقت کنید.</p><p dir="rtl">برای به دست آوردن اطلاعاتی در مورد اجازهنامههای Qt لطفاً <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> را ببینید.</p><p dir="rtl">قانون حمایت از حقوق مؤلفین (C) ۲۰۱۱ کمپانی نوکیا و/یا تمام زیرمجموعهها</p><p dir="rtl">Qt یک محصول Nokia است.برای اطلاعات بیشتر <a href="http://qt.nokia.com/">qt.nokia.com</a> را ببینید.</p></translation> + </message> + <message> + <source>About Qt</source> + <translation>دربارهٔ کیوت</translation> + </message> +</context> +<context> + <name>QMultiInputContext</name> + <message> + <source>Select IM</source> + <translation>انتخاب IM</translation> + </message> +</context> +<context> + <name>QMultiInputContextPlugin</name> + <message> + <source>Multiple input method switcher</source> + <translation>سویچ روش ورودی چندگانه</translation> + </message> + <message> + <source>Multiple input method switcher that uses the context menu of the text widgets</source> + <translation>سویچ روش ورودی چندگانه که از منوی محتوای عناصر متنی استفاده میکند</translation> + </message> +</context> +<context> + <name>QNativeSocketEngine</name> + <message> + <source>Unable to initialize non-blocking socket</source> + <translation>نمیتوان سوکت بلوکبندی نشده را آماده کرد</translation> + </message> + <message> + <source>Unable to initialize broadcast socket</source> + <translation>نمیتوان سوکت پخش را آماده کرد</translation> + </message> + <message> + <source>Attempt to use IPv6 socket on a platform with no IPv6 support</source> + <translation>تلاش برای استفاده از سوکت IPv6 روی پلتفرم بدون پشتیبانی IPv6</translation> + </message> + <message> + <source>The remote host closed the connection</source> + <translation>میزبان کنترل از راه دور اتصال را بست</translation> + </message> + <message> + <source>Network operation timed out</source> + <translation>عملیات شبکه با وقفهٔ زمانی مواجه شد</translation> + </message> + <message> + <source>Out of resources</source> + <translation>خارج از منابع</translation> + </message> + <message> + <source>Unsupported socket operation</source> + <translation>عملیات پشتیبانی نشده سوکت</translation> + </message> + <message> + <source>Protocol type not supported</source> + <translation>نوع پروتکل پشتیبانی نشده است</translation> + </message> + <message> + <source>Invalid socket descriptor</source> + <translation>توصیفکنندهٔ نامعتبر سوکت</translation> + </message> + <message> + <source>Host unreachable</source> + <translation>میزبان در دسترس نیست</translation> + </message> + <message> + <source>Network unreachable</source> + <translation>شبکه در دسترس نیست</translation> + </message> + <message> + <source>Permission denied</source> + <translation>حق دسترسی وجود ندارد</translation> + </message> + <message> + <source>Connection timed out</source> + <translation>اتصال با وقفهٔ زمانی مواجه شد</translation> + </message> + <message> + <source>Connection refused</source> + <translation>اتصال پذیرفته نشد</translation> + </message> + <message> + <source>The bound address is already in use</source> + <translation>آدرس محدوده هماکنون در حال استفاده است</translation> + </message> + <message> + <source>The address is not available</source> + <translation>آدرس در دسترس نیست</translation> + </message> + <message> + <source>The address is protected</source> + <translation>آدرس حفاظتشده است</translation> + </message> + <message> + <source>Datagram was too large to send</source> + <translation>دیتاگرام برای ارسال خیلی بزرگ بود</translation> + </message> + <message> + <source>Unable to send a message</source> + <translation>نمیتوان پیام را ارسال کرد</translation> + </message> + <message> + <source>Unable to receive a message</source> + <translation>نمیتوان پیام دریافت کرد</translation> + </message> + <message> + <source>Unable to write</source> + <translation>ناتوان در نوشتن</translation> + </message> + <message> + <source>Network error</source> + <translation>خطای شبکه</translation> + </message> + <message> + <source>Another socket is already listening on the same port</source> + <translation>سوکت تکیهگاه هماکنون روی همان درگاه در حال شنیدن است</translation> + </message> + <message> + <source>Operation on non-socket</source> + <translation>عملیات روی غیرسوکت</translation> + </message> + <message> + <source>The proxy type is invalid for this operation</source> + <translation>پروکسی برای این عملیات غیرمعتبر است</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QNetworkAccessCacheBackend</name> + <message> + <source>Error opening %1</source> + <translation>خطای باز کردن %1</translation> + </message> +</context> +<context> + <name>QNetworkAccessDataBackend</name> + <message> + <source>Operation not supported on %1</source> + <translation>عملیات روی %1 پشتیبانی نمیشود</translation> + </message> + <message> + <source>Invalid URI: %1</source> + <translation>نشانی اینترنتی نامعتبر: %1</translation> + </message> +</context> +<context> + <name>QNetworkAccessDebugPipeBackend</name> + <message> + <source>Write error writing to %1: %2</source> + <translation>خطای نوشتن روی %1: %2</translation> + </message> + <message> + <source>Socket error on %1: %2</source> + <translation>خطای سوکت در %1: %2</translation> + </message> + <message> + <source>Remote host closed the connection prematurely on %1</source> + <translation>میزبان کنترل از راه دور اتصال را نابهنگام روی %1 بست</translation> + </message> +</context> +<context> + <name>QNetworkAccessFileBackend</name> + <message> + <source>Request for opening non-local file %1</source> + <translation>درخواست برای بازکردن پروندهٔ غیر محلی %1</translation> + </message> + <message> + <source>Cannot open %1: Path is a directory</source> + <translation>نمیتوان %1 را باز کرد: مسیر یک پوشه است</translation> + </message> + <message> + <source>Error opening %1: %2</source> + <translation>خطای باز کردن %1: %2</translation> + </message> + <message> + <source>Write error writing to %1: %2</source> + <translation>خطای نوشتن روی %1: %2</translation> + </message> + <message> + <source>Read error reading from %1: %2</source> + <translation>خطای خواندن از %1: %2</translation> + </message> +</context> +<context> + <name>QNetworkAccessFtpBackend</name> + <message> + <source>No suitable proxy found</source> + <translation>پروکسی مناسب پیدا نشد</translation> + </message> + <message> + <source>Cannot open %1: is a directory</source> + <translation>نمیتوان %1 را باز کرد: یک پوشه است</translation> + </message> + <message> + <source>Logging in to %1 failed: authentication required</source> + <translation>.برقراری ناموفق ارتباط با %1: اعتبارسنجی نیاز است</translation> + </message> + <message> + <source>Error while downloading %1: %2</source> + <translation>خطا در هنگام دانلود %1: %2</translation> + </message> + <message> + <source>Error while uploading %1: %2</source> + <translation>خطا در هنگام آپلود %1: %2</translation> + </message> +</context> +<context> + <name>QNetworkAccessHttpBackend</name> + <message> + <source>No suitable proxy found</source> + <translation>پروکسی مناسب پیدا نشد</translation> + </message> +</context> +<context> + <name>QNetworkAccessManager</name> + <message> + <source>Network access is disabled.</source> + <translation>دسترسی شبکه غیرفعال شده است.</translation> + </message> +</context> +<context> + <name>QNetworkReply</name> + <message> + <source>Error downloading %1 - server replied: %2</source> + <translation>خطای دانلود %1 - پاسخ سرور: %2</translation> + </message> + <message> + <source>Protocol "%1" is unknown</source> + <translation>پروتکل «%1» پشتیبانی ناشناخته است</translation> + </message> + <message> + <source>Network session error.</source> + <translation>خطای جلسهٔ شبکه.</translation> + </message> + <message> + <source>Temporary network failure.</source> + <translation>خرابی موقت شبکه.</translation> + </message> +</context> +<context> + <name>QNetworkReplyImpl</name> + <message> + <source>Operation canceled</source> + <translation>عملیات لغو شد</translation> + </message> +</context> +<context> + <name>QNetworkSession</name> + <message> + <source>Invalid configuration.</source> + <translation>پیکربندی نامعتبر.</translation> + </message> +</context> +<context> + <name>QNetworkSessionPrivateImpl</name> + <message> + <source>Roaming error</source> + <translation>خطای رومینگ</translation> + </message> + <message> + <source>Session aborted by user or system</source> + <translation>جلسه بهوسیلهٔ کاربر یا سیستم لغو شد</translation> + </message> + <message> + <source>The specified configuration cannot be used.</source> + <translation>پیکربندی مشخصشده نمیتواند استفاده شود.</translation> + </message> + <message> + <source>Unidentified Error</source> + <translation>خطای ناشناخته</translation> + </message> + <message> + <source>Unknown session error.</source> + <translation>خطای ناشناختهٔ جلسه.</translation> + </message> + <message> + <source>The session was aborted by the user or system.</source> + <translation>جلسه بهوسیلهٔ کاربر یا سیستم لغو شده بود.</translation> + </message> + <message> + <source>The requested operation is not supported by the system.</source> + <translation>درخواست عملیات بهوسیلهٔ سیستم پشتیبانی نشده است.</translation> + </message> + <message> + <source>Roaming was aborted or is not possible.</source> + <translation>رومینگ لغو شد یا امکان پذیر نیست.</translation> + </message> +</context> +<context> + <name>QOCIDriver</name> + <message> + <source>Unable to initialize</source> + <comment>QOCIDriver</comment> + <translation>نمیتوان آماده کرد</translation> + </message> + <message> + <source>Unable to logon</source> + <translation>نمیتوان وارد سیستم شد</translation> + </message> + <message> + <source>Unable to begin transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> +</context> +<context> + <name>QOCIResult</name> + <message> + <source>Unable to bind column for batch execute</source> + <translation>نمیتوان ستون را برای اجرای گروهی مقید کرد</translation> + </message> + <message> + <source>Unable to execute batch statement</source> + <translation>نمیتوان عبارت دستهای را اجرا کرد</translation> + </message> + <message> + <source>Unable to goto next</source> + <translation>نمیتوان به بعدی رفت</translation> + </message> + <message> + <source>Unable to alloc statement</source> + <translation>نمیتوان عبارت را تخصیص داد</translation> + </message> + <message> + <source>Unable to prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> + <message> + <source>Unable to get statement type</source> + <translation>نمیتوان نوع عبارت را بازیابی کرد</translation> + </message> + <message> + <source>Unable to bind value</source> + <translation>نمیتوان متغیر را مقید کرد</translation> + </message> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> +</context> +<context> + <name>QODBCDriver</name> + <message> + <source>Unable to connect</source> + <translation>نمیتوان اتصال برقرار کرد</translation> + </message> + <message> + <source>Unable to connect - Driver doesn't support all functionality required</source> + <translation>نمیتوان اتصال برقرار نمود. درایور تمام عملکردهای لازم را پشتیبانی نمیکند</translation> + </message> + <message> + <source>Unable to disable autocommit</source> + <translation>نمیتوان ارسال خودکار را غیرفعال کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> + <message> + <source>Unable to enable autocommit</source> + <translation>نمیتوان ارسال خودکار را فعال کرد</translation> + </message> +</context> +<context> + <name>QODBCResult</name> + <message> + <source>Unable to fetch last</source> + <translation>نمیتوان آخرین رکورد را واکشی کرد</translation> + </message> + <message> + <source>QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration</source> + <translation>QODBCResult::reset: نمیتوان 'SQL_CURSOR_STATIC' را به عنوان صفت عبارت نتظیم کرد. لطفاً پیکربندی گردانندهٔ ODBC خود را بررسی کنید</translation> + </message> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> + <message> + <source>Unable to fetch</source> + <translation>نمیتوان رکورد را واکشی کرد</translation> + </message> + <message> + <source>Unable to fetch next</source> + <translation>نمیتوان رکورد بعد را واکشی کرد</translation> + </message> + <message> + <source>Unable to fetch first</source> + <translation>نمیتوان اولین رکورد را واکشی کرد</translation> + </message> + <message> + <source>Unable to fetch previous</source> + <translation>نمیتوان رکورد قبلی را واکشی کرد</translation> + </message> + <message> + <source>Unable to prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> + <message> + <source>Unable to bind variable</source> + <translation>نمیتوان متغیر را مقید کرد</translation> + </message> +</context> +<context> + <name>QObject</name> + <message> + <source>PulseAudio Sound Server</source> + <translation>سرویسدهندهٔ صوت PulseAudio</translation> + </message> + <message> + <source>"%1" duplicates a previous role name and will be disabled.</source> + <translation>"%1" نام وظیفهٔ قبلی را تکرار میکند و غیرفعال خواهد شد.</translation> + </message> + <message> + <source>invalid query: "%1"</source> + <translation>پرسوجوی نامعتبر: %1</translation> + </message> +</context> +<context> + <name>QPPDOptionsModel</name> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Value</source> + <translation>مقدار</translation> + </message> +</context> +<context> + <name>QPSQLDriver</name> + <message> + <source>Unable to connect</source> + <translation>نمیتوان اتصال برقرار کرد</translation> + </message> + <message> + <source>Could not begin transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Could not commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Could not rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> + <message> + <source>Unable to subscribe</source> + <translation>نمیتوان اشتراک ایجاد کرد</translation> + </message> + <message> + <source>Unable to unsubscribe</source> + <translation>نمیتوان اشتراک را لغو کرد</translation> + </message> +</context> +<context> + <name>QPSQLResult</name> + <message> + <source>Unable to create query</source> + <translation>نمیتوان پرسوجو ایجاد کرد</translation> + </message> + <message> + <source>Unable to prepare statement</source> + <translation>نمیتوان عبارت را آماده کرد</translation> + </message> +</context> +<context> + <name>QPageSetupWidget</name> + <message> + <source>Form</source> + <translation>فرم</translation> + </message> + <message> + <source>Paper</source> + <translation>کاغذ</translation> + </message> + <message> + <source>Page size:</source> + <translation>اندازهٔ صفحه:</translation> + </message> + <message> + <source>Width:</source> + <translation>عرض:</translation> + </message> + <message> + <source>Height:</source> + <translation>ارتفاع:</translation> + </message> + <message> + <source>Paper source:</source> + <translation>منبع کاغذ:</translation> + </message> + <message> + <source>Orientation</source> + <translation>جهت</translation> + </message> + <message> + <source>Portrait</source> + <translation>عمودی</translation> + </message> + <message> + <source>Landscape</source> + <translation>افقی</translation> + </message> + <message> + <source>Reverse landscape</source> + <translation>افقی معکوس</translation> + </message> + <message> + <source>Reverse portrait</source> + <translation>.عمودی معکوس</translation> + </message> + <message> + <source>Margins</source> + <translation>حاشیه</translation> + </message> + <message> + <source>top margin</source> + <translation>حاشیهٔ بالا</translation> + </message> + <message> + <source>left margin</source> + <translation>حاشیهٔ چپ</translation> + </message> + <message> + <source>right margin</source> + <translation>حاشیهٔ راست</translation> + </message> + <message> + <source>bottom margin</source> + <translation>حاشیهٔ پایین</translation> + </message> + <message> + <source>Centimeters (cm)</source> + <translation>سانتیمتر (cm)</translation> + </message> + <message> + <source>Millimeters (mm)</source> + <translation>میلیمتر (mm)</translation> + </message> + <message> + <source>Inches (in)</source> + <translation>اینچ (in)</translation> + </message> + <message> + <source>Points (pt)</source> + <translation>نقطه (pt)</translation> + </message> +</context> +<context> + <name>QPluginLoader</name> + <message> + <source>The plugin was not loaded.</source> + <translation>افزونه بار نشده بود.</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QPrintDialog</name> + <message> + <source>Print</source> + <translation>چاپ</translation> + </message> + <message> + <source>A0</source> + <translation>A0</translation> + </message> + <message> + <source>A1</source> + <translation>A1</translation> + </message> + <message> + <source>A2</source> + <translation>A2</translation> + </message> + <message> + <source>A3</source> + <translation>A3</translation> + </message> + <message> + <source>A4</source> + <translation>A4</translation> + </message> + <message> + <source>A5</source> + <translation>A5</translation> + </message> + <message> + <source>A6</source> + <translation>A6</translation> + </message> + <message> + <source>A7</source> + <translation>A7</translation> + </message> + <message> + <source>A8</source> + <translation>A8</translation> + </message> + <message> + <source>A9</source> + <translation>A9</translation> + </message> + <message> + <source>B0</source> + <translation>B0</translation> + </message> + <message> + <source>B1</source> + <translation>B1</translation> + </message> + <message> + <source>B2</source> + <translation>B2</translation> + </message> + <message> + <source>B3</source> + <translation>B3</translation> + </message> + <message> + <source>B4</source> + <translation>B4</translation> + </message> + <message> + <source>B5</source> + <translation>B5</translation> + </message> + <message> + <source>B6</source> + <translation>B6</translation> + </message> + <message> + <source>B7</source> + <translation>B7</translation> + </message> + <message> + <source>B8</source> + <translation>B8</translation> + </message> + <message> + <source>B9</source> + <translation>B9</translation> + </message> + <message> + <source>B10</source> + <translation>B10</translation> + </message> + <message> + <source>C5E</source> + <translation>C5E</translation> + </message> + <message> + <source>DLE</source> + <translation>DLE</translation> + </message> + <message> + <source>Executive</source> + <translation>Executive</translation> + </message> + <message> + <source>Folio</source> + <translation>Folio</translation> + </message> + <message> + <source>Ledger</source> + <translation>Ledger</translation> + </message> + <message> + <source>Legal</source> + <translation>Legal</translation> + </message> + <message> + <source>Letter</source> + <translation>Letter</translation> + </message> + <message> + <source>Tabloid</source> + <translation>Tabloid</translation> + </message> + <message> + <source>US Common #10 Envelope</source> + <translation>US Common #10 Envelope</translation> + </message> + <message> + <source>Custom</source> + <translation>سفارشی</translation> + </message> + <message> + <source>File exists</source> + <translation>پرونده وجود دارد</translation> + </message> + <message> + <source><qt>Do you want to overwrite it?</qt></source> + <translation><qt>آیا میخواهید آن را بازنویسی کنید؟</qt></translation> + </message> + <message> + <source>A0 (841 x 1189 mm)</source> + <translation>A0 (۸۴۱ x ۱۱۸۹ میلیمتر)</translation> + </message> + <message> + <source>A1 (594 x 841 mm)</source> + <translation>A1 (۵۹۴ x ۸۴۱ میلیمتر)</translation> + </message> + <message> + <source>A2 (420 x 594 mm)</source> + <translation>A2 (۴۲۰ x ۵۹۴ میلیمتر)</translation> + </message> + <message> + <source>A3 (297 x 420 mm)</source> + <translation>A3 (۲۹۷ x ۴۲۰ میلیمتر)</translation> + </message> + <message> + <source>A4 (210 x 297 mm, 8.26 x 11.7 inches)</source> + <translation>A4 (۲۱۰ x ۲۹۷ میلیمتر، ۸٫۲۶ x ۱۱٫۷ اینچ)</translation> + </message> + <message> + <source>A5 (148 x 210 mm)</source> + <translation>A5 (۱۴۸ x ۲۱۰ میلیمتر)</translation> + </message> + <message> + <source>A6 (105 x 148 mm)</source> + <translation>A6 (۱۰۵ x ۱۴۸ میلیمتر)</translation> + </message> + <message> + <source>A7 (74 x 105 mm)</source> + <translation>A7 (۷۴ x ۱۰۵ میلیمتر)</translation> + </message> + <message> + <source>A8 (52 x 74 mm)</source> + <translation>A8 (۵۲ x ۷۴ میلیمتر)</translation> + </message> + <message> + <source>A9 (37 x 52 mm)</source> + <translation>A9 (۳۷ x ۵۲ mm)</translation> + </message> + <message> + <source>B0 (1000 x 1414 mm)</source> + <translation>B0 (۱۰۰۰ x ۱۴۱۴ میلیمتر)</translation> + </message> + <message> + <source>B1 (707 x 1000 mm)</source> + <translation>B1 (۷۰۷ x ۱۰۰۰ میلیمتر)</translation> + </message> + <message> + <source>B2 (500 x 707 mm)</source> + <translation>B2 (۵۰۰ x ۷۰۷ میلیمتر)</translation> + </message> + <message> + <source>B3 (353 x 500 mm)</source> + <translation>B3 (۳۵۳ x ۵۰۰ میلیمتر)</translation> + </message> + <message> + <source>B4 (250 x 353 mm)</source> + <translation>B4 (۲۵۰ x ۳۵۳ میلیمتر)</translation> + </message> + <message> + <source>B5 (176 x 250 mm, 6.93 x 9.84 inches)</source> + <translation>B5 (۱۷۶ x ۲۵۰ میلیمتر، ۶٫۹۳ x ۹٫۸۴ اینچ)</translation> + </message> + <message> + <source>B6 (125 x 176 mm)</source> + <translation>B6 (۱۲۵ x ۱۷۶ میلیمتر)</translation> + </message> + <message> + <source>B7 (88 x 125 mm)</source> + <translation>B7 (۸۸ x ۱۲۵ میلیمتر)</translation> + </message> + <message> + <source>B8 (62 x 88 mm)</source> + <translation>B8 (۶۲ x ۸۸ میلیمتر)</translation> + </message> + <message> + <source>B9 (44 x 62 mm)</source> + <translation>B9 (۴۴ x ۶۲ میلیمتر)</translation> + </message> + <message> + <source>B10 (31 x 44 mm)</source> + <translation>B10 (۳۱ x ۴۴ میلیمتر)</translation> + </message> + <message> + <source>C5E (163 x 229 mm)</source> + <translation>C5E (۱۶۳ x ۲۲۹ میلیمتر)</translation> + </message> + <message> + <source>DLE (110 x 220 mm)</source> + <translation>DLE (۱۱۰ x ۲۲۰ میلیمتر)</translation> + </message> + <message> + <source>Executive (7.5 x 10 inches, 191 x 254 mm)</source> + <translation>Executive (۷٫۵ x ۱۰ اینچ - ۱۹۱ x ۲۵۴ میلیمتر)</translation> + </message> + <message> + <source>Folio (210 x 330 mm)</source> + <translation>Folio (۲۱۰ x ۳۳۰ میلیمتر)</translation> + </message> + <message> + <source>Ledger (432 x 279 mm)</source> + <translation>Ledger (۴۳۲ x ۲۷۹ میلیمتر)</translation> + </message> + <message> + <source>Legal (8.5 x 14 inches, 216 x 356 mm)</source> + <translation>Legal (۸٫۵ x ۱۴ اینچ - ۲۱۶ x ۳۵۶ میلیمتر)</translation> + </message> + <message> + <source>Letter (8.5 x 11 inches, 216 x 279 mm)</source> + <translation>Letter (۸٫۵ x ۱۱ اینچ - ۲۱۶ x ۲۹۷ میلیمتر)</translation> + </message> + <message> + <source>Tabloid (279 x 432 mm)</source> + <translation>Tabloid (۲۷۹ x ۴۳۲ میلیمتر)</translation> + </message> + <message> + <source>US Common #10 Envelope (105 x 241 mm)</source> + <translation>US Common #10 Envelope (۱۰۵ x ۲۴۱ میلیمتر)</translation> + </message> + <message> + <source>Print all</source> + <translation>چاپ کردن همه</translation> + </message> + <message> + <source>Print selection</source> + <translation>اتتخاب چاپ</translation> + </message> + <message> + <source>Print range</source> + <translation>چاپ کردن محدوده</translation> + </message> + <message> + <source>Print current page</source> + <translation>چاپ صفحهٔ جاری</translation> + </message> + <message> + <source>&Options >></source> + <translation>&تنظیمات >></translation> + </message> + <message> + <source>&Print</source> + <translation>&چاپ کردن</translation> + </message> + <message> + <source>&Options <<</source> + <translation>&تنظیمات <<</translation> + </message> + <message> + <source>Print to File (PDF)</source> + <translation>چاپ کردن روی پرونده (PDF)</translation> + </message> + <message> + <source>Print to File (Postscript)</source> + <translation>چاپ کردن روی پرونده (Postscript)</translation> + </message> + <message> + <source>Local file</source> + <translation>پروندهٔ محلی</translation> + </message> + <message> + <source>Write %1 file</source> + <translation>نوشتن %1 فایل</translation> + </message> + <message> + <source>Print To File ...</source> + <translation>چاپ روی پرونده ...</translation> + </message> + <message> + <source>%1 is a directory. +Please choose a different file name.</source> + <translation>%1 یک پوشه است +لطفا یک پروندهٔ دیگر انتخاب کنید.</translation> + </message> + <message> + <source>File %1 is not writable. +Please choose a different file name.</source> + <translation>پروندهٔ %1 قابل نوشتن نیست +لطفاً یک پروندهٔ دیگر انتخاب کنید.</translation> + </message> + <message> + <source>%1 already exists. +Do you want to overwrite it?</source> + <translation>%1 هماکنون وجود دارد +آیا میخواهید آن را بازنویسی کنید؟</translation> + </message> + <message> + <source>The 'From' value cannot be greater than the 'To' value.</source> + <translation>مقدار مبدأ نمیتواند از مقدار مقصد بزرگتر باشد.</translation> + </message> + <message> + <source>OK</source> + <translation>تأیید</translation> + </message> + <message> + <source>locally connected</source> + <translation>به طورمحلی متصل شد</translation> + </message> + <message> + <source>Aliases: %1</source> + <translation>نامهای مستعار: %1</translation> + </message> + <message> + <source>unknown</source> + <translation>ناشناخته</translation> + </message> +</context> +<context> + <name>QPrintPreviewDialog</name> + <message> + <source>Page Setup</source> + <translation>پیکربندی صفحه</translation> + </message> + <message> + <source>%1%</source> + <translation>%1%</translation> + </message> + <message> + <source>Print Preview</source> + <translation>پیشنمایش چاپ</translation> + </message> + <message> + <source>Next page</source> + <translation>صفحهٔ بعدی</translation> + </message> + <message> + <source>Previous page</source> + <translation>صفحهٔ قبلی</translation> + </message> + <message> + <source>First page</source> + <translation>صفحهٔ اول</translation> + </message> + <message> + <source>Last page</source> + <translation>صفحهٔ آخر</translation> + </message> + <message> + <source>Fit width</source> + <translation>تنظیم براساس عرض</translation> + </message> + <message> + <source>Fit page</source> + <translation>تنظیم براساس اندازهٔ صفحه</translation> + </message> + <message> + <source>Zoom in</source> + <translation>بزرگنمایی</translation> + </message> + <message> + <source>Zoom out</source> + <translation>کوچکنمایی</translation> + </message> + <message> + <source>Portrait</source> + <translation>عمودی</translation> + </message> + <message> + <source>Landscape</source> + <translation>افقی</translation> + </message> + <message> + <source>Show single page</source> + <translation>نمایش یک صفحهٔ تکی</translation> + </message> + <message> + <source>Show facing pages</source> + <translation>نمایش صفحههای اول</translation> + </message> + <message> + <source>Show overview of all pages</source> + <translation>نمایش اختصاری تمام صفحات</translation> + </message> + <message> + <source>Print</source> + <translation>چاپ</translation> + </message> + <message> + <source>Page setup</source> + <translation>پیکربندی صفحه</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Export to PDF</source> + <translation>خروجی گرفتن به PDF</translation> + </message> + <message> + <source>Export to PostScript</source> + <translation>خروجی گرفتن به PostScript</translation> + </message> +</context> +<context> + <name>QPrintPropertiesWidget</name> + <message> + <source>Form</source> + <translation>فرم</translation> + </message> + <message> + <source>Page</source> + <translation>صفحه</translation> + </message> + <message> + <source>Advanced</source> + <translation>پیشرفته</translation> + </message> +</context> +<context> + <name>QPrintSettingsOutput</name> + <message> + <source>Form</source> + <translation>فرم</translation> + </message> + <message> + <source>Copies</source> + <translation>کپیها</translation> + </message> + <message> + <source>Print range</source> + <translation>چاپ کردن محدوده</translation> + </message> + <message> + <source>Print all</source> + <translation>چاپ کردن همه</translation> + </message> + <message> + <source>Pages from</source> + <translation>محدودهٔ صفحات</translation> + </message> + <message> + <source>to</source> + <translation>تا</translation> + </message> + <message> + <source>Current Page</source> + <translation>صفحهٔ جاری</translation> + </message> + <message> + <source>Selection</source> + <translation>انتخاب</translation> + </message> + <message> + <source>Output Settings</source> + <translation>تنظیمات خروجی</translation> + </message> + <message> + <source>Copies:</source> + <translation>کپیها:</translation> + </message> + <message> + <source>Collate</source> + <translation>تلفیق کردن</translation> + </message> + <message> + <source>Reverse</source> + <translation>معکوس</translation> + </message> + <message> + <source>Options</source> + <translation>تنظیمات</translation> + </message> + <message> + <source>Color Mode</source> + <translation>حالت رنگ</translation> + </message> + <message> + <source>Color</source> + <translation>رنگ</translation> + </message> + <message> + <source>Grayscale</source> + <translation>مقیاس خاکستری</translation> + </message> + <message> + <source>Duplex Printing</source> + <translation>چاپ دوبله</translation> + </message> + <message> + <source>None</source> + <translation>هیچ</translation> + </message> + <message> + <source>Long side</source> + <translation>سمت طولانی</translation> + </message> + <message> + <source>Short side</source> + <translation>سمت کوتاه</translation> + </message> +</context> +<context> + <name>QPrintWidget</name> + <message> + <source>Form</source> + <translation>فرم</translation> + </message> + <message> + <source>Printer</source> + <translation>چاپگر</translation> + </message> + <message> + <source>&Name:</source> + <translation>&نام:</translation> + </message> + <message> + <source>P&roperties</source> + <translation>و&ژگیها</translation> + </message> + <message> + <source>Location:</source> + <translation>موقعیت:</translation> + </message> + <message> + <source>Preview</source> + <translation>پیشنمایش</translation> + </message> + <message> + <source>Type:</source> + <translation>نوع:</translation> + </message> + <message> + <source>Output &file:</source> + <translation>&پروندهٔ خروجی:</translation> + </message> + <message> + <source>...</source> + <translation>...</translation> + </message> +</context> +<context> + <name>QProcess</name> + <message> + <source>Error reading from process</source> + <translation>خطای خواندن از پردازش</translation> + </message> + <message> + <source>Error writing to process</source> + <translation>خطای نوشتن روی پردازش</translation> + </message> + <message> + <source>Process crashed</source> + <translation>پردازش خراب شد</translation> + </message> + <message> + <source>No program defined</source> + <translation>هیچ برنامهای تعریف نشده است</translation> + </message> + <message> + <source>Could not open input redirection for reading</source> + <translation>نمیتوان تغییر مسیر ورودی را برای خواندن باز کرد</translation> + </message> + <message> + <source>Could not open output redirection for writing</source> + <translation>نمیتوان تغییر مسیر خروجی را برای نوشتن باز کرد</translation> + </message> + <message> + <source>Resource error (fork failure): %1</source> + <translation>خطای منبع (خرابی انشعاب): %1</translation> + </message> + <message> + <source>Process operation timed out</source> + <translation>عملیات پردازش با وقفهٔ زمانی مواجه شد</translation> + </message> + <message> + <source>Process failed to start: %1</source> + <translation>شروع ناموفق پردازش: %1</translation> + </message> +</context> +<context> + <name>QProgressDialog</name> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> +</context> +<context> + <name>QPushButton</name> + <message> + <source>Open</source> + <translation>باز کردن</translation> + </message> +</context> +<context> + <name>QRadioButton</name> + <message> + <source>Check</source> + <translation>انتخاب</translation> + </message> +</context> +<context> + <name>QRegExp</name> + <message> + <source>no error occurred</source> + <translation>خطایی رخ نداد</translation> + </message> + <message> + <source>disabled feature used</source> + <translation>استفاده از ویژگی غیرفعال شده</translation> + </message> + <message> + <source>bad char class syntax</source> + <translation>.استفاده از کلاس نویسهٔ نامعتبر</translation> + </message> + <message> + <source>bad lookahead syntax</source> + <translation>نحو نامعتبر پیشرو</translation> + </message> + <message> + <source>bad repetition syntax</source> + <translation>نحو نامعتبر تکرار</translation> + </message> + <message> + <source>invalid octal value</source> + <translation>مقدار هشتهشتی نامعتبر</translation> + </message> + <message> + <source>missing left delim</source> + <translation>جداکنندهٔ چپ موجود نیست</translation> + </message> + <message> + <source>unexpected end</source> + <translation>انتهای نامنتظره</translation> + </message> + <message> + <source>met internal limit</source> + <translation>رویارویی با محدودیت داخلی</translation> + </message> + <message> + <source>invalid interval</source> + <translation>وقفهٔ نامعتبر</translation> + </message> + <message> + <source>invalid category</source> + <translation>طبقهبندی نامعتبر</translation> + </message> +</context> +<context> + <name>QSQLite2Driver</name> + <message> + <source>Error opening database</source> + <translation>خطا در باز کردن پایگاه داده</translation> + </message> + <message> + <source>Unable to begin transaction</source> + <translation>نمیتوان تراکنش داده را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> +</context> +<context> + <name>QSQLite2Result</name> + <message> + <source>Unable to fetch results</source> + <translation>عدم موفقیت در واکشی نتایج</translation> + </message> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> +</context> +<context> + <name>QSQLiteDriver</name> + <message> + <source>Error opening database</source> + <translation>خطا در باز کردن پایگاه داده</translation> + </message> + <message> + <source>Error closing database</source> + <translation>خطا در بستن پایگاه داده</translation> + </message> + <message> + <source>Unable to begin transaction</source> + <translation>نمیتوان تراکنش را شروع کرد</translation> + </message> + <message> + <source>Unable to commit transaction</source> + <translation>نمیتوان تراکنش را ارسال کرد</translation> + </message> + <message> + <source>Unable to rollback transaction</source> + <translation>نمیتوان تراکنش را بازگرداند</translation> + </message> +</context> +<context> + <name>QSQLiteResult</name> + <message> + <source>Unable to fetch row</source> + <translation>نمیتوان رکورد را واکشی کرد</translation> + </message> + <message> + <source>No query</source> + <translation>درخواست وجود ندارد</translation> + </message> + <message> + <source>Unable to execute statement</source> + <translation>نمیتوان عبارت را اجرا کرد</translation> + </message> + <message> + <source>Unable to reset statement</source> + <translation>نمیتوان عبارت را بازنشانی کرد</translation> + </message> + <message> + <source>Unable to bind parameters</source> + <translation>نمیتوان پارامترها را مقید کرد</translation> + </message> + <message> + <source>Parameter count mismatch</source> + <translation>تعداد پارامترها تطابق ندارد</translation> + </message> +</context> +<context> + <name>QScriptBreakpointsModel</name> + <message> + <source>ID</source> + <translation>شمارهٔ شناسایی</translation> + </message> + <message> + <source>Location</source> + <translation>موقعیت</translation> + </message> + <message> + <source>Condition</source> + <translation>شرایط</translation> + </message> + <message> + <source>Ignore-count</source> + <translation>نادیدهگرفتن-شمارش</translation> + </message> + <message> + <source>Single-shot</source> + <translation>تک-شلیک</translation> + </message> + <message> + <source>Hit-count</source> + <translation>ضربه-شمارش</translation> + </message> +</context> +<context> + <name>QScriptBreakpointsWidget</name> + <message> + <source>New</source> + <translation>جدید</translation> + </message> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> +</context> +<context> + <name>QScriptDebugger</name> + <message> + <source>Go to Line</source> + <translation>برو به خط</translation> + </message> + <message> + <source>Line:</source> + <translation>خط:</translation> + </message> + <message> + <source>Interrupt</source> + <translation>وقفه</translation> + </message> + <message> + <source>Shift+F5</source> + <translation>Shift+F5</translation> + </message> + <message> + <source>Continue</source> + <translation>ادامه</translation> + </message> + <message> + <source>F5</source> + <translation>F5</translation> + </message> + <message> + <source>Step Into</source> + <translation>پرش به داخل</translation> + </message> + <message> + <source>F11</source> + <translation>F11</translation> + </message> + <message> + <source>Step Over</source> + <translation>پرش از روی</translation> + </message> + <message> + <source>F10</source> + <translation>F10</translation> + </message> + <message> + <source>Step Out</source> + <translation>پرش به بیرون</translation> + </message> + <message> + <source>Shift+F11</source> + <translation>Shift+F11</translation> + </message> + <message> + <source>Run to Cursor</source> + <translation>اجرا تا نشانگر</translation> + </message> + <message> + <source>Ctrl+F10</source> + <translation>Ctrl+F10</translation> + </message> + <message> + <source>Run to New Script</source> + <translation>اجرا تا اسکریپت جدید</translation> + </message> + <message> + <source>Toggle Breakpoint</source> + <translation>تغییر وضعیت دادن نقطهٔ شکست</translation> + </message> + <message> + <source>F9</source> + <translation>F9</translation> + </message> + <message> + <source>Clear Debug Output</source> + <translation>پاک کردن خروجی اشکالزدایی</translation> + </message> + <message> + <source>Clear Error Log</source> + <translation>پاک کردن گزارش خطا</translation> + </message> + <message> + <source>Clear Console</source> + <translation>پاک کردن کنسول</translation> + </message> + <message> + <source>&Find in Script...</source> + <translation>&پیدا کردن در اسکریپت...</translation> + </message> + <message> + <source>Ctrl+F</source> + <translation>Ctrl+F</translation> + </message> + <message> + <source>Find &Next</source> + <translation>پیدا کردن &بعدی</translation> + </message> + <message> + <source>F3</source> + <translation>F3</translation> + </message> + <message> + <source>Find &Previous</source> + <translation>پیدا کردن &قبلی</translation> + </message> + <message> + <source>Shift+F3</source> + <translation>Shift+F3</translation> + </message> + <message> + <source>Ctrl+G</source> + <translation>Ctrl+G</translation> + </message> + <message> + <source>Debug</source> + <translation>اشکالزدایی</translation> + </message> +</context> +<context> + <name>QScriptDebuggerCodeFinderWidget</name> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Previous</source> + <translation>قبلی</translation> + </message> + <message> + <source>Next</source> + <translation>بعدی</translation> + </message> + <message> + <source>Case Sensitive</source> + <translation>حساس به بزگ و کوچک بودن نویسهها</translation> + </message> + <message> + <source>Whole words</source> + <translation>تمام واژهها</translation> + </message> + <message> + <source><img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped</source> + <translation><img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;جستجو پیچیده شد</translation> + </message> +</context> +<context> + <name>QScriptDebuggerLocalsModel</name> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Value</source> + <translation>مقدار</translation> + </message> +</context> +<context> + <name>QScriptDebuggerStackModel</name> + <message> + <source>Level</source> + <translation>سطح</translation> + </message> + <message> + <source>Name</source> + <translation>نام</translation> + </message> + <message> + <source>Location</source> + <translation>موقعیت</translation> + </message> +</context> +<context> + <name>QScriptEdit</name> + <message> + <source>Toggle Breakpoint</source> + <translation>تغییر دادن وضعیت نقطهٔ شکست</translation> + </message> + <message> + <source>Disable Breakpoint</source> + <translation>غیرفعال کردن نقطهٔ شکست</translation> + </message> + <message> + <source>Enable Breakpoint</source> + <translation>فعالسازی نقطهٔ شکست</translation> + </message> + <message> + <source>Breakpoint Condition:</source> + <translation>شرط نقطهٔ شکست:</translation> + </message> +</context> +<context> + <name>QScriptEngineDebugger</name> + <message> + <source>Loaded Scripts</source> + <translation>اسکریپت بارگذاریشده</translation> + </message> + <message> + <source>Breakpoints</source> + <translation>نقطهٔ شکست</translation> + </message> + <message> + <source>Stack</source> + <translation>پشته</translation> + </message> + <message> + <source>Locals</source> + <translation>محلیها</translation> + </message> + <message> + <source>Console</source> + <translation>کنسول</translation> + </message> + <message> + <source>Debug Output</source> + <translation>خروجی اشکالزدایی</translation> + </message> + <message> + <source>Error Log</source> + <translation>گزارش خطا</translation> + </message> + <message> + <source>Search</source> + <translation>جستجو</translation> + </message> + <message> + <source>View</source> + <translation>نمایش</translation> + </message> + <message> + <source>Qt Script Debugger</source> + <translation>اشکالزدای اسکریپتی کیوت</translation> + </message> +</context> +<context> + <name>QScriptNewBreakpointWidget</name> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> +</context> +<context> + <name>QScrollBar</name> + <message> + <source>Scroll here</source> + <translation>لغزش به اینجا</translation> + </message> + <message> + <source>Left edge</source> + <translation>گوشهٔ چپ</translation> + </message> + <message> + <source>Top</source> + <translation>بالا</translation> + </message> + <message> + <source>Right edge</source> + <translation>گوشهٔ راست</translation> + </message> + <message> + <source>Bottom</source> + <translation>پایین</translation> + </message> + <message> + <source>Page left</source> + <translation>صفحهٔ چپ</translation> + </message> + <message> + <source>Page up</source> + <translation>صفحهٔ بالا</translation> + </message> + <message> + <source>Page right</source> + <translation>صفحهٔ راست</translation> + </message> + <message> + <source>Page down</source> + <translation>صفحه به پایین</translation> + </message> + <message> + <source>Scroll left</source> + <translation>لغزش به چپ</translation> + </message> + <message> + <source>Scroll up</source> + <translation>لغزش به بالا</translation> + </message> + <message> + <source>Scroll right</source> + <translation>لغزش به راست</translation> + </message> + <message> + <source>Scroll down</source> + <translation>لغزش به پایین</translation> + </message> + <message> + <source>Line up</source> + <translation>به خط شدن</translation> + </message> + <message> + <source>Position</source> + <translation>موقعیت</translation> + </message> + <message> + <source>Line down</source> + <translation>به خط شدن به پایین</translation> + </message> +</context> +<context> + <name>QSharedMemory</name> + <message> + <source>%1: unable to set key on lock</source> + <translation>%1: نمیتوان کلید را روی قفل تنظیم کرد</translation> + </message> + <message> + <source>%1: create size is less then 0</source> + <translation>%1: اندازهٔ ساخت کمتر از صفر است</translation> + </message> + <message> + <source>%1: unable to lock</source> + <translation>%1: نمیتوان قفل کرد</translation> + </message> + <message> + <source>%1: unable to unlock</source> + <translation>%1: نمیتوان قفل را باز کرد</translation> + </message> + <message> + <source>%1: already exists</source> + <translation>%1: هماکنون موجود است</translation> + </message> + <message> + <source>%1: doesn't exists</source> + <translation>%1: وجود ندارد</translation> + </message> + <message> + <source>%1: invalid size</source> + <translation>%1: اندازهٔ نامعتبر</translation> + </message> + <message> + <source>%1: out of resources</source> + <translation>%1: خارج از منابع</translation> + </message> + <message> + <source>%1: permission denied</source> + <translation>%1: حق دسترسی وجود ندارد</translation> + </message> + <message> + <source>%1: unknown error %2</source> + <translation>%1: خطای ناشناخته %2</translation> + </message> + <message> + <source>%1: key error</source> + <translation>%1: خطای کلید</translation> + </message> + <message> + <source>%1: unable to make key</source> + <translation>%1: نمیتوان کلید ایجاد کرد</translation> + </message> + <message> + <source>%1: doesn't exist</source> + <translation>%1: وجود ندارد</translation> + </message> + <message> + <source>%1: key is empty</source> + <translation>%1: کلید تهی است</translation> + </message> + <message> + <source>%1: UNIX key file doesn't exist</source> + <translation>%1: پروندهٔ کلید UNIX وجود ندارد</translation> + </message> + <message> + <source>%1: ftok failed</source> + <translation>%1: عدم موفقیت ftok</translation> + </message> + <message> + <source>%1: system-imposed size restrictions</source> + <translation>%1: محدودیت اندازهٔ تحمیلی سیستم</translation> + </message> + <message> + <source>%1: not attached</source> + <translation>%1: ضمیمه نشد</translation> + </message> + <message> + <source>%1: size query failed</source> + <translation>%1: عدم موفقیت اندازهٔ پرسوجو</translation> + </message> +</context> +<context> + <name>QShortcut</name> + <message> + <source>Space</source> + <extracomment>This and all following "incomprehensible" strings in QShortcut context are key names. Please use the localized names appearing on actual keyboards or whatever is commonly used.</extracomment> + <translation>Space</translation> + </message> + <message> + <source>Esc</source> + <translation>Esc</translation> + </message> + <message> + <source>Tab</source> + <translation>Tab</translation> + </message> + <message> + <source>Backtab</source> + <translation>Backtab</translation> + </message> + <message> + <source>Backspace</source> + <translation>Backspace</translation> + </message> + <message> + <source>Return</source> + <translation>Return</translation> + </message> + <message> + <source>Enter</source> + <translation>Enter</translation> + </message> + <message> + <source>Ins</source> + <translation>Ins</translation> + </message> + <message> + <source>Del</source> + <translation>Del</translation> + </message> + <message> + <source>Pause</source> + <translation>Pause</translation> + </message> + <message> + <source>Print</source> + <translation>Print</translation> + </message> + <message> + <source>SysReq</source> + <translation>SysReq</translation> + </message> + <message> + <source>Home</source> + <translation>Home</translation> + </message> + <message> + <source>End</source> + <translation>End</translation> + </message> + <message> + <source>Left</source> + <translation>Left</translation> + </message> + <message> + <source>Up</source> + <translation>Up</translation> + </message> + <message> + <source>Right</source> + <translation>Right</translation> + </message> + <message> + <source>Down</source> + <translation>Down</translation> + </message> + <message> + <source>PgUp</source> + <translation>PgUp</translation> + </message> + <message> + <source>PgDown</source> + <translation>PgDown</translation> + </message> + <message> + <source>CapsLock</source> + <translation>CapsLock</translation> + </message> + <message> + <source>NumLock</source> + <translation>NumLock</translation> + </message> + <message> + <source>ScrollLock</source> + <translation>ScrollLock</translation> + </message> + <message> + <source>Menu</source> + <translation>Menu</translation> + </message> + <message> + <source>Help</source> + <translation>Help</translation> + </message> + <message> + <source>Back</source> + <translation>Back</translation> + </message> + <message> + <source>Forward</source> + <translation>Forward</translation> + </message> + <message> + <source>Stop</source> + <translation>Stop</translation> + </message> + <message> + <source>Refresh</source> + <translation>Refresh</translation> + </message> + <message> + <source>Volume Down</source> + <translation>Volume Down</translation> + </message> + <message> + <source>Volume Mute</source> + <translation>Volume Mute</translation> + </message> + <message> + <source>Volume Up</source> + <translation>Volume Up</translation> + </message> + <message> + <source>Bass Boost</source> + <translation>Bass Boost</translation> + </message> + <message> + <source>Bass Up</source> + <translation>Bass Up</translation> + </message> + <message> + <source>Bass Down</source> + <translation>Bass Down</translation> + </message> + <message> + <source>Treble Up</source> + <translation>Treble Up</translation> + </message> + <message> + <source>Treble Down</source> + <translation>Treble Down</translation> + </message> + <message> + <source>Media Play</source> + <translation>Media Play</translation> + </message> + <message> + <source>Media Stop</source> + <translation>Media Stop</translation> + </message> + <message> + <source>Media Previous</source> + <translation>Media Previous</translation> + </message> + <message> + <source>Media Next</source> + <translation>Media Next</translation> + </message> + <message> + <source>Media Record</source> + <translation>Media Record</translation> + </message> + <message> + <source>Media Pause</source> + <extracomment>Media player pause button</extracomment> + <translation>Media Pause</translation> + </message> + <message> + <source>Toggle Media Play/Pause</source> + <extracomment>Media player button to toggle between playing and paused</extracomment> + <translation>Toggle Media Play/Pause</translation> + </message> + <message> + <source>Home Page</source> + <translation>Home Page</translation> + </message> + <message> + <source>Favorites</source> + <translation>Favorites</translation> + </message> + <message> + <source>Search</source> + <translation>Search</translation> + </message> + <message> + <source>Standby</source> + <translation>Standby</translation> + </message> + <message> + <source>Open URL</source> + <translation>Open URL</translation> + </message> + <message> + <source>Launch Mail</source> + <translation>Launch Mail</translation> + </message> + <message> + <source>Launch Media</source> + <translation>Launch Media</translation> + </message> + <message> + <source>Launch (0)</source> + <translation>Launch (0)</translation> + </message> + <message> + <source>Launch (1)</source> + <translation>Launch (1)</translation> + </message> + <message> + <source>Launch (2)</source> + <translation>Launch (2)</translation> + </message> + <message> + <source>Launch (3)</source> + <translation>Launch (3)</translation> + </message> + <message> + <source>Launch (4)</source> + <translation>Launch (4)</translation> + </message> + <message> + <source>Launch (5)</source> + <translation>Launch (5)</translation> + </message> + <message> + <source>Launch (6)</source> + <translation>Launch (6)</translation> + </message> + <message> + <source>Launch (7)</source> + <translation>Launch (7)</translation> + </message> + <message> + <source>Launch (8)</source> + <translation>Launch (8)</translation> + </message> + <message> + <source>Launch (9)</source> + <translation>Launch (9)</translation> + </message> + <message> + <source>Launch (A)</source> + <translation>Launch (A)</translation> + </message> + <message> + <source>Launch (B)</source> + <translation>Launch (B)</translation> + </message> + <message> + <source>Launch (C)</source> + <translation>Launch (C)</translation> + </message> + <message> + <source>Launch (D)</source> + <translation>Launch (D)</translation> + </message> + <message> + <source>Launch (E)</source> + <translation>Launch (E)</translation> + </message> + <message> + <source>Launch (F)</source> + <translation>Launch (F)</translation> + </message> + <message> + <source>Monitor Brightness Up</source> + <translation>افزایش درخشش نمایشگر</translation> + </message> + <message> + <source>Monitor Brightness Down</source> + <translation>Monitor Brightness Down</translation> + </message> + <message> + <source>Keyboard Light On/Off</source> + <translation>نور صفحهکلید (روشن/خاموش)</translation> + </message> + <message> + <source>Keyboard Brightness Up</source> + <translation>افزایش درخشش صفحهکلید</translation> + </message> + <message> + <source>Keyboard Brightness Down</source> + <translation>کاهش درخشش صفحهکلید</translation> + </message> + <message> + <source>Power Off</source> + <translation>قطع برق</translation> + </message> + <message> + <source>Wake Up</source> + <translation>بیدار شدن</translation> + </message> + <message> + <source>Eject</source> + <translation>بیرون آوردن</translation> + </message> + <message> + <source>Screensaver</source> + <translation>محافظ صفحه</translation> + </message> + <message> + <source>WWW</source> + <translation>WWW</translation> + </message> + <message> + <source>Sleep</source> + <translation>خواب</translation> + </message> + <message> + <source>LightBulb</source> + <translation>لامپ روشنایی</translation> + </message> + <message> + <source>Shop</source> + <translation>فروشگاه</translation> + </message> + <message> + <source>History</source> + <translation>تاریخ</translation> + </message> + <message> + <source>Add Favorite</source> + <translation>اضافه کردن علایق</translation> + </message> + <message> + <source>Hot Links</source> + <translation>پیوندهای داغ</translation> + </message> + <message> + <source>Adjust Brightness</source> + <translation>تنظیم درخشندگی</translation> + </message> + <message> + <source>Finance</source> + <translation>مالی</translation> + </message> + <message> + <source>Community</source> + <translation>جامعه</translation> + </message> + <message> + <source>Audio Rewind</source> + <translation>برگرداندن صدا</translation> + </message> + <message> + <source>Back Forward</source> + <translation>رو به عقب</translation> + </message> + <message> + <source>Application Left</source> + <translation>چپ برنامه</translation> + </message> + <message> + <source>Application Right</source> + <translation>راست برنامه</translation> + </message> + <message> + <source>Book</source> + <translation>کتاب</translation> + </message> + <message> + <source>CD</source> + <translation>سیدی</translation> + </message> + <message> + <source>Calculator</source> + <translation>ماشینحساب</translation> + </message> + <message> + <source>Clear</source> + <translation>پاک کردن</translation> + </message> + <message> + <source>Clear Grab</source> + <translation>پاک کردن قلاب</translation> + </message> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Copy</source> + <translation>کپی</translation> + </message> + <message> + <source>Cut</source> + <translation>برش</translation> + </message> + <message> + <source>Display</source> + <translation>نمایش</translation> + </message> + <message> + <source>DOS</source> + <translation>DOS</translation> + </message> + <message> + <source>Documents</source> + <translation>اسناد</translation> + </message> + <message> + <source>Spreadsheet</source> + <translation>صفحهگسترده</translation> + </message> + <message> + <source>Browser</source> + <translation>مرورگر</translation> + </message> + <message> + <source>Game</source> + <translation>بازی</translation> + </message> + <message> + <source>Go</source> + <translation>برو</translation> + </message> + <message> + <source>iTouch</source> + <translation>iTouch</translation> + </message> + <message> + <source>Logoff</source> + <translation>خروج</translation> + </message> + <message> + <source>Market</source> + <translation>بازار</translation> + </message> + <message> + <source>Meeting</source> + <translation>ملاقات</translation> + </message> + <message> + <source>Keyboard Menu</source> + <translation>منوی صفحهکلید</translation> + </message> + <message> + <source>Menu PB</source> + <translation>Menu PB</translation> + </message> + <message> + <source>My Sites</source> + <translation>سایتهای من</translation> + </message> + <message> + <source>News</source> + <translation>اخبار</translation> + </message> + <message> + <source>Home Office</source> + <translation>دفتر کار خانگی</translation> + </message> + <message> + <source>Option</source> + <translation>تنظیمات</translation> + </message> + <message> + <source>Paste</source> + <translation>چسباندن</translation> + </message> + <message> + <source>Phone</source> + <translation>تلفن</translation> + </message> + <message> + <source>Reply</source> + <translation>پاسخ</translation> + </message> + <message> + <source>Reload</source> + <translation>بارگذاری مجدد</translation> + </message> + <message> + <source>Rotate Windows</source> + <translation>چرخاندن پنجره</translation> + </message> + <message> + <source>Rotation PB</source> + <translation>چرخش PB</translation> + </message> + <message> + <source>Rotation KB</source> + <translation>چرخش KB</translation> + </message> + <message> + <source>Save</source> + <translation>ذخیره</translation> + </message> + <message> + <source>Send</source> + <translation>ارسال</translation> + </message> + <message> + <source>Spellchecker</source> + <translation>چککنندهٔ املا</translation> + </message> + <message> + <source>Split Screen</source> + <translation>تقسیم صفحه</translation> + </message> + <message> + <source>Support</source> + <translation>پشتیبانی</translation> + </message> + <message> + <source>Task Panel</source> + <translation>صفحهٔ وظیفه</translation> + </message> + <message> + <source>Terminal</source> + <translation>ترمینال</translation> + </message> + <message> + <source>Tools</source> + <translation>ابزار</translation> + </message> + <message> + <source>Travel</source> + <translation>سفر</translation> + </message> + <message> + <source>Video</source> + <translation>ویدئو</translation> + </message> + <message> + <source>Word Processor</source> + <translation>پردازشگر متن</translation> + </message> + <message> + <source>XFer</source> + <translation>XFer</translation> + </message> + <message> + <source>Zoom In</source> + <translation>بزرگنمایی</translation> + </message> + <message> + <source>Zoom Out</source> + <translation>کوچکنمایی</translation> + </message> + <message> + <source>Away</source> + <translation>دور</translation> + </message> + <message> + <source>Messenger</source> + <translation>پیامرسان</translation> + </message> + <message> + <source>WebCam</source> + <translation>وبکم</translation> + </message> + <message> + <source>Mail Forward</source> + <translation>دوباره فرستادن نامه</translation> + </message> + <message> + <source>Pictures</source> + <translation>عکسها</translation> + </message> + <message> + <source>Music</source> + <translation>موسیقی</translation> + </message> + <message> + <source>Battery</source> + <translation>باتری</translation> + </message> + <message> + <source>Bluetooth</source> + <translation>بلوتوث</translation> + </message> + <message> + <source>Wireless</source> + <translation>وایرلس</translation> + </message> + <message> + <source>Ultra Wide Band</source> + <translation>باند فوق پهن</translation> + </message> + <message> + <source>Audio Forward</source> + <translation>صدا - جلوبردن</translation> + </message> + <message> + <source>Audio Repeat</source> + <translation>تکرار صدا</translation> + </message> + <message> + <source>Audio Random Play</source> + <translation>صدا - اجرای تصادفی</translation> + </message> + <message> + <source>Subtitle</source> + <translation>زیرنویس</translation> + </message> + <message> + <source>Audio Cycle Track</source> + <translation>صدا - سیکل قطعه</translation> + </message> + <message> + <source>Time</source> + <translation>زمان</translation> + </message> + <message> + <source>Select</source> + <translation>انتخاب</translation> + </message> + <message> + <source>View</source> + <translation>نمایش</translation> + </message> + <message> + <source>Top Menu</source> + <translation>منوی بالا</translation> + </message> + <message> + <source>Suspend</source> + <translation>انجماد</translation> + </message> + <message> + <source>Hibernate</source> + <translation>خواب</translation> + </message> + <message> + <source>Print Screen</source> + <translation>چاپ کردن صفحه</translation> + </message> + <message> + <source>Page Up</source> + <translation>صفحه به بالا</translation> + </message> + <message> + <source>Page Down</source> + <translation>صفحه به پایین</translation> + </message> + <message> + <source>Caps Lock</source> + <translation>CapsLock</translation> + </message> + <message> + <source>Num Lock</source> + <translation>Num Lock</translation> + </message> + <message> + <source>Number Lock</source> + <translation>Number Lock</translation> + </message> + <message> + <source>Scroll Lock</source> + <translation>Scroll Lock</translation> + </message> + <message> + <source>Insert</source> + <translation>درج</translation> + </message> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> + <message> + <source>Escape</source> + <translation>Escape</translation> + </message> + <message> + <source>System Request</source> + <translation>درخواست سیستم</translation> + </message> + <message> + <source>Yes</source> + <translation>بله</translation> + </message> + <message> + <source>No</source> + <translation>نه</translation> + </message> + <message> + <source>Context1</source> + <translation>زمینهٔ ۱</translation> + </message> + <message> + <source>Context2</source> + <translation>زمینهٔ ۲</translation> + </message> + <message> + <source>Context3</source> + <translation>زمینهٔ ۳</translation> + </message> + <message> + <source>Context4</source> + <translation>زمینهٔ ۴</translation> + </message> + <message> + <source>Call</source> + <extracomment>Button to start a call (note: a separate button is used to end the call)</extracomment> + <translation>فراخوانی</translation> + </message> + <message> + <source>Hangup</source> + <extracomment>Button to end a call (note: a separate button is used to start the call)</extracomment> + <translation>هنگاپ</translation> + </message> + <message> + <source>Toggle Call/Hangup</source> + <extracomment>Button that will hang up if we're in call, or make a call if we're not.</extracomment> + <translation>تغییر وضعیت (فراخوانی/هنگاپ)</translation> + </message> + <message> + <source>Flip</source> + <translation>تلنگر</translation> + </message> + <message> + <source>Voice Dial</source> + <extracomment>Button to trigger voice dialing</extracomment> + <translation>شمارهگیری صوتی</translation> + </message> + <message> + <source>Last Number Redial</source> + <extracomment>Button to redial the last number called</extracomment> + <translation>شمارهگیری مجدد آخرین شماره</translation> + </message> + <message> + <source>Camera Shutter</source> + <extracomment>Button to trigger the camera shutter (take a picture)</extracomment> + <translation>شاتر دوربین</translation> + </message> + <message> + <source>Camera Focus</source> + <extracomment>Button to focus the camera</extracomment> + <translation>زوم دوربین</translation> + </message> + <message> + <source>Kanji</source> + <translation>Kanji</translation> + </message> + <message> + <source>Muhenkan</source> + <translation>Muhenkan</translation> + </message> + <message> + <source>Henkan</source> + <translation>Henkan</translation> + </message> + <message> + <source>Romaji</source> + <translation>Romaji</translation> + </message> + <message> + <source>Hiragana</source> + <translation>Hiragana</translation> + </message> + <message> + <source>Katakana</source> + <translation>Katakana</translation> + </message> + <message> + <source>Hiragana Katakana</source> + <translation>Hiragana Katakana</translation> + </message> + <message> + <source>Zenkaku</source> + <translation>Zenkaku</translation> + </message> + <message> + <source>Hankaku</source> + <translation>Hankaku</translation> + </message> + <message> + <source>Zenkaku Hankaku</source> + <translation>Zenkaku Hankaku</translation> + </message> + <message> + <source>Touroku</source> + <translation>Touroku</translation> + </message> + <message> + <source>Massyo</source> + <translation>Massyo</translation> + </message> + <message> + <source>Kana Lock</source> + <translation>Kana Lock</translation> + </message> + <message> + <source>Kana Shift</source> + <translation>Kana Shift</translation> + </message> + <message> + <source>Eisu Shift</source> + <translation>Eisu Shift</translation> + </message> + <message> + <source>Eisu toggle</source> + <translation>Eisu toggle</translation> + </message> + <message> + <source>Code input</source> + <translation>Code input</translation> + </message> + <message> + <source>Multiple Candidate</source> + <translation>Multiple Candidate</translation> + </message> + <message> + <source>Previous Candidate</source> + <translation>Previous Candidate</translation> + </message> + <message> + <source>Hangul</source> + <translation>Hangul</translation> + </message> + <message> + <source>Hangul Start</source> + <translation>شروع Hangul</translation> + </message> + <message> + <source>Hangul End</source> + <translation>پایان Hangul</translation> + </message> + <message> + <source>Hangul Hanja</source> + <translation>Hangul Hanja</translation> + </message> + <message> + <source>Hangul Jamo</source> + <translation>Hangul Jamo</translation> + </message> + <message> + <source>Hangul Romaja</source> + <translation>Hangul Romaja</translation> + </message> + <message> + <source>Hangul Jeonja</source> + <translation>Hangul Jeonja</translation> + </message> + <message> + <source>Hangul Banja</source> + <translation>Hangul Banja</translation> + </message> + <message> + <source>Hangul PreHanja</source> + <translation>Hangul PreHanja</translation> + </message> + <message> + <source>Hangul PostHanja</source> + <translation>Hangul PostHanja</translation> + </message> + <message> + <source>Hangul Special</source> + <translation>Hangul Special</translation> + </message> + <message> + <source>Ctrl</source> + <translation>Ctrl</translation> + </message> + <message> + <source>Shift</source> + <translation>Shift</translation> + </message> + <message> + <source>Alt</source> + <translation>Alt</translation> + </message> + <message> + <source>Meta</source> + <translation>Meta</translation> + </message> + <message> + <source>+</source> + <translation>+</translation> + </message> + <message> + <source>F%1</source> + <translation>F%1</translation> + </message> +</context> +<context> + <name>QSlider</name> + <message> + <source>Page left</source> + <translation>صفحه به چپ</translation> + </message> + <message> + <source>Page up</source> + <translation>صفحه به بالا</translation> + </message> + <message> + <source>Position</source> + <translation>موقعیت</translation> + </message> + <message> + <source>Page right</source> + <translation>صفحه به راست</translation> + </message> + <message> + <source>Page down</source> + <translation>صفحه به پایین</translation> + </message> +</context> +<context> + <name>QSocks5SocketEngine</name> + <message> + <source>Connection to proxy refused</source> + <translation>اتصال به پروکسی پذیرفته نشد</translation> + </message> + <message> + <source>Connection to proxy closed prematurely</source> + <translation>اتصال به پروکسی نابهنگام بسته شد</translation> + </message> + <message> + <source>Proxy host not found</source> + <translation>میزبان پروکسی پیدا نشد</translation> + </message> + <message> + <source>Connection to proxy timed out</source> + <translation>اتصال به پروکسی با وقفهٔ زمانی روبهرو شد</translation> + </message> + <message> + <source>Proxy authentication failed</source> + <translation>اعتبارسنجی ناموفق پروکسی</translation> + </message> + <message> + <source>Proxy authentication failed: %1</source> + <translation>اعتبارسنجی ناموفق پروکسی: %1</translation> + </message> + <message> + <source>SOCKS version 5 protocol error</source> + <translation>خطای پروتکل سوکت نسخهٔ ۵</translation> + </message> + <message> + <source>General SOCKSv5 server failure</source> + <translation>خرابی عمومی سرور SOCKSv5</translation> + </message> + <message> + <source>Connection not allowed by SOCKSv5 server</source> + <translation>اتصال بهوسیلهٔ سرور SOCKSv5 مجاز نیست</translation> + </message> + <message> + <source>TTL expired</source> + <translation>اTTL منقضی شده است</translation> + </message> + <message> + <source>SOCKSv5 command not supported</source> + <translation>دستور SOCKSv5 پشتیبانی نشده است</translation> + </message> + <message> + <source>Address type not supported</source> + <translation>نوع آدرس پشتیبانی نشده است</translation> + </message> + <message> + <source>Unknown SOCKSv5 proxy error code 0x%1</source> + <translation>کد 0x%1 خطای ناشناختهٔ پروکسی SOCKSv5</translation> + </message> + <message> + <source>Network operation timed out</source> + <translation>عملیات شبکه با وقفهٔ زمانی مواجه شد</translation> + </message> +</context> +<context> + <name>QSoftKeyManager</name> + <message> + <source>Ok</source> + <translation>تأیید</translation> + </message> + <message> + <source>Select</source> + <translation>انتخاب</translation> + </message> + <message> + <source>Done</source> + <translation>انجام شد</translation> + </message> + <message> + <source>Options</source> + <translation>تنظیمات</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> + <message> + <source>Exit</source> + <translation>خروج</translation> + </message> +</context> +<context> + <name>QSpinBox</name> + <message> + <source>More</source> + <translation>بیشتر</translation> + </message> + <message> + <source>Less</source> + <translation>کمتر</translation> + </message> +</context> +<context> + <name>QSql</name> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> + <message> + <source>Delete this record?</source> + <translation>این رکورد حذف شود؟</translation> + </message> + <message> + <source>Yes</source> + <translation>بله</translation> + </message> + <message> + <source>No</source> + <translation>نه</translation> + </message> + <message> + <source>Insert</source> + <translation>درج</translation> + </message> + <message> + <source>Update</source> + <translation>بهروزرسانی</translation> + </message> + <message> + <source>Save edits?</source> + <translation>تغییرات ذخیره شوند؟</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> + <message> + <source>Confirm</source> + <translation>تأیید</translation> + </message> + <message> + <source>Cancel your edits?</source> + <translation>تغییرات خود را لغو میکنید؟</translation> + </message> +</context> +<context> + <name>QSslSocket</name> + <message> + <source>No error</source> + <translation>خطا وجود ندارد</translation> + </message> + <message> + <source>The issuer certificate could not be found</source> + <translation>گواهینامهٔ درخواستکننده پیدا نمیشود</translation> + </message> + <message> + <source>The certificate signature could not be decrypted</source> + <translation>نمیتوان امضای گواهینامه را رمزگشایی نمود</translation> + </message> + <message> + <source>The public key in the certificate could not be read</source> + <translation>کلید عمومی تأییدیه خوانده نمیشود</translation> + </message> + <message> + <source>The signature of the certificate is invalid</source> + <translation>امضای گواهینامه نامعتبر است</translation> + </message> + <message> + <source>The certificate is not yet valid</source> + <translation>گواهینامه هنوز معتبر نیست</translation> + </message> + <message> + <source>The certificate has expired</source> + <translation>گواهینامه باطل شده است</translation> + </message> + <message> + <source>The certificate's notBefore field contains an invalid time</source> + <translation>رشتهٔ notBefore گواهینامه شامل یک آیتم نامعتبر است</translation> + </message> + <message> + <source>The certificate's notAfter field contains an invalid time</source> + <translation>رشتهٔ notAfter گواهینامه شامل یک آیتم نامعتبر است</translation> + </message> + <message> + <source>The certificate is self-signed, and untrusted</source> + <translation>گواهینامه، خود-امضا و غیرقابل اعتماد است</translation> + </message> + <message> + <source>The root certificate of the certificate chain is self-signed, and untrusted</source> + <translation>گواهینامهٔ ریشه در زنجیرهٔ گواهینامهها خود-امضا و غیرقابل اعتماد است</translation> + </message> + <message> + <source>The issuer certificate of a locally looked up certificate could not be found</source> + <translation>گواهینامهٔ درخواستکنندهٔ یک گواهینامهٔ جستجو شدهٔ محلی، پیدا نمیشود</translation> + </message> + <message> + <source>No certificates could be verified</source> + <translation>هیچ گواهینامهای قابل تأیید نیست</translation> + </message> + <message> + <source>One of the CA certificates is invalid</source> + <translation>یکی از گواهینامههای CA نامعتبر است</translation> + </message> + <message> + <source>The basicConstraints path length parameter has been exceeded</source> + <translation>پارامتر طول مسیر basicConstraints از حد تجاوز کرده است</translation> + </message> + <message> + <source>The supplied certificate is unsuitable for this purpose</source> + <translation>تأییدیهٔ تهیهشده برای این هدف نامناسب است</translation> + </message> + <message> + <source>The root CA certificate is not trusted for this purpose</source> + <translation>تأییدیهٔ ریشهٔ CA برای این هدف غیرقابلاطمینان است</translation> + </message> + <message> + <source>The root CA certificate is marked to reject the specified purpose</source> + <translation>تأییدیهٔ ریشهٔ CA برای رد هدف مشخص شدهای مارک شده است</translation> + </message> + <message> + <source>The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate</source> + <translation>شمارهٔ تأییدیهٔ داوطلب جاری پذیرفته نشد زیرا موضوع نام آن با شمارهٔ نام تأییدیهٔ جاری همخوانی ندارد</translation> + </message> + <message> + <source>The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate</source> + <translation>شمارهٔ تأییدیهٔ داوطلب جاری پذیرفته نشد زیرا شمارهٔ نام و شمارهٔ سریال ارائه شده با کلید مجوز تأییدیهٔ جاری همخوانی ندارد</translation> + </message> + <message> + <source>The peer did not present any certificate</source> + <translation>جفت تأییدیهای ارائه نداده است</translation> + </message> + <message> + <source>The host name did not match any of the valid hosts for this certificate</source> + <translation>نام میزبان با نام هیچ یک از میزبانهای معتبر برای این تأییدیه همخوانی ندارد</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> + <message> + <source>Error creating SSL context (%1)</source> + <translation>خطای ایجاد زمینهٔ SSL (%1)</translation> + </message> + <message> + <source>Invalid or empty cipher list (%1)</source> + <translation>لیست رمز تهی یا نامعتبر (%1)</translation> + </message> + <message> + <source>Cannot provide a certificate with no key, %1</source> + <translation>نمیتوان بدون کلید یک تأییدیه تهیه کرد، %1</translation> + </message> + <message> + <source>Error loading local certificate, %1</source> + <translation>خطای بارگذاری تأییدیهٔ محلی، %1</translation> + </message> + <message> + <source>Error loading private key, %1</source> + <translation>خطای بارگذاری کلید اختصاصی، %1</translation> + </message> + <message> + <source>Private key does not certify public key, %1</source> + <translation>کلید اختصاصی کلید عمومی را تأیید نمیکند، %1</translation> + </message> + <message> + <source>Error creating SSL session, %1</source> + <translation>خطای ایجاد جلسهٔ SSL %1</translation> + </message> + <message> + <source>Error creating SSL session: %1</source> + <translation>خطای ایجاد جلسهٔ SSL: %1</translation> + </message> + <message> + <source>Unable to write data: %1</source> + <translation>نمیتوان روی داده نوشت: %1</translation> + </message> + <message> + <source>Unable to decrypt data: %1</source> + <translation>نمیتوان داده را رمزگشایی کرد: %1</translation> + </message> + <message> + <source>Error while reading: %1</source> + <translation>خطا در هنگام خواندن: %1</translation> + </message> + <message> + <source>Error during SSL handshake: %1</source> + <translation>خطا در هنگام دستدهی SSL: %1</translation> + </message> + <message> + <source>The peer certificate is blacklisted</source> + <translation>گواهینامهٔ جفت در لیست سیاه قرار دارد</translation> + </message> +</context> +<context> + <name>QStateMachine</name> + <message> + <source>Missing initial state in compound state '%1'</source> + <translation>حالت مقداردهی گمشده در حالت ترکیب «%1»</translation> + </message> + <message> + <source>Missing default state in history state '%1'</source> + <translation>حالت پیشفرض گمشده در حالت تاریخ «%1»</translation> + </message> + <message> + <source>No common ancestor for targets and source of transition from state '%1'</source> + <translation>فاقد نیای مشترک برای اهداف و منابع انتقالی از حالت «%1»</translation> + </message> + <message> + <source>Unknown error</source> + <translation>خطای ناشناخته</translation> + </message> +</context> +<context> + <name>QSystemSemaphore</name> + <message> + <source>%1: permission denied</source> + <translation>%1: حق دسترسی وجود ندارد</translation> + </message> + <message> + <source>%1: already exists</source> + <translation>%1: هماکنون موجود است</translation> + </message> + <message> + <source>%1: does not exist</source> + <translation>%1: وجود ندارد</translation> + </message> + <message> + <source>%1: out of resources</source> + <translation>%1: خارج از منابع</translation> + </message> + <message> + <source>%1: unknown error %2</source> + <translation>%1: خطای ناشناخته %2</translation> + </message> +</context> +<context> + <name>QTDSDriver</name> + <message> + <source>Unable to open connection</source> + <translation>نمیتوان اتصال را برقرار نمود</translation> + </message> + <message> + <source>Unable to use database</source> + <translation>نمیتوان از پایگاه داده استفاده کرد</translation> + </message> +</context> +<context> + <name>QTabBar</name> + <message> + <source>Scroll Left</source> + <translation>لغزش به چپ</translation> + </message> + <message> + <source>Scroll Right</source> + <translation>لغزش به راست</translation> + </message> +</context> +<context> + <name>QTcpServer</name> + <message> + <source>Operation on socket is not supported</source> + <translation>عملیات روی سوکت پشتیبانی نمیشود</translation> + </message> +</context> +<context> + <name>QTextControl</name> + <message> + <source>&Undo</source> + <translation>&خنثیسازی</translation> + </message> + <message> + <source>&Redo</source> + <translation>&بازانجام</translation> + </message> + <message> + <source>Cu&t</source> + <translation>ب&ریدن</translation> + </message> + <message> + <source>&Copy</source> + <translation>&کپی</translation> + </message> + <message> + <source>Copy &Link Location</source> + <translation>کپی و &پیوند دادن مکان</translation> + </message> + <message> + <source>&Paste</source> + <translation>&چسباندن</translation> + </message> + <message> + <source>Delete</source> + <translation>حذف</translation> + </message> + <message> + <source>Select All</source> + <translation>انتخاب همه</translation> + </message> +</context> +<context> + <name>QToolButton</name> + <message> + <source>Press</source> + <translation>فشار دادن</translation> + </message> + <message> + <source>Open</source> + <translation>باز کردن</translation> + </message> +</context> +<context> + <name>QUdpSocket</name> + <message> + <source>This platform does not support IPv6</source> + <translation>این پلتفرم IPv6 را پشتیبانی نمیکند</translation> + </message> +</context> +<context> + <name>QUndoGroup</name> + <message> + <source>Undo</source> + <translation>خنثیسازی</translation> + </message> + <message> + <source>Redo</source> + <translation>بازانجام</translation> + </message> +</context> +<context> + <name>QUndoModel</name> + <message> + <source><empty></source> + <translation><خالی></translation> + </message> +</context> +<context> + <name>QUndoStack</name> + <message> + <source>Undo</source> + <translation>خنثیسازی</translation> + </message> + <message> + <source>Redo</source> + <translation>بازانجام</translation> + </message> +</context> +<context> + <name>QUnicodeControlCharacterMenu</name> + <message> + <source>LRM Left-to-right mark</source> + <translation>LRM نشانهٔ چپ-به-راست</translation> + </message> + <message> + <source>RLM Right-to-left mark</source> + <translation>RLM نشانهٔ راست-به-چپ</translation> + </message> + <message> + <source>ZWJ Zero width joiner</source> + <translation>ZWJ متصلکننده با عرض صفر</translation> + </message> + <message> + <source>ZWNJ Zero width non-joiner</source> + <translation>ZWNJ فاصلهٔ غیرچسبان بدون عرض</translation> + </message> + <message> + <source>ZWSP Zero width space</source> + <translation>ZWSP فاصلهٔ بدون عرض</translation> + </message> + <message> + <source>LRE Start of left-to-right embedding</source> + <translation>LRE شروع حالت تعبیهشدهٔ چپ-به-راست</translation> + </message> + <message> + <source>RLE Start of right-to-left embedding</source> + <translation>RLE شروع حالت تعبیهشدهٔ راست-به-چپ</translation> + </message> + <message> + <source>LRO Start of left-to-right override</source> + <translation>LRO شروع رویهمگذاری چپ-به-راست</translation> + </message> + <message> + <source>RLO Start of right-to-left override</source> + <translation>RLO شروع رویهمگذاری راست-به-چپ</translation> + </message> + <message> + <source>PDF Pop directional formatting</source> + <translation>PDF قالببندی Pop directional</translation> + </message> + <message> + <source>Insert Unicode control character</source> + <translation>درج نویسهٔ کنترلی یونیکد</translation> + </message> +</context> +<context> + <name>QWebFrame</name> + <message> + <source>Request cancelled</source> + <translation>درخواست لغو شد</translation> + </message> + <message> + <source>Request blocked</source> + <translation>درخواست بلوکه شد</translation> + </message> + <message> + <source>Cannot show URL</source> + <translation>نمیتوان URL را نمایش داد</translation> + </message> + <message> + <source>Frame load interrupted by policy change</source> + <translation>بارگذاری فریم با تغییر سیاست دچار وقفه شد</translation> + </message> + <message> + <source>Cannot show mimetype</source> + <translation>نمیتوان mimetype را نمایش داد</translation> + </message> + <message> + <source>File does not exist</source> + <translation>پرونده وجود ندارد</translation> + </message> +</context> +<context> + <name>QWebPage</name> + <message> + <source>Redirection limit reached</source> + <translation>رسیدن به محدودیت تعیین مسیر</translation> + </message> + <message> + <source>Bad HTTP request</source> + <translation>درخواست HTTP ناهنجار</translation> + </message> + <message numerus="yes"> + <source>%n file(s)</source> + <comment>number of chosen file</comment> + <translation> + <numerusform>%n پرونده</numerusform> + </translation> + </message> + <message> + <source>Submit</source> + <comment>default label for Submit buttons in forms on web pages</comment> + <translation>ارسال</translation> + </message> + <message> + <source>Submit</source> + <comment>Submit (input element) alt text for <input> elements with no alt, title, or value</comment> + <translation>ارسال</translation> + </message> + <message> + <source>Reset</source> + <comment>default label for Reset buttons in forms on web pages</comment> + <translation>بازتنظیم</translation> + </message> + <message> + <source>This is a searchable index. Enter search keywords: </source> + <comment>text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'</comment> + <translation>این یک شاخص قابل جستجو است. کلیدواژههای جستجو را وارد کنید:</translation> + </message> + <message> + <source>Choose File</source> + <comment>title for file button used in HTML forms</comment> + <translation>پرونده را انتخاب کنید</translation> + </message> + <message> + <source>No file selected</source> + <comment>text to display in file button used in HTML forms when no file is selected</comment> + <translation>پروندهای انتخاب نشد</translation> + </message> + <message> + <source>Open in New Window</source> + <comment>Open in New Window context menu item</comment> + <translation>بازکردن در پنجرهٔ جدید</translation> + </message> + <message> + <source>Save Link...</source> + <comment>Download Linked File context menu item</comment> + <translation>ذخیرهٔ پیوند...</translation> + </message> + <message> + <source>Copy Link</source> + <comment>Copy Link context menu item</comment> + <translation>کپی پیوند</translation> + </message> + <message> + <source>Open Image</source> + <comment>Open Image in New Window context menu item</comment> + <translation>بازکردن تصویر</translation> + </message> + <message> + <source>Save Image</source> + <comment>Download Image context menu item</comment> + <translation>ذخیرهٔ تصویر</translation> + </message> + <message> + <source>Copy Image</source> + <comment>Copy Link context menu item</comment> + <translation>کپی تصویر</translation> + </message> + <message> + <source>Open Frame</source> + <comment>Open Frame in New Window context menu item</comment> + <translation>بازکردن فریم</translation> + </message> + <message> + <source>Copy</source> + <comment>Copy context menu item</comment> + <translation>کپی</translation> + </message> + <message> + <source>Go Back</source> + <comment>Back context menu item</comment> + <translation>عقبگرد</translation> + </message> + <message> + <source>Go Forward</source> + <comment>Forward context menu item</comment> + <translation>جلوگرد</translation> + </message> + <message> + <source>Stop</source> + <comment>Stop context menu item</comment> + <translation>توقف</translation> + </message> + <message> + <source>Reload</source> + <comment>Reload context menu item</comment> + <translation>بارگذاری مجدد</translation> + </message> + <message> + <source>Cut</source> + <comment>Cut context menu item</comment> + <translation>برش</translation> + </message> + <message> + <source>Paste</source> + <comment>Paste context menu item</comment> + <translation>چسباندن</translation> + </message> + <message> + <source>No Guesses Found</source> + <comment>No Guesses Found context menu item</comment> + <translation>تخمینی پیدا نشد</translation> + </message> + <message> + <source>Ignore</source> + <comment>Ignore Spelling context menu item</comment> + <translation>نادیده گرفتن</translation> + </message> + <message> + <source>Add To Dictionary</source> + <comment>Learn Spelling context menu item</comment> + <translation>اضافهکردن به دیکشنری</translation> + </message> + <message> + <source>Search The Web</source> + <comment>Search The Web context menu item</comment> + <translation>جستجوی وب</translation> + </message> + <message> + <source>Look Up In Dictionary</source> + <comment>Look Up in Dictionary context menu item</comment> + <translation>جستجو در دیکشنری</translation> + </message> + <message> + <source>Open Link</source> + <comment>Open Link context menu item</comment> + <translation>بازکردن لینک</translation> + </message> + <message> + <source>Ignore</source> + <comment>Ignore Grammar context menu item</comment> + <translation>نادیده گرفتن</translation> + </message> + <message> + <source>Spelling</source> + <comment>Spelling and Grammar context sub-menu item</comment> + <translation>هجی کردن</translation> + </message> + <message> + <source>Show Spelling and Grammar</source> + <comment>menu item title</comment> + <translation>نمایش املا و گرامر</translation> + </message> + <message> + <source>Hide Spelling and Grammar</source> + <comment>menu item title</comment> + <translation>مخفیکردن املا و گرامر</translation> + </message> + <message> + <source>Check Spelling</source> + <comment>Check spelling context menu item</comment> + <translation>بررسی املا</translation> + </message> + <message> + <source>Check Spelling While Typing</source> + <comment>Check spelling while typing context menu item</comment> + <translation>بررسی املا هنگام نوشتن</translation> + </message> + <message> + <source>Check Grammar With Spelling</source> + <comment>Check grammar with spelling context menu item</comment> + <translation>بررسی گرامر در هنگام نوشتن</translation> + </message> + <message> + <source>Fonts</source> + <comment>Font context sub-menu item</comment> + <translation>قلمها</translation> + </message> + <message> + <source>Bold</source> + <comment>Bold context menu item</comment> + <translation>توپر</translation> + </message> + <message> + <source>Italic</source> + <comment>Italic context menu item</comment> + <translation>کج</translation> + </message> + <message> + <source>Underline</source> + <comment>Underline context menu item</comment> + <translation>زیرخطدار</translation> + </message> + <message> + <source>Outline</source> + <comment>Outline context menu item</comment> + <translation>خطوط پیرامونی</translation> + </message> + <message> + <source>Direction</source> + <comment>Writing direction context sub-menu item</comment> + <translation>جهت</translation> + </message> + <message> + <source>Text Direction</source> + <comment>Text direction context sub-menu item</comment> + <translation>جهت متن</translation> + </message> + <message> + <source>Default</source> + <comment>Default writing direction context menu item</comment> + <translation>پیشفرض</translation> + </message> + <message> + <source>Left to Right</source> + <comment>Left to Right context menu item</comment> + <translation>چپ به راست</translation> + </message> + <message> + <source>Right to Left</source> + <comment>Right to Left context menu item</comment> + <translation>راست به چپ</translation> + </message> + <message> + <source>Inspect</source> + <comment>Inspect Element context menu item</comment> + <translation>بررسیکردن</translation> + </message> + <message> + <source>No recent searches</source> + <comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment> + <translation>جستجویی انجام نشده</translation> + </message> + <message> + <source>Recent searches</source> + <comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment> + <translation>جستجوهای پیشین</translation> + </message> + <message> + <source>Clear recent searches</source> + <comment>menu item in Recent Searches menu that empties menu's contents</comment> + <translation>پاککردن جستجوهای پیشین</translation> + </message> + <message> + <source>Missing Plug-in</source> + <comment>Label text to be used when a plug-in is missing</comment> + <translation>افزونهٔ گمشده</translation> + </message> + <message> + <source>Unknown</source> + <comment>Unknown filesize FTP directory listing item</comment> + <translation>ناشناخته</translation> + </message> + <message> + <source>%1 (%2x%3 pixels)</source> + <comment>Title string for images</comment> + <translation>%1 (%2x%3 پیکسل)</translation> + </message> + <message> + <source>Loading...</source> + <comment>Media controller status message when the media is loading</comment> + <translation>بارگذاری...</translation> + </message> + <message> + <source>Live Broadcast</source> + <comment>Media controller status message when watching a live broadcast</comment> + <translation>پخش زنده</translation> + </message> + <message> + <source>Audio Element</source> + <comment>Media controller element</comment> + <translation>عنصر صوتی</translation> + </message> + <message> + <source>Video Element</source> + <comment>Media controller element</comment> + <translation>عنصر تصویری</translation> + </message> + <message> + <source>Mute Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ قطع صدا</translation> + </message> + <message> + <source>Unmute Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ وصل صدا</translation> + </message> + <message> + <source>Play Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ اجرا</translation> + </message> + <message> + <source>Pause Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ توقف</translation> + </message> + <message> + <source>Slider</source> + <comment>Media controller element</comment> + <translation>لغزنده</translation> + </message> + <message> + <source>Slider Thumb</source> + <comment>Media controller element</comment> + <translation>بندانگشتی لغزنده</translation> + </message> + <message> + <source>Rewind Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ پیچاندن</translation> + </message> + <message> + <source>Return to Real-time Button</source> + <comment>Media controller element</comment> + <translation>بازگشت به دکمهٔ زمان-واقعی</translation> + </message> + <message> + <source>Elapsed Time</source> + <comment>Media controller element</comment> + <translation>زمان صرف شده</translation> + </message> + <message> + <source>Remaining Time</source> + <comment>Media controller element</comment> + <translation>زمان باقیمانده</translation> + </message> + <message> + <source>Status Display</source> + <comment>Media controller element</comment> + <translation>نمایش وضعیت</translation> + </message> + <message> + <source>Fullscreen Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ تمامصفحه</translation> + </message> + <message> + <source>Seek Forward Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ لغزش رو به جلو</translation> + </message> + <message> + <source>Seek Back Button</source> + <comment>Media controller element</comment> + <translation>دکمهٔ لغزش رو به عقب</translation> + </message> + <message> + <source>Audio element playback controls and status display</source> + <comment>Media controller element</comment> + <translation>کنترلها و نمایش وضعیت پخش عنصر صوتی</translation> + </message> + <message> + <source>Video element playback controls and status display</source> + <comment>Media controller element</comment> + <translation>کنترلها و نمایش وضعیت پخش عنصر تصویری</translation> + </message> + <message> + <source>Mute audio tracks</source> + <comment>Media controller element</comment> + <translation>خاموشکردن قطعههای صوتی</translation> + </message> + <message> + <source>Unmute audio tracks</source> + <comment>Media controller element</comment> + <translation>روشنکردن قطعههای صوتی</translation> + </message> + <message> + <source>Begin playback</source> + <comment>Media controller element</comment> + <translation>شروع پخش</translation> + </message> + <message> + <source>Pause playback</source> + <comment>Media controller element</comment> + <translation>توقف پخش</translation> + </message> + <message> + <source>Movie time scrubber</source> + <comment>Media controller element</comment> + <translation>پاککنندهٔ زمان فیلم</translation> + </message> + <message> + <source>Movie time scrubber thumb</source> + <comment>Media controller element</comment> + <translation>بندانگشتی پاککنندهٔ زمان فیلم</translation> + </message> + <message> + <source>Rewind movie</source> + <comment>Media controller element</comment> + <translation> عقبگرد فیلم</translation> + </message> + <message> + <source>Return streaming movie to real-time</source> + <comment>Media controller element</comment> + <translation>بازگشت جریان فیلم به زمان-واقعی</translation> + </message> + <message> + <source>Current movie time</source> + <comment>Media controller element</comment> + <translation>زمان جاری فیلم</translation> + </message> + <message> + <source>Remaining movie time</source> + <comment>Media controller element</comment> + <translation>زمان باقیماندهٔ فیلم</translation> + </message> + <message> + <source>Current movie status</source> + <comment>Media controller element</comment> + <translation>وضعیت جاری فیلم</translation> + </message> + <message> + <source>Play movie in full-screen mode</source> + <comment>Media controller element</comment> + <translation>اجرای فیلم در حالت تمام صفحه</translation> + </message> + <message> + <source>Seek quickly back</source> + <comment>Media controller element</comment> + <translation>لغزش سریع رو به عقب</translation> + </message> + <message> + <source>Seek quickly forward</source> + <comment>Media controller element</comment> + <translation>لغزش سریع رو به جلو</translation> + </message> + <message> + <source>Indefinite time</source> + <comment>Media time description</comment> + <translation>زمان نامعلوم</translation> + </message> + <message> + <source>%1 days %2 hours %3 minutes %4 seconds</source> + <comment>Media time description</comment> + <translation>%1 روز %2 ساعت %3 دقیقه %4 ثانیه</translation> + </message> + <message> + <source>%1 hours %2 minutes %3 seconds</source> + <comment>Media time description</comment> + <translation>%1 ساعت %2 دقیقه %3 ثانیه</translation> + </message> + <message> + <source>%1 minutes %2 seconds</source> + <comment>Media time description</comment> + <translation>%1 دقیقه %2 ثانیه</translation> + </message> + <message> + <source>%1 seconds</source> + <comment>Media time description</comment> + <translation>%1 ثانیه</translation> + </message> + <message> + <source>Scroll here</source> + <translation>لغزش به اینجا</translation> + </message> + <message> + <source>Left edge</source> + <translation>یال چپ</translation> + </message> + <message> + <source>Top</source> + <translation>بالا</translation> + </message> + <message> + <source>Right edge</source> + <translation>یال راست</translation> + </message> + <message> + <source>Bottom</source> + <translation>کف</translation> + </message> + <message> + <source>Page left</source> + <translation>صفحه به چپ</translation> + </message> + <message> + <source>Page up</source> + <translation>صفحه به بالا</translation> + </message> + <message> + <source>Page right</source> + <translation>صفحه به راست</translation> + </message> + <message> + <source>Page down</source> + <translation>صفحه به پایین</translation> + </message> + <message> + <source>Scroll left</source> + <translation>لغزش به چپ</translation> + </message> + <message> + <source>Scroll up</source> + <translation>لغزش به بالا</translation> + </message> + <message> + <source>Scroll right</source> + <translation>لغزش به راست</translation> + </message> + <message> + <source>Scroll down</source> + <translation>لغزش به پایین</translation> + </message> + <message> + <source>JavaScript Alert - %1</source> + <translation>اخطار جاوااسکریپت - %1</translation> + </message> + <message> + <source>JavaScript Confirm - %1</source> + <translation>تأیید جاوااسکریپت - %1</translation> + </message> + <message> + <source>JavaScript Prompt - %1</source> + <translation>عکسالعمل جاوااسکریپت - %1</translation> + </message> + <message> + <source>JavaScript Problem - %1</source> + <translation>مشکل جاوااسکریپت - %1</translation> + </message> + <message> + <source>The script on this page appears to have a problem. Do you want to stop the script?</source> + <translation>به نظر میرسد اسکریپت در این صفحه مشکلی دارد. آیا مایل هستید اسکریپت را متوقف کنید؟</translation> + </message> + <message> + <source>Move the cursor to the next character</source> + <translation>نشانگر را به نویسهٔ بعدی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the previous character</source> + <translation>نشانگر را به نویسهٔ قبلی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the next word</source> + <translation>نشانگر را به کلمهٔ بعدی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the previous word</source> + <translation>نشانگر را به کلمهٔ قبلی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the next line</source> + <translation>نشانگر را به خط بعدی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the previous line</source> + <translation>نشانگر را به خط قبلی حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the start of the line</source> + <translation>نشانگر را به شروع خط حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the end of the line</source> + <translation>نشانگر را به پایان خط حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the start of the block</source> + <translation>نشانگر را به شروع بلاک حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the end of the block</source> + <translation>نشانگر را به پایان بلاک حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the start of the document</source> + <translation>نشانگر را به شروع سند حرکت بده</translation> + </message> + <message> + <source>Move the cursor to the end of the document</source> + <translation>نشانگر را به پایان سند حرکت بده</translation> + </message> + <message> + <source>Select all</source> + <translation>انتخاب همه</translation> + </message> + <message> + <source>Select to the next character</source> + <translation>انتخاب کاراکتر بعدی</translation> + </message> + <message> + <source>Select to the previous character</source> + <translation>انتخاب کاراکتر قبلی</translation> + </message> + <message> + <source>Select to the next word</source> + <translation>انتخاب کلمهٔ بعدی</translation> + </message> + <message> + <source>Select to the previous word</source> + <translation>انتخاب کلمهٔ قبلی</translation> + </message> + <message> + <source>Select to the next line</source> + <translation>انتخاب خط بعدی</translation> + </message> + <message> + <source>Select to the previous line</source> + <translation>انتخاب خط قبلی</translation> + </message> + <message> + <source>Select to the start of the line</source> + <translation>انتخاب شروع خط</translation> + </message> + <message> + <source>Select to the end of the line</source> + <translation>انتخاب پایان خط</translation> + </message> + <message> + <source>Select to the start of the block</source> + <translation>انتخاب شروع بلاک</translation> + </message> + <message> + <source>Select to the end of the block</source> + <translation>انتخاب پایان بلاک</translation> + </message> + <message> + <source>Select to the start of the document</source> + <translation>انتخاب شروع سند</translation> + </message> + <message> + <source>Select to the end of the document</source> + <translation>انتخاب پایان سند</translation> + </message> + <message> + <source>Delete to the start of the word</source> + <translation>انتخاب شروع کلمه</translation> + </message> + <message> + <source>Delete to the end of the word</source> + <translation>انتخاب پایان کلمه</translation> + </message> + <message> + <source>Insert a new paragraph</source> + <translation>درج پاراگراف جدید</translation> + </message> + <message> + <source>Insert a new line</source> + <translation>درج خط جدید</translation> + </message> + <message> + <source>Paste and Match Style</source> + <translation>چسباندن و تطبیق سبک</translation> + </message> + <message> + <source>Remove formatting</source> + <translation>حذف قالببندی</translation> + </message> + <message> + <source>Strikethrough</source> + <translation>خطدار</translation> + </message> + <message> + <source>Subscript</source> + <translation>زیرنگاشت</translation> + </message> + <message> + <source>Superscript</source> + <translation>بالانگاشت</translation> + </message> + <message> + <source>Insert Bulleted List</source> + <translation>درج سیاههٔ نقطهدار</translation> + </message> + <message> + <source>Insert Numbered List</source> + <translation>درج سیاههٔ شمارهدار</translation> + </message> + <message> + <source>Indent</source> + <translation>تورفتگی</translation> + </message> + <message> + <source>Outdent</source> + <translation>بیرونزدگی</translation> + </message> + <message> + <source>Center</source> + <translation>مرکز</translation> + </message> + <message> + <source>Justify</source> + <translation>تراز از دو طرف</translation> + </message> + <message> + <source>Align Left</source> + <translation>ترازکردن از چپ</translation> + </message> + <message> + <source>Align Right</source> + <translation>ترازکردن از راست</translation> + </message> + <message> + <source>Web Inspector - %2</source> + <translation>بررسیکنندهٔ وب - %2</translation> + </message> +</context> +<context> + <name>QWhatsThisAction</name> + <message> + <source>What's This?</source> + <translation>این چیست؟</translation> + </message> +</context> +<context> + <name>QWidget</name> + <message> + <source>*</source> + <translation>*</translation> + </message> +</context> +<context> + <name>QWizard</name> + <message> + <source>Go Back</source> + <translation>برو عقب</translation> + </message> + <message> + <source>< &Back</source> + <translation>< &عقب</translation> + </message> + <message> + <source>Continue</source> + <translation>ادامه</translation> + </message> + <message> + <source>&Next</source> + <translation>بع&دی</translation> + </message> + <message> + <source>&Next ></source> + <translation>بع&دی ></translation> + </message> + <message> + <source>Commit</source> + <translation>ارسال</translation> + </message> + <message> + <source>Done</source> + <translation>انجام شد</translation> + </message> + <message> + <source>&Finish</source> + <translation>پایا&ن</translation> + </message> + <message> + <source>Cancel</source> + <translation>لغو</translation> + </message> + <message> + <source>Help</source> + <translation>کمک</translation> + </message> + <message> + <source>&Help</source> + <translation>&کمک</translation> + </message> +</context> +<context> + <name>QWorkspace</name> + <message> + <source>Close</source> + <translation>بستن</translation> + </message> + <message> + <source>Minimize</source> + <translation>کوچک کردن</translation> + </message> + <message> + <source>Restore Down</source> + <translation>بازیابی به پایین</translation> + </message> + <message> + <source>&Restore</source> + <translation>با&زیابی</translation> + </message> + <message> + <source>&Move</source> + <translation>&حرکت</translation> + </message> + <message> + <source>&Size</source> + <translation>&اندازه</translation> + </message> + <message> + <source>Mi&nimize</source> + <translation>کوچ&ک کردن</translation> + </message> + <message> + <source>Ma&ximize</source> + <translation>بزر&گ کردن</translation> + </message> + <message> + <source>&Close</source> + <translation>&بستن</translation> + </message> + <message> + <source>Stay on &Top</source> + <translation>بالاتر ب&ماند</translation> + </message> + <message> + <source>Sh&ade</source> + <translation>&سایه</translation> + </message> + <message> + <source>%1 - [%2]</source> + <translation>%1 ـ [%2]</translation> + </message> + <message> + <source>&Unshade</source> + <translation>بازنشانی &سایه</translation> + </message> +</context> +<context> + <name>QXml</name> + <message> + <source>no error occurred</source> + <translation>خطایی رخ نداد</translation> + </message> + <message> + <source>error triggered by consumer</source> + <translation>خطای تحریک شده بهوسیلهٔ مصرفکننده</translation> + </message> + <message> + <source>unexpected end of file</source> + <translation>انتهای نامنتظرهٔ پرونده</translation> + </message> + <message> + <source>more than one document type definition</source> + <translation>بیشتر از یک تعریف نوع سند</translation> + </message> + <message> + <source>error occurred while parsing element</source> + <translation>خطا در هنگام تحلیل عنصر رخ داد</translation> + </message> + <message> + <source>tag mismatch</source> + <translation>عدم تطابق نشانه</translation> + </message> + <message> + <source>error occurred while parsing content</source> + <translation>خطا در هنگام تحلیل محتوا رخ داد</translation> + </message> + <message> + <source>unexpected character</source> + <translation>نویسهٔ غیرمنتظرهٔ</translation> + </message> + <message> + <source>invalid name for processing instruction</source> + <translation>نام نامعتبر برای معرفی پردازش</translation> + </message> + <message> + <source>version expected while reading the XML declaration</source> + <translation>هنگام خواندن XML نسخه نیاز است</translation> + </message> + <message> + <source>wrong value for standalone declaration</source> + <translation>مقدار اشتباه برای بیان مستقل</translation> + </message> + <message> + <source>encoding declaration or standalone declaration expected while reading the XML declaration</source> + <translation>هنگام خواندن XML بیان کدگذاری یا بیان مستقل نیاز است</translation> + </message> + <message> + <source>standalone declaration expected while reading the XML declaration</source> + <translation>هنگام خواندن XML بیان مستقل نیاز است</translation> + </message> + <message> + <source>error occurred while parsing document type definition</source> + <translation>خطا در هنگام تحلیل نوع تعریف سند رخ داد</translation> + </message> + <message> + <source>letter is expected</source> + <translation>حرف مورد انتظار است</translation> + </message> + <message> + <source>error occurred while parsing comment</source> + <translation>خطا در هنگام تحلیل پیام رخ داد</translation> + </message> + <message> + <source>error occurred while parsing reference</source> + <translation>خطا در هنگام تحلیل مرجع رخ داد</translation> + </message> + <message> + <source>internal general entity reference not allowed in DTD</source> + <translation>موجودیت عمومی داخلی مرجع در DTD مجاز نیست</translation> + </message> + <message> + <source>external parsed general entity reference not allowed in attribute value</source> + <translation>موجودیت عمومی تجزیهشدهٔ خارجی مرجع در مقدار صفت مجاز نیست</translation> + </message> + <message> + <source>external parsed general entity reference not allowed in DTD</source> + <translation>موجودیت عمومی تجزیهشدهٔ خارجی مرجع در DTD مجاز نیست</translation> + </message> + <message> + <source>unparsed entity reference in wrong context</source> + <translation>موجودیت عمومی تجزیهنشدهٔ مرجع در زمینهٔ اشتباه</translation> + </message> + <message> + <source>recursive entities</source> + <translation>موجودیتهای بازگشتی</translation> + </message> + <message> + <source>error in the text declaration of an external entity</source> + <translation>خطا در بیان متنی یک موجودیت خارجی</translation> + </message> +</context> +<context> + <name>QXmlPatternistCLI</name> + <message> + <source>Warning in %1, at line %2, column %3: %4</source> + <translation>اخطار در %1 ،در خط %2 ، ستون %3: %4</translation> + </message> + <message> + <source>Warning in %1: %2</source> + <translation>اخطار در %1: %2</translation> + </message> + <message> + <source>Unknown location</source> + <translation>موقعیت ناشناخته</translation> + </message> + <message> + <source>Error %1 in %2, at line %3, column %4: %5</source> + <translation>خطای %1 در %2 ،در خط %3 ، ستون %4: %5</translation> + </message> + <message> + <source>Error %1 in %2: %3</source> + <translation>خطای %1 در %2: %3</translation> + </message> +</context> +<context> + <name>QXmlStream</name> + <message> + <source>Extra content at end of document.</source> + <translation>محتویات اضافه در انتهای سند.</translation> + </message> + <message> + <source>Invalid entity value.</source> + <translation>مقدار موجودیت نامعتبر.</translation> + </message> + <message> + <source>Invalid XML character.</source> + <translation>نویسهٔ نامعتبر XML.</translation> + </message> + <message> + <source>Sequence ']]>' not allowed in content.</source> + <translation>رشتهٔ «<[[» در محتوا مجاز نیست.</translation> + </message> + <message> + <source>Encountered incorrectly encoded content.</source> + <translation>رویارویی با محتوای کدگذاری شده بهشکل نادرست.</translation> + </message> + <message> + <source>Namespace prefix '%1' not declared</source> + <translation>پیشوند «%1» فضاینامی تعریف نشده است</translation> + </message> + <message> + <source>Illegal namespace declaration.</source> + <translation>بیان غیرمجاز فضاینامی.</translation> + </message> + <message> + <source>Attribute redefined.</source> + <translation>بازتعریف صفت.</translation> + </message> + <message> + <source>Unexpected character '%1' in public id literal.</source> + <translation>نویسهٔ غیرمنتظرهٔ «%1» در رشتهٔ id عمومی.</translation> + </message> + <message> + <source>Invalid XML version string.</source> + <translation>رشتهٔ نامعتبر نسخهٔ XML.</translation> + </message> + <message> + <source>Unsupported XML version.</source> + <translation>نسخهٔ پشتیبانی نشدهٔ XML.</translation> + </message> + <message> + <source>The standalone pseudo attribute must appear after the encoding.</source> + <translation>صفت مستقل کاذب باید بعد از کدگذاری ظاهر شود.</translation> + </message> + <message> + <source>%1 is an invalid encoding name.</source> + <translation>%1 یک نام کدگذاری نامعتبر است.</translation> + </message> + <message> + <source>Encoding %1 is unsupported</source> + <translation>کدگذاری %1 پشتیبانی نشده است</translation> + </message> + <message> + <source>Standalone accepts only yes or no.</source> + <translation>پذیرفتنهای مستقل فقط بله یا خیر.</translation> + </message> + <message> + <source>Invalid attribute in XML declaration.</source> + <translation>صفت نامعتبر در بیان XML.</translation> + </message> + <message> + <source>Premature end of document.</source> + <translation>پایان نابههنگام سند.</translation> + </message> + <message> + <source>Invalid document.</source> + <translation>سند نامعتبر.</translation> + </message> + <message> + <source>Expected </source> + <translation>مورد انتظار</translation> + </message> + <message> + <source>, but got '</source> + <translation>، اما دریافت شده: '</translation> + </message> + <message> + <source>Unexpected '</source> + <translation>نامنتظره '</translation> + </message> + <message> + <source>Expected character data.</source> + <translation>دادهٔ نویسه مورد انتظار است.</translation> + </message> + <message> + <source>Recursive entity detected.</source> + <translation>موجودیت بازگشتی پیدا شد.</translation> + </message> + <message> + <source>Start tag expected.</source> + <translation>نشانهٔ شروع مورد انتظار.</translation> + </message> + <message> + <source>NDATA in parameter entity declaration.</source> + <translation>NDATA در بیان موجودیت پارامتر.</translation> + </message> + <message> + <source>XML declaration not at start of document.</source> + <translation>بیان XML در ابتدای سند نیست.</translation> + </message> + <message> + <source>%1 is an invalid processing instruction name.</source> + <translation>%1 یک دستورالعمل پردازشی نامعتبر است.</translation> + </message> + <message> + <source>Invalid processing instruction name.</source> + <translation>دستورالعمل پردازشی نامعتبر.</translation> + </message> + <message> + <source>%1 is an invalid PUBLIC identifier.</source> + <translation>%1 یک شناسهٔ عمومی نامعتبر است.</translation> + </message> + <message> + <source>Invalid XML name.</source> + <translation>نام XML نامعتبر.</translation> + </message> + <message> + <source>Opening and ending tag mismatch.</source> + <translation>نشانهٔ شروع و پایان نامناسب.</translation> + </message> + <message> + <source>Entity '%1' not declared.</source> + <translation>موجودیت «%1» بیان نشده است.</translation> + </message> + <message> + <source>Reference to unparsed entity '%1'.</source> + <translation>ارجاع به موجودیت تحلیلنشده «%1».</translation> + </message> + <message> + <source>Reference to external entity '%1' in attribute value.</source> + <translatorcomment>ارجاع به موجودیت خارجی «%1» در مقدار صفت.</translatorcomment> + <translation></translation> + </message> + <message> + <source>Invalid character reference.</source> + <translation>ارجاع کاراکتر نامعتبر.</translation> + </message> +</context> +<context> + <name>QtXmlPatterns</name> + <message> + <source>%1 is an unsupported encoding.</source> + <translation>%1 یک کدگذاری پشتیبانی نشده است.</translation> + </message> + <message> + <source>%1 contains octets which are disallowed in the requested encoding %2.</source> + <translation>%1 شامل هشتاییهایی است که در کدگذاری درخواست شده توسط %2 مجاز نیستند.</translation> + </message> + <message> + <source>The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.</source> + <translation>کدنقطهٔ %1، در %2 واقع میشود از کدگذاری %3 استفاده میکند، یک نویسهٔ XML نامعتبر است.</translation> + </message> + <message> + <source>Network timeout.</source> + <translation>وقفهٔ زمانی شبکه.</translation> + </message> + <message> + <source>Element %1 can't be serialized because it appears outside the document element.</source> + <translation>عنصر %1 نمیتواند سریالیزه شود زیرا خارج از عنصر سند به نظر میرسد.</translation> + </message> + <message> + <source>Attribute %1 can't be serialized because it appears at the top level.</source> + <translation>صفت %1 نمیتواند مرتب شود زیرا در سطح بالا به نظر میرسد.</translation> + </message> + <message> + <source>Year %1 is invalid because it begins with %2.</source> + <translation>سال %1 نامعتبر است زیرا با %2 شروع میشود.</translation> + </message> + <message> + <source>Day %1 is outside the range %2..%3.</source> + <translation>روز %1 خارج از دامنهٔ %2 است..%3.</translation> + </message> + <message> + <source>Month %1 is outside the range %2..%3.</source> + <translation>ماه %1 خارج از دامنهٔ %2 است..%3.</translation> + </message> + <message> + <source>Overflow: Can't represent date %1.</source> + <translation>سرریز: نمیتوان تاریخ %1 را نمایش داد.</translation> + </message> + <message> + <source>Day %1 is invalid for month %2.</source> + <translation>روز %1 برای ماه %2 نامعتبر است.</translation> + </message> + <message> + <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source> + <translation>زمان ۲۴ ساعتی: %1 %2 %3 نامعتبر است. زمان ۲۴ ساعتی است اما دقیقه، ثانیه و میلیثانیه صفر نیستند؛</translation> + </message> + <message> + <source>Time %1:%2:%3.%4 is invalid.</source> + <translation>زمان %1:%2:%3.%4 نامعتبر است.</translation> + </message> + <message> + <source>Overflow: Date can't be represented.</source> + <translation>سرریز: نمیتوان تاریخ را نمایش داد.</translation> + </message> + <message> + <source>At least one component must be present.</source> + <translation>حداقل یک جزء باید نمایش داده شود.</translation> + </message> + <message> + <source>At least one time component must appear after the %1-delimiter.</source> + <translation>حداقل یک جزء زمان باید بعد از حائل %1 ظاهر شود.</translation> + </message> + <message> + <source>%1 is not a valid value of type %2.</source> + <translation>%1 یک مقدار معتبر از نوع %2 نیست.</translation> + </message> + <message> + <source>When casting to %1 from %2, the source value cannot be %3.</source> + <translation>هنگام تبدیل از %2 به %1، مقدار مبدأ نمیتواند %3 شود.</translation> + </message> + <message> + <source>Integer division (%1) by zero (%2) is undefined.</source> + <translation>تقسیم صحیح (%1) بر صفر (%2) تعریف نشده است.</translation> + </message> + <message> + <source>Division (%1) by zero (%2) is undefined.</source> + <translation>تقسیم (%1) بر صفر (%2) تعریف نشده است.</translation> + </message> + <message> + <source>Modulus division (%1) by zero (%2) is undefined.</source> + <translation>باقیماندهگیری (%1) از صفر (%2) تعریف نشده است.</translation> + </message> + <message> + <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source> + <translation>تقسیم مقادیر از نوع %1 بر %2 (غیر عددی) مجاز نیست.</translation> + </message> + <message> + <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source> + <translation>تقسیم مقادیر از نوع %1 بر %2 یا %3 (+ یا - صفر) مجاز نیست.</translation> + </message> + <message> + <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source> + <translation>ضرب مقادیر از نوع %1 در %2 یا %3 (+ یا - بینهایت) مجاز نیست.</translation> + </message> + <message> + <source>A value of type %1 cannot have an Effective Boolean Value.</source> + <translation>مقدار از نوع %1 نمیتواند مقدار مؤثر منطقی داشتهباشد.</translation> + </message> + <message> + <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source> + <translation>مقدار مؤثر بولین نمیتواند برای رشتهای با دو یا چند مقدار اتمی محاسبه شود.</translation> + </message> + <message> + <source>Value %1 of type %2 exceeds maximum (%3).</source> + <translation>مقدار %1 از نوع %2 از حد ماکزیمم (%3) تجاوز میکند.</translation> + </message> + <message> + <source>Value %1 of type %2 is below minimum (%3).</source> + <translation>مقدار %1 از نوع %2 زیر حد کمینه (%3) است.</translation> + </message> + <message> + <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source> + <translation>یک مقدار از نوع %1 باید تعداد زوج اعداد باشد. مقدار %2 این طور نیست.</translation> + </message> + <message> + <source>%1 is not valid as a value of type %2.</source> + <translation>%1 به عنوان مقداری از نوع %2 معتبر نیست.</translation> + </message> + <message> + <source>Ambiguous rule match.</source> + <translation>قاعدهٔ تطبیق مبهم.</translation> + </message> + <message> + <source>Operator %1 cannot be used on type %2.</source> + <translation>عملگر %1 روی نوع %2 قابل اجرا نیست.</translation> + </message> + <message> + <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source> + <translation>عملگر %1 روی مقادیر اتمی از نوع %2 و %3 قابل اجرا نیست.</translation> + </message> + <message> + <source>The namespace URI in the name for a computed attribute cannot be %1.</source> + <translation>نام فضاینامی URL برای یک صفت محاسبه شده نمیتواند %1 باشد.</translation> + </message> + <message> + <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source> + <translation>نام صفت محاسبه شده نمیتواند فضای نامی URL %1 را با نام محلی %2 داشته باشد.</translation> + </message> + <message> + <source>Type error in cast, expected %1, received %2.</source> + <translation>خطای نوع در تبدیل، مورد انتظار %1، دریافت شده %2.</translation> + </message> + <message> + <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source> + <translation>هنگامی که به %1 تبدیل میکنیم با انواع از آن مشتق میشوند، مقدار اولیه باید همان یا رشته باشد. نوع %2 مجاز نیست.</translation> + </message> + <message> + <source>A comment cannot contain %1</source> + <translation>یک توضیح نمیتواند شامل %1 باشد</translation> + </message> + <message> + <source>A comment cannot end with a %1.</source> + <translation>یک توضیح نمیتواند با یک %1 تمام شود.</translation> + </message> + <message> + <source>In a namespace constructor, the value for a namespace cannot be an empty string.</source> + <translation>در یک سازندهٔ فضاینامی، مقدار فضاینامی نمیتواند یک رشتهٔ خالی باشد.</translation> + </message> + <message> + <source>The prefix must be a valid %1, which %2 is not.</source> + <translation>پیشوند باید یک %1 معتبر باشد، که %2 نیست.</translation> + </message> + <message> + <source>The prefix %1 cannot be bound.</source> + <translation>پیشوند %1 نمیتواند مقید شود.</translation> + </message> + <message> + <source>Only the prefix %1 can be bound to %2 and vice versa.</source> + <translation>فقط پیشوند %1 میتواند به %2 مقید شود و برعکس.</translation> + </message> + <message> + <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source> + <translation>یک گرهٔ صفت نمیتواند فرزند یک گرهٔ سند باشد. بنابراین، صفت %1 خارج از مکان است.</translation> + </message> + <message> + <source>A library module cannot be evaluated directly. It must be imported from a main module.</source> + <translation>یک ماژول کتابخانهای نمیتواند به تنهایی بررسی شود. آن باید از یک ماژول اصلی وارد شود.</translation> + </message> + <message> + <source>No template by name %1 exists.</source> + <translation>هیچ قالبی با نام %1 وجود ندارد.</translation> + </message> + <message> + <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source> + <translation>یک نوع نامعتبر %1 نمیتواند مستند باشد. یک مستند باید یک نوع عددی یا یک نوع مؤثر بولین داشته باشد.</translation> + </message> + <message> + <source>A positional predicate must evaluate to a single numeric value.</source> + <translation>یک مستند وابسته به موقعیت باید نسبت به یک مقدار عددی تک ارزیابی شود.</translation> + </message> + <message> + <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.</source> + <translation>نام هدف در دستورالعمل پردازش نمیتواند در هر ترکیب از حروف بزرگ و کوچک %1 باشد. بنابراین، %2 نامعتبر است.</translation> + </message> + <message> + <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source> + <translation>%1 یک نام هدف معتبر در دستورالعمل پردازش نیست. آن باید یک مقدار %2 باشد، برای مثال %3.</translation> + </message> + <message> + <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source> + <translation>آخرین گام در یک مسیر باید شامل گره یا مقدار اتمی باشد. آن نمیتواند ترکیبی بین هردو باشد.</translation> + </message> + <message> + <source>The data of a processing instruction cannot contain the string %1</source> + <translation>دادهٔ دستورالعمل پردازش نمیتواند شامل رشتهٔ %1 باشد</translation> + </message> + <message> + <source>No namespace binding exists for the prefix %1</source> + <translation>هیچ مقیدسازی فضاینامی برای پیشوند %1 وجود ندارد</translation> + </message> + <message> + <source>No namespace binding exists for the prefix %1 in %2</source> + <translation>هیچ مقیدسازی فضاینامی برای پیشوند %1 در %2 وجود ندارد</translation> + </message> + <message> + <source>%1 is an invalid %2</source> + <translation>%1 یک %2 نامعتبر است</translation> + </message> + <message> + <source>The parameter %1 is passed, but no corresponding %2 exists.</source> + <translation>پارامتر %1 پاس شده است، اما مترادف %2 وجود ندارد.</translation> + </message> + <message> + <source>The parameter %1 is required, but no corresponding %2 is supplied.</source> + <translation>پارامتر %1 مورد نیاز است است، اما مترادف %2 تأمین نشده است.</translation> + </message> + <message numerus="yes"> + <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source> + <translation> + <numerusform>%1 حداکثر %n آرگومان میگیرد. بنابراین %2 نامعتبر است.</numerusform> + </translation> + </message> + <message numerus="yes"> + <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source> + <translation> + <numerusform>%1 لااقل %n آرگومان نیاز دارد. بنابراین %2 نامعتبر است.</numerusform> + </translation> + </message> + <message> + <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source> + <translation>اولین آرگومان به %1 نمیتواند از نوع %2 باشد. آن باید یک نوع عددی، xs:yearMonthDuratin یا xs::dayTimeDuration باشد.</translation> + </message> + <message> + <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source> + <translation>اولین آرگومان به %1 نمیتواند از نوع %2 باشد. آن باید از نوع %3، %4 یا %5 باشد.</translation> + </message> + <message> + <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source> + <translation>دومین آرگومان به %1 نمیتواند از نوع %2 باشد. آن باید از نوع %3، %4 یا %5 باشد.</translation> + </message> + <message> + <source>%1 is not a valid XML 1.0 character.</source> + <translation>%1 یک کاراکتر معتبر 1.0 XML نیست.</translation> + </message> + <message> + <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source> + <translation>گره ریشهٔ دومین آرگومان به تابع %1 باید یک گره سند باشد. %2 یک گره سند نیست.</translation> + </message> + <message> + <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source> + <translation>اگر هر دو مقدار انحراف ناحیهای دارند انحراف ناحیهای آنها باید برابر باشد. %1 و %2 یکی نیستند.</translation> + </message> + <message> + <source>%1 was called.</source> + <translation>%1 فراخوانی شده بود.</translation> + </message> + <message> + <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source> + <translation>%1 باید با %2 یا %3 همراه شود، نه در پایان رشتهٔ جایگزین.</translation> + </message> + <message> + <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source> + <translation>در رشتهٔ جایگزین، %1 هنگامی که شناسهٔ فرار نیست باید حداقل با یک رقم همراه شود.</translation> + </message> + <message> + <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source> + <translation>در رشتهٔ جایگزین، %1 فقط باید برای فرار از %2 یا خودش استفاده شود، نه %3</translation> + </message> + <message> + <source>%1 matches newline characters</source> + <translation>%1 با کاراکتر خطجدید مطابقت دارد</translation> + </message> + <message> + <source>%1 and %2 match the start and end of a line.</source> + <translation>%1 و %2 شروع و پایان یک خط را جور میکنند.</translation> + </message> + <message> + <source>Matches are case insensitive</source> + <translation>تطابقها حساس به حالت هستند</translation> + </message> + <message> + <source>Whitespace characters are removed, except when they appear in character classes</source> + <translation>کاراکترهای فضای خالی حذف میشوند به جز مواردی که در ردههای کاراکتر پیدا شوند</translation> + </message> + <message> + <source>%1 is an invalid regular expression pattern: %2</source> + <translation>%1 یک الگوی عبارت منظم نامعتبر است: %2</translation> + </message> + <message> + <source>%1 is an invalid flag for regular expressions. Valid flags are:</source> + <translation>%1 یک پرچم نامعتبر برای عبارات منظم است. پرچمهای معتبر اینها هستند:</translation> + </message> + <message> + <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source> + <translation>اگر اولین آرگومان خالی یا یک رشته با طول صفر باشد، یک پیشوند نمیتواند مشخص شود. پیشوند %1 مشخص شده بود.</translation> + </message> + <message> + <source>It will not be possible to retrieve %1.</source> + <translation>امکان بازیابی %1 وجود ندارد.</translation> + </message> + <message> + <source>The default collection is undefined</source> + <translation>مجموعهٔ پیشفرض تعریف نشده است</translation> + </message> + <message> + <source>%1 cannot be retrieved</source> + <translation>نمیتوان %1 را بازیابی کرد</translation> + </message> + <message> + <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source> + <translation>نرمالسازی از %1 پشتیبانی نشده است. شکلهای پشتیبانی شده %2، %3، %4، %5 و رشته خالی هستند.</translation> + </message> + <message> + <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source> + <translation>یک انحراف ناحیهای باید شامل محدودهٔ %1 تا %2 باشد. %3 خارج از محدوده است.</translation> + </message> + <message> + <source>%1 is not a whole number of minutes.</source> + <translation>%1 تمام عدد دقیقهها نیست.</translation> + </message> + <message> + <source>The URI cannot have a fragment</source> + <translation>URL نمیتواند شکستگی داشته باشد</translation> + </message> + <message> + <source>Required cardinality is %1; got cardinality %2.</source> + <translation>اصلیت %1 درخواست شد؛ %2 حاصل شد.</translation> + </message> + <message> + <source>The item %1 did not match the required type %2.</source> + <translation>آیتم %1 با نوع موردنیاز %2 مطابقت ندارد.</translation> + </message> + <message> + <source>The variable %1 is unused</source> + <translation>متغیر %1 استفاده نشده است</translation> + </message> + <message> + <source>W3C XML Schema identity constraint selector</source> + <translation>موجودیت طرح XML W3C انتخابکننده را محدود میکند</translation> + </message> + <message> + <source>W3C XML Schema identity constraint field</source> + <translation>موجودیت طرح XML W3C رشته را محدود میکند</translation> + </message> + <message> + <source>A construct was encountered which is disallowed in the current language(%1).</source> + <translation>برخورد با ساختار غیرمجاز در زبان جاری (%1)..</translation> + </message> + <message> + <source>%1 is an unknown schema type.</source> + <translation>%1 نوع ناشناختهٔ طرح نوع.</translation> + </message> + <message> + <source>A template with name %1 has already been declared.</source> + <translation>یک قالب با نام %1 هماکنون بیان شده است.</translation> + </message> + <message> + <source>%1 is not a valid numeric literal.</source> + <translation>%1 یک لفظ عددی نامعتبر است.</translation> + </message> + <message> + <source>Only one %1 declaration can occur in the query prolog.</source> + <translation>فقط اعلان یک %1میتواند در prolog پرسوجویی اتفاق بیفتد.</translation> + </message> + <message> + <source>The initialization of variable %1 depends on itself</source> + <translation>فرمت متغیر %1 به خودش وابسته است</translation> + </message> + <message> + <source>No variable with name %1 exists</source> + <translation>هیچ متغییری با نام %1 وجود ندارد</translation> + </message> + <message> + <source>Version %1 is not supported. The supported XQuery version is 1.0.</source> + <translation>نسخهٔ %1 پشتیبانی نشده است. نسخهٔ پشتیبانی شدهٔ XQuery 1.0است.</translation> + </message> + <message> + <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source> + <translation>کدگذاری %1 نامعتبر است. آن فقط باید شامل حروف لاتین باشد و نباید شامل فضای خالی باشد و همچنین باید با عبارت منظم %2 تطابق داشته باشد.</translation> + </message> + <message> + <source>No function with signature %1 is available</source> + <translation>تابعی با امضای %1 در دسترس نیست</translation> + </message> + <message> + <source>A default namespace declaration must occur before function, variable, and option declarations.</source> + <translation>اعلان یک فضاینامی پیشفرض باید قبل از اعلان تابع، متغیر و گزینهها اتفاق بیفتد.</translation> + </message> + <message> + <source>Namespace declarations must occur before function, variable, and option declarations.</source> + <translation>اعلان فضاینامی باید قبل از اعلان تابع، متغیر و گزینهها اتفاق بیفتد.</translation> + </message> + <message> + <source>Module imports must occur before function, variable, and option declarations.</source> + <translation>واردکردن ماژول باید قبل از اعلان تابع، متغیر و گزینهها اتفاق بیفتد.</translation> + </message> + <message> + <source>The keyword %1 cannot occur with any other mode name.</source> + <translation>کلیدواژهٔ %1 نمیتواند با هیچ اسم حالت دیگری اتفاق بیفتد.</translation> + </message> + <message> + <source>The value of attribute %1 must be of type %2, which %3 isn't.</source> + <translation>مقدار صفت %1 باید از نوع %2 باشد، در حالی که %3 نیست.</translation> + </message> + <message> + <source>It is not possible to redeclare prefix %1.</source> + <translation>نمیتوان پیشوند %1 را دوباره اعلان کرد.</translation> + </message> + <message> + <source>The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.</source> + <translation>پیشوند %1 نمیتواند مقید شود. به طور پیشفرض، آن به فضاینامی %2 مقید شده است.</translation> + </message> + <message> + <source>Prefix %1 is already declared in the prolog.</source> + <translation>پیشوند %1 هماکنون در prolog اعلان شده است.</translation> + </message> + <message> + <source>The name of an option must have a prefix. There is no default namespace for options.</source> + <translation>نام گزینه باید پیشوند داشته باشد. فضاینامی پیشفرضی برای گزینهها وجود ندارد.</translation> + </message> + <message> + <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source> + <translation>ویژگی واردکردن طرح پشتیبانی نشده است، بنابراین اعلان %1 نمیتواند اتفاق بیفتد.</translation> + </message> + <message> + <source>The target namespace of a %1 cannot be empty.</source> + <translation>فضاینامی هدف %1 نمیتواند خالی باشد.</translation> + </message> + <message> + <source>The module import feature is not supported</source> + <translation>ویژگی واردکردن ماژول پشتیبانی نشده است</translation> + </message> + <message> + <source>A variable with name %1 has already been declared.</source> + <translation>یک متغیر با نام %1 هماکنون اعلان شده است.</translation> + </message> + <message> + <source>No value is available for the external variable with name %1.</source> + <translation>مقداری برای متغیر خارجی با نام %1 در دسترس نیست.</translation> + </message> + <message> + <source>A stylesheet function must have a prefixed name.</source> + <translation>یک تابع مجموعهتعاریف باید یک نام پیشوندی داشته باشد.</translation> + </message> + <message> + <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source> + <translation>فضاینامی برای توابع تعریف شده توسط کاربر نمیتواند خالی باشد(پیشوند از پیش تعریف شدهٔ %1 را که برای این موارد وجود دارد امتحان کنید)</translation> + </message> + <message> + <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source> + <translation>فضاینامی %1 رزرو شده است؛ بنابراین توابع تعریف شده توسط کاربر نمیتوانند از آن استفاده کنند. پیشوند از پیش تعریف شدهٔ %2 را که برای این موارد وجود دارد امتحان کنید.</translation> + </message> + <message> + <source>The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2</source> + <translation>فضاینامی یک تابع تعریف شده توسط کاربر در یک ماژول کتابخانهای باید همارز فضاینامی ماژول باشد. به بیان دیگر، باید %1 بهجای %2 باشد</translation> + </message> + <message> + <source>A function already exists with the signature %1.</source> + <translation>یک تابع با امضای %1 هماکنون وجود دارد.</translation> + </message> + <message> + <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source> + <translation>هیچ تابع خارجی پشتیبانی نشده است. تمام توابع پشتیبانی شده میتوانند بدون بیان به صورت خارجی در ابتدا، به طور مستقیم استفاده شوند</translation> + </message> + <message> + <source>An argument with name %1 has already been declared. Every argument name must be unique.</source> + <translation>یک آرگومان با نام %1 هماکنون اعلان شده است. نام هر آرگومان باید یکتا باشد.</translation> + </message> + <message> + <source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source> + <translation>هنگامی که تابع %1 برای تطابق داخل الگو استفاده میشود، آرگومان باید یک اشارهگر به متغر یا رشته باشد.</translation> + </message> + <message> + <source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source> + <translation>در یک الگوی XSL-T، آرگومان اول تابع %1 هنگامی که برای تطابق استفاده میشود باید رشته باشد.</translation> + </message> + <message> + <source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source> + <translation>در یک الگوی XSL-T، آرگومان اول تابع %1 هنگامی که برای تطابق استفاده میشود باید لفظ یا اشارهگر به متغیر باشد.</translation> + </message> + <message> + <source>In an XSL-T pattern, function %1 cannot have a third argument.</source> + <translation>در یک الگوی XSL-T، تابع %1 نمیتواند آرگومان سوم داشته باشد.</translation> + </message> + <message> + <source>In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.</source> + <translation>در یک الگوی XSL-T، فقط توابع %1 و %2 نه %3 میتواند برای تطابق استفاده شوند.</translation> + </message> + <message> + <source>In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.</source> + <translation>در یک الگوی XSL-T، فقط الگوهای %2 و %3 نه %1 میتوانند استفاده شوند.</translation> + </message> + <message> + <source>%1 is an invalid template mode name.</source> + <translation>%1 یک نام حالت قالب نامعتبر است.</translation> + </message> + <message> + <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source> + <translation>نام یک متغیر مقید شده برای عبارت باید متفاوت از نام یک متغیر موقعیتی باشد. بنابراین دو متغیر با نام %1 برخورد دارند.</translation> + </message> + <message> + <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source> + <translation>ویژگی اعتبارسنجی طرح پشتیبانی نشده است. بنابراین، عبارات-%1 ممکن است استفاده نشود.</translation> + </message> + <message> + <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source> + <translation>هیچ عبارت عملی پشتیبانی نشده اسن. بنابراین، یک عبارت عقبنشینی باید ارائه شود</translation> + </message> + <message> + <source>Each name of a template parameter must be unique; %1 is duplicated.</source> + <translation>هر نام پارامتر قالب باید یگانه باشد؛ %1 چندگانه است.</translation> + </message> + <message> + <source>The %1-axis is unsupported in XQuery</source> + <translation>محور %1 در XQuery پشتیبانی نشده است</translation> + </message> + <message> + <source>No function with name %1 is available.</source> + <translation>هیچ تابعی با نام %1 در دسترس نیست.</translation> + </message> + <message> + <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source> + <translation>فضاینامی URL هنگامی که به یک پیشوند مقید میشود نمیتواند رشتهٔ خالی باشد، %1.</translation> + </message> + <message> + <source>%1 is an invalid namespace URI.</source> + <translation>%1 یک فضای نامی URL نامعتبر است.</translation> + </message> + <message> + <source>It is not possible to bind to the prefix %1</source> + <translation>مقید کردن به پیشوند %1 ممکن نیست</translation> + </message> + <message> + <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source> + <translation>فضاینامی %1 فقط میتواند به %2 مقید شود (در هر حالتی پیش اعلان شده است).</translation> + </message> + <message> + <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source> + <translation>پیشوند %1 فقط میتواند به %2 مقید شود (در هر حالتی پیش اعلان شده است).</translation> + </message> + <message> + <source>Two namespace declaration attributes have the same name: %1.</source> + <translation>صفتهای اعلان دو فضای نام دارای یک نام هستند: %1.</translation> + </message> + <message> + <source>The namespace URI must be a constant and cannot use enclosed expressions.</source> + <translation>فضاینامی URL باید ثابت باشد و نمیتواند به عبارات بپیوندد.</translation> + </message> + <message> + <source>An attribute with name %1 has already appeared on this element.</source> + <translation>یک صفت با نام %1 هماکنون در این عنصر شده است.</translation> + </message> + <message> + <source>A direct element constructor is not well-formed. %1 is ended with %2.</source> + <translation>سازندهٔ مستقیم یک عنصر خوشفرم نیست. %1 با %2 تمام شده است.</translation> + </message> + <message> + <source>The name %1 does not refer to any schema type.</source> + <translation>نام %1 به هیچ نوع طرحی اشاره نمیکند.</translation> + </message> + <message> + <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source> + <translation>%1 یک نوع پیچیده است. تبدیل به نوع پیچیده غیرممکن است. اما تبدیل به انواع اتمی مثل %2 کار میکند.</translation> + </message> + <message> + <source>%1 is not an atomic type. Casting is only possible to atomic types.</source> + <translation>%1 یک نوع اتمی نیست. تبدیل فقط برای انواع اتمی ممکن است.</translation> + </message> + <message> + <source>%1 is not a valid name for a processing-instruction.</source> + <translation>%1 یک نام معتبر برای دستوراعمل پردازش نیست.</translation> + </message> + <message> + <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source> + <translation>%1 یک اعلان صفت درون قلمرویی نیست. توجه کنید که ویژگی واردکردن طرح پشتیبانی نشده است.</translation> + </message> + <message> + <source>The name of an extension expression must be in a namespace.</source> + <translation>نام یک عبارت توسعه داده شده باید در فضاینامی باشد.</translation> + </message> + <message> + <source>Element %1 is not allowed at this location.</source> + <translation>عنصر %1 در این مکان مجاز نیست.</translation> + </message> + <message> + <source>Text nodes are not allowed at this location.</source> + <translation>گرههای متن در این مکان مجاز نیستند.</translation> + </message> + <message> + <source>Parse error: %1</source> + <translation>خطای تحلیل: %1</translation> + </message> + <message> + <source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.</source> + <translation>مقدار صفت ورژن XSL-T باید از نوع %1 باشد در حالی که %2 نیست.</translation> + </message> + <message> + <source>Running an XSL-T 1.0 stylesheet with a 2.0 processor.</source> + <translation>اجرای یک مجموعهتعاریف 1.0 XSL-T با یک پردازنده 2.0.</translation> + </message> + <message> + <source>Unknown XSL-T attribute %1.</source> + <translation>صفت ناشناخته %1 XSL-T.</translation> + </message> + <message> + <source>Attribute %1 and %2 are mutually exclusive.</source> + <translation>صفات %1 و %2 متقابلاً انحصاری هستند.</translation> + </message> + <message> + <source>In a simplified stylesheet module, attribute %1 must be present.</source> + <translation>در یک ماژول مجموعه تعاریف ساده شده، صفت %1 باید ارائه شود.</translation> + </message> + <message> + <source>If element %1 has no attribute %2, it cannot have attribute %3 or %4.</source> + <translation>اگر عنصر %1 صفت %2 را نداشته باشد، نمیتواند صفت %3 یا %4 را داشته باشد.</translation> + </message> + <message> + <source>Element %1 must have at least one of the attributes %2 or %3.</source> + <translation>عنصر %1 باید حداقل یکی از صفات %2 یا %3 را داشته باشد.</translation> + </message> + <message> + <source>At least one mode must be specified in the %1-attribute on element %2.</source> + <translation>حداقل یک حالت باید به صورت صفت %1 در عنصر %2 مشخص شود.</translation> + </message> + <message> + <source>Element %1 must come last.</source> + <translation>عنصر %1 باید در آخر بیاید.</translation> + </message> + <message> + <source>At least one %1-element must occur before %2.</source> + <translation>حداقل یک عنصر %1 قبل از %2 باید واقع شود.</translation> + </message> + <message> + <source>Only one %1-element can appear.</source> + <translation>فقط یک عنصر %1 میتواند ظاهر شود.</translation> + </message> + <message> + <source>At least one %1-element must occur inside %2.</source> + <translation>حداقل یک عنصر %1 باید داخل %2 واقع شود.</translation> + </message> + <message> + <source>When attribute %1 is present on %2, a sequence constructor cannot be used.</source> + <translation>هنگامی که صفت %1 روی %2 ارائه میشود، یک سازندهٔ رشته نمیتواند استفاده شود.</translation> + </message> + <message> + <source>Element %1 must have either a %2-attribute or a sequence constructor.</source> + <translation>عنصر %1 باید یک صفت %2 یا یک سازندهٔ رشته داشته باشد.</translation> + </message> + <message> + <source>When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.</source> + <translation>هنگامی که یک پارامتر موردنیاز است، یک مقدار پیشفرض نمیتواند به واسطهٔ صفت %1 یا سازندهٔ رشته تأمین شود.</translation> + </message> + <message> + <source>Element %1 cannot have children.</source> + <translation>عنصر %1 نمیتواند فرزند داشته باشد.</translation> + </message> + <message> + <source>Element %1 cannot have a sequence constructor.</source> + <translation>عنصر %1 نمیتواند سازندهٔ رشته داشته باشد.</translation> + </message> + <message> + <source>The attribute %1 cannot appear on %2, when it is a child of %3.</source> + <translation>صفت %1 نمیتواند روی %2 ظاهر شود، در حالی که فرزند %3 است.</translation> + </message> + <message> + <source>A parameter in a function cannot be declared to be a tunnel.</source> + <translation>یک پارامتر در یک تابع نمیتواند به عنوان تونل اعلان شود.</translation> + </message> + <message> + <source>This processor is not Schema-aware and therefore %1 cannot be used.</source> + <translation>این پردازنده طرح-آگاه نیست بنابراین %1 نمیتواند استفاده شود.</translation> + </message> + <message> + <source>Top level stylesheet elements must be in a non-null namespace, which %1 isn't.</source> + <translation>عنصر مجموعهٔ تعریف سطح بالا باید یک فضاینامی غیرتهی باشد، در حالی که %1 نیست.</translation> + </message> + <message> + <source>The value for attribute %1 on element %2 must either be %3 or %4, not %5.</source> + <translation>مقدار صفت %1 روی عنصر %2 باید %3 یا %4 باشد، نه %5.</translation> + </message> + <message> + <source>Attribute %1 cannot have the value %2.</source> + <translation>صفت %1 نمیتواند مقدار %2 داشته باشد.</translation> + </message> + <message> + <source>The attribute %1 can only appear on the first %2 element.</source> + <translation>صفت %1 فقط میتواند روی %2 عنصر اول به نظر برسد.</translation> + </message> + <message> + <source>At least one %1 element must appear as child of %2.</source> + <translation>حداقل یک عنصر %1 باید به عنوان فرزند %2 ظاهر شود.</translation> + </message> + <message> + <source>Empty particle cannot be derived from non-empty particle.</source> + <translation>یک ذرهٔ تهی نمیتواند از یک ذرهٔ غیرتهی مشتق شود.</translation> + </message> + <message> + <source>Derived particle is missing element %1.</source> + <translation>ذرهٔ مشتق شده عنصر گمشدهٔ %1 است.</translation> + </message> + <message> + <source>Derived element %1 is missing value constraint as defined in base particle.</source> + <translation>عنصر مشتق شدهٔ %1 مقدار گمشدهایست که در ذرهٔ پایهٔ به عنوان تعریف شده مقید شده.</translation> + </message> + <message> + <source>Derived element %1 has weaker value constraint than base particle.</source> + <translation>عنصر مشتق شده %1 مقدار ضعیفتری دارد که از عنصر پایه مقید میشود.</translation> + </message> + <message> + <source>Fixed value constraint of element %1 differs from value constraint in base particle.</source> + <translation>مقدار اصلاح شدهای که از عنصر %1 مقید میشود از مقداری که از عنصر پایه مقید میشود متفاوت است.</translation> + </message> + <message> + <source>Derived element %1 cannot be nillable as base element is not nillable.</source> + <translation>عنصر مشتق شده %1 همان طور که عنصر پایهاش nillable نیست نمیتواند nillable باشد.</translation> + </message> + <message> + <source>Block constraints of derived element %1 must not be more weaker than in the base element.</source> + <translation>بلاکی که از عنصر مشتق شده %1 مقید میشود نباید از عنصر پایه ضعیفتر باشد.</translation> + </message> + <message> + <source>Simple type of derived element %1 cannot be validly derived from base element.</source> + <translation>نوع سادهٔ مشتق شده از عنصر %1 نمیتواند به طور معتبر از عنصر پایه مشتق شود.</translation> + </message> + <message> + <source>Complex type of derived element %1 cannot be validly derived from base element.</source> + <translation>نوع پیچیدهٔ مشتق شده از عنصر %1 نمیتواند به طور معتبر از عنصر پایه مشتق شود.</translation> + </message> + <message> + <source>Element %1 is missing in derived particle.</source> + <translation>عنصر %1 در جزء مشتقشده گم شده است.</translation> + </message> + <message> + <source>Element %1 does not match namespace constraint of wildcard in base particle.</source> + <translation>عنصر %1 با فضاینامی که از حرف جایگزین شونده در عنصر پایه مقید میشود تطابق ندارد.</translation> + </message> + <message> + <source>Wildcard in derived particle is not a valid subset of wildcard in base particle.</source> + <translation>حرف جایگزین شونده در عنصر مشتق شده یک زیرمجموعه معتبر از حرف جایگزین شونده در عنصر پایه نیست.</translation> + </message> + <message> + <source>processContent of wildcard in derived particle is weaker than wildcard in base particle.</source> + <translation>محتویات پردازش حرف جایگزین شونده در عنصر مشتق شده از حرف جایگزین شونده در عنصر پایه ضعیفتر است.</translation> + </message> + <message> + <source>Derived particle allows content that is not allowed in the base particle.</source> + <translation>محتویات غیرمجاز در عنصر پایه در عنصر مشتق شده مجازند.</translation> + </message> + <message> + <source>%1 has inheritance loop in its base type %2.</source> + <translation>%1 در نوع %2 پایهاش حلقهٔ وراثت دارد.</translation> + </message> + <message> + <source>Circular inheritance of base type %1.</source> + <translation>وراثت گردشی پایهٔ نوع %1.</translation> + </message> + <message> + <source>Circular inheritance of union %1.</source> + <translation>وراثت گردشی اتحاد %1.</translation> + </message> + <message> + <source>%1 is not allowed to derive from %2 by restriction as the latter defines it as final.</source> + <translation>%1 نمیتواند با شرط از %2 مشتق شود مانند نویسهای که آن را به عنوان نهایی تعریف میکند.</translation> + </message> + <message> + <source>%1 is not allowed to derive from %2 by extension as the latter defines it as final.</source> + <translation>%1 نمیتواند با پسوند از %2 مشتق شود مانند نویسهای که آن را به عنوان نهایی تعریف میکند.</translation> + </message> + <message> + <source>Base type of simple type %1 cannot be complex type %2.</source> + <translation>نوع پایهٔ نوع سادهٔ %1 نمیتواند نوع پیچیدهٔ %2 باشد.</translation> + </message> + <message> + <source>Simple type %1 cannot have direct base type %2.</source> + <translation>نوع سادهٔ %1 نمیتواند نوع پایهٔ مستقیم %2 را باشد.</translation> + </message> + <message> + <source>Simple type %1 is not allowed to have base type %2.</source> + <translation>نوع سادهٔ %1 مجاز نیست نوع پایهٔ مستقیم %2 را داشته باشد.</translation> + </message> + <message> + <source>Simple type %1 can only have simple atomic type as base type.</source> + <translation>نوع سادهٔ %1 فقط میتواند نوع سادهٔ اتمی را به عنوان نوع پایه داشته باشد.</translation> + </message> + <message> + <source>Simple type %1 cannot derive from %2 as the latter defines restriction as final.</source> + <translation>%1 نمیتواند از %2 مشتق شود مانند نویسهای که قید را به عنوان نهایی تعریف میکند.</translation> + </message> + <message> + <source>Variety of item type of %1 must be either atomic or union.</source> + <translation>نوع آیتم نوع %1 باید اتمی یا اتحاد باشد.</translation> + </message> + <message> + <source>Variety of member types of %1 must be atomic.</source> + <translation>نوع عضو نوع %1 باید اتمی باشد.</translation> + </message> + <message> + <source>%1 is not allowed to derive from %2 by list as the latter defines it as final.</source> + <translation>%1 نمیتواند با لیست از %2 مشتق شود مانند نویسهای که آن را به عنوان نهایی تعریف میکند.</translation> + </message> + <message> + <source>Simple type %1 is only allowed to have %2 facet.</source> + <translation>نوع سادهٔ %1 فقط مجاز است رویهٔ %2 را داشته باشد.</translation> + </message> + <message> + <source>Base type of simple type %1 must have variety of type list.</source> + <translation>نوع پایهٔ نوع سادهٔ %1 باید از نوع لیست باشد.</translation> + </message> + <message> + <source>Base type of simple type %1 has defined derivation by restriction as final.</source> + <translation>نوع پایهٔ نوع سادهٔ %1 اشتقاق را با قید پایانی تعریف کرده است.</translation> + </message> + <message> + <source>Item type of base type does not match item type of %1.</source> + <translation>آیتم نوع پایه با آیتم نوع %1 مطابقت ندارد.</translation> + </message> + <message> + <source>Simple type %1 contains not allowed facet type %2.</source> + <translation>نوع سادهٔ %1 شامل رویهٔ غیرمجاز نوع %2 است.</translation> + </message> + <message> + <source>%1 is not allowed to derive from %2 by union as the latter defines it as final.</source> + <translation>%1 نمیتواند با اتحاد از %2 مشتق شود مانند نویسهای که آن را به عنوان نهایی تعریف میکند.</translation> + </message> + <message> + <source>%1 is not allowed to have any facets.</source> + <translation>نوع سادهٔ %1 مجاز نیست هیچ رویهای داشته باشد.</translation> + </message> + <message> + <source>Base type %1 of simple type %2 must have variety of union.</source> + <translation>نوع پایهٔ %1 نوع سادهٔ %2 بایدازنوع اتحاد باشد.</translation> + </message> + <message> + <source>Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.</source> + <translation>نوع پایهٔ %1 نوع سادهٔ %2 مجاز نیست در صفت %3 محدودیت داشته باشد.</translation> + </message> + <message> + <source>Member type %1 cannot be derived from member type %2 of %3's base type %4.</source> + <translation>نوع %1 نمیتواند از نوع %2 نوع %4 پایهٔ %3 مشتق شود.</translation> + </message> + <message> + <source>Derivation method of %1 must be extension because the base type %2 is a simple type.</source> + <translation>روش اشتقاق %1 باید پسوند باشد زیرا پایهٔ نوع %2 ساده است.</translation> + </message> + <message> + <source>Complex type %1 has duplicated element %2 in its content model.</source> + <translation>نوع پیچیدهٔ %1 در مدل محتویاتش عنصر چندگانهٔ %2 را دارد.</translation> + </message> + <message> + <source>Complex type %1 has non-deterministic content.</source> + <translation>نوع پیچیدهٔ %1 محتویات غیرقطعی دارد.</translation> + </message> + <message> + <source>Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.</source> + <translation>صفات نوع پیچیدهٔ %1 پسوند معتبر صفات نوع پایهٔ %2 نیستند: %3.</translation> + </message> + <message> + <source>Content model of complex type %1 is not a valid extension of content model of %2.</source> + <translation>مدل محتویات نوع پیچیدهٔ %1 پسوند معتبر مدل محتویات %2 نیستند.</translation> + </message> + <message> + <source>Complex type %1 must have simple content.</source> + <translation>نوع پیچیدهٔ %1 باید محتویات ساده داشته باشد.</translation> + </message> + <message> + <source>Complex type %1 must have the same simple type as its base class %2.</source> + <translation>نوع پیچیدهٔ %1 باید همان انواع ساده را مانند کلاس %2 پایهاش داشته باشد.</translation> + </message> + <message> + <source>Complex type %1 cannot be derived from base type %2%3.</source> + <translation>نوع پیچیدهٔ %1 نمیتواند از نوع %2%3 مشتق شود.</translation> + </message> + <message> + <source>Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.</source> + <translation>صفات نوع پیچیدهٔ %1 قید معتبری از صفات نوع پایهٔ %2 نیستند: %3.</translation> + </message> + <message> + <source>Complex type %1 with simple content cannot be derived from complex base type %2.</source> + <translation>نوع پیچیدهٔ %1 با محتویات ساده نمیتواند از نوع پیچیدهٔ %2 مشتق شود.</translation> + </message> + <message> + <source>Item type of simple type %1 cannot be a complex type.</source> + <translation>نوع آیتم نوع سادهٔ %1 نمیتواند نوع پیچیده باشد.</translation> + </message> + <message> + <source>Member type of simple type %1 cannot be a complex type.</source> + <translation>اعضای نوع سادهٔ %1 نمیتوانند پیچیده باشند.</translation> + </message> + <message> + <source>%1 is not allowed to have a member type with the same name as itself.</source> + <translation>%1 نمیتواند عضوی همنام خودش داشته باشد.</translation> + </message> + <message> + <source>%1 facet collides with %2 facet.</source> + <translation>رویهٔ %1 با %2 تداخل دارد.</translation> + </message> + <message> + <source>%1 facet must have the same value as %2 facet of base type.</source> + <translation>رویهٔ %1 باید همان مقدار رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>%1 facet must be equal or greater than %2 facet of base type.</source> + <translation>رویهٔ %1 باید بزرگتر یا مساوی رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>%1 facet must be less than or equal to %2 facet of base type.</source> + <translation>رویهٔ %1 باید کوچکتر یا مساوی رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>%1 facet contains invalid regular expression</source> + <translation>رویهٔ %1 شامل عبارت منظم نامعتبر است</translation> + </message> + <message> + <source>Unknown notation %1 used in %2 facet.</source> + <translation>نشانهگذاری ناشناختهٔ %1 در رویهٔ %2 استفاده شده است.</translation> + </message> + <message> + <source>%1 facet contains invalid value %2: %3.</source> + <translation>رویه %1 شامل مقدار نامعتبر %2 است: %3.</translation> + </message> + <message> + <source>%1 facet cannot be %2 or %3 if %4 facet of base type is %5.</source> + <translation>رویهٔ %1 نمیتواند %2 یا %3 باشد اگر رویهٔ %4 نوع پایه %5 باشد.</translation> + </message> + <message> + <source>%1 facet cannot be %2 if %3 facet of base type is %4.</source> + <translation>رویهٔ %1 نمیتواند %2 باشد اگر رویهٔ %3 نوع پایه %4 باشد.</translation> + </message> + <message> + <source>%1 facet must be less than or equal to %2 facet.</source> + <translation>رویهٔ %1 باید کوچکتر یا مساوی رویهٔ %2 باشد.</translation> + </message> + <message> + <source>%1 facet must be less than %2 facet of base type.</source> + <translation>رویهٔ %1 باید کوچکتر از رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>%1 facet and %2 facet cannot appear together.</source> + <translation>رویههای %1 و %2 نمیتوانند با هم ظاهر شوند.</translation> + </message> + <message> + <source>%1 facet must be greater than %2 facet of base type.</source> + <translation>رویهٔ %1 باید بزرگتر از رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>%1 facet must be less than %2 facet.</source> + <translation>رویهٔ %1 باید کوچکتر از رویهٔ %2 باشد.</translation> + </message> + <message> + <source>%1 facet must be greater than or equal to %2 facet of base type.</source> + <translation>رویهٔ %1 باید بزرگتر یا مساوی رویهٔ %2 نوع پایه باشد.</translation> + </message> + <message> + <source>Simple type contains not allowed facet %1.</source> + <translation>نوع ساده شامل رویهٔ غیر مجاز %1 است.</translation> + </message> + <message> + <source>%1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.</source> + <translation>رویههای %1، %2، %3، %4، %5 و %6 هنگامی که بهوسیلهٔ لیست مشتق میشوند مجاز نیستند.</translation> + </message> + <message> + <source>Only %1 and %2 facets are allowed when derived by union.</source> + <translation>فقط رویههای %1 و %2 هنگامی که بهوسیلهٔ اتحاد مشتق میشوند مجاز هستند.</translation> + </message> + <message> + <source>%1 contains %2 facet with invalid data: %3.</source> + <translation>%1 شامل رویهٔ %2 با دادهٔ نامعتبر است: %3.</translation> + </message> + <message> + <source>Attribute group %1 contains attribute %2 twice.</source> + <translation>گروه صفت %1 صفت %2 را دوبار شامل است.</translation> + </message> + <message> + <source>Attribute group %1 contains two different attributes that both have types derived from %2.</source> + <translation>گروه صفت %1 شامل دو صفت متفاوت است که هر دو از %2 مشتق شدهاند.</translation> + </message> + <message> + <source>Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.</source> + <translation>گروه صفت %1 شامل صفت %2 است.که قید مقدار دارد اما نوع را از %3 به ارث میبرد.</translation> + </message> + <message> + <source>Complex type %1 contains attribute %2 twice.</source> + <translation>نوع پیچیدهٔ %1 صفت %2 را دوبار شامل است.</translation> + </message> + <message> + <source>Complex type %1 contains two different attributes that both have types derived from %2.</source> + <translation>نوع پیچیدهٔ %1 شامل دو صفت متفاوت است که هر دو از %2 مشتق شدهاند.</translation> + </message> + <message> + <source>Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.</source> + <translation>نوع پیچیدهٔ %1 شامل صفت %2 است.که قید مقدار دارد اما نوع را از %3 به ارث میبرد.</translation> + </message> + <message> + <source>Element %1 is not allowed to have a value constraint if its base type is complex.</source> + <translation>نوع %1 مجاز به داشتن قید مقدار نیست اگر نوع پایهاش پیچیده باشد.</translation> + </message> + <message> + <source>Element %1 is not allowed to have a value constraint if its type is derived from %2.</source> + <translation>نوع %1 مجاز به داشتن قید مقدار نیست اگر از %2 مشتق شود.</translation> + </message> + <message> + <source>Value constraint of element %1 is not of elements type: %2.</source> + <translation>قید مقدار عنصر %1 از نوع عنصر نیست: %2.</translation> + </message> + <message> + <source>Element %1 is not allowed to have substitution group affiliation as it is no global element.</source> + <translation>نوع %1 مجاز به داشتن وابستگی مجموعهٔ زیرحالت نیست مادامی که عنصر سراسری نباشد.</translation> + </message> + <message> + <source>Type of element %1 cannot be derived from type of substitution group affiliation.</source> + <translation>نوع عنصر %1 نمیتواند از نوع وابستگی مجموعهٔ زیرحالت مشتق شود.</translation> + </message> + <message> + <source>Value constraint of attribute %1 is not of attributes type: %2.</source> + <translation>مقدار قید صفت %1 نوع صفت نیست: %2.</translation> + </message> + <message> + <source>Attribute %1 has value constraint but has type derived from %2.</source> + <translation>صفت %1 مقدار قید دارد اما از نوع %2 مشتق شده است.</translation> + </message> + <message> + <source>%1 attribute in derived complex type must be %2 like in base type.</source> + <translation>%1 صفت در نوع پیچیدهٔ مشتق شده باید مانند %2 در نوع پایه باشد.</translation> + </message> + <message> + <source>Attribute %1 in derived complex type must have %2 value constraint like in base type.</source> + <translation>%1 صفت در نوع پیچیدهٔ مشتق شده باید %2 مانند نوع پایه باشد.</translation> + </message> + <message> + <source>Attribute %1 in derived complex type must have the same %2 value constraint like in base type.</source> + <translation>صفت %1 در نوع پیچیدهٔ مشتق شده باید همان %2 قید مقدار را مانند نوع پایه داشته باشد.</translation> + </message> + <message> + <source>Attribute %1 in derived complex type must have %2 value constraint.</source> + <translation>صفت %1 در نوع پیچیدهٔ مشتق شده باید %2 قید مقدار داشته باشد.</translation> + </message> + <message> + <source>processContent of base wildcard must be weaker than derived wildcard.</source> + <translation>محتویات پردازش در حروف جایگزین شونده پایه باید از حروف جایگزین شوندهٔ مشتق شده ضعیفتر باشند.</translation> + </message> + <message> + <source>Element %1 exists twice with different types.</source> + <translation>عنصر %1 دوبار با انواع متفاوت وجود دارد.</translation> + </message> + <message> + <source>Particle contains non-deterministic wildcards.</source> + <translation>ذره شامل حروف جایگزین شوندهٔ قطعی نیست.</translation> + </message> + <message> + <source>Base attribute %1 is required but derived attribute is not.</source> + <translation>صفت پایهٔ %1 مورد نیاز است اما صفت مشتق شده نه.</translation> + </message> + <message> + <source>Type of derived attribute %1 cannot be validly derived from type of base attribute.</source> + <translation>نوع صفت مشتق شدهٔ %1 نمیتواند به طور معتبر از صفت پایه مشتق شود.</translation> + </message> + <message> + <source>Value constraint of derived attribute %1 does not match value constraint of base attribute.</source> + <translation>قید مقدار صفت مشتق شدهٔ %1 با قید مقدار صفت پایه مطابق نیست.</translation> + </message> + <message> + <source>Derived attribute %1 does not exist in the base definition.</source> + <translation>صفت مشتق شدهٔ %1 در تعریف پایه وجود ندارد.</translation> + </message> + <message> + <source>Derived attribute %1 does not match the wildcard in the base definition.</source> + <translation>صفت مشتق شدهٔ %1 با کلمات جایگزین شونده در تعریف پایه مطابقت ندارد.</translation> + </message> + <message> + <source>Base attribute %1 is required but missing in derived definition.</source> + <translation>صفت پایهٔ %1 مورد نیاز است اما صفت مشتق شده مفقود شده است.</translation> + </message> + <message> + <source>Derived definition contains an %1 element that does not exists in the base definition</source> + <translation>تعریف مشتق شده شامل صفت %1 است که در تعریف پایه وجود ندارد</translation> + </message> + <message> + <source>Derived wildcard is not a subset of the base wildcard.</source> + <translation>حروف جایگزین شوندهٔ مشتق شده زیر مجموعهای از حروف جایگزین شوندهٔ پایه نیستند.</translation> + </message> + <message> + <source>%1 of derived wildcard is not a valid restriction of %2 of base wildcard</source> + <translation>%1 حروف جایگزین شونده مشتق شده، قید معتبر %2 حروف جایگزین شوندهٔ پایه نیستند</translation> + </message> + <message> + <source>Attribute %1 from base type is missing in derived type.</source> + <translation>صفت %1 از نوع پایه در نوع مشتق شده مفقود شده است.</translation> + </message> + <message> + <source>Type of derived attribute %1 differs from type of base attribute.</source> + <translation>نوع صفت مشتق شده %1 از نوع صفت پایه متفاوت است.</translation> + </message> + <message> + <source>Base definition contains an %1 element that is missing in the derived definition</source> + <translation>تعریف پایه شامل عنصر %1 است که در تعریف مشتق شده مفقود شده است</translation> + </message> + <message> + <source>Can not process unknown element %1, expected elements are: %2.</source> + <translation>نمیتوان عنصر ناشناختهٔ %1 را پردازش کرد، عناصر مورد انتظار اینها هستند: %2.</translation> + </message> + <message> + <source>Element %1 is not allowed in this scope, possible elements are: %2.</source> + <translation>عنصر %1 در این قلمرو مجاز نیست، عناصر ممکن اینها هستند: %2.</translation> + </message> + <message> + <source>Child element is missing in that scope, possible child elements are: %1.</source> + <translation>عنصر فرزند در این قلمرو مفقود شده است، عناصر فرزند ممکن اینها هستند: %1.</translation> + </message> + <message> + <source>Document is not a XML schema.</source> + <translation>سند یک الگوی XML نیست.</translation> + </message> + <message> + <source>%1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.</source> + <translation>صفت %1 از عنصر %2 شامل محتویات غیرمجاز است: {%3} یک مقدار از نوع %4 نیست.</translation> + </message> + <message> + <source>%1 attribute of %2 element contains invalid content: {%3}.</source> + <translation>صفت %1 از عنصر %2 شامل محتویات غیرمجاز است: {%3}.</translation> + </message> + <message> + <source>Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.</source> + <translation>فضاینامی هدف %1 طرح شامل شده متفاوت از فضاینامی هدف %2 آنگونه که به وسلیهٔ طرح شامل تعریف شده است میباشد.</translation> + </message> + <message> + <source>Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.</source> + <translation>فضاینامی %1 طرح وارد شده متفاوت از فضاینامی هدف %2 آنگونه که به وسلیهٔ طرح وارد شده تعریف شده است میباشد.</translation> + </message> + <message> + <source>%1 element is not allowed to have the same %2 attribute value as the target namespace %3.</source> + <translation>عنصر %1 مجاز نیست که صفت %2 ی یکسان بافضاینام هدف %3 داشته باشد.</translation> + </message> + <message> + <source>%1 element without %2 attribute is not allowed inside schema without target namespace.</source> + <translation>عنصر %1 بدون صفت %2 در طرح بدون فضاینامی هدف مجاز نیست.</translation> + </message> + <message> + <source>%1 element is not allowed inside %2 element if %3 attribute is present.</source> + <translation>عنصر %1 در عنصر %2 اگر صفت %3 ارائه شده باشد مجاز نیست.</translation> + </message> + <message> + <source>%1 element has neither %2 attribute nor %3 child element.</source> + <translation>عنصر %1 نه صفت %2 را دارد نه عنصر فرزند %3 را دارد.</translation> + </message> + <message> + <source>%1 element with %2 child element must not have a %3 attribute.</source> + <translation>عنصر %1 با فرزند %2 نباید صفت %3 را داشته باشد.</translation> + </message> + <message> + <source>%1 attribute of %2 element must be %3 or %4.</source> + <translation>صفت %1 از عنصر %2 باید %3 یا %4 باشد.</translation> + </message> + <message> + <source>%1 attribute of %2 element must have a value of %3.</source> + <translation>صفت %1 از عنصر %2 باید مقدار %3 را داشته باشد.</translation> + </message> + <message> + <source>%1 attribute of %2 element must have a value of %3 or %4.</source> + <translation>صفت %1 از عنصر %2 باید مقدار %3 یا %4 را داشته باشد.</translation> + </message> + <message> + <source>%1 element must not have %2 and %3 attribute together.</source> + <translation>عنصر %1 نباید صفات %2 و %3 را با هم داشته باشد.</translation> + </message> + <message> + <source>Content of %1 attribute of %2 element must not be from namespace %3.</source> + <translation>محتویات صفت %1 از عنصر %2 نباید از فضاینامی %3 باشد.</translation> + </message> + <message> + <source>%1 attribute of %2 element must not be %3.</source> + <translation>صفت %1 از عنصر %2 نباید %3 باشد.</translation> + </message> + <message> + <source>%1 attribute of %2 element must have the value %3 because the %4 attribute is set.</source> + <translation>صفت %1 از عنصر %2 باید مقدار %3 را داشته باشد زیرا صفت %4 تنظیم شده است.</translation> + </message> + <message> + <source>Specifying use='prohibited' inside an attribute group has no effect.</source> + <translation>تعیین استفاده = 'ممنوع' در گروه صفت هیچ تأثیری ندارد.</translation> + </message> + <message> + <source>%1 element must have either %2 or %3 attribute.</source> + <translation>عنصر %1 باید یکی از صفات %2 یا %3 را داشته باشد.</translation> + </message> + <message> + <source>%1 element must have either %2 attribute or %3 or %4 as child element.</source> + <translation>عنصر %1 باید صفت %2 یا %3 یا %4 را به عنوان فرزند داشته باشد.</translation> + </message> + <message> + <source>%1 element requires either %2 or %3 attribute.</source> + <translation>عنصر %1 یکی از صفات %2 یا %3 را نیاز دارد..</translation> + </message> + <message> + <source>Text or entity references not allowed inside %1 element</source> + <translation>ارجاع متن یا موجودیت در عنصر %1 مجاز نیست</translation> + </message> + <message> + <source>%1 attribute of %2 element must contain %3, %4 or a list of URIs.</source> + <translation>صفت %1 از عنصر %2 باید شامل %3، %4 یا لیستی از URLها باشد.</translation> + </message> + <message> + <source>%1 element is not allowed in this context.</source> + <translation>عنصر %1 در این زمینه مجاز نیست.</translation> + </message> + <message> + <source>%1 attribute of %2 element has larger value than %3 attribute.</source> + <translation>صفت %1 از عنصر %2 مقداری بزرگتر از صفت %3 دارد.</translation> + </message> + <message> + <source>Prefix of qualified name %1 is not defined.</source> + <translation>پیشوند نام دارای شرایط %1 تعریف نشده است.</translation> + </message> + <message> + <source>%1 attribute of %2 element must either contain %3 or the other values.</source> + <translation>صفت %1 از عنصر %2 باید شامل %3 یا مقادیر دیگری باشد.</translation> + </message> + <message> + <source>Component with ID %1 has been defined previously.</source> + <translation>جزئی با ID %1 قبلاً تعریف شده است.</translation> + </message> + <message> + <source>Element %1 already defined.</source> + <translation>عنصر %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Attribute %1 already defined.</source> + <translation>صفت %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Type %1 already defined.</source> + <translation>نوع %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Attribute group %1 already defined.</source> + <translation>گروه صفت %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Element group %1 already defined.</source> + <translation>گروه عنصر %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Notation %1 already defined.</source> + <translation>نشانهگذاری %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Identity constraint %1 already defined.</source> + <translation>قید هویت %1 هماکنون تعریف شده است.</translation> + </message> + <message> + <source>Duplicated facets in simple type %1.</source> + <translation>رویهٔ چندگانه در نوع سادهٔ %1.</translation> + </message> + <message> + <source>%1 references unknown %2 or %3 element %4.</source> + <translation>%1 %2 یا %3 نامشخص عنصر %4 مراجعه میکند.</translation> + </message> + <message> + <source>%1 references identity constraint %2 that is no %3 or %4 element.</source> + <translation>%1 به قید هویت %2 که عنصر %3 یا %4 نیست مراجعه میکند.</translation> + </message> + <message> + <source>%1 has a different number of fields from the identity constraint %2 that it references.</source> + <translation>%1 فیلد عددی متفاوتی از قید هویت %2 که به آن اشاره میکند دارد.</translation> + </message> + <message> + <source>Base type %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد نوع پایهٔ %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Item type %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد آیتم نوع %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Member type %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد عضو نوع %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Type %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد نوع %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Base type %1 of complex type cannot be resolved.</source> + <translation>نمیتوان در مورد نوع پایهٔ %1 از نوع پیچیده تصمیم گرفت.</translation> + </message> + <message> + <source>%1 cannot have complex base type that has a %2.</source> + <translation>%1 نمیتواند نوع پیچیدهٔ پایهای که یک %2 دارد داشته باشد.</translation> + </message> + <message> + <source>Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.</source> + <translation>محتویات مدل نوع پیچیدهٔ %1 شامل %2 است بنابراین نمیتواند با پسوند از نوع غیرتهی مشتق شود.</translation> + </message> + <message> + <source>Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.</source> + <translation>نوع پیچیدهٔ %1 نمیتواند با پسوند از %2 مشتق شود همچنان که اخیراً شامل عنصر %3 در مدل محتویاتش است.</translation> + </message> + <message> + <source>Type of %1 element must be a simple type, %2 is not.</source> + <translation>نوع عنصر %1 باید ساده باشد، در حالی که %2 نیست.</translation> + </message> + <message> + <source>Substitution group %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد جانشینی گروه %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Substitution group %1 has circular definition.</source> + <translation>جانشینی گروه %1 تعریف حلقوی دارد.</translation> + </message> + <message> + <source>Duplicated element names %1 in %2 element.</source> + <translation>نامهای چندگانهٔ %1 در عنصر %2.</translation> + </message> + <message> + <source>Reference %1 of %2 element cannot be resolved.</source> + <translation>نمیتوان در مورد ارجاع %1 از عنصر %2 تصمیم گرفت.</translation> + </message> + <message> + <source>Circular group reference for %1.</source> + <translation>ارجاع گروهی حلقوی برای %1.</translation> + </message> + <message> + <source>%1 element is not allowed in this scope</source> + <translation>عنصر %1 در این قلمرو مجاز نیست</translation> + </message> + <message> + <source>%1 element cannot have %2 attribute with value other than %3.</source> + <translation>عنصر %1 نمیتواند صفت %2 را با مقداری متفاوت از %3 داشته باشد.</translation> + </message> + <message> + <source>%1 element cannot have %2 attribute with value other than %3 or %4.</source> + <translation>عنصر %1 نمیتواند صفت %2 را با مقداری متفاوت از %3 یا %4 داشته باشد.</translation> + </message> + <message> + <source>%1 or %2 attribute of reference %3 does not match with the attribute declaration %4.</source> + <translation>صفت %1 یا %2 از ارجاع %3 با اعلان صفت %4 مطابق نیست.</translation> + </message> + <message> + <source>Attribute group %1 has circular reference.</source> + <translation>گروه صفت %1 ارجاع حلقوی دارد.</translation> + </message> + <message> + <source>%1 attribute in %2 must have %3 use like in base type %4.</source> + <translation>صفت %1 در %2 باید استفادهٔ %3 را مانند نوع پایهٔ %4 داشته باشد.</translation> + </message> + <message> + <source>Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.</source> + <translation>صفت wildcard %1 قید معتبر صفت wildcard نوع پایهٔ %2 نیست.</translation> + </message> + <message> + <source>%1 has attribute wildcard but its base type %2 has not.</source> + <translation>%1 wildcard صفت دارد اما نوع پایهٔ %2 اش ندارد.</translation> + </message> + <message> + <source>Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.</source> + <translation>اتحاد wildcars صفت نوع %1 و wildcard صفت نوع پایهٔ %2 آن قابل بیان نیست.</translation> + </message> + <message> + <source>Enumeration facet contains invalid content: {%1} is not a value of type %2.</source> + <translation>رویهٔ شمارش شامل محتویات غیر مجاز است: {%1} یک مقدار از نوع %2 نیست.</translation> + </message> + <message> + <source>Namespace prefix of qualified name %1 is not defined.</source> + <translation>پیشوند فضاینامی نام مشخص شدهٔ %1 تعریف نشده است.</translation> + </message> + <message> + <source>%1 element %2 is not a valid restriction of the %3 element it redefines: %4.</source> + <translation>%1 عنصر %2 یک قید معتبر عنصر %3 که %4 را بازتعریف میکند نیست.</translation> + </message> + <message> + <source>%1 is not valid according to %2.</source> + <translation>%1 بر طبق %2 معتبر نیست.</translation> + </message> + <message> + <source>String content does not match the length facet.</source> + <translation>محتوای رشته با رویهٔ طول مطابق نیست.</translation> + </message> + <message> + <source>String content does not match the minLength facet.</source> + <translation>محتوای رشته با رویهٔ طول مینیمم مطابق نیست.</translation> + </message> + <message> + <source>String content does not match the maxLength facet.</source> + <translation>محتوای رشته با رویهٔ طول ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>String content does not match pattern facet.</source> + <translation>محتوای رشته با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>String content is not listed in the enumeration facet.</source> + <translation>محتوای رشته در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Signed integer content does not match the maxInclusive facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ شامل ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Signed integer content does not match the maxExclusive facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ فقط ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Signed integer content does not match the minInclusive facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ شامل مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Signed integer content does not match the minExclusive facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ فقط مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Signed integer content is not listed in the enumeration facet.</source> + <translation>محتوای عدد صحیح علامتدار در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Signed integer content does not match pattern facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Signed integer content does not match in the totalDigits facet.</source> + <translation>محتوای عدد صحیح علامتدار با رویهٔ مجموع ارقام مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content does not match the maxInclusive facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ شامل ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content does not match the maxExclusive facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ فقط ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content does not match the minInclusive facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ شامل مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content does not match the minExclusive facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ فقط مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content is not listed in the enumeration facet.</source> + <translation>محتوای عدد صحیح بدون علامت در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Unsigned integer content does not match pattern facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Unsigned integer content does not match in the totalDigits facet.</source> + <translation>محتوای عدد صحیح بدون علامت با رویهٔ مجموع ارقام مطابق نیست.</translation> + </message> + <message> + <source>Double content does not match the maxInclusive facet.</source> + <translation>محتوای عدد اعشاری با رویهٔ شامل ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Double content does not match the maxExclusive facet.</source> + <translation>محتوای عدد اعشاری با رویهٔ فقط ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Double content does not match the minInclusive facet.</source> + <translation>محتوای عدد اعشاری با رویهٔ شامل مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Double content does not match the minExclusive facet.</source> + <translation>محتوای عدد اعشاری با رویهٔ فقط مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Double content is not listed in the enumeration facet.</source> + <translation>محتوای عدد اعشاری در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Double content does not match pattern facet.</source> + <translation>محتوای عدد اعشاری با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Decimal content does not match in the fractionDigits facet.</source> + <translation>محتوای عدد دهدهی با رویهٔ ارقام کسری مطابق نیست.</translation> + </message> + <message> + <source>Decimal content does not match in the totalDigits facet.</source> + <translation>محتوای عدد دهدهی با رویهٔ مجموع ارقام مطابق نیست.</translation> + </message> + <message> + <source>Date time content does not match the maxInclusive facet.</source> + <translation>محتوای تاریخ زمان با رویهٔ شامل ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Date time content does not match the maxExclusive facet.</source> + <translation>محتوای تاریخ زمان با رویهٔ فقط ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Date time content does not match the minInclusive facet.</source> + <translation>محتوای تاریخ زمان با رویهٔ شامل مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Date time content does not match the minExclusive facet.</source> + <translation>محتوای تاریخ زمان با رویهٔ فقط مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Date time content is not listed in the enumeration facet.</source> + <translation>محتوای تاریخ زمان در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Date time content does not match pattern facet.</source> + <translation>محتوای تاریخ زمان با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Duration content does not match the maxInclusive facet.</source> + <translation>محتوای مدت با رویهٔ شامل ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Duration content does not match the maxExclusive facet.</source> + <translation>محتوای مدت با رویهٔ فقط ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Duration content does not match the minInclusive facet.</source> + <translation>محتوای مدت با رویهٔ شامل مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Duration content does not match the minExclusive facet.</source> + <translation>محتوای مدت با رویهٔ فقط مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Duration content is not listed in the enumeration facet.</source> + <translation>محتوای مدت در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Duration content does not match pattern facet.</source> + <translation>محتوای مدت با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Boolean content does not match pattern facet.</source> + <translation>محتوای بولین با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Binary content does not match the length facet.</source> + <translation>محتوای دودویی با رویهٔ طول مطابق نیست.</translation> + </message> + <message> + <source>Binary content does not match the minLength facet.</source> + <translation>محتوای دودویی با رویهٔ طول مینیمم مطابق نیست.</translation> + </message> + <message> + <source>Binary content does not match the maxLength facet.</source> + <translation>محتوای دودویی با رویهٔ طول ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>Binary content is not listed in the enumeration facet.</source> + <translation>محتوای دودویی در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Invalid QName content: %1.</source> + <translation>محتوای نامعتبر QName: %1.</translation> + </message> + <message> + <source>QName content is not listed in the enumeration facet.</source> + <translation>محتوای QName در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>QName content does not match pattern facet.</source> + <translation>محتوای QName با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Notation content is not listed in the enumeration facet.</source> + <translation>محتوای علامتگذاری در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>List content does not match length facet.</source> + <translation>محتوای لیست با رویهٔ طول مطابق نیست.</translation> + </message> + <message> + <source>List content does not match minLength facet.</source> + <translation>محتوای لیست با رویهٔ طول مینیمم مطابق نیست.</translation> + </message> + <message> + <source>List content does not match maxLength facet.</source> + <translation>محتوای لیست با رویهٔ طول ماکزیمم مطابق نیست.</translation> + </message> + <message> + <source>List content is not listed in the enumeration facet.</source> + <translation>محتوای لیست در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>List content does not match pattern facet.</source> + <translation>محتوای لیست با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Union content is not listed in the enumeration facet.</source> + <translation>محتوای اتحاد در رویهٔ شمارش لیست نشده.</translation> + </message> + <message> + <source>Union content does not match pattern facet.</source> + <translation>محتوای اتحاد با رویهٔ الگو مطابق نیست.</translation> + </message> + <message> + <source>Data of type %1 are not allowed to be empty.</source> + <translation>داده نوع %1 نمیتواند خالی باشد.</translation> + </message> + <message> + <source>Element %1 is missing child element.</source> + <translation>عنصر %1 عنصر فرزند را گم کرده است.</translation> + </message> + <message> + <source>There is one IDREF value with no corresponding ID: %1.</source> + <translation>هیچ IDREF ای با مقدار ID مترادف وجود ندارد: %1.</translation> + </message> + <message> + <source>Loaded schema file is invalid.</source> + <translation>فایل طرح بارشده نامعتبر است.</translation> + </message> + <message> + <source>%1 contains invalid data.</source> + <translation>%1 شامل دادهٔ نامعتبر است.</translation> + </message> + <message> + <source>xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.</source> + <translation>فضاینامی xsi:chemalocation %1 هماکنون در ابتدای سند نمونه ظاهر شده.</translation> + </message> + <message> + <source>xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.</source> + <translation>xsi:noNamespaceShemaLocation نمیتواند بعد از اولین عنصر یا صفت بدون فضاینامی ظاهر شود.</translation> + </message> + <message> + <source>No schema defined for validation.</source> + <translation>طرحی برای اعتبارسنجی تعریف نشده است.</translation> + </message> + <message> + <source>No definition for element %1 available.</source> + <translation>تعریفی برای عنصر %1 در دسترس نیست.</translation> + </message> + <message> + <source>Specified type %1 is not known to the schema.</source> + <translation>نوع مشخص شدهٔ %1 برای طرح ناشناخته است.</translation> + </message> + <message> + <source>Element %1 is not defined in this scope.</source> + <translation>عنصر %1 در این قلمرو تعریف نشده است.</translation> + </message> + <message> + <source>Declaration for element %1 does not exist.</source> + <translation>برای عنصر %1 اعلانی وجود ندارد.</translation> + </message> + <message> + <source>Element %1 contains invalid content.</source> + <translation>عنصر %1 شامل محتوای نامعتبر است.</translation> + </message> + <message> + <source>Element %1 is declared as abstract.</source> + <translation>عنصر %1 به صورت انتزاعی اعلان است.</translation> + </message> + <message> + <source>Element %1 is not nillable.</source> + <translation>عنصر %1 nillable نیست.</translation> + </message> + <message> + <source>Attribute %1 contains invalid data: %2</source> + <translation>صفت %1 شامل دادهٔ نامعتبر است: %2</translation> + </message> + <message> + <source>Element contains content although it is nillable.</source> + <translation>عنصر شامل محتویاتی است اگرچه nillable است.</translation> + </message> + <message> + <source>Fixed value constraint not allowed if element is nillable.</source> + <translation>قید عنصر ثابت مجاز نیست اگر عنصر nillable باشد.</translation> + </message> + <message> + <source>Specified type %1 is not validly substitutable with element type %2.</source> + <translation>عنصر مشخص شده نوع %1 نمیتواند به طور معتبر با عنصر نوع %2 جایگزین شود.</translation> + </message> + <message> + <source>Complex type %1 is not allowed to be abstract.</source> + <translation>نوع پیچیدهٔ %1 نمیتواند انتزاعی باشد.</translation> + </message> + <message> + <source>Element %1 contains not allowed attributes.</source> + <translation>عنصر %1 شامل صفت غیرمجاز است.</translation> + </message> + <message> + <source>Element %1 contains not allowed child element.</source> + <translation>عنصر %1 شامل عنصر فرزند غیرمجاز است.</translation> + </message> + <message> + <source>Content of element %1 does not match its type definition: %2.</source> + <translation>محتویات عنصر %1 با تعریفش مطابق نیست: %2.</translation> + </message> + <message> + <source>Content of element %1 does not match defined value constraint.</source> + <translation>محتویات عنصر %1 با قید مقدار تعریف شده مطابق نیست.</translation> + </message> + <message> + <source>Element %1 contains not allowed child content.</source> + <translation>عنصر %1 شامل محتویات فرزند غیرمجاز است.</translation> + </message> + <message> + <source>Element %1 contains not allowed text content.</source> + <translation>عنصر %1 شامل محتویات متن غیرمجاز است.</translation> + </message> + <message> + <source>Element %1 cannot contain other elements, as it has a fixed content.</source> + <translation>اگر عنصر %1 ثابت باشد نمیتواند شامل عناصر دیگر باشد.</translation> + </message> + <message> + <source>Element %1 is missing required attribute %2.</source> + <translation>عنصر %1 صفت گمشدهٔ موردنیاز %2 است.</translation> + </message> + <message> + <source>Attribute %1 does not match the attribute wildcard.</source> + <translation>صفت %1 با کاراکتر جایگزین شونده مطابق نیست.</translation> + </message> + <message> + <source>Declaration for attribute %1 does not exist.</source> + <translation>برای صفت %1 اعلانی وجود ندارد.</translation> + </message> + <message> + <source>Element %1 contains two attributes of type %2.</source> + <translation>عنصر %1 دو صفت از نوع %2 دارد.</translation> + </message> + <message> + <source>Attribute %1 contains invalid content.</source> + <translation>صفت %1 شامل محتویات نامعتبر است.</translation> + </message> + <message> + <source>Element %1 contains unknown attribute %2.</source> + <translation>عنصر %1 شامل صفت ناشناختهٔ %2 است.</translation> + </message> + <message> + <source>Content of attribute %1 does not match its type definition: %2.</source> + <translation>محتویات صفت %1 با تعریف نوعش مطابق نیست: %2.</translation> + </message> + <message> + <source>Content of attribute %1 does not match defined value constraint.</source> + <translation>محتویات صفت %1 با قید مقدار تعریف شده مطابق نیست.</translation> + </message> + <message> + <source>Non-unique value found for constraint %1.</source> + <translation>مقدار غیر یکتا برای قید %1 پیدا شد.</translation> + </message> + <message> + <source>Key constraint %1 contains absent fields.</source> + <translation>قید کلید %1 شامل فیلد مفقود است.</translation> + </message> + <message> + <source>Key constraint %1 contains references nillable element %2.</source> + <translation>قید کلید %1 شامل ارجاعهای عنصر nillable %2 است.</translation> + </message> + <message> + <source>No referenced value found for key reference %1.</source> + <translation>هیچ عنصر مراجعه شدهای برای کلید مرجع %1 پیدا نشد.</translation> + </message> + <message> + <source>More than one value found for field %1.</source> + <translation>بیش از یک مقدار برای میدان %1 پیدا شد.</translation> + </message> + <message> + <source>Field %1 has no simple type.</source> + <translation>فیلد %1 نوع سادهای ندارد.</translation> + </message> + <message> + <source>ID value '%1' is not unique.</source> + <translation>مقدار ID «%1» یکتا نیست.</translation> + </message> + <message> + <source>'%1' attribute contains invalid QName content: %2.</source> + <translation>صفت «%1» شامل محتوای نامعتبر QName است: %2.</translation> + </message> + <message> + <source>empty</source> + <translation>خالی</translation> + </message> + <message> + <source>zero or one</source> + <translation>صفر یا یک</translation> + </message> + <message> + <source>exactly one</source> + <translation>دقیقاً یک</translation> + </message> + <message> + <source>one or more</source> + <translation>یک یا بیشتر</translation> + </message> + <message> + <source>zero or more</source> + <translation>صفر یا بیشتر</translation> + </message> + <message> + <source>Required type is %1, but %2 was found.</source> + <translation>نوع درخواستی %1 است اما %2 پیدا شد.</translation> + </message> + <message> + <source>Promoting %1 to %2 may cause loss of precision.</source> + <translation>بالا بردن %1 نسبت به %2 ممکن است باعث ازدسترفتن دقت شود.</translation> + </message> + <message> + <source>The focus is undefined.</source> + <translation>کانون تعریف نشده است.</translation> + </message> + <message> + <source>It's not possible to add attributes after any other kind of node.</source> + <translation>بعد از هر نوع گره امکان اضافهکردن صفت وجود ندارد.</translation> + </message> + <message> + <source>An attribute by name %1 has already been created.</source> + <translation>یک صفت با نام %1 هماکنون ساخته شده است.</translation> + </message> + <message> + <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source> + <translation>فقط تطبیق کد یونیکد پشتیبانی شده است (%1). %2 پشتیبانی نشده است.</translation> + </message> +</context> +</TS> |