summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-05-29 14:02:22 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-05-29 14:02:22 (GMT)
commite27032a8c5e759a0f7132dfbded5d5eeb9d0bbd3 (patch)
treee0b891cf94b1162645331702c52bb53372c8ab72 /src/3rdparty/webkit/WebKit
parentab8581692310db4d2786eeff21b0a8e024097d1c (diff)
downloadQt-e27032a8c5e759a0f7132dfbded5d5eeb9d0bbd3.zip
Qt-e27032a8c5e759a0f7132dfbded5d5eeb9d0bbd3.tar.gz
Qt-e27032a8c5e759a0f7132dfbded5d5eeb9d0bbd3.tar.bz2
Updated WebKit to eb07c6f9bd50d0d74e9ac19ade4a2fbd5cece7c7
Changes integrated: || <https://webkit.org/b/39488> || [Qt] QtTestBrowser is still called QtLauncher in the code || || <https://webkit.org/b/38722> || [Qt] qwebframe auto test doesn't compile || || <https://webkit.org/b/39491> || [Qt] QtTestBrowser has two graphicsview options that aren't enabled correctly || || <https://webkit.org/b/39063> || [Qt] Tiled backing store checker pattern does not paint correctly when scaling factor is not 1 || || <https://webkit.org/b/39217> || Add an optional "starting node' parameter to scrollRecursively and scrollOverflow of EventHandler || || <https://webkit.org/b/38389> || [Qt] Update the Symbian version for the user agent || || <https://webkit.org/b/35702> || [Qt] Add more support for InputTextController || || <https://webkit.org/b/39513> || [Qt] Using Accelerated Composing the rocket back animation on http://www.the-art-of-web.com/css/css-animation/ works differently as when not using AC. || || <https://webkit.org/b/39609> || [Qt] Running with accelerated compositing enabled sometimes result in a crash || Plus autotest fix.
Diffstat (limited to 'src/3rdparty/webkit/WebKit')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp99
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog44
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/docs.pri2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp9
6 files changed, 112 insertions, 50 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
index 22d4c8d..389fb5f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
+++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro
@@ -28,7 +28,7 @@ qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}define QT_QTWEBKIT_MOD
qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}include $${ESCAPE}<QtNetwork/QtNetwork$${ESCAPE}>$${QUOTE} >> $${qtheader_module.target} &&
WEBKIT_CLASS_HEADERS = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/QtWebKit
-regex = ".*\\sclass\\sQWEBKIT_EXPORT\\s(\\w+)\\s(.*)"
+regex = ".*\sclass\sQWEBKIT_EXPORT\s(\w+)\s(.*)"
for(HEADER, WEBKIT_API_HEADERS) {
# 1. Append to QtWebKit header that includes all other header files
@@ -70,7 +70,7 @@ for(HEADER, WEBKIT_API_HEADERS) {
res = $$find(src, $$regex)
isEmpty(res):break()
- exp = $$replace(src, $$regex, "EXPORTED_CLASS = \\1")
+ exp = $$replace(src, $$regex, "EXPORTED_CLASS = \1")
eval($$exp)
CLASS_TARGET = "qtheader_$${EXPORTED_CLASS}"
@@ -87,7 +87,7 @@ for(HEADER, WEBKIT_API_HEADERS) {
# Qt's QRegExp does not support inline non-greedy matching,
# so we'll have to work around it by updating the haystack
- src = $$replace(src, $$regex, "\\2")
+ src = $$replace(src, $$regex, "\2")
src_words = $$join(src, $${LITERAL_WHITESPACE})
}
}
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 44bd902..b7182b4 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1294,6 +1294,9 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
{
WebCore::Frame *frame = page->focusController()->focusedOrMainFrame();
WebCore::Editor *editor = frame->editor();
+#if QT_VERSION >= 0x040600
+ QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant());
+#endif
if (!editor->canEdit()) {
ev->ignore();
@@ -1310,6 +1313,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
renderTextControl = toRenderTextControl(renderer);
Vector<CompositionUnderline> underlines;
+ bool hasSelection = false;
for (int i = 0; i < ev->attributes().size(); ++i) {
const QInputMethodEvent::Attribute& a = ev->attributes().at(i);
@@ -1333,10 +1337,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
}
#if QT_VERSION >= 0x040600
case QInputMethodEvent::Selection: {
- if (renderTextControl) {
- renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length)));
- renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length)));
- }
+ selection = a;
+ hasSelection = true;
break;
}
#endif
@@ -1345,10 +1347,25 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
if (!ev->commitString().isEmpty())
editor->confirmComposition(ev->commitString());
- else if (!ev->preeditString().isEmpty()) {
+ else {
+ // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition
+ // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text
+ // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text
+ // 4. otherwise event is updating supplied pre-edit text
QString preedit = ev->preeditString();
- editor->setComposition(preedit, underlines, preedit.length(), 0);
+#if QT_VERSION >= 0x040600
+ if (hasSelection) {
+ QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString();
+ if (preedit.isEmpty() && selection.start + selection.length > 0)
+ preedit = text;
+ editor->setComposition(preedit, underlines,
+ (selection.length < 0) ? selection.start + selection.length : selection.start,
+ (selection.length < 0) ? selection.start : selection.start + selection.length);
+ } else
+#endif
+ editor->setComposition(preedit, underlines, preedit.length(), 0);
}
+
ev->accept();
}
@@ -3329,12 +3346,37 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
#elif defined Q_WS_X11
"X11"
#elif defined Q_OS_SYMBIAN
- "SymbianOS"
+ "Symbian"
#else
"Unknown"
#endif
);
+#if defined Q_OS_SYMBIAN
+ QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
+ switch (symbianVersion) {
+ case QSysInfo::SV_9_2:
+ firstPartTemp += QString::fromLatin1("OS/9.2");
+ break;
+ case QSysInfo::SV_9_3:
+ firstPartTemp += QString::fromLatin1("OS/9.3");
+ break;
+ case QSysInfo::SV_9_4:
+ firstPartTemp += QString::fromLatin1("OS/9.4");
+ break;
+ case QSysInfo::SV_SF_2:
+ firstPartTemp += QString::fromLatin1("/2");
+ break;
+ case QSysInfo::SV_SF_3:
+ firstPartTemp += QString::fromLatin1("/3");
+ break;
+ case QSysInfo::SV_SF_4:
+ firstPartTemp += QString::fromLatin1("/4");
+ default:
+ break;
+ }
+#endif
+
firstPartTemp += QString::fromLatin1("; ");
// SSL support
@@ -3458,51 +3500,22 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
firstPartTemp += QString::fromLatin1("Sun Solaris");
#elif defined Q_OS_ULTRIX
firstPartTemp += QString::fromLatin1("DEC Ultrix");
-#elif defined Q_OS_SYMBIAN
- firstPartTemp += QString::fromLatin1("SymbianOS");
- QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion();
- switch (symbianVersion) {
- case QSysInfo::SV_9_2:
- firstPartTemp += QString::fromLatin1("/9.2");
- break;
- case QSysInfo::SV_9_3:
- firstPartTemp += QString::fromLatin1("/9.3");
- break;
- case QSysInfo::SV_9_4:
- firstPartTemp += QString::fromLatin1("/9.4");
- break;
- case QSysInfo::SV_SF_2:
- firstPartTemp += QString::fromLatin1("^2");
- break;
- case QSysInfo::SV_SF_3:
- firstPartTemp += QString::fromLatin1("^3");
- break;
- case QSysInfo::SV_SF_4:
- firstPartTemp += QString::fromLatin1("^4");
- break;
- default:
- firstPartTemp += QString::fromLatin1("/Unknown");
- }
-
-#if defined Q_WS_S60
+#elif defined Q_WS_S60
firstPartTemp += QLatin1Char(' ');
- firstPartTemp += QString::fromLatin1("Series60");
QSysInfo::S60Version s60Version = QSysInfo::s60Version();
switch (s60Version) {
case QSysInfo::SV_S60_3_1:
- firstPartTemp += QString::fromLatin1("/3.1");
+ firstPartTemp += QString::fromLatin1("Series60/3.1");
break;
case QSysInfo::SV_S60_3_2:
- firstPartTemp += QString::fromLatin1("/3.2");
+ firstPartTemp += QString::fromLatin1("Series60/3.2");
break;
case QSysInfo::SV_S60_5_0:
- firstPartTemp += QString::fromLatin1("/5.0");
+ firstPartTemp += QString::fromLatin1("Series60/5.0");
break;
default:
- firstPartTemp += QString::fromLatin1("/Unknown");
+ break;
}
-#endif
-
#elif defined Q_OS_UNIX
firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system");
#elif defined Q_OS_UNIXWARE
@@ -3532,8 +3545,8 @@ QString QWebPage::userAgentForUrl(const QUrl&) const
QString thirdPartTemp;
thirdPartTemp.reserve(150);
-#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
- thirdPartTemp + QLatin1String(" Mobile Safari/");
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5)
+ thirdPartTemp += QLatin1String(" Mobile Safari/");
#else
thirdPartTemp += QLatin1String(" Safari/");
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 2f87c7b..79c1ef3 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,47 @@
+2010-04-20 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Add more support for textInputController
+
+ Add support for selectedRange(), setMarkedText(), insertText(),
+ and firstRectForCharacterRange().
+
+ https://bugs.webkit.org/show_bug.cgi?id=35702
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::inputMethodEvent):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::inputMethods):
+
+2010-05-20 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] WINSCW compile fix for qwebframe test
+ https://bugs.webkit.org/show_bug.cgi?id=38722
+
+ WINSCW cannot determine template type up the hierarchy
+ to common base class.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2010-05-23 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Update the Symbian version for the user agent
+ https://bugs.webkit.org/show_bug.cgi?id=38389
+
+ Fixes a regression introduced by r58648. Ensure that the "Symbian" string
+ is only listed one time in the User Agent string.
+
+ In addition make an effort to align the User Agent string to already
+ released WebKit based products for Symbian.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::userAgentForUrl):
+
2010-05-21 Simon Hausmann <simon.hausmann@nokia.com>
Symbian build fix.
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/docs.pri b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri
index a56ddb4..804817b 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/docs.pri
+++ b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri
@@ -3,7 +3,7 @@ include(../../../WebKit.pri)
unix {
QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/bin/qdoc3
} else {
- QDOC = $$(QTDIR)\\bin\\qdoc3.exe
+ QDOC = $$(QTDIR)\bin\qdoc3.exe
}
unix {
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index c53a42d..76fdba3 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -785,7 +785,7 @@ void tst_QWebFrame::getSetStaticProperty()
QCOMPARE(vm.size(), 3);
QCOMPARE(vm.value("a").toInt(), 123);
QCOMPARE(vm.value("b").toString(), QLatin1String("foo"));
- QCOMPARE(vm.value("c").value<QObject*>(), m_myObject);
+ QCOMPARE(vm.value("c").value<QObject*>(), static_cast<QObject*>(m_myObject));
}
QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue);
QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue);
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 52dc6bb..19c6bde 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -1450,11 +1450,16 @@ void tst_QWebPage::inputMethods()
QString selectionValue = variant.value<QString>();
QCOMPARE(selectionValue, QString("eb"));
- //Set selection with negative length
- inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
+ //Cancel current composition first
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant());
QInputMethodEvent eventSelection2("",inputAttributes);
page->event(&eventSelection2);
+ //Set selection with negative length
+ inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant());
+ QInputMethodEvent eventSelection3("",inputAttributes);
+ page->event(&eventSelection3);
+
//ImAnchorPosition
variant = page->inputMethodQuery(Qt::ImAnchorPosition);
anchorPosition = variant.toInt();