summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/embedded/embedded.pro5
-rw-r--r--demos/embedded/fluidlauncher/config_s60/config.xml7
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.pro12
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmlcalculator.pngbin0 -> 15455 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmlclocks.pngbin0 -> 12409 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmldialcontrol.pngbin0 -> 16811 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmleasing.pngbin0 -> 3453 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmlflickr.jpgbin0 -> 35616 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpgbin0 -> 24216 bytes
-rw-r--r--demos/embedded/fluidlauncher/screenshots/qmltwitter.jpgbin0 -> 35159 bytes
-rw-r--r--demos/embedded/qmlcalculator/deployment.pri7
-rw-r--r--demos/embedded/qmlcalculator/qmlcalculator.cpp78
-rw-r--r--demos/embedded/qmlcalculator/qmlcalculator.pro12
-rw-r--r--demos/embedded/qmlclocks/deployment.pri7
-rw-r--r--demos/embedded/qmlclocks/qmlclocks.cpp78
-rw-r--r--demos/embedded/qmlclocks/qmlclocks.pro12
-rw-r--r--demos/embedded/qmldialcontrol/deployment.pri7
-rw-r--r--demos/embedded/qmldialcontrol/qmldialcontrol.cpp66
-rw-r--r--demos/embedded/qmldialcontrol/qmldialcontrol.pro11
-rw-r--r--demos/embedded/qmleasing/deployment.pri7
-rw-r--r--demos/embedded/qmleasing/qmleasing.cpp66
-rw-r--r--demos/embedded/qmleasing/qmleasing.pro11
-rw-r--r--demos/embedded/qmlflickr/deployment.pri7
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.cpp92
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.pro14
-rw-r--r--demos/embedded/qmlphotoviewer/deployment.pri7
-rw-r--r--demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp92
-rw-r--r--demos/embedded/qmlphotoviewer/qmlphotoviewer.pro14
-rw-r--r--demos/embedded/qmltwitter/deployment.pri7
-rw-r--r--demos/embedded/qmltwitter/qmltwitter.cpp92
-rw-r--r--demos/embedded/qmltwitter/qmltwitter.pro14
-rw-r--r--mkspecs/common/symbian/symbian-mmp.conf22
-rw-r--r--mkspecs/modules/qt_webkit_version.pri2
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog73
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro25
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h1
-rw-r--r--src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp30
-rw-r--r--src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h1
-rw-r--r--src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri (renamed from src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri)0
-rw-r--r--src/gui/text/qfontdatabase_s60.cpp76
-rw-r--r--src/gui/text/qfontengine_s60.cpp78
-rw-r--r--src/gui/text/qfontengine_s60_p.h18
48 files changed, 1031 insertions, 65 deletions
diff --git a/demos/embedded/embedded.pro b/demos/embedded/embedded.pro
index da764d152e..a3fc72b63a 100644
--- a/demos/embedded/embedded.pro
+++ b/demos/embedded/embedded.pro
@@ -19,6 +19,11 @@ contains(QT_CONFIG, webkit) {
SUBDIRS += anomaly
}
+contains(QT_CONFIG, declarative) {
+ # Qml demos require DEPLOYMENT support. Therefore, only symbian.
+ symbian:SUBDIRS += qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter
+}
+
# install
sources.files = README *.pro
sources.path = $$[QT_INSTALL_DEMOS]/embedded
diff --git a/demos/embedded/fluidlauncher/config_s60/config.xml b/demos/embedded/fluidlauncher/config_s60/config.xml
index d926a4b5cb..4f10488f65 100644
--- a/demos/embedded/fluidlauncher/config_s60/config.xml
+++ b/demos/embedded/fluidlauncher/config_s60/config.xml
@@ -21,6 +21,13 @@
<example filename="digiflip" name="Flipping Clock" image="screenshots/digiflip.png"/>
<example filename="qmediaplayer" name="Media Player" image="screenshots/mediaplayer.png" args="-small-screen"/>
<example filename="spectrum" name="Spectrum Analyzer" image="screenshots/spectrum.png" args="-small-screen"/>
+ <example filename="qmlcalculator" name="Qml Calculator" image="screenshots/qmlcalculator.png"/>
+ <example filename="qmlclocks" name="Qml Clocks" image="screenshots/qmlclocks.png"/>
+ <example filename="qmldialcontrol" name="Qml Dial Control" image="screenshots/qmldialcontrol.png"/>
+ <example filename="qmleasing" name="Qml Easing Curves" image="screenshots/qmleasing.png"/>
+ <example filename="qmlflickr" name="Qml flickr" image="screenshots/qmlflickr.jpg"/>
+ <example filename="qmlphotoviewer" name="Qml Photo Viewer" image="screenshots/qmlphotoviewer.jpg"/>
+ <example filename="qmltwitter" name="Qml twitter" image="screenshots/qmltwitter.jpg"/>
</demos>
<slideshow timeout="60000" interval="10000">
<imagedir dir="slides"/>
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.pro b/demos/embedded/fluidlauncher/fluidlauncher.pro
index bb512d9d0c..21f38198a2 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.pro
+++ b/demos/embedded/fluidlauncher/fluidlauncher.pro
@@ -215,6 +215,16 @@ symbian {
$$appResourceDir(examples/script/context2d/context2d.mif)
}
+ qmldemos = qmlcalculator qmlclocks qmldialcontrol qmleasing qmlflickr qmlphotoviewer qmltwitter
+ contains(QT_CONFIG, declarative) {
+ for(qmldemo, qmldemos) {
+ executables.sources += $$QT_BUILD_TREE/demos/embedded/$${qmldemo}/$${qmldemo}.exe
+ reg_resource.sources += $$regResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}_reg.rsc)
+ resource.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.rsc)
+ mifs.sources += $$appResourceDir(demos/embedded/$${qmldemo}/$${qmldemo}.mif)
+ }
+ }
+
files.sources = $$PWD/screenshots $$PWD/slides
files.path = .
@@ -243,6 +253,8 @@ symbian {
DEPLOYMENT += config files executables viewerimages saxbookmarks reg_resource resource \
mifs desktopservices_music desktopservices_images fluidbackup
+ contains(QT_CONFIG, declarative):for(qmldemo, qmldemos):include($$QT_BUILD_TREE/demos/embedded/$${qmldemo}/deployment.pri)
+
DEPLOYMENT.installer_header = 0xA000D7CD
TARGET.EPOCHEAPSIZE = 100000 20000000
diff --git a/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png b/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png
new file mode 100644
index 0000000000..f4218f5b33
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmlcalculator.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmlclocks.png b/demos/embedded/fluidlauncher/screenshots/qmlclocks.png
new file mode 100644
index 0000000000..ba25a18376
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmlclocks.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png b/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png
new file mode 100644
index 0000000000..b8def8c804
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmldialcontrol.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmleasing.png b/demos/embedded/fluidlauncher/screenshots/qmleasing.png
new file mode 100644
index 0000000000..d34c2ac3d1
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmleasing.png
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg b/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg
new file mode 100644
index 0000000000..d7faabfb11
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmlflickr.jpg
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg b/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg
new file mode 100644
index 0000000000..673ffc6e90
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmlphotoviewer.jpg
Binary files differ
diff --git a/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg b/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg
new file mode 100644
index 0000000000..4399eea09d
--- /dev/null
+++ b/demos/embedded/fluidlauncher/screenshots/qmltwitter.jpg
Binary files differ
diff --git a/demos/embedded/qmlcalculator/deployment.pri b/demos/embedded/qmlcalculator/deployment.pri
new file mode 100644
index 0000000000..d5078f6655
--- /dev/null
+++ b/demos/embedded/qmlcalculator/deployment.pri
@@ -0,0 +1,7 @@
+qmlcalculator_src = $$PWD/../../declarative/calculator
+symbian {
+ qmlcalculator_uid3 = EA8EBD98
+ qmlcalculator_files.path = ../$$qmlcalculator_uid3
+}
+qmlcalculator_files.sources = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core
+DEPLOYMENT += qmlcalculator_files
diff --git a/demos/embedded/qmlcalculator/qmlcalculator.cpp b/demos/embedded/qmlcalculator/qmlcalculator.cpp
new file mode 100644
index 0000000000..3030e810be
--- /dev/null
+++ b/demos/embedded/qmlcalculator/qmlcalculator.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+
+#if defined(Q_OS_SYMBIAN)
+#include <eikenv.h>
+#include <eikappui.h>
+#include <aknenv.h>
+#include <aknappui.h>
+#endif // Q_OS_SYMBIAN
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("calculator.qml");
+ QDeclarativeView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(QT_KEYPAD_NAVIGATION)
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif // QT_KEYPAD_NAVIGATION
+
+#if defined(Q_OS_SYMBIAN)
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
+ TRAPD(error,
+ if (appUi)
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait)
+ )
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.show();
+#endif // Q_OS_SYMBIAN
+
+ return application.exec();
+}
diff --git a/demos/embedded/qmlcalculator/qmlcalculator.pro b/demos/embedded/qmlcalculator/qmlcalculator.pro
new file mode 100644
index 0000000000..1e71eed4fa
--- /dev/null
+++ b/demos/embedded/qmlcalculator/qmlcalculator.pro
@@ -0,0 +1,12 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative
+SOURCES += $$PWD/qmlcalculator.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmlcalculator_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ LIBS += -lcone -leikcore -lavkon # Screen orientation
+}
diff --git a/demos/embedded/qmlclocks/deployment.pri b/demos/embedded/qmlclocks/deployment.pri
new file mode 100644
index 0000000000..84803ece7b
--- /dev/null
+++ b/demos/embedded/qmlclocks/deployment.pri
@@ -0,0 +1,7 @@
+qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks
+symbian {
+ qmlclocks_uid3 = E19225B9
+ qmlclocks_files.path = ../$$qmlclocks_uid3
+}
+qmlclocks_files.sources = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content
+DEPLOYMENT += qmlclocks_files
diff --git a/demos/embedded/qmlclocks/qmlclocks.cpp b/demos/embedded/qmlclocks/qmlclocks.cpp
new file mode 100644
index 0000000000..d94cbdd359
--- /dev/null
+++ b/demos/embedded/qmlclocks/qmlclocks.cpp
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+
+#if defined(Q_OS_SYMBIAN)
+#include <eikenv.h>
+#include <eikappui.h>
+#include <aknenv.h>
+#include <aknappui.h>
+#endif // Q_OS_SYMBIAN
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("clocks.qml");
+ QDeclarativeView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(QT_KEYPAD_NAVIGATION)
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif // QT_KEYPAD_NAVIGATION
+
+#if defined(Q_OS_SYMBIAN)
+ CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi());
+ TRAPD(error,
+ if (appUi)
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape)
+ )
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.show();
+#endif // Q_OS_SYMBIAN
+
+ return application.exec();
+}
diff --git a/demos/embedded/qmlclocks/qmlclocks.pro b/demos/embedded/qmlclocks/qmlclocks.pro
new file mode 100644
index 0000000000..5edfe14241
--- /dev/null
+++ b/demos/embedded/qmlclocks/qmlclocks.pro
@@ -0,0 +1,12 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative
+SOURCES += $$PWD/qmlclocks.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmlclocks_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ LIBS += -lcone -leikcore -lavkon # Screen orientation
+}
diff --git a/demos/embedded/qmldialcontrol/deployment.pri b/demos/embedded/qmldialcontrol/deployment.pri
new file mode 100644
index 0000000000..8eb39b2a26
--- /dev/null
+++ b/demos/embedded/qmldialcontrol/deployment.pri
@@ -0,0 +1,7 @@
+qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol
+symbian {
+ qmldialcontrol_uid3 = E59A9283
+ qmldialcontrol_files.path = ../$$qmldialcontrol_uid3
+}
+qmldialcontrol_files.sources = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content
+DEPLOYMENT += qmldialcontrol_files
diff --git a/demos/embedded/qmldialcontrol/qmldialcontrol.cpp b/demos/embedded/qmldialcontrol/qmldialcontrol.cpp
new file mode 100644
index 0000000000..311cee09c9
--- /dev/null
+++ b/demos/embedded/qmldialcontrol/qmldialcontrol.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("dialcontrol.qml");
+ QDeclarativeView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(QT_KEYPAD_NAVIGATION)
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif // QT_KEYPAD_NAVIGATION
+
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.show();
+#endif // Q_OS_SYMBIAN
+
+ return application.exec();
+}
diff --git a/demos/embedded/qmldialcontrol/qmldialcontrol.pro b/demos/embedded/qmldialcontrol/qmldialcontrol.pro
new file mode 100644
index 0000000000..193cf55ce8
--- /dev/null
+++ b/demos/embedded/qmldialcontrol/qmldialcontrol.pro
@@ -0,0 +1,11 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative
+SOURCES += $$PWD/qmldialcontrol.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmldialcontrol_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/demos/embedded/qmleasing/deployment.pri b/demos/embedded/qmleasing/deployment.pri
new file mode 100644
index 0000000000..ddab1bab75
--- /dev/null
+++ b/demos/embedded/qmleasing/deployment.pri
@@ -0,0 +1,7 @@
+qmleasing_src = $$PWD/../../../examples/declarative/animation/easing
+symbian {
+ qmleasing_uid3 = E8E8E725
+ qmleasing_files.path = ../$$qmleasing_uid3
+}
+qmleasing_files.sources = $$qmleasing_src/easing.qml
+DEPLOYMENT += qmleasing_files
diff --git a/demos/embedded/qmleasing/qmleasing.cpp b/demos/embedded/qmleasing/qmleasing.cpp
new file mode 100644
index 0000000000..d326468d40
--- /dev/null
+++ b/demos/embedded/qmleasing/qmleasing.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("easing.qml");
+ QDeclarativeView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(QT_KEYPAD_NAVIGATION)
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif // QT_KEYPAD_NAVIGATION
+
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.show();
+#endif // Q_OS_SYMBIAN
+
+ return application.exec();
+}
diff --git a/demos/embedded/qmleasing/qmleasing.pro b/demos/embedded/qmleasing/qmleasing.pro
new file mode 100644
index 0000000000..084a880cbe
--- /dev/null
+++ b/demos/embedded/qmleasing/qmleasing.pro
@@ -0,0 +1,11 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative
+SOURCES += $$PWD/qmleasing.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmleasing_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/demos/embedded/qmlflickr/deployment.pri b/demos/embedded/qmlflickr/deployment.pri
new file mode 100644
index 0000000000..aef319892d
--- /dev/null
+++ b/demos/embedded/qmlflickr/deployment.pri
@@ -0,0 +1,7 @@
+qmlflickr_src = $$PWD/../../declarative/flickr
+symbian {
+ qmlflickr_uid3 = E56D5A92
+ qmlflickr_files.path = ../$$qmlflickr_uid3
+}
+qmlflickr_files.sources = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile
+DEPLOYMENT += qmlflickr_files
diff --git a/demos/embedded/qmlflickr/qmlflickr.cpp b/demos/embedded/qmlflickr/qmlflickr.cpp
new file mode 100644
index 0000000000..6f0c528ee3
--- /dev/null
+++ b/demos/embedded/qmlflickr/qmlflickr.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
+
+#if defined(Q_OS_SYMBIAN)
+#include <QtCore/QTextCodec>
+#include <QtCore/QTimer>
+#include "sym_iap_util.h"
+
+class QmlAppView : public QDeclarativeView
+{
+Q_OBJECT
+public:
+ QmlAppView(QWidget *parent = 0)
+ : QDeclarativeView(parent)
+ {
+ QTimer::singleShot(0, this, SLOT(setDefaultIap()));
+ }
+
+private slots:
+ void setDefaultIap()
+ {
+ qt_SetDefaultIap();
+ }
+};
+#else // Q_OS_SYMBIAN
+typedef QDeclarativeView QmlAppView;
+#endif // Q_OS_SYMBIAN
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("flickr.qml");
+ QmlAppView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.setGeometry(QRect(100, 100, 360, 640));
+ view.show();
+#endif // Q_OS_SYMBIAN
+ return application.exec();
+}
+
+#if defined(Q_OS_SYMBIAN)
+#include "qmlflickr.moc"
+#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmlflickr/qmlflickr.pro b/demos/embedded/qmlflickr/qmlflickr.pro
new file mode 100644
index 0000000000..e7061349a3
--- /dev/null
+++ b/demos/embedded/qmlflickr/qmlflickr.pro
@@ -0,0 +1,14 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative network
+SOURCES += $$PWD/qmlflickr.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
+ LIBS += -lesock -lcommdb -linsock # For IAP selection
+ TARGET.CAPABILITY = NetworkServices
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/demos/embedded/qmlphotoviewer/deployment.pri b/demos/embedded/qmlphotoviewer/deployment.pri
new file mode 100644
index 0000000000..99475ccbdf
--- /dev/null
+++ b/demos/embedded/qmlphotoviewer/deployment.pri
@@ -0,0 +1,7 @@
+qmlphotoviewer_src = $$PWD/../../declarative/photoviewer
+symbian {
+ qmlphotoviewer_uid3 = E8567E72
+ qmlphotoviewer_files.path = ../$$qmlphotoviewer_uid3
+}
+qmlphotoviewer_files.sources = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore
+DEPLOYMENT += qmlphotoviewer_files
diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp
new file mode 100644
index 0000000000..7889842f35
--- /dev/null
+++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
+
+#if defined(Q_OS_SYMBIAN)
+#include <QtCore/QTextCodec>
+#include <QtCore/QTimer>
+#include "sym_iap_util.h"
+
+class QmlAppView : public QDeclarativeView
+{
+Q_OBJECT
+public:
+ QmlAppView(QWidget *parent = 0)
+ : QDeclarativeView(parent)
+ {
+ QTimer::singleShot(0, this, SLOT(setDefaultIap()));
+ }
+
+private slots:
+ void setDefaultIap()
+ {
+ qt_SetDefaultIap();
+ }
+};
+#else // Q_OS_SYMBIAN
+typedef QDeclarativeView QmlAppView;
+#endif // Q_OS_SYMBIAN
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("photoviewer.qml");
+ QmlAppView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.setGeometry(QRect(100, 100, 360, 640));
+ view.show();
+#endif // Q_OS_SYMBIAN
+ return application.exec();
+}
+
+#if defined(Q_OS_SYMBIAN)
+#include "qmlphotoviewer.moc"
+#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro
new file mode 100644
index 0000000000..ead5e6700d
--- /dev/null
+++ b/demos/embedded/qmlphotoviewer/qmlphotoviewer.pro
@@ -0,0 +1,14 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative network
+SOURCES += $$PWD/qmlphotoviewer.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmlphotoviewer_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
+ LIBS += -lesock -lcommdb -linsock # For IAP selection
+ TARGET.CAPABILITY = NetworkServices
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/demos/embedded/qmltwitter/deployment.pri b/demos/embedded/qmltwitter/deployment.pri
new file mode 100644
index 0000000000..e5bd884c8b
--- /dev/null
+++ b/demos/embedded/qmltwitter/deployment.pri
@@ -0,0 +1,7 @@
+qmltwitter_src = $$PWD/../../declarative/twitter
+symbian {
+ qmltwitter_uid3 = EEF6D468
+ qmltwitter_files.path = ../$$qmltwitter_uid3
+}
+qmltwitter_files.sources = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore
+DEPLOYMENT += qmltwitter_files
diff --git a/demos/embedded/qmltwitter/qmltwitter.cpp b/demos/embedded/qmltwitter/qmltwitter.cpp
new file mode 100644
index 0000000000..e30ab24546
--- /dev/null
+++ b/demos/embedded/qmltwitter/qmltwitter.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demonstration applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
+#include <QtDeclarative/QDeclarativeView>
+#include <QtDeclarative/QDeclarativeEngine>
+
+#if defined(Q_OS_SYMBIAN)
+#include <QtCore/QTextCodec>
+#include <QtCore/QTimer>
+#include "sym_iap_util.h"
+
+class QmlAppView : public QDeclarativeView
+{
+Q_OBJECT
+public:
+ QmlAppView(QWidget *parent = 0)
+ : QDeclarativeView(parent)
+ {
+ QTimer::singleShot(0, this, SLOT(setDefaultIap()));
+ }
+
+private slots:
+ void setDefaultIap()
+ {
+ qt_SetDefaultIap();
+ }
+};
+#else // Q_OS_SYMBIAN
+typedef QDeclarativeView QmlAppView;
+#endif // Q_OS_SYMBIAN
+
+int main(int argc, char *argv[])
+{
+ QApplication application(argc, argv);
+
+ const QString mainQmlApp = QLatin1String("twitter.qml");
+ QmlAppView view;
+ view.setSource(QUrl(mainQmlApp));
+ view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
+
+#if defined(Q_OS_SYMBIAN)
+ view.showFullScreen();
+#else // Q_OS_SYMBIAN
+ view.setGeometry(QRect(100, 100, 360, 640));
+ view.show();
+#endif // Q_OS_SYMBIAN
+ return application.exec();
+}
+
+#if defined(Q_OS_SYMBIAN)
+#include "qmltwitter.moc"
+#endif // Q_OS_SYMBIAN
diff --git a/demos/embedded/qmltwitter/qmltwitter.pro b/demos/embedded/qmltwitter/qmltwitter.pro
new file mode 100644
index 0000000000..7f9be57317
--- /dev/null
+++ b/demos/embedded/qmltwitter/qmltwitter.pro
@@ -0,0 +1,14 @@
+!symbian:!wince*:warning("DEPLOYMENT support required. This project only works on Symbian and WinCE.")
+
+QT += declarative network
+SOURCES += $$PWD/qmltwitter.cpp
+include($$PWD/deployment.pri)
+
+symbian {
+ TARGET.UID3 = 0x$$qmltwitter_uid3 # defined in deployment.pri
+ include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
+ INCLUDEPATH += $$QT_SOURCE_TREE/examples/network/qftp/
+ LIBS += -lesock -lcommdb -linsock # For IAP selection
+ TARGET.CAPABILITY = NetworkServices
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+}
diff --git a/mkspecs/common/symbian/symbian-mmp.conf b/mkspecs/common/symbian/symbian-mmp.conf
index b0d17be771..5a7b2d22ba 100644
--- a/mkspecs/common/symbian/symbian-mmp.conf
+++ b/mkspecs/common/symbian/symbian-mmp.conf
@@ -40,15 +40,21 @@ MMP_RULES += "USERINCLUDE ."
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis) {
S60_VERSION = 5.2 symbian3
-} else:exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) {
- S60_VERSION = 5.1 symbian2
-} else:exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
- S60_VERSION = 5.0
-} else:exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
- S60_VERSION = 3.2
} else {
- S60_VERSION = 3.1
- MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) {
+ S60_VERSION = 5.1 symbian2
+ } else {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
+ S60_VERSION = 5.0
+ } else {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
+ S60_VERSION = 3.2
+ } else {
+ S60_VERSION = 3.1
+ MMP_RULES -= PAGED BYTEPAIRCOMPRESSTARGET
+ }
+ }
+ }
}
QMAKE_CXXFLAGS_FAST_VFP.ARMCC = --fpmode fast
diff --git a/mkspecs/modules/qt_webkit_version.pri b/mkspecs/modules/qt_webkit_version.pri
new file mode 100644
index 0000000000..03707207ae
--- /dev/null
+++ b/mkspecs/modules/qt_webkit_version.pri
@@ -0,0 +1,2 @@
+# The version information comes from our copy of
+include($$PWD/../../src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri)
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 8cb0e530ee..cc67d1b83a 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-f59a934694947496cedecc5256a71bff60c43c4c
+de1e909b06cbc981d63e0fc0f6a3f84002dd1e80
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index fb78e36d63..f37c367ac8 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
- c58dc2f491a824ac56e31c440fcf7fe16dab09c4
+ 9a83f22bc41a2016b6bbf495bfd32b3a659038c8
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index ff7d2149cf..e907167609 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,76 @@
+2010-06-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix installation of the QtWebKit module .pri file when building inside of Qt
+
+ * WebCore.pro:
+
+2010-06-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix a QtWebKit.pc corruption problem.
+ https://bugs.webkit.org/show_bug.cgi?id=36826
+
+ The problem occurs while installing QtWebKit from trunk
+ or a source package.
+
+ * WebCore.pro:
+
+2010-06-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Fix Symbian package dependencies of apps against QtWebKit when installing into Qt
+
+ Install the versioning qt_webkit_version.pri into $$[QMAKE_MKSPECS]/modules, which is
+ where mkspecs/features/qt.prf expects it.
+
+ * WebCore.pro:
+
+2010-05-17 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Bring CanvasRenderingContext2D's createImageData() in line with HTML5 spec
+ Added createImageData(ImageData) which returns a new ImageData with the same size as the one passed.
+ Changed createImageData(width, height) to use the absolute values of width and height.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39189
+
+ Spec link:
+ http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createimagedata
+
+ Test: fast/canvas/canvas-createImageData.html
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2D::createImageData):
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createImageData):
+ * html/canvas/CanvasRenderingContext2D.h:
+ * html/canvas/CanvasRenderingContext2D.idl:
+
+2010-05-16 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Properly handle invalid arguments to CanvasRenderingContext2D's getImageData() and putImageData().
+ Both should throw NOT_SUPPORTED_ERR when called with nonfinite arguments.
+ getImageData() should throw INDEX_SIZE_ERR if either width or height is 0.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39175
+
+ Spec link:
+ http://www.whatwg.org/specs/web-apps/current-work/#pixel-manipulation
+
+ Test: fast/canvas/canvas-getImageData-invalid.html
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createImageData):
+ (WebCore::CanvasRenderingContext2D::getImageData):
+ (WebCore::CanvasRenderingContext2D::putImageData):
+
2010-05-31 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 63e78a7dea..2a1536c508 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -74,7 +74,8 @@ CONFIG(QTDIR_build) {
!static: DEFINES += QT_MAKEDLL
symbian: TARGET =$$TARGET$${QT_LIBINFIX}
}
-include($$PWD/../WebKit/qt/qtwebkit_version.pri)
+moduleFile=$$PWD/../WebKit/qt/qt_webkit_version.pri
+include($$moduleFile)
VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION}
unix {
@@ -2840,7 +2841,12 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) {
include($$PWD/../WebKit/qt/Api/headers.pri)
HEADERS += $$WEBKIT_API_HEADERS
-!CONFIG(QTDIR_build) {
+CONFIG(QTDIR_build) {
+ modfile.files = $$moduleFile
+ modfile.path = $$[QMAKE_MKSPECS]/modules
+
+ INSTALLS += modfile
+} else {
exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri)
WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS
@@ -2849,7 +2855,10 @@ HEADERS += $$WEBKIT_API_HEADERS
headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
target.path = $$[QT_INSTALL_LIBS]
- INSTALLS += target headers
+ modfile.files = $$moduleFile
+ modfile.path = $$[QMAKE_MKSPECS]/modules
+
+ INSTALLS += target headers modfile
} else {
# INSTALLS is not implemented in qmake's s60 generators, copy headers manually
inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
@@ -2857,7 +2866,13 @@ HEADERS += $$WEBKIT_API_HEADERS
inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
QMAKE_EXTRA_COMPILERS += inst_headers
- install.depends += compiler_inst_headers_make_all
+ inst_modfile.commands = $$inst_headers.commands
+ inst_modfile.input = moduleFile
+ inst_modfile.output = $$[QMAKE_MKSPECS]/modules
+
+ QMAKE_EXTRA_COMPILERS += inst_modfile
+
+ install.depends += compiler_inst_headers_make_all compiler_inst_modfile_make_all
QMAKE_EXTRA_TARGETS += install
}
@@ -2875,7 +2890,7 @@ HEADERS += $$WEBKIT_API_HEADERS
QMAKE_PKGCONFIG_LIBDIR = $$target.path
QMAKE_PKGCONFIG_INCDIR = $$headers.path
QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- lib_replace.match = $$DESTDIR
+ lib_replace.match = $$re_escape($$DESTDIR)
lib_replace.replace = $$[QT_INSTALL_LIBS]
QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
index a27192305e..0254d0fea6 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
@@ -361,6 +361,24 @@ JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList
return jsUndefined();
}
+JSValue JSCanvasRenderingContext2D::createImageData(ExecState* exec, const ArgList& args)
+{
+ // createImageData has two variants
+ // createImageData(ImageData)
+ // createImageData(width, height)
+ CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+ RefPtr<ImageData> imageData = 0;
+
+ ExceptionCode ec = 0;
+ if (args.size() == 1)
+ imageData = context->createImageData(toImageData(args.at(0)), ec);
+ else if (args.size() == 2)
+ imageData = context->createImageData(args.at(0).toFloat(exec), args.at(1).toFloat(exec), ec);
+
+ setDOMException(exec, ec);
+ return toJS(exec, globalObject(), WTF::getPtr(imageData));
+}
+
JSValue JSCanvasRenderingContext2D::putImageData(ExecState* exec, const ArgList& args)
{
// putImageData has two variants
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
index a991e8d018..d97b54a5f7 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
@@ -165,7 +165,7 @@ static const HashTableValue JSCanvasRenderingContext2DPrototypeTableValues[45] =
{ "drawImageFromRect", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionDrawImageFromRect), (intptr_t)0 },
{ "setShadow", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionSetShadow), (intptr_t)0 },
{ "createPattern", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionCreatePattern), (intptr_t)0 },
- { "createImageData", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionCreateImageData), (intptr_t)2 },
+ { "createImageData", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionCreateImageData), (intptr_t)0 },
{ "getImageData", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionGetImageData), (intptr_t)4 },
{ "putImageData", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsCanvasRenderingContext2DPrototypeFunctionPutImageData), (intptr_t)0 },
{ 0, 0, 0, 0 }
@@ -1018,15 +1018,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionCreateImageData
if (!thisValue.inherits(&JSCanvasRenderingContext2D::s_info))
return throwError(exec, TypeError);
JSCanvasRenderingContext2D* castedThisObj = static_cast<JSCanvasRenderingContext2D*>(asObject(thisValue));
- CanvasRenderingContext2D* imp = static_cast<CanvasRenderingContext2D*>(castedThisObj->impl());
- ExceptionCode ec = 0;
- float sw = args.at(0).toFloat(exec);
- float sh = args.at(1).toFloat(exec);
-
-
- JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createImageData(sw, sh, ec)));
- setDOMException(exec, ec);
- return result;
+ return castedThisObj->createImageData(exec, args);
}
JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionGetImageData(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h
index 218e455be5..92fabb7702 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h
@@ -61,6 +61,7 @@ public:
JSC::JSValue drawImageFromRect(JSC::ExecState*, const JSC::ArgList&);
JSC::JSValue setShadow(JSC::ExecState*, const JSC::ArgList&);
JSC::JSValue createPattern(JSC::ExecState*, const JSC::ArgList&);
+ JSC::JSValue createImageData(JSC::ExecState*, const JSC::ArgList&);
JSC::JSValue putImageData(JSC::ExecState*, const JSC::ArgList&);
protected:
static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
index 398e4d8e8f..9cec7a92b1 100644
--- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
+++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp
@@ -1278,14 +1278,30 @@ static PassRefPtr<ImageData> createEmptyImageData(const IntSize& size)
return data.get();
}
+PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(PassRefPtr<ImageData> imageData, ExceptionCode& ec) const
+{
+ if (!imageData) {
+ ec = NOT_SUPPORTED_ERR;
+ return 0;
+ }
+
+ IntSize size(imageData->width(), imageData->height());
+ return createEmptyImageData(size);
+}
+
PassRefPtr<ImageData> CanvasRenderingContext2D::createImageData(float sw, float sh, ExceptionCode& ec) const
{
ec = 0;
+ if (!sw || !sh) {
+ ec = INDEX_SIZE_ERR;
+ return 0;
+ }
if (!isfinite(sw) || !isfinite(sh)) {
ec = NOT_SUPPORTED_ERR;
return 0;
}
- FloatSize unscaledSize(sw, sh);
+
+ FloatSize unscaledSize(fabs(sw), fabs(sh));
IntSize scaledSize = canvas()->convertLogicalToDevice(unscaledSize);
if (scaledSize.width() < 1)
scaledSize.setWidth(1);
@@ -1301,7 +1317,15 @@ PassRefPtr<ImageData> CanvasRenderingContext2D::getImageData(float sx, float sy,
ec = SECURITY_ERR;
return 0;
}
-
+ if (!sw || !sh) {
+ ec = INDEX_SIZE_ERR;
+ return 0;
+ }
+ if (!isfinite(sx) || !isfinite(sy) || !isfinite(sw) || !isfinite(sh)) {
+ ec = NOT_SUPPORTED_ERR;
+ return 0;
+ }
+
FloatRect unscaledRect(sx, sy, sw, sh);
IntRect scaledRect = canvas()->convertLogicalToDevice(unscaledRect);
if (scaledRect.width() < 1)
@@ -1332,7 +1356,7 @@ void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy,
}
if (!isfinite(dx) || !isfinite(dy) || !isfinite(dirtyX) ||
!isfinite(dirtyY) || !isfinite(dirtyWidth) || !isfinite(dirtyHeight)) {
- ec = INDEX_SIZE_ERR;
+ ec = NOT_SUPPORTED_ERR;
return;
}
diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h
index 553ffd293b..2220f7e675 100644
--- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h
+++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h
@@ -178,6 +178,7 @@ namespace WebCore {
PassRefPtr<CanvasPattern> createPattern(HTMLImageElement*, const String& repetitionType, ExceptionCode&);
PassRefPtr<CanvasPattern> createPattern(HTMLCanvasElement*, const String& repetitionType, ExceptionCode&);
+ PassRefPtr<ImageData> createImageData(PassRefPtr<ImageData> imageData, ExceptionCode&) const;
PassRefPtr<ImageData> createImageData(float width, float height, ExceptionCode&) const;
PassRefPtr<ImageData> getImageData(float sx, float sy, float sw, float sh, ExceptionCode&) const;
void putImageData(ImageData*, float dx, float dy, ExceptionCode&);
diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl
index f93a7525a9..3f7ead714a 100644
--- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl
+++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl
@@ -105,13 +105,12 @@ module html {
[Custom] void drawImageFromRect(/* 10 */);
[Custom] void setShadow(/* 3 */);
[Custom] void createPattern(/* 2 */);
+ [Custom] ImageData createImageData(/* 3 */);
attribute [Custom] custom strokeStyle;
attribute [Custom] custom fillStyle;
// pixel manipulation
- ImageData createImageData(in float sw, in float sh)
- raises (DOMException);
ImageData getImageData(in float sx, in float sy, in float sw, in float sh)
raises(DOMException);
[Custom] void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */);
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index b6cbf92e85..39f2cf3a0c 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-01 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Rename versioning .pri file to what Qt's mkspecs/features/qt.pri expects.
+
+ * qt_webkit_version.pri: Renamed from WebKit/qt/qtwebkit_version.pri.
+
2010-05-31 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index ffd192c315..ffd192c315 100644
--- a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
index 489b70b30f..943df7f246 100644
--- a/src/gui/text/qfontdatabase_s60.cpp
+++ b/src/gui/text/qfontdatabase_s60.cpp
@@ -49,12 +49,12 @@
#include <private/qt_s60_p.h>
#include "qendian.h"
#include <private/qcore_symbian_p.h>
-#if defined(QT_NO_FREETYPE)
+#ifdef QT_NO_FREETYPE
#include <openfont.h>
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include <graphics/openfontrasterizer.h> // COpenFontRasterizer has moved to a new header file
#endif // SYMBIAN_ENABLE_SPLIT_HEADERS
-#endif
+#endif // QT_NO_FREETYPE
QT_BEGIN_NAMESPACE
@@ -91,7 +91,7 @@ QFileInfoList alternativeFilePaths(const QString &path, const QStringList &nameF
return result;
}
-#if defined(QT_NO_FREETYPE)
+#ifdef QT_NO_FREETYPE
class QSymbianFontDatabaseExtrasImplementation : public QSymbianFontDatabaseExtras
{
public:
@@ -100,16 +100,41 @@ public:
const QSymbianTypeFaceExtras *extras(const QString &typeface, bool bold, bool italic) const;
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
+ struct CFontFromFontStoreReleaser {
+ static inline void cleanup(CFont *font)
+ {
+ if (!font)
+ return;
+ const QSymbianFontDatabaseExtrasImplementation *dbExtras =
+ static_cast<const QSymbianFontDatabaseExtrasImplementation*>(privateDb()->symbianExtras);
+ dbExtras->m_store->ReleaseFont(font);
+ }
+ };
+#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
+
+ struct CFontFromScreenDeviceReleaser {
+ static inline void cleanup(CFont *font)
+ {
+ if (!font)
+ return;
+ QS60Data::screenDevice()->ReleaseFont(font);
+ }
+ };
+
private:
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
RHeap* m_heap;
CFontStore *m_store;
COpenFontRasterizer *m_rasterizer;
mutable QList<const QSymbianTypeFaceExtras *> m_extras;
+#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
mutable QHash<QString, const QSymbianTypeFaceExtras *> m_extrasHash;
};
QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementation()
{
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
QStringList filters;
filters.append(QLatin1String("*.ttf"));
filters.append(QLatin1String("*.ccc"));
@@ -131,10 +156,14 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati
TPtrC fontFilePtr(qt_QString2TPtrC(fontFile));
QT_TRAP_THROWING(m_store->AddFileL(fontFilePtr));
}
+#endif // !Q_SYMBIAN_HAS_FONTTABLE_API
}
QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementation()
{
+#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+ qDeleteAll(m_extrasHash);
+#else // Q_SYMBIAN_HAS_FONTTABLE_API
typedef QList<const QSymbianTypeFaceExtras *>::iterator iterator;
for (iterator p = m_extras.begin(); p != m_extras.end(); ++p) {
m_store->ReleaseFont((*p)->fontOwner());
@@ -143,6 +172,7 @@ QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementat
delete m_store;
m_heap->Close();
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
}
#ifndef FNTSTORE_H_INLINES_SUPPORT_FMM
@@ -167,26 +197,37 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
{
const QString searchKey = typeface + QString::number(int(bold)) + QString::number(int(italic));
if (!m_extrasHash.contains(searchKey)) {
- CFont* font = NULL;
TFontSpec searchSpec(qt_QString2TPtrC(typeface), 1);
if (bold)
searchSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold);
if (italic)
searchSpec.iFontStyle.SetPosture(EPostureItalic);
+
+ CFont* font = NULL;
+#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+ const TInt err = QS60Data::screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec);
+ Q_ASSERT(err == KErrNone && font);
+ QScopedPointer<CFont, CFontFromScreenDeviceReleaser> sFont(font);
+ QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font);
+ sFont.take();
+ m_extrasHash.insert(searchKey, extras);
+#else // Q_SYMBIAN_HAS_FONTTABLE_API
const TInt err = m_store->GetNearestFontToDesignHeightInPixels(font, searchSpec);
Q_ASSERT(err == KErrNone && font);
const CBitmapFont *bitmapFont = static_cast<CBitmapFont*>(font);
COpenFont *openFont =
#ifdef FNTSTORE_H_INLINES_SUPPORT_FMM
- bitmapFont->openFont();
-#else
+ bitmapFont->OpenFont();
+#else // FNTSTORE_H_INLINES_SUPPORT_FMM
OpenFontFromBitmapFont(bitmapFont);
#endif // FNTSTORE_H_INLINES_SUPPORT_FMM
const TOpenFontFaceAttrib* const attrib = openFont->FaceAttrib();
const QString foundKey =
QString((const QChar*)attrib->FullName().Ptr(), attrib->FullName().Length());
if (!m_extrasHash.contains(foundKey)) {
+ QScopedPointer<CFont, CFontFromFontStoreReleaser> sFont(font);
QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font, openFont);
+ sFont.take();
m_extras.append(extras);
m_extrasHash.insert(searchKey, extras);
m_extrasHash.insert(foundKey, extras);
@@ -194,10 +235,11 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c
m_store->ReleaseFont(font);
m_extrasHash.insert(searchKey, m_extrasHash.value(foundKey));
}
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
}
return m_extrasHash.value(searchKey);
}
-#else
+#else // QT_NO_FREETYPE
class QFontEngineFTS60 : public QFontEngineFT
{
public:
@@ -209,7 +251,7 @@ QFontEngineFTS60::QFontEngineFTS60(const QFontDef &fd)
{
default_hint_style = HintFull;
}
-#endif // defined(QT_NO_FREETYPE)
+#endif // QT_NO_FREETYPE
/*
QFontEngineS60::pixelsToPoints, QFontEngineS60::pointsToPixels, QFontEngineMultiS60::QFontEngineMultiS60
@@ -261,12 +303,12 @@ static void initializeDb()
if(!db || db->count)
return;
-#if defined(QT_NO_FREETYPE)
+#ifdef QT_NO_FREETYPE
if (!db->symbianExtras)
db->symbianExtras = new QSymbianFontDatabaseExtrasImplementation;
QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock);
-
+
const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces();
const QSymbianFontDatabaseExtrasImplementation *dbExtras =
static_cast<const QSymbianFontDatabaseExtrasImplementation*>(db->symbianExtras);
@@ -278,6 +320,7 @@ static void initializeDb()
TFontSpec fontSpec(typefaceSupport.iTypeface.iName, 11);
if (QS60Data::screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone)
continue;
+ QScopedPointer<CFont, QSymbianFontDatabaseExtrasImplementation::CFontFromScreenDeviceReleaser> sFont(font);
if (font->TypeUid() == KCFbsFontUid) {
TOpenFontFaceAttrib faceAttrib;
const CFbsFont *cfbsFont = static_cast<const CFbsFont *>(font);
@@ -318,14 +361,13 @@ static void initializeDb()
fontAdded = true;
}
- QS60Data::screenDevice()->ReleaseFont(font);
}
Q_ASSERT(fontAdded);
- lock.relock();
+ lock.relock();
-#else // defined(QT_NO_FREETYPE)
+#else // QT_NO_FREETYPE
QDir dir(QDesktopServices::storageLocation(QDesktopServices::FontsLocation));
dir.setNameFilters(QStringList() << QLatin1String("*.ttf")
<< QLatin1String("*.ttc") << QLatin1String("*.pfa")
@@ -334,7 +376,7 @@ static void initializeDb()
const QByteArray file = QFile::encodeName(dir.absoluteFilePath(dir[i]));
db->addTTFile(file);
}
-#endif // defined(QT_NO_FREETYPE)
+#endif // QT_NO_FREETYPE
}
static inline void load(const QString &family = QString(), int script = -1)
@@ -416,13 +458,13 @@ QFontEngine *QFontDatabase::findFont(int script, const QFontPrivate *, const QFo
const QString fontFamily = desc.family->name;
QFontDef request = req;
request.family = fontFamily;
-#if defined(QT_NO_FREETYPE)
+#ifdef QT_NO_FREETYPE
const QSymbianFontDatabaseExtrasImplementation *dbExtras =
static_cast<const QSymbianFontDatabaseExtrasImplementation*>(db->symbianExtras);
const QSymbianTypeFaceExtras *typeFaceExtras =
dbExtras->extras(fontFamily, request.weight > QFont::Normal, request.style != QFont::StyleNormal);
fe = new QFontEngineS60(request, typeFaceExtras);
-#else
+#else // QT_NO_FREETYPE
QFontEngine::FaceId faceId;
const QtFontFamily * const reqQtFontFamily = db->family(fontFamily);
faceId.filename = reqQtFontFamily->fontFilename;
@@ -433,7 +475,7 @@ QFontEngine *QFontDatabase::findFont(int script, const QFontPrivate *, const QFo
fe = fte;
else
delete fte;
-#endif
+#endif // QT_NO_FREETYPE
Q_ASSERT(fe);
if (script == QUnicodeTables::Common
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index 93f02ff671..52a2c3c4ce 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -50,21 +50,73 @@
#include <e32std.h>
#include <eikenv.h>
#include <gdi.h>
+#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+#include <graphics/gdi/gdiplatapi.h>
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
QT_BEGIN_NAMESPACE
-QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* fontOwner, COpenFont *font)
- : m_font(font)
- , m_cmap(0)
+#ifdef Q_SYMBIAN_HAS_FONTTABLE_API
+QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont)
+ : m_cFont(cFont)
, m_symbolCMap(false)
- , m_fontOwner(fontOwner)
+{
+ Q_UNUSED(openFont)
+}
+
+QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras()
+{
+ QS60Data::screenDevice()->ReleaseFont(m_cFont);
+}
+
+QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const
+{
+ RFontTable fontTable;
+ if (fontTable.Open(*m_cFont, tag) != KErrNone)
+ return QByteArray();
+ const QByteArray byteArray(reinterpret_cast<const char *>
+ (fontTable.TableContent()),fontTable.TableLength());
+ fontTable.Close();
+ return byteArray;
+}
+
+bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *length) const
+{
+ RFontTable fontTable;
+ if (fontTable.Open(*m_cFont, tag) != KErrNone)
+ return false;
+
+ bool result = true;
+ const TInt tableByteLength = fontTable.TableLength();
+
+ if (*length > 0 && *length < tableByteLength) {
+ result = false; // Caller did not allocate enough memory
+ } else {
+ *length = tableByteLength;
+ if (buffer)
+ qMemCopy(buffer, fontTable.TableContent(), tableByteLength);
+ }
+
+ fontTable.Close();
+ return result;
+}
+
+#else // Q_SYMBIAN_HAS_FONTTABLE_API
+QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont)
+ : m_cFont(cFont)
+ , m_symbolCMap(false)
+ , m_openFont(openFont)
{
TAny *trueTypeExtension = NULL;
- m_font->ExtendedInterface(KUidOpenFontTrueTypeExtension, trueTypeExtension);
+ m_openFont->ExtendedInterface(KUidOpenFontTrueTypeExtension, trueTypeExtension);
m_trueTypeExtension = static_cast<MOpenFontTrueTypeExtension*>(trueTypeExtension);
Q_ASSERT(m_trueTypeExtension);
}
+QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras()
+{
+}
+
QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const
{
Q_ASSERT(m_trueTypeExtension->HasTrueTypeTable(tag));
@@ -100,23 +152,25 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len
m_trueTypeExtension->ReleaseTrueTypeTable(table);
return result;
}
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
-const unsigned char *QSymbianTypeFaceExtras::cmap() const
+const uchar *QSymbianTypeFaceExtras::cmap() const
{
- if (!m_cmap) {
- m_cmapTable = getSfntTable(MAKE_TAG('c', 'm', 'a', 'p'));
+ if (m_cmapTable.isNull()) {
+ const QByteArray cmapTable = getSfntTable(MAKE_TAG('c', 'm', 'a', 'p'));
int size = 0;
- m_cmap = QFontEngineS60::getCMap(reinterpret_cast<const uchar *>(m_cmapTable.constData()), m_cmapTable.size(), &m_symbolCMap, &size);
+ const uchar *cmap = QFontEngine::getCMap(reinterpret_cast<const uchar *>
+ (cmapTable.constData()), cmapTable.size(), &m_symbolCMap, &size);
+ m_cmapTable = QByteArray(reinterpret_cast<const char *>(cmap), size);
}
- return m_cmap;
+ return reinterpret_cast<const uchar *>(m_cmapTable.constData());
}
CFont *QSymbianTypeFaceExtras::fontOwner() const
{
- return m_fontOwner;
+ return m_cFont;
}
-
// duplicated from qfontengine_xyz.cpp
static inline unsigned int getChar(const QChar *str, int &i, const int len)
{
diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h
index 6883730e99..dea32c489f 100644
--- a/src/gui/text/qfontengine_s60_p.h
+++ b/src/gui/text/qfontengine_s60_p.h
@@ -58,6 +58,10 @@
#include "qsize.h"
#include <openfont.h>
+#ifdef SYMBIAN_GDI_GLYPHDATA
+#define Q_SYMBIAN_HAS_FONTTABLE_API
+#endif
+
class CFont;
QT_BEGIN_NAMESPACE
@@ -66,20 +70,22 @@ QT_BEGIN_NAMESPACE
class QSymbianTypeFaceExtras
{
public:
- QSymbianTypeFaceExtras(CFont* fontOwner, COpenFont *font);
+ QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont = 0);
+ ~QSymbianTypeFaceExtras();
QByteArray getSfntTable(uint tag) const;
bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
- const unsigned char *cmap() const;
+ const uchar *cmap() const;
CFont *fontOwner() const;
private:
- COpenFont *m_font;
- mutable MOpenFontTrueTypeExtension *m_trueTypeExtension;
- mutable const unsigned char *m_cmap;
+ CFont* m_cFont;
mutable bool m_symbolCMap;
mutable QByteArray m_cmapTable;
- CFont* m_fontOwner;
+#ifndef Q_SYMBIAN_HAS_FONTTABLE_API
+ COpenFont *m_openFont;
+ mutable MOpenFontTrueTypeExtension *m_trueTypeExtension;
+#endif // Q_SYMBIAN_HAS_FONTTABLE_API
};
class QFontEngineS60 : public QFontEngine