summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp8
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/abstractaudioeffect.h4
-rw-r--r--src/3rdparty/phonon/mmf/audiooutput.cpp3
-rw-r--r--src/3rdparty/phonon/mmf/bassboost.cpp1
-rw-r--r--src/3rdparty/phonon/mmf/effectfactory.cpp5
-rw-r--r--src/3rdparty/phonon/mmf/loudness.cpp1
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog15
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h4
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog338
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.gypi2
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pri16
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro48
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp18
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h3
-rw-r--r--src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp2
-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/WebCore/page/FrameView.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/FrameView.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/ScrollView.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp26
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp10
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.mm (renamed from src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp)5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp24
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog116
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp6
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc427
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc5
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp177
-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/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp17
52 files changed, 1363 insertions, 100 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index 022689b..b3c229e 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -1094,6 +1094,10 @@ RVCT()
#define DEFINE_STUB_FUNCTION(rtype, op) rtype JIT_STUB cti_##op(STUB_ARGS_DECLARATION)
#endif
+#if COMPILER(GCC)
+#pragma GCC visibility push(hidden)
+#endif
+
DEFINE_STUB_FUNCTION(EncodedJSValue, op_convert_this)
{
STUB_INIT_STACK_FRAME(stackFrame);
@@ -3205,6 +3209,10 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, to_object)
return JSValue::encode(stackFrame.args[0].jsValue().toObject(callFrame));
}
+#if COMPILER(GCC)
+#pragma GCC visibility pop
+#endif
+
} // namespace JSC
#endif // ENABLE(JIT)
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
index 6cfeb76..9b64ab3 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp
@@ -184,6 +184,8 @@ int AbstractAudioEffect::effectParameterChanged(
const EffectParameter &param, const QVariant &value)
{
// Default implementation
+ Q_UNUSED(param)
+ Q_UNUSED(value)
Q_ASSERT_X(false, Q_FUNC_INFO, "Effect has no parameters");
return 0;
}
diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
index d71993b..70adcf6 100644
--- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
+++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
@@ -118,6 +118,10 @@ private:
// for each of the effects. Using this reduces repetition of boilerplate
// in the implementations of the backend effect nodes.
+#ifdef Q_CC_NOKIAX86
+# pragma warn_illtokenpasting off
+#endif
+
#define PHONON_MMF_DEFINE_EFFECT_FUNCTIONS(Effect) \
\
void Effect##::createEffect(AudioPlayer::NativePlayer *player) \
diff --git a/src/3rdparty/phonon/mmf/audiooutput.cpp b/src/3rdparty/phonon/mmf/audiooutput.cpp
index c6be20b..3588683 100644
--- a/src/3rdparty/phonon/mmf/audiooutput.cpp
+++ b/src/3rdparty/phonon/mmf/audiooutput.cpp
@@ -78,6 +78,9 @@ bool MMF::AudioOutput::setOutputDevice(int index)
{
Q_ASSERT_X(index == AudioOutputDeviceID, Q_FUNC_INFO,
"We only support one output device, with id 0");
+#ifdef QT_NO_DEBUG
+ Q_UNUSED(index)
+#endif
return true;
}
diff --git a/src/3rdparty/phonon/mmf/bassboost.cpp b/src/3rdparty/phonon/mmf/bassboost.cpp
index c7af939..67076f6 100644
--- a/src/3rdparty/phonon/mmf/bassboost.cpp
+++ b/src/3rdparty/phonon/mmf/bassboost.cpp
@@ -49,6 +49,7 @@ const char* BassBoost::description()
bool BassBoost::getParameters(CMdaAudioOutputStream *stream,
QList<EffectParameter> &parameters)
{
+ Q_UNUSED(parameters)
QScopedPointer<CBassBoost> effect;
TRAPD(err, effect.reset(CBassBoost::NewL(*stream)));
return (KErrNone == err);
diff --git a/src/3rdparty/phonon/mmf/effectfactory.cpp b/src/3rdparty/phonon/mmf/effectfactory.cpp
index c5e33d5..4643978 100644
--- a/src/3rdparty/phonon/mmf/effectfactory.cpp
+++ b/src/3rdparty/phonon/mmf/effectfactory.cpp
@@ -183,8 +183,9 @@ EffectFactory::EffectData EffectFactory::getData()
/* defaultValue */ QVariant(bool(true)));
data.m_parameters.append(param);
- if (data.m_supported = BackendNode::getParameters
- (stream.data(), data.m_parameters)) {
+ data.m_supported = BackendNode::getParameters(stream.data(),
+ data.m_parameters);
+ if (data.m_supported) {
const QString description = QCoreApplication::translate
("Phonon::MMF::EffectFactory", BackendNode::description());
data.m_descriptions.insert("name", description);
diff --git a/src/3rdparty/phonon/mmf/loudness.cpp b/src/3rdparty/phonon/mmf/loudness.cpp
index 1079a35..ca05ab0 100644
--- a/src/3rdparty/phonon/mmf/loudness.cpp
+++ b/src/3rdparty/phonon/mmf/loudness.cpp
@@ -49,6 +49,7 @@ const char* Loudness::description()
bool Loudness::getParameters(CMdaAudioOutputStream *stream,
QList<EffectParameter> &parameters)
{
+ Q_UNUSED(parameters)
QScopedPointer<CLoudness> effect;
TRAPD(err, effect.reset(CLoudness::NewL(*stream)));
return (KErrNone == err);
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 8cb0e53..125e175 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-f59a934694947496cedecc5256a71bff60c43c4c
+0f8941d0dd5f947530e1dc55b859d810bba14764
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 016e0dd..d9b2987 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-06-07 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Crash when compiling on Snow Leopard and running on Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=31403
+
+ Disable the use of pthread_setname_np and other symbols
+ when targetting Leopard.
+
+ Use the defines TARGETING_XX instead of BUILDING_ON_XX
+ for features that cannot be used before Snow Leopard.
+
+ * wtf/Platform.h:
+
2010-04-20 Csaba Osztrogonác <ossy@webkit.org>
[Qt] Unreviewed speculative buildfix for WinCE after r57882
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index fac477e..876e60e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -700,11 +700,11 @@
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMEB_H 1
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+#if !defined(TARGETING_TIGER) && !defined(TARGETING_LEOPARD)
#define HAVE_DISPATCH_H 1
-#if !PLATFORM(IPHONE) && !PLATFORM(QT)
+#if !PLATFORM(IPHONE)
#define HAVE_MADV_FREE_REUSE 1
#define HAVE_MADV_FREE 1
#define HAVE_PTHREAD_SETNAME_NP 1
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index fb78e36..6aaae4f 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
+ f943ead2759537527faa7f3cb057d995291663b9
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index ff7d214..e04729d 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,341 @@
+2010-06-13 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy
+ https://bugs.webkit.org/show_bug.cgi?id=40535
+
+ Made sure the painter ends its operation before copying the pixmap.
+
+ No new tests: this is an optimization.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::recache):
+
+2010-03-24 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Changing the V8 and JSC implementations of
+ SQLStatementErrorCallback to interpret as false all results that
+ could be converted to a false boolean. Pretty much a revert of
+ r54981.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36569
+
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
+ (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
+ (WebCore::V8CustomSQLStatementErrorCallback::handleEvent):
+ * bindings/v8/custom/V8CustomVoidCallback.cpp:
+ (WebCore::invokeCallback):
+ * bindings/v8/custom/V8CustomVoidCallback.h:
+
+2010-06-13 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] tests/hybridPixmap fails
+ https://bugs.webkit.org/show_bug.cgi?id=37316
+
+ The problem was that JSC::Instance::createRuntimeObject was never called.
+ This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject
+ in between, instead of creating the runtime object directly inside the static function
+ QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function.
+
+ This fixes an existing test, tests/hybridPixmap
+
+ * bridge/qt/qt_pixmapruntime.cpp:
+ (JSC::Bindings::QtPixmapInstance::newRuntimeObject):
+ (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
+ * bridge/qt/qt_pixmapruntime.h:
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::convertQVariantToValue):
+
+2010-06-07 Mahesh Kulakrni <mahesh.kulkarni@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [QT] QT_BEARER flag is not enabled on S60 properly
+ https://bugs.webkit.org/show_bug.cgi?id=39357
+
+ enable QT_BEARER for all platform based on qtmobility +
+ bearer module availability or for qt 4.7+
+
+ * WebCore.pri:
+
+2010-06-09 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Dirk Schulze.
+
+ [Qt] Imperfect dependency for generated SVGNames.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=40359
+
+ * WebCore.pri: Missing dependency added.
+
+2010-06-08 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Unreviewed Buildbot fix.
+
+ Reset the Qt TextBreakIterator when reusing it.
+
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::setUpIterator):
+
+2010-06-08 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Antti Koivisto.
+
+ [Qt] TextBreakIterator Qt performance
+ https://bugs.webkit.org/show_bug.cgi?id=39958
+
+ Rework TextBreakIteratorQt to be more in line with the ICU version.
+
+ We now reuse iterators where ever possible. The string data is compared
+ with memcmp, which should be faster than using a hash, as you need
+ to traverse the full buffer in the case the strings don't match,
+ where as the compare would fail quickly.
+
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::TextBreakIterator::TextBreakIterator):
+ (WebCore::setUpIterator):
+ (WebCore::wordBreakIterator):
+ (WebCore::characterBreakIterator):
+ (WebCore::lineBreakIterator):
+ (WebCore::sentenceBreakIterator):
+
+2010-06-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix text selection drawing.
+ https://bugs.webkit.org/show_bug.cgi?id=40221
+
+ The regression was introduced in r60169.
+
+ * platform/graphics/qt/FontQt.cpp:
+ (WebCore::drawTextCommon):
+
+2010-06-04 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix compilation with QT_NO_FEATURE
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ The #ifdef QT_NO_GRAPHICSEFFECT was in the wrong place, would have
+ made AC not work at all.
+
+ No new tests.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::flushChanges):
+
+2010-05-24 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix compilation with QT_NO_TEMPORARYFILE
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * platform/qt/FileSystemQt.cpp:
+ (WebCore::openTemporaryFile):
+
+2010-05-21 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with QT_NO_GRAPHICSEFFECT
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::GraphicsLayerQtImpl::flushChanges):
+
+2010-05-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/qt/NetworkStateNotifierQt.cpp:
+
+2010-05-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with QT_NO_LINEEDIT
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::~RenderThemeQt):
+ (WebCore::RenderThemeQt::findFrameLineWidth):
+
+2010-06-04 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Compilation fails when compiling against Qt 4.7 and Qt Mobility is installed
+ https://bugs.webkit.org/show_bug.cgi?id=40116
+
+ CONFIG += mobility has the side-effect of pulling in mobility includes, which conflict
+ with Qt 4.7's bearer managenent includes and break the build.
+
+ * WebCore.pro:
+
+2010-06-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix NPAPI support on Mac OS X/Cocoa-32
+
+ qt_mac_window_for() returns a NSWindow on Cocoa, so we were
+ passing in a NSWindow instead of a WindowRef as part of the
+ NP_CGContext.
+
+ https://bugs.webkit.org/show_bug.cgi?id=38762
+
+ * WebCore.gypi: Reflect rename
+ * WebCore.pro: Reflect rename
+ * plugins/mac/PluginViewMac.cpp: Renamed to PluginViewMac.mm
+ and fix bug by getting the Carbon windowRef from the NSWindow.
+ * wscript: Reflect rename
+
+2010-06-02 Nico Weber <thakis@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Scroll events are sent twice per keypress for ports that don't have a platformWidget scrollbar
+ https://bugs.webkit.org/show_bug.cgi?id=39918
+
+ This was regressed by http://trac.webkit.org/changeset/58615 . Fix this by slightly tweaking
+ that patch.
+
+ Test: editing/input/page-up-down-scrolls.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scrollPositionChanged):
+ * page/FrameView.h:
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::valueChanged):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::repaintFixedElementsAfterScrolling):
+
+2010-06-02 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix make install on Symbian for headers in package builds when INSTALL_HEADERS is not defined
+
+ First we wrote inst_headers.output with $$[QT_INSTALL_HEADERS] and then
+ overwrote it with the $$INSTALL_HEADERS variant without checking if the
+ variable was set.
+
+ Fixed and cleaned up the logic of falling back to $$[QT_INSTALL_HEADERS].
+
+ * WebCore.pro:
+
+2010-06-01 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] GraphicsLayer: warnings when reloading page
+ https://bugs.webkit.org/show_bug.cgi?id=39694
+
+ Made sure recaching and masks aren't attempted on zero-size layers.
+
+ No new tests. Old tests (e.g. LayoutTests/compositing/masks) show the problem.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::MaskEffectQt::draw):
+ (WebCore::GraphicsLayerQtImpl::recache):
+
+2010-05-10 Rodrigo Belem <rodrigo.belem@openbossa.org>
+
+ Reviewed by Kenneth Christiansen , Simon Hausmann and Gustavo Noronha.
+
+ [Qt, Gtk] Allows build-webkit script to receive an install prefix as parameter
+ https://bugs.webkit.org/show_bug.cgi?id=26224
+
+ This patch adds the ability, in the QtWebkit build system, to change
+ the installation path.
+
+ * WebCore.pro:
+
+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.gypi b/src/3rdparty/webkit/WebCore/WebCore.gypi
index 1e92f1f..94a6052 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.gypi
+++ b/src/3rdparty/webkit/WebCore/WebCore.gypi
@@ -2920,7 +2920,7 @@
'plugins/gtk/xembed.h',
'plugins/mac/PluginDataMac.mm',
'plugins/mac/PluginPackageMac.cpp',
- 'plugins/mac/PluginViewMac.cpp',
+ 'plugins/mac/PluginViewMac.mm',
'plugins/qt/PluginDataQt.cpp',
'plugins/qt/PluginPackageQt.cpp',
'plugins/qt/PluginViewQt.cpp',
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri
index 5f5987f..9debd6a 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pri
+++ b/src/3rdparty/webkit/WebCore/WebCore.pri
@@ -101,18 +101,19 @@ greaterThan(QT_MINOR_VERSION, 5) {
DEFINES += ENABLE_XSLT=0
}
-!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) {
- symbian: {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \
- exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) {
+# Bearer management is part of Qt 4.7
+# for older version, check for mobility with bearer
+!contains(DEFINES, ENABLE_QT_BEARER=.) {
+ !lessThan(QT_MINOR_VERSION, 7) {
+ DEFINES += ENABLE_QT_BEARER=1
+ } else {
+ load(mobilityconfig)
+ contains(MOBILITY_CONFIG, bearer) {
DEFINES += ENABLE_QT_BEARER=1
}
}
}
-# Bearer management is part of Qt 4.7
-!lessThan(QT_MINOR_VERSION, 7):!contains(DEFINES, ENABLE_QT_BEARER=.):DEFINES += ENABLE_QT_BEARER=1
-
# Enable touch event support with Qt 4.6
!lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1
@@ -593,6 +594,7 @@ contains(DEFINES, ENABLE_SVG=1) {
# GENERATOR 5-C:
svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp
svgnames.input = SVG_NAMES
+ svgnames.depends = $$PWD/svg/svgattrs.in
svgnames.wkScript = $$PWD/dom/make_names.pl
svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR
svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 63e78a7..048fc93 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 {
@@ -2165,7 +2166,7 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
mac {
SOURCES += \
plugins/mac/PluginPackageMac.cpp \
- plugins/mac/PluginViewMac.cpp
+ plugins/mac/PluginViewMac.mm
OBJECTIVE_SOURCES += \
platform/text/mac/StringImplMac.mm \
platform/mac/WebCoreNSStringExtras.mm
@@ -2495,8 +2496,12 @@ contains(DEFINES, ENABLE_QT_BEARER=1) {
SOURCES += \
platform/network/qt/NetworkStateNotifierQt.cpp
- CONFIG += mobility
- MOBILITY += bearer
+ # Bearer management is part of Qt 4.7, so don't accidentially
+ # pull in Qt Mobility when building against >= 4.7
+ !greaterThan(QT_MINOR_VERSION, 6) {
+ CONFIG += mobility
+ MOBILITY += bearer
+ }
}
contains(DEFINES, ENABLE_SVG=1) {
@@ -2840,24 +2845,45 @@ 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
!symbian {
headers.files = $$WEBKIT_INSTALL_HEADERS
- headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
- target.path = $$[QT_INSTALL_LIBS]
- INSTALLS += target headers
+ !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit
+ else: headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
+
+ !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
+ else: target.path = $$[QT_INSTALL_LIBS]
+
+ 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}
inst_headers.input = WEBKIT_INSTALL_HEADERS
- inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+
+ !isEmpty(INSTALL_HEADERS): inst_headers.output = $$INSTALL_HEADERS/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+ else: inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+
QMAKE_EXTRA_COMPILERS += inst_headers
- 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 +2901,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 a271923..0254d0f 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/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
index 4d5de79..6178509 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
@@ -77,7 +77,7 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction,
// Therefore an exception and returning true are the same thing - so, return true on an exception
return true;
}
- return !result.isFalse();
+ return result.toBoolean(exec);
}
}
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
index 803316d..3e6197f 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp
@@ -346,10 +346,17 @@ returnEmptyVariant:
return QVariant::fromValue<QImage>(QImage());
return QVariant();
}
-JSObject* QtPixmapInstance::createRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data)
+
+RuntimeObject* QtPixmapInstance::newRuntimeObject(ExecState* exec)
+{
+ return new(exec) QtPixmapRuntimeObject(exec, this);
+}
+
+JSObject* QtPixmapInstance::createPixmapRuntimeObject(ExecState* exec, PassRefPtr<RootObject> root, const QVariant& data)
{
JSLock lock(SilenceAssertionsOnly);
- return new(exec) QtPixmapRuntimeObject(exec, new QtPixmapInstance(root, data));
+ QtPixmapInstance* instance = new QtPixmapInstance(root, data);
+ return instance->createRuntimeObject(exec);
}
bool QtPixmapInstance::canHandle(QMetaType::Type hint)
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
index a0e0e26..de1bcee 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h
@@ -42,7 +42,8 @@ public:
int height() const;
QPixmap toPixmap();
QImage toImage();
- static JSObject* createRuntimeObject(ExecState*, PassRefPtr<RootObject>, const QVariant&);
+ RuntimeObject* newRuntimeObject(ExecState* exec);
+ static JSObject* createPixmapRuntimeObject(ExecState*, PassRefPtr<RootObject>, const QVariant&);
static QVariant variantFromObject(JSObject*, QMetaType::Type hint);
static bool canHandle(QMetaType::Type hint);
};
diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
index 4524d97..a39dc7a 100644
--- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
+++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp
@@ -877,7 +877,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
}
if (QtPixmapInstance::canHandle(static_cast<QMetaType::Type>(variant.type())))
- return QtPixmapInstance::createRuntimeObject(exec, root, variant);
+ return QtPixmapInstance::createPixmapRuntimeObject(exec, root, variant);
if (type == qMetaTypeId<QWebElement>()) {
if (!root->globalObject()->inherits(&JSDOMWindow::s_info))
diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp
index a991e8d..d97b54a 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 218e455..92fabb7 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 398e4d8..9cec7a9 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 553ffd2..2220f7e 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 f93a752..3f7ead7 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/WebCore/page/FrameView.cpp b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
index 39c92de..bc0519f 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.cpp
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.cpp
@@ -1060,7 +1060,11 @@ void FrameView::setScrollPosition(const IntPoint& scrollPoint)
void FrameView::scrollPositionChanged()
{
frame()->eventHandler()->sendScrollEvent();
+ repaintFixedElementsAfterScrolling();
+}
+void FrameView::repaintFixedElementsAfterScrolling()
+{
// For fixed position elements, update widget positions and compositing layers after scrolling,
// but only if we're not inside of layout.
// FIXME: we could skip this if we knew the page had no fixed position elements.
diff --git a/src/3rdparty/webkit/WebCore/page/FrameView.h b/src/3rdparty/webkit/WebCore/page/FrameView.h
index 7119975..71e2966 100644
--- a/src/3rdparty/webkit/WebCore/page/FrameView.h
+++ b/src/3rdparty/webkit/WebCore/page/FrameView.h
@@ -139,7 +139,8 @@ public:
virtual void scrollRectIntoViewRecursively(const IntRect&);
virtual void setScrollPosition(const IntPoint&);
- virtual void scrollPositionChanged();
+ void scrollPositionChanged();
+ virtual void repaintFixedElementsAfterScrolling();
String mediaType() const;
void setMediaType(const String&);
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
index e50ab55..5753e1d 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.cpp
@@ -292,7 +292,7 @@ void ScrollView::valueChanged(Scrollbar* scrollbar)
if (scrollbarsSuppressed())
return;
- scrollPositionChanged();
+ repaintFixedElementsAfterScrolling();
scrollContents(scrollDelta);
}
diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollView.h b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
index 118a310..0f79fa8 100644
--- a/src/3rdparty/webkit/WebCore/platform/ScrollView.h
+++ b/src/3rdparty/webkit/WebCore/platform/ScrollView.h
@@ -303,7 +303,7 @@ private:
void updateScrollbars(const IntSize& desiredOffset);
// Called when the scroll position within this view changes. FrameView overrides this to generate repaint invalidations.
- virtual void scrollPositionChanged() {}
+ virtual void repaintFixedElementsAfterScrolling() {}
void platformInit();
void platformDestroy();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
index b707f9d..ae1033e 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp
@@ -146,6 +146,7 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float
line.draw(p, pt);
p->restore();
}
+ p->setPen(textFillPen);
line.draw(p, pt);
p->restore();
return;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 02bf25e..ad2ec9c 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -43,6 +43,7 @@
namespace WebCore {
+#ifndef QT_NO_GRAPHICSEFFECT
class MaskEffectQt : public QGraphicsEffect {
public:
MaskEffectQt(QObject* parent, QGraphicsItem* maskLayer)
@@ -57,7 +58,12 @@ public:
// It's more efficient to do it this way because
// (a) we don't need the QBrush abstraction - we always end up using QGraphicsItem::paint from the mask layer
// (b) QGraphicsOpacityEffect detaches the pixmap, which is inefficient on OpenGL.
- QPixmap maskPixmap(sourceBoundingRect().toAlignedRect().size());
+ const QSize maskSize = sourceBoundingRect().toAlignedRect().size();
+ if (!maskSize.isValid() || maskSize.isEmpty()) {
+ drawSource(painter);
+ return;
+ }
+ QPixmap maskPixmap(maskSize);
// we need to do this so the pixmap would have hasAlpha()
maskPixmap.fill(Qt::transparent);
@@ -91,6 +97,7 @@ public:
QGraphicsItem* m_maskLayer;
};
+#endif // QT_NO_GRAPHICSEFFECT
class GraphicsLayerQtImpl : public QGraphicsObject {
Q_OBJECT
@@ -179,7 +186,9 @@ public:
TransformationMatrix m_transformRelativeToRootLayer;
bool m_transformAnimationRunning;
bool m_opacityAnimationRunning;
+#ifndef QT_NO_GRAPHICSEFFECT
QWeakPointer<MaskEffectQt> m_maskEffect;
+#endif
struct ContentData {
QPixmap pixmap;
@@ -294,7 +303,7 @@ const GraphicsLayerQtImpl* GraphicsLayerQtImpl::rootLayer() const
QPixmap GraphicsLayerQtImpl::recache(const QRegion& regionToUpdate)
{
- if (!m_layer->drawsContent())
+ if (!m_layer->drawsContent() || m_size.isEmpty() ||!m_size.isValid())
return QPixmap();
QRegion region = regionToUpdate;
@@ -321,6 +330,7 @@ QPixmap GraphicsLayerQtImpl::recache(const QRegion& regionToUpdate)
// Render the actual contents into the cache
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
m_layer->paintGraphicsLayerContents(gc, region.boundingRect());
+ painter.end();
m_backingStoreKey = QPixmapCache::insert(pixmap);
return pixmap;
@@ -515,6 +525,7 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
// we can't paint here, because we don't know if the mask layer
// itself is ready... we'll have to wait till this layer tries to paint
setFlag(ItemClipsChildrenToShape, m_layer->maskLayer() || m_layer->masksToBounds());
+#ifndef QT_NO_GRAPHICSEFFECT
setGraphicsEffect(0);
if (m_layer->maskLayer()) {
if (GraphicsLayerQtImpl* mask = qobject_cast<GraphicsLayerQtImpl*>(m_layer->maskLayer()->platformLayer()->toGraphicsObject())) {
@@ -522,6 +533,7 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
setGraphicsEffect(mask->m_maskEffect.data());
}
}
+#endif
}
if (m_changeMask & SizeChange) {
@@ -596,11 +608,15 @@ void GraphicsLayerQtImpl::flushChanges(bool recursive, bool forceUpdateTransform
if ((m_changeMask & ContentsOpaqueChange) && m_state.contentsOpaque != m_layer->contentsOpaque())
prepareGeometryChange();
+#ifndef QT_NO_GRAPHICSEFFECT
if (m_maskEffect)
m_maskEffect.data()->update();
- else if (m_changeMask & DisplayChange) {
- // Recache now: all the content is ready and we don't want to wait until the paint event. We only need to do this for HTML content,
- // there's no point in caching directly composited content like images or solid rectangles.
+ else
+#endif
+ if (m_changeMask & DisplayChange) {
+ // Recache now: all the content is ready and we don't want to wait until the paint event.
+ // We only need to do this for HTML content, there's no point in caching directly composited
+ // content like images or solid rectangles.
if (m_pendingContent.contentType == HTMLContentType)
recache(m_pendingContent.regionToUpdate);
update(m_pendingContent.regionToUpdate.boundingRect());
diff --git a/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h b/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
index 781259c..d1f2db4 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
@@ -44,6 +44,15 @@ typedef const struct __SCDynamicStore * SCDynamicStoreRef;
#include <windows.h>
+#elif PLATFORM(QT)
+
+#include <QtCore/qglobal.h>
+
+#ifdef QT_NO_BEARERMANAGEMENT
+#undef ENABLE_QT_BEARER
+#define ENABLE_QT_BEARER 0
+#endif
+
#endif
namespace WebCore {
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
index 52512aa..3aae92a 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
@@ -20,6 +20,8 @@
#include "config.h"
#include "NetworkStateNotifier.h"
+#if PLATFORM(QT) && ENABLE(QT_BEARER)
+
#include "NetworkStateNotifierPrivate.h"
#include "qnetworkconfigmanager.h"
@@ -89,4 +91,6 @@ void NetworkStateNotifier::setNetworkAccessAllowed(bool isAllowed)
} // namespace WebCore
+#endif
+
#include "moc_NetworkStateNotifierPrivate.cpp"
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
index f9ced98..54ecbf1 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp
@@ -117,6 +117,7 @@ Vector<String> listDirectory(const String& path, const String& filter)
CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
{
+#ifndef QT_NO_TEMPORARYFILE
QTemporaryFile* tempFile = new QTemporaryFile(QLatin1String(prefix));
tempFile->setAutoRemove(false);
QFile* temp = tempFile;
@@ -124,6 +125,7 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& handle)
handle = temp;
return String(temp->fileName()).utf8();
}
+#endif
handle = invalidPlatformFileHandle;
return CString();
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index 577903b..08b7aca 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -163,7 +163,9 @@ RenderThemeQt::RenderThemeQt(Page* page)
RenderThemeQt::~RenderThemeQt()
{
delete m_fallbackStyle;
+#ifndef QT_NO_LINEEDIT
delete m_lineEdit;
+#endif
}
#if USE(QT_MOBILE_THEME)
@@ -264,11 +266,17 @@ bool RenderThemeQt::supportsControlTints() const
int RenderThemeQt::findFrameLineWidth(QStyle* style) const
{
+#ifndef QT_NO_LINEEDIT
if (!m_lineEdit)
m_lineEdit = new QLineEdit();
+#endif
QStyleOptionFrameV2 opt;
- return style->pixelMetric(QStyle::PM_DefaultFrameWidth, &opt, m_lineEdit);
+ QWidget* widget = 0;
+#ifndef QT_NO_LINEEDIT
+ widget = m_lineEdit;
+#endif
+ return style->pixelMetric(QStyle::PM_DefaultFrameWidth, &opt, widget);
}
static QRect inflateButtonRect(const QRect& originalRect, QStyle* style)
diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
index 5a8a812..dda443f 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
@@ -33,31 +33,49 @@
namespace WebCore {
+ static unsigned char buffer[1024];
+
class TextBreakIterator : public QTextBoundaryFinder {
+ public:
+ TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)
+ : QTextBoundaryFinder(type, (const QChar*)string, length, buffer, sizeof(buffer))
+ , length(length)
+ , string(string) {}
+ TextBreakIterator()
+ : QTextBoundaryFinder()
+ , length(0)
+ , string(0) {}
+
+ int length;
+ const UChar* string;
};
- static QTextBoundaryFinder* iterator = 0;
- static unsigned char buffer[1024];
- TextBreakIterator* wordBreakIterator(const UChar* string, int length)
+ TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length)
{
if (!string || !length)
return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Word, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ if (iterator.isValid() && type == iterator.type() && length == iterator.length
+ && memcmp(string, iterator.string, length) == 0) {
+ iterator.toStart();
+ return &iterator;
+ }
+
+ iterator = TextBreakIterator(type, string, length);
+
+ return &iterator;
}
- TextBreakIterator* characterBreakIterator(const UChar* string, int length)
+ TextBreakIterator* wordBreakIterator(const UChar* string, int length)
{
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
+ static TextBreakIterator staticWordBreakIterator;
+ return setUpIterator(staticWordBreakIterator, QTextBoundaryFinder::Word, string, length);
+ }
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Grapheme, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ TextBreakIterator* characterBreakIterator(const UChar* string, int length)
+ {
+ static TextBreakIterator staticCharacterBreakIterator;
+ return setUpIterator(staticCharacterBreakIterator, QTextBoundaryFinder::Grapheme, string, length);
}
TextBreakIterator* cursorMovementIterator(const UChar* string, int length)
@@ -67,25 +85,15 @@ namespace WebCore {
TextBreakIterator* lineBreakIterator(const UChar* string, int length)
{
- static QTextBoundaryFinder *iterator = 0;
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
-
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Line, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
+ static TextBreakIterator staticLineBreakIterator;
+ return setUpIterator(staticLineBreakIterator, QTextBoundaryFinder::Line, string, length);
}
TextBreakIterator* sentenceBreakIterator(const UChar* string, int length)
{
- if (!string || !length)
- return 0;
- if (!iterator)
- iterator = new QTextBoundaryFinder;
+ static TextBreakIterator staticSentenceBreakIterator;
+ return setUpIterator(staticSentenceBreakIterator, QTextBoundaryFinder::Sentence, string, length);
- *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Sentence, (const QChar *)string, length, buffer, sizeof(buffer));
- return static_cast<TextBreakIterator*>(iterator);
}
int textBreakFirst(TextBreakIterator* bi)
diff --git a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.mm
index 1fd4676..57d74ab 100644
--- a/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/mac/PluginViewMac.mm
@@ -103,9 +103,12 @@ static inline WindowRef nativeWindowFor(PlatformWidget widget)
{
#if PLATFORM(QT)
if (widget)
+#if QT_MAC_USE_COCOA
+ return static_cast<WindowRef>([qt_mac_window_for(widget) windowRef]);
+#else
return static_cast<WindowRef>(qt_mac_window_for(widget));
#endif
-#if PLATFORM(WX)
+#elif PLATFORM(WX)
if (widget)
return (WindowRef)widget->MacGetTopLevelWindowRef();
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 564c6fe..8c7b93d 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1175,7 +1175,7 @@ void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1188,7 +1188,7 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1218,7 +1218,7 @@ void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
ev->setDropAction(action);
if (action != Qt::IgnoreAction)
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1232,7 +1232,7 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
ev->setDropAction(action);
// We must accept this event in order to receive the drag move events that are sent
// while the drag and drop action is in progress.
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1242,7 +1242,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos().toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1254,7 +1254,7 @@ void QWebPagePrivate::dropEvent(QDropEvent* ev)
DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
dropActionToDragOp(Qt::DropAction(ev->dropAction())));
if (page->dragController()->performDrag(&dragData))
- ev->accept();
+ ev->acceptProposedAction();
#endif
}
@@ -1370,6 +1370,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
ev->accept();
}
+#ifndef QT_NO_PROPERTIES
void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event)
{
if (event->propertyName() == "_q_viewMode") {
@@ -1424,6 +1425,7 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev
}
#endif
}
+#endif
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
{
@@ -2808,9 +2810,11 @@ bool QWebPage::event(QEvent *ev)
d->touchEvent(static_cast<QTouchEvent*>(ev));
break;
#endif
+#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange:
d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev));
break;
+#endif
default:
return QObject::event(ev);
}
@@ -3263,6 +3267,14 @@ bool QWebPage::findText(const QString &subString, FindFlags options)
} else
return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0);
} else {
+ if (subString.isEmpty()) {
+ d->page->mainFrame()->selection()->clear();
+ Frame* frame = d->page->mainFrame()->tree()->firstChild();
+ while (frame) {
+ frame->selection()->clear();
+ frame = frame->tree()->traverseNextWithWrap(false);
+ }
+ }
::FindDirection direction = ::FindDirectionForward;
if (options & FindBackward)
direction = ::FindDirectionBackward;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
index 5350cd9..1b90a66 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h
@@ -112,7 +112,9 @@ public:
void inputMethodEvent(QInputMethodEvent*);
+#ifndef QT_NO_PROPERTIES
void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*);
+#endif
void shortcutOverrideEvent(QKeyEvent*);
void leaveEvent(QEvent*);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
index f715430..b9180be 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp
@@ -63,7 +63,7 @@
/*!
\class QWebPluginFactory::Plugin
\since 4.4
- \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
+ \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create.
\inmodule QtWebKit
*/
@@ -147,7 +147,7 @@ QWebPluginFactory::~QWebPluginFactory()
supported plugins the factory can create.
\note Currently, this function is only called when JavaScript programs
- access the global \c plugins or \c mimetypes objects.
+ access the global \c plugins or \c mimetypes objects.
*/
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
index 81823f6..a5fc794 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp
@@ -48,9 +48,7 @@
#include <QUrl>
#include <QFileInfo>
-#if ENABLE(QT_BEARER)
#include "NetworkStateNotifier.h"
-#endif
void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed)
{
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index b6cbf92..671acec 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,119 @@
+2010-06-09 Pierre Rossi <pierre.rossi@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ QWebPage::findText() does not clear selection when passed empty string
+ https://bugs.webkit.org/show_bug.cgi?id=31779
+
+ * Api/qwebpage.cpp:
+ (QWebPage::findText):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::findText):
+
+2010-06-12 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add documentation to the QtWebkit bridge
+ https://bugs.webkit.org/show_bug.cgi?id=35861
+
+ The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation
+ change. The new patch amends that, with the correct snippets and grammar fixes.
+
+ * docs/qtwebkit-bridge.qdoc:
+ * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp:
+ (wrapInFunction):
+
+2010-06-11 Jesus Sanchez-Palencia <jesus@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Typo error in QWebPluginFactory Documentation
+ https://bugs.webkit.org/show_bug.cgi?id=40490
+
+ * Api/qwebpluginfactory.cpp:
+
+2010-06-10 Andy Shaw <andy.shaw@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default
+ https://bugs.webkit.org/show_bug.cgi?id=40401
+
+ The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead
+ of accept().
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+
+2010-06-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [Qt] Fix compilation with QT_NO_PROPERTIES
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * Api/qwebpage.cpp:
+ (QWebPage::event):
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::openInspectorFrontend):
+
+2010-05-17 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix compilation with QT_NO_COMBOBOX
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::createSelectPopup):
+ * WebCoreSupport/QtFallbackWebPopup.cpp:
+ * WebCoreSupport/QtFallbackWebPopup.h:
+
+2010-05-02 Tasuku Suzuki <tasuku.suzuki@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix compilation with QT_NO_BEARERMANAGEMENT
+ https://bugs.webkit.org/show_bug.cgi?id=38324
+
+ * Api/qwebsettings.cpp:
+
+2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Auto-uppercase and predictive text need to be disabled for S60 (as for maemo)
+ https://bugs.webkit.org/show_bug.cgi?id=33176
+
+ * WebCoreSupport/EditorClientQt.cpp:
+
+2010-06-01 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Add documentation to the QtWebkit bridge
+ https://bugs.webkit.org/show_bug.cgi?id=35861
+
+ This patch includes comprehensive qdoc documentation for the QtWebkit bridge.
+
+ * docs/qtwebkit-bridge.qdoc: Added.
+ * docs/qtwebkit.qdoc:
+ * docs/webkitsnippets/doc_src_qtscript.qdoc: Added.
+ * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: Added.
+ (wrapInFunction):
+
+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/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 4e742fc..7d1c794 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -573,8 +573,10 @@ QtAbstractWebPopup* ChromeClientQt::createSelectPopup()
{
#if defined(Q_WS_MAEMO_5)
return new QtMaemoWebPopup;
-#else
+#elif !defined(QT_NO_COMBOBOX)
return new QtFallbackWebPopup;
+#else
+ return result;
#endif
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 7b7f610..0ce6383 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -613,11 +613,11 @@ void EditorClientQt::setInputMethodState(bool active)
}
}
webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#ifdef Q_WS_MAEMO_5
- // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
+#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
+ // disables auto-uppercase and predictive text for mobile devices
webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
-#endif // Q_WS_MAEMO_5
+#endif // Q_WS_MAEMO_5 || Q_OS_SYMBIAN
#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 725c5fb..2d11700 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -93,7 +93,10 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*)
// Web inspector. This is used for SDK purposes. Please keep this hook
// around and don't remove it.
// https://bugs.webkit.org/show_bug.cgi?id=35340
- QUrl inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
+ QUrl inspectorUrl;
+#ifndef QT_NO_PROPERTIES
+ inspectorUrl = inspector->property("_q_inspectorUrl").toUrl();
+#endif
if (!inspectorUrl.isValid())
inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html");
inspectorView->page()->mainFrame()->load(inspectorUrl);
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
index 7514077..26420e5 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -21,6 +21,8 @@
#include "config.h"
#include "QtFallbackWebPopup.h"
+#ifndef QT_NO_COMBOBOX
+
#include "HostWindow.h"
#include "PopupMenuClient.h"
#include "QWebPageClient.h"
@@ -225,3 +227,5 @@ void QtFallbackWebPopup::activeChanged(int index)
}
}
+
+#endif // QT_NO_COMBOBOX
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index 62b8aea..6d2e1ff 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -23,6 +23,8 @@
#include "QtAbstractWebPopup.h"
#include <QComboBox>
+#ifndef QT_NO_COMBOBOX
+
QT_BEGIN_NAMESPACE
class QGraphicsProxyWidget;
QT_END_NAMESPACE
@@ -67,4 +69,6 @@ private:
}
+#endif // QT_NO_COMBOBOX
+
#endif // QtFallbackWebPopup_h
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
new file mode 100644
index 0000000..fa93293
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
@@ -0,0 +1,427 @@
+/*!
+ \inmodule QtWebKit
+ \page qtwebkit-bridge.html
+ \title The QtWebKit Bridge
+ \contentspage QtWebKit
+ \section1 Overview
+ \section2 The technology
+
+ The QtWebKit bridge is a mechanism that extends WebKit's JavaScript environment to access native
+ objects that are represented as \l{QObject}s. It takes advantage of the \l{QObject} introspection,
+ a part of the \l{Qt Object Model}, which makes it easy to integrate with the dynamic JavaScript environment,
+ for example \l{QObject} properties map directly to JavaScript properties.
+
+ For example, both JavaScript and QObjects have properties: a construct that represent a getter/setter
+ pair under one name.
+
+ \section2 Use Cases
+
+ There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Clients.
+
+ \section3 Web Content in a Native Application
+
+ This is a common use case in classic Qt application, and a design pattern used by several modern
+ applications. For example, an application that contains a media-player, playlist manager, and music store.
+ The playlist manager is usually best authored as a classic desktop application,
+ with the native-looking robust \l{QWidget}s helping with producing that application.
+ The media-player control, which usually looks custom, can be written using \l{The Graphics View framework}
+ or with in a declarative way with \l{QtDeclarative}. The music store, which shows dynamic content
+ from the internet and gets modified rapidly, is best authored in HTML and maintained on the server.
+
+ With the QtWebKit bridge, that music store component can interact with native parts of the application,
+ for example, if a file needs to be saved to a specific location.
+
+ \section3 Thin Client
+
+ Another use case is using Qt as a native backend to a full web application,
+ referred to here as a thin client. In this use-case, the entire UI is driven by
+ HTML, JavaScript and CSS, and native Qt-based components are used to allow that application
+ access to native features not usually exposed to the web, or to enable helper components that
+ are best written with C++.
+
+ An example for such a client is a UI for a video-on-demand service on a TV. The entire content and
+ UI can be kept on the server, served dynamically through HTTP and rendered with WebKit, with additional
+ native components for accessing hardware-specific features like extracting the list of images
+ out of the video.
+
+ \section2 Difference from Other Bridge Technologies
+
+ Of course QtWebKit is not the only bridge technology out there. NPAPI, for example,
+ is a long-time standard or web-native bridging. Due to Qt's meta-object system, full applications
+ built partially with web-technologies are much easier to develop. NPAPI, however, is more geared
+ towards cross-browser plugins, due to it being an accepted standard.
+
+ When developing a plugin for a browser, NPAPI is recommended. When developing a full application
+ that utilizes HTML-rendering, the QtWebKit bridge is recommended.
+
+ \section2 Relationship with QtScript
+
+ The QtWebKit bridge is similar to \l{QtScript}, especially to some of the features described in the
+ \l{Making Applications Scriptable} page. However, as of Qt 4.7, full QtScript API is not supported for web applications.
+ That is planned as an enhancement for future versions. You might notice that some of the features
+ described here are an exact copy of the ones described in the \l{Making Applications Scriptable} page. That is because
+ the QtWebKit bridge is a subset of that functionality, and this page tries to capture the full
+ capabilities available through the QtWebKit bridge specifically.
+
+ \section1 Accessing QObjects
+
+ \section2 Creating the link via QWebFrame
+
+ By default, no QObjects are accessible through the web environment, for security reasons.
+ To enable web content access for a native QObject, the application must explicitly grant it access,
+ using the following call:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 0
+
+ See \l{QWebFrame::addToJavaScriptWindowObject()} for more information.
+
+ \section2 Using Signals and Slots
+
+ The QtWebKit bridge adapts Qt's central \l{Signals and Slots} feature for
+ scripting. There are three principal ways to use signals and slots
+ with the QtWebKit bridge:
+
+ \list
+ \i \bold{Hybrid C++/script}: C++ application code connects a
+ signal to a script function. For example, the script function can be
+ a function that the user has typed in, or one that you have read from a
+ file. This approach is useful if you have a QObject but don't want
+ to expose the object itself to the scripting environment; you just
+ want a script to be able to define how a signal should be reacted
+ to, and leave it up to the C++ side of your application to establish
+ the connection.
+
+ \i \bold{Hybrid script/C++}: A script can connect signals and slots
+ to establish connections between pre-defined objects that the
+ application exposes to the scripting environment. In this scenario,
+ the slots themselves are still written in C++, but the definition of
+ the connections is fully dynamic (script-defined).
+
+ \i \bold{Purely script-defined}: A script can both define signal
+ handler functions (effectively "slots written in JavaScript"),
+ \e{and} set up the connections that utilize those handlers. For
+ example, a script can define a function that will handle the
+ QLineEdit::returnPressed() signal, and then connect that signal to the
+ script function.
+ \endlist
+
+ Note that QtScript functions such as qScriptConnect are unavilable in the web environment.
+
+ \section3 Signal to Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 6
+
+ In this form of connection, the argument to \c{connect()} is the
+ function to connect to the signal.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 7
+
+ The argument can be a JavaScript function, as in the above
+ example, or it can be a QObject slot, as in
+ the following example:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 8
+
+ When the argument is a QObject slot, the argument types of the
+ signal and slot do not necessarily have to be compatible;
+ If necessary, the QtWebKit bridge will, perform conversion of the signal
+ arguments to match the argument types of the slot.
+
+ To disconnect from a signal, you invoke the signal's
+ \c{disconnect()} function, passing the function to disconnect
+ as argument:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 9
+
+ When a script function is invoked in response to a signal, the
+ \c this object will be the Global Object.
+
+ \section3 Signal to Member Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10
+
+ In this form of the \c{connect()} function, the first argument
+ is the object that will be bound to the variable, \c this, when
+ the function specified using the second argument is invoked.
+
+ If you have a push button in a form, you typically want to do
+ something involving the form in response to the button's
+ \c{clicked} signal; passing the form as the \c this object
+ makes sense in such a case.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 11
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 12
+
+ \section3 Signal to Named Member Function Connections
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 14
+
+ This form of the \c{connect()} function requires that the first argument is
+ the object that will be bound to the variable \c{this} when a function is
+ invoked in response to the signal. The second argument specifies the
+ name of a function that is connected to the signal, and this refers to a
+ member function of the object passed as the first argument (thisObject
+ in the above scheme).
+
+ Note that the function is resolved when the connection is made, not
+ when the signal is emitted.
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 15
+
+ To disconnect from the signal, pass the same arguments to \c{disconnect()}:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 17
+
+ \section3 Error Handling
+
+ When \c{connect()} or \c{disconnect()} succeeds, the function will
+ return \c{undefined}; otherwise, it will throw a script exception.
+ You can obtain an error message from the resulting \c{Error} object.
+ Example:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 18
+
+ \section3 Emitting Signals from Scripts
+
+ To emit a signal from script code, you simply invoke the signal
+ function, passing the relevant arguments:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 19
+
+ It is currently not possible to define a new signal in a script;
+ i.e., all signals must be defined by C++ classes.
+
+ \section3 Overloaded Signals and Slots
+
+ When a signal or slot is overloaded, the QtWebKit bridge will attempt to
+ pick the right overload based on the actual types of the QScriptValue arguments
+ involved in the function invocation. For example, if your class has slots
+ \c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following
+ script code will behave reasonably:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 20
+
+ You can specify a particular overload by using array-style property access
+ with the \l{QMetaObject::normalizedSignature()}{normalized signature} of
+ the C++ function as the property name:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 21
+
+ If the overloads have different number of arguments, the QtWebKit bridge will
+ pick the overload with the argument count that best matches the
+ actual number of arguments passed to the slot.
+
+ For overloaded signals, JavaScript will throw an error if you try to connect
+ to the signal by name; you have to refer to the signal with the full
+ normalized signature of the particular overload you want to connect to.
+
+ \section3 Invokable Methods
+
+ Both slots and signals are invokable from script by default. In addition, it's also
+ possible to define a method that's invokable from script without it being a signal or a slot.
+ This is especially useful for functions with return types, as slots normally do not return anything
+ (it would be meaningless to return values from a slot, as the connected signals don't handle the returned data).
+ To make a non-slot method invokable, simply add the Q_INVOKABLE macro before its definition:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 22
+
+ \section2 Accessing Properties
+
+ The properties of the QObject are available as properties
+ of the corresponding JavaScript object. When you manipulate
+ a property in script code, the C++ get/set method for that
+ property will automatically be invoked. For example, if your
+ C++ class has a property declared as follows:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 23
+
+ then script code can do things like the following:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 24
+
+ \section2 Accessing Child QObjects
+
+ Every named child of the QObject (that is, for which
+ QObject::objectName() is not an empty string) is by default available as
+ a property of the JavaScript wrapper object. For example,
+ if you have a QDialog with a child widget whose \c{objectName} property is
+ \c{"okButton"}, you can access this object in script code through
+ the expression
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 25
+
+ Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
+ the name in script code to, for example, rename an object:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 26
+
+ \section2 Data types
+
+ When calling slots, receiving signals or accessing properties, usually some payload is involved.
+ For example, a property "text" might return a \l{QString} parameter.
+ The QtWebKit bridge does the job of converting between a given JavaScript data-type, and the
+ expected or given Qt type. Each Qt type has a coresponding set of rules of how JavaScript treats it.
+
+ The data type conversions are also applicable for the data returned from non-void invokable methods.
+
+ \section3 Numbers
+
+ All Qt numeric data types are converted to or from a JavaScript number. These include int, short, float,
+ double, and the porable Qt types (qreal, qint etc). A special case is \l{QChar};
+ If a slot expects a QChar, the QtWebKit bridge would use the unicode value in case of a number,
+ or the first character in a string.
+
+ Note that non-standard (typedefed) number types are not automatically converted to
+ or from a JavaScript number - it's advised to use standard number types for signal, slots
+ and properties.
+
+ When a non-number is passed as an argument to a method or property that expects a number,
+ the appropriate JavaScript conversion function (parseInt / parseFloat) would be used.
+
+ \section3 Strings
+
+ When JavaScript accesses methods or properties that expect a \l{QString}, the QtWebKit bridge
+ will automatically convert the value to a string (if it is not already a string), using the
+ built-in JavaScript toString method.
+
+ When a QString is passed to JavaScript from a signal or a property, The QtWebKit bridge will
+ convert it into a JavaScript string.
+
+ \section3 Date & Time
+
+ Both \l{QDate}, \l{QTime} and \l{QDateTime} are automatically translated to or from the JavaScript
+ Date object. If a number were passed as an argument to a method that expects one of the date/time
+ types, the QtWebKit bridge would treat it as a timestamp. If a sting is passed, QtWebKit would
+ try different Qt date parsing functions to find the right one.
+
+ \section3 Regular Expressions
+
+ The QtWebKit bridge would automatically convert JavaScript RegEx object to a \l{QRegExp}.
+ If a string is passed to a method expecting a \l{QRegExp}, the string would be converted
+ to that \l{QRegExp}.
+
+ \section3 Lists
+
+ The QtWebKit bridge treats several types of lists in a special way: \l{QVariantList}, \l{QStringList},
+ \l{QObjectList} and \l{QList}<int>. When a slot or property expects one of those list types,
+ the QtWebKit bridge would try to convert a JavaScript array into that type, converting each of
+ the array's elements to the single-element type of the list.
+
+ The most useful type of list is perhaps \l{QVariantList}, which can be converted to from any
+ JavaScript array.
+
+ \section3 Compound (JSON) objects
+
+ JavaScript compound objects, also known as JSON objects, are variables that hold a list
+ of key-value pairs, where all the keys are strings and the values can have any type.
+ This translates very well to \l{QVariantMap}, which is nothing more than a \l{QMap} of \l{QString}
+ to \l{QVariant}.
+
+ The seamless conversion between JSON objects and \l{QVariantMap} allows for a very convenient
+ way of passing arbitrary structured data between C++ and the JavaScript environment. The native \l{QObject} has
+ to make sure that compound values are converted to \l{QVariantMap}s and \l{QVariantList}s, and JavaScript is
+ guaranteed to receive them in a meaningful way.
+
+ Note that types that are not supported by JSON, such as JavaScript functions and getters/setters,
+ are not converted.
+
+ \section3 QVariants
+
+ When a slot or property accepts a \l{QVariant}, the QtWebKit bridge would create a \l{QVariant} that best
+ matches the argument passed by JavaScript. A string, for example, would become a \l{QVariant} holding a \l{QString},
+ a normal JSON object would become a \l{QVariantMap}, and a JavaScript array would become a \l{QVariantList}.
+
+ Using \l{QVariant}s generously in C++ in that way makes C++ programming feel a bit more like JavaScript programming,
+ as it adds another level of indirection. Passing \l{QVariant}s around like this q is very flexible, as the program can figure out
+ the type of argument in runtime just like JavaScript would do, but it also takes away from the type-safety and robust
+ nature of C++. It's recommended to use \l{QVariant}s only for convenience high-level functions, and to keep most of your
+ \l{QObject}s somewhat type-safe.
+
+ \section3 QObjects
+
+ A pointer to a \l{QObject} or a \l{QWidget} can be passed as payload in signals, slots and properties. That object
+ can then be used like an object that's exposed directly; i.e. its slots can be invoked, its signals connected to etc.
+ However, this functionality is fairly limited - the type used has to be \l{QObject}* or \l{QWidget}*. If the type
+ specified is a pointer to a non-\l{QWidget} subclass of \l{QObject}, the QtWebKit bridge would not recognize it to be
+ a \l{QObject}.
+
+ In general its advised to use care when passing \l{QObject}s as arguments, as those objects don't become owned by
+ the JavaScript engine; That means that the application developer has to be extra careful not to try to access
+ \l{QObject}s that have already been deleted by the native environment.
+
+ \section3 Pixmaps and Images
+
+ \since 4.7
+
+ The QtWebKit bridge handles \l{QPixmap}s and \l{QImage}s in a special way. Since QtWebKit stores \l{QPixmap}s to
+ represent HTML images, \l{QPixmap}s coming from the native environment can be used directly inside WebKit.
+ A \l{QImage} or a \l{QPixmap} coming from the Qt environment would convert to an intermediate JavaScript object,
+ that can be represented like this:
+
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 1
+
+ The JavaScript environment can then use the pixmap it gets from Qt and display it inside the HTML environment,
+ by assigning it to an existing <img /> element using assignToHTMLImageElement. It can also use the toDataURL() function,
+ which allows using the pixmap as the src attribute of an image or as a background-image url. Note that the toDataURL()
+ function is costly and should be used with caution.
+
+ Example code:
+
+ C++:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 2
+
+ HTML:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 3
+
+ When a Qt object expects a \l{QImage} or a \l{QPixmap} as input, and the argument passed is an HTML image element,
+ the QtWebKit bridge would convert the pixmap assigned to that image element into a \l{QPixmap} or a \l{QImage}.
+
+ \since 4.7
+
+ \section3 QWebElement
+
+ A signal, slot or property that expects or returns a \l{QWebElement} can work seamlessly with JavaScript references
+ to DOM elements. The JavaScript environment can select DOM elements, keep them in variables, then pass them to Qt as
+ a \l{QWebElement}, and receive them back. Example:
+
+ C++:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 4
+
+ HTML:
+ \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 5
+
+ This is specifically useful to create custom renderers or extensions to the web environment. Instead of forcing Qt
+ to select the element, the web environment already selects the element and then send the selected element directly to Qt.
+
+ Note that \l{QWebElement}s are not thread safe - an object handling them has to live in the UI thread.
+
+ \section1 Architecture issues
+
+ \section2 Limiting the Scope of the Hybrid Layer
+
+ When using QtWebKit's hybrid features, it is a common pitfall to make the API exposed to JavaScript very rich and
+ use all its features. This, however, leads to complexity and can create bugs that are hard to trace.
+ Instead, it is advisable to keep the hybrid layer small and manageable: create a gate only when
+ there's an actual need for it, i.e. there's a new native enabler that requires a direct interface
+ to the application layer. Sometimes new functionality is better handled internally in the native layer
+ or in the web layer; simplicity is your friend.
+
+ This usually becomes more apparent when the hybrid layer can create or destroy objects, or uses
+ signals slots or properties with a \l{QObject}* argument. It is advised to be very careful and to treat
+ an exposed \l{QObject} as a system - with careful attention to memory management and object ownership.
+
+ \section2 Internet Security
+
+ When exposing native object to an open web environment, it is importwhichant to understand the security
+ implications. Think whether the exposed object enables the web environment access to things that
+ shouldn't be open, and whether the web content loaded by that web page comes from a trusted. In general, when
+ exposing native QObjects that give the web environment access to private information or to functionality
+ that's potentially harmful to the client, such exposure should be balanced by limiting the web page's
+ access to trusted URLs only with HTTPS, and by utilizing other measures as part of a security strategy.
+
+
+
+*/
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
index c6dd550..d3f5502 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
+++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc
@@ -20,8 +20,9 @@
scripted with JavaScript.
A bridge between the JavaScript execution environment and the Qt object
- model makes it possible for custom QObjects to be scripted. Integration
- with the Qt networking module enables Web pages to be transparently loaded
+ model makes it possible for custom QObjects to be scripted. For detailed
+ documentation see \l{The QtWebkit Bridge}.
+ Integration with the Qt networking module enables Web pages to be transparently loaded
from Web servers, the local file system or even the Qt resource system.
In addition to providing pure rendering features, HTML documents can be
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
new file mode 100644
index 0000000..62eeeca
--- /dev/null
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp
@@ -0,0 +1,177 @@
+
+void wrapInFunction()
+{
+
+ //! [0]
+ // ...
+ QWebFrame *frame = myWebPage->mainFrame();
+ frame->addToJavaScriptWindowObject("someNameForMyObject", myObject);
+ // ...
+ //! [0]
+#if 0
+ //! [1]
+ {
+ width: ...,
+ height: ...,
+ toDataURL: function() { ... },
+ assignToHTMLImageElement: function(element) { ... }
+ }
+ //! [1]
+#endif
+ //! [2]
+ class MyObject : QObject {
+ Q_OBJECT
+ Q_PROPERTY(QPixmap myPixmap READ getPixmap)
+
+ public:
+ QPixmap getPixmap() const;
+ };
+
+ /* ... */
+
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+
+ //! [2]
+#if 0
+ //! [3]
+ <html>
+ <head>
+ <script>
+ function loadImage() {
+ myObject.myPixmap.assignToHTMLImageElement(document.getElementById("imageElement"));
+ }
+ </script>
+ </head>
+ <body onload="loadImage()">
+ <img id="imageElement" width="300" height="200" />
+ </body>
+ </html>
+ //! [3]
+#endif
+ //! [4]
+ class MyObject : QObject {
+ Q_OBJECT
+
+ public slots:
+ void doSomethingWithWebElement(const QWebElement&);
+ };
+
+ /* ... */
+
+ MyObject myObject;
+ myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject);
+
+ //! [4]
+#if 0
+ //! [5]
+ <html>
+ <head>
+ <script>
+ function runExample() {
+ myObject.doSomethingWithWebElement(document.getElementById("someElement"));
+ }
+ </script>
+ </head>
+ <body onload="runExample()">
+ <span id="someElement">Text</span>
+ </body>
+ </html>
+ //! [5]
+ //! [6]
+ connect(function);
+ //! [6]
+ //! [7]
+ function myInterestingScriptFunction() { ... }
+ ...
+ myQObject.somethingChanged.connect(myInterestingScriptFunction);
+ //! [7]
+ //! [8]
+ myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+ //! [8]
+ //! [9]
+ myQObject.somethingChanged.disconnect(myInterestingFunction);
+ myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+ //! [9]
+ //! [10]
+ connect(thisObject, function)
+ //! [10]
+ //! [11]
+ var obj = { x: 123 };
+ var fun = function() { print(this.x); };
+ myQObject.somethingChanged.connect(obj, fun);
+ //! [11]
+ //! [12]
+ myQObject.somethingChanged.disconnect(obj, fun);
+ //! [12]
+ //! [13]
+ connect(function);
+ //! [13]
+ //! [14]
+ connect(thisObject, functionName)
+ //! [14]
+ //! [15]
+ var obj = { x: 123, fun: function() { print(this.x); } };
+ myQObject.somethingChanged.connect(obj, "fun");
+ //! [15]
+ //! [16]
+ connect(function);
+ //! [16]
+ //! [17]
+ myQObject.somethingChanged.disconnect(obj, "fun");
+ //! [17]
+ //! [18]
+ try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+ } catch (e) {
+ print(e);
+ }
+ //! [18]
+ //! [19]
+ myQObject.somethingChanged("hello");
+ //! [19]
+ //! [20]
+ myQObject.myOverloadedSlot(10); // will call the int overload
+ myQObject.myOverloadedSlot("10"); // will call the QString overload
+ //! [20]
+ //! [21]
+ myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+ myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+ //! [21]
+ //! [22]
+ class MyObject : public QObject
+ {
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+ };
+ //! [22]
+ //! [23]
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+ //! [23]
+ //! [24]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [24]
+ //! [25]
+ myQObject.enabled = true;
+
+ ...
+
+ myQObject.enabled = !myQObject.enabled;
+ //! [25]
+ //! [26]
+ myDialog.okButton
+ myDialog.okButton.objectName = "cancelButton";
+ // from now on, myDialog.cancelButton references the button
+ //! [26]
+#endif
+}
+
diff --git a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index ffd192c..ffd192c 100644
--- a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
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 27f4b27..0f2ca22 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -122,6 +122,7 @@ private slots:
void testJSPrompt();
void showModalDialog();
void testStopScheduledPageRefresh();
+ void findText();
private:
QWebView* m_view;
@@ -2121,5 +2122,21 @@ void tst_QWebPage::testStopScheduledPageRefresh()
QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank"));
}
+void tst_QWebPage::findText()
+{
+ m_view->setHtml(QString("<html><head></head><body><div>foo bar</div></body></html>"));
+ m_page->triggerAction(QWebPage::SelectAll);
+ QVERIFY(!m_page->selectedText().isEmpty());
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ QStringList words = (QStringList() << "foo" << "bar");
+ foreach (QString subString, words) {
+ m_page->findText(subString, QWebPage::FindWrapsAroundDocument);
+ QCOMPARE(m_page->selectedText(), subString);
+ m_page->findText("");
+ QVERIFY(m_page->selectedText().isEmpty());
+ }
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"