summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-29 10:56:05 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-29 10:56:05 (GMT)
commit17c17adbd706d32723ecedeb207c7e467f9fa8eb (patch)
tree22d6d314dc7320d0b728578a734d636a1d74d9ae
parent1ff83d2b44fe07d1bc6b243fad270dfa7d860dc7 (diff)
parentdcd185e58face87105f484e98ecb195af0790a22 (diff)
downloadQt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.zip
Qt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.tar.gz
Qt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.tar.bz2
Merge commit 'qt/4.6' into mmfphonon
-rwxr-xr-xbin/createpackage.pl6
-rwxr-xr-xbin/patch_capabilities.pl4
-rwxr-xr-xbin/syncqt2
-rwxr-xr-xconfigure2
-rw-r--r--demos/boxes/main.cpp7
-rw-r--r--demos/browser/browser.pro2
-rw-r--r--demos/browser/browsermainwindow.cpp2
-rw-r--r--demos/browser/tabwidget.cpp11
-rw-r--r--demos/embedded/desktopservices/contenttab.cpp17
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.cpp28
-rw-r--r--demos/embedded/fluidlauncher/fluidlauncher.h5
-rw-r--r--demos/embedded/fluidlauncher/slideshow.cpp5
-rw-r--r--demos/embedded/fluidlauncher/slideshow.h2
-rw-r--r--demos/embedded/raycasting/raycasting.cpp86
-rw-r--r--demos/sub-attaq/states.cpp5
-rw-r--r--dist/changes-4.5.355
-rw-r--r--doc/src/development/designer-manual.qdoc122
-rw-r--r--doc/src/development/qmake-manual.qdoc2
-rw-r--r--doc/src/examples/hellogl.qdoc12
-rw-r--r--doc/src/examples/rogue.qdoc2
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc5
-rw-r--r--doc/src/frameworks-technologies/statemachine.qdoc35
-rw-r--r--doc/src/images/browser-demo.pngbin157205 -> 144715 bytes
-rw-r--r--doc/src/platforms/supported-platforms.qdoc8
-rw-r--r--doc/src/qt4-intro.qdoc6
-rw-r--r--doc/src/snippets/statemachine/eventtest.cpp2
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc11
-rw-r--r--examples/animation/animatedtiles/main.cpp34
-rw-r--r--examples/animation/easing/animation.h6
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/graphicsview/anchorlayout/anchorlayout.pro1
-rw-r--r--examples/statemachine/factorial/main.cpp6
-rw-r--r--examples/statemachine/rogue/movementtransition.h6
-rw-r--r--examples/webkit/formextractor/formextractor.cpp14
-rw-r--r--mkspecs/features/qt_functions.prf4
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h5
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp29
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h5
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp4
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h3
-rw-r--r--src/3rdparty/javascriptcore/VERSION4
-rw-r--r--src/3rdparty/webkit/ChangeLog6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog249
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri14
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp27
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h15
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h12
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h10
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp14
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h5
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JIT.h11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp103
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h43
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jsc.cpp41
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp22
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h5
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h36
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp5
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp22
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackSymbian.cpp44
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp25
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h24
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h17
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h7
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp4
-rw-r--r--src/3rdparty/webkit/VERSION4
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog1290
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.gypi65
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro9
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp14
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm33
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp47
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSSelectorList.h46
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Attr.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.h2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Document.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp71
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.h2
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.idl4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/EventTarget.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/InputElement.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/dom/InputElement.h6
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Node.cpp50
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.cpp90
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.h12
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Range.idl7
-rw-r--r--src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h3
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp64
-rw-r--r--src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h2
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSAttr.h6
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSDocument.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSElement.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSElement.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp16
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h1
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h4
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRange.cpp36
-rw-r--r--src/3rdparty/webkit/WebCore/generated/JSRange.h2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp40
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h22
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp22
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLInputElement.h16
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp29
-rw-r--r--src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h10
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorController.h1
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h2
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorDOMStorageResource.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js9
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js20
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js18
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js3
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ProfileDataGridTree.js5
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js27
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js2
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js16
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc3
-rw-r--r--src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css4
-rw-r--r--src/3rdparty/webkit/WebCore/loader/EmptyClients.h7
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp144
-rw-r--r--src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/page/DOMWindow.cpp114
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.cpp20
-rw-r--r--src/3rdparty/webkit/WebCore/page/EventHandler.h2
-rw-r--r--src/3rdparty/webkit/WebCore/page/HaltablePlugin.h44
-rw-r--r--src/3rdparty/webkit/WebCore/page/Page.cpp34
-rw-r--r--src/3rdparty/webkit/WebCore/page/Page.h13
-rw-r--r--src/3rdparty/webkit/WebCore/page/PluginHalter.cpp112
-rw-r--r--src/3rdparty/webkit/WebCore/page/PluginHalter.h59
-rw-r--r--src/3rdparty/webkit/WebCore/page/PluginHalterClient.h42
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.cpp24
-rw-r--r--src/3rdparty/webkit/WebCore/page/Settings.h12
-rw-r--r--src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/Pasteboard.h1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h9
-rw-r--r--src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h15
-rw-r--r--src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm22
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp21
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderObject.h36
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h2
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h2
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp5
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h4
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespace.h2
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp7
-rw-r--r--src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h2
-rw-r--r--src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp3
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLInputElement.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLInputElement.h3
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/ChangeLog11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp396
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h26
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog96
-rw-r--r--src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp163
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp15
-rw-r--r--src/corelib/animation/qabstractanimation.cpp19
-rw-r--r--src/corelib/animation/qabstractanimation.h2
-rw-r--r--src/corelib/animation/qparallelanimationgroup.cpp14
-rw-r--r--src/corelib/animation/qparallelanimationgroup.h2
-rw-r--r--src/corelib/animation/qpauseanimation.cpp2
-rw-r--r--src/corelib/animation/qpauseanimation.h2
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.cpp4
-rw-r--r--src/corelib/animation/qsequentialanimationgroup.h2
-rw-r--r--src/corelib/animation/qvariantanimation.cpp2
-rw-r--r--src/corelib/animation/qvariantanimation.h2
-rw-r--r--src/corelib/arch/symbian/qatomic_symbian.cpp7
-rw-r--r--src/corelib/global/qfeatures.h2
-rw-r--r--src/corelib/global/qfeatures.txt2
-rw-r--r--src/corelib/global/qglobal.cpp36
-rw-r--r--src/corelib/global/qnamespace.qdoc4
-rw-r--r--src/corelib/io/qfilesystemwatcher.cpp2
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp12
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp3
-rw-r--r--src/corelib/kernel/qcoreevent.cpp5
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp133
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib_p.h2
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp8
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp3
-rw-r--r--src/corelib/kernel/qsystemsemaphore_symbian.cpp2
-rw-r--r--src/corelib/statemachine/qabstracttransition.cpp10
-rw-r--r--src/corelib/statemachine/qabstracttransition_p.h4
-rw-r--r--src/corelib/statemachine/qeventtransition.cpp12
-rw-r--r--src/corelib/statemachine/qsignalevent.h83
-rw-r--r--src/corelib/statemachine/qsignaltransition.cpp15
-rw-r--r--src/corelib/statemachine/qstate.cpp4
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp93
-rw-r--r--src/corelib/statemachine/qstatemachine.h36
-rw-r--r--src/corelib/statemachine/qstatemachine_p.h7
-rw-r--r--src/corelib/statemachine/qwrappedevent.h80
-rw-r--r--src/corelib/statemachine/statemachine.pri4
-rw-r--r--src/corelib/tools/qlocale.cpp7
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h2
-rw-r--r--src/gui/egl/qegl.cpp110
-rw-r--r--src/gui/egl/qegl_p.h28
-rw-r--r--src/gui/egl/qegl_qws.cpp4
-rw-r--r--src/gui/egl/qegl_symbian.cpp11
-rw-r--r--src/gui/egl/qegl_wince.cpp8
-rw-r--r--src/gui/egl/qegl_x11.cpp8
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp88
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp97
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h1
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h26
-rw-r--r--src/gui/graphicsview/qgraphicslayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp41
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h5
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex_p.h4
-rw-r--r--src/gui/graphicsview/qsimplex_p.cpp177
-rw-r--r--src/gui/image/qimage.h2
-rw-r--r--src/gui/image/qimagereader.cpp18
-rw-r--r--src/gui/image/qmovie.cpp4
-rw-r--r--src/gui/image/qpixmap.h2
-rw-r--r--src/gui/image/qpixmap_raster_p.h2
-rw-r--r--src/gui/image/qpixmap_s60.cpp15
-rw-r--r--src/gui/image/qpixmapcache.cpp66
-rw-r--r--src/gui/image/qpixmapcache_p.h6
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp44
-rw-r--r--src/gui/kernel/qapplication_mac.mm93
-rw-r--r--src/gui/kernel/qapplication_p.h1
-rw-r--r--src/gui/kernel/qapplication_s60.cpp35
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm35
-rw-r--r--src/gui/kernel/qeventdispatcher_x11.cpp2
-rw-r--r--src/gui/kernel/qguieventdispatcher_glib.cpp2
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp15
-rw-r--r--src/gui/kernel/qwidget.cpp37
-rw-r--r--src/gui/painting/qcolor.cpp23
-rw-r--r--src/gui/painting/qdrawhelper_mmx.cpp2
-rw-r--r--src/gui/painting/qdrawhelper_mmx3dnow.cpp3
-rw-r--r--src/gui/painting/qpaintbuffer.cpp18
-rw-r--r--src/gui/painting/qpaintbuffer_p.h4
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qprinter.cpp6
-rw-r--r--src/gui/statemachine/qkeyeventtransition.cpp4
-rw-r--r--src/gui/statemachine/qmouseeventtransition.cpp4
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/util/qdesktopservices_s60.cpp5
-rw-r--r--src/gui/widgets/qcalendarwidget.cpp20
-rw-r--r--src/gui/widgets/qdialogbuttonbox.cpp1
-rw-r--r--src/gui/widgets/qspinbox.cpp214
-rw-r--r--src/gui/widgets/qtabbar.cpp2
-rw-r--r--src/gui/widgets/qwidgetanimator.cpp2
-rw-r--r--src/multimedia/audio/qaudioinput.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.h4
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp13
-rw-r--r--src/network/kernel/qhostaddress.cpp3
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp48
-rw-r--r--src/opengl/qgl.cpp20
-rw-r--r--src/opengl/qgl_egl.cpp89
-rw-r--r--src/opengl/qgl_p.h1
-rw-r--r--src/opengl/qgl_qws.cpp107
-rw-r--r--src/opengl/qgl_win.cpp6
-rw-r--r--src/opengl/qgl_wince.cpp96
-rw-r--r--src/opengl/qgl_x11.cpp92
-rw-r--r--src/opengl/qgl_x11egl.cpp106
-rw-r--r--src/opengl/qglframebufferobject.cpp17
-rw-r--r--src/opengl/qglpixelbuffer.cpp1
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp5
-rw-r--r--src/opengl/qglpixelbuffer_x11.cpp33
-rw-r--r--src/opengl/qglpixmapfilter.cpp16
-rw-r--r--src/opengl/qpixmapdata_gl.cpp26
-rw-r--r--src/opengl/qwindowsurface_gl.cpp75
-rw-r--r--src/openvg/qpixmapdata_vg.cpp5
-rw-r--r--src/openvg/qvg_p.h9
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp135
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp5
-rw-r--r--src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp2
-rw-r--r--src/s60installs/eabi/QtCoreu.def72
-rw-r--r--src/s60installs/eabi/QtGuiu.def169
-rw-r--r--src/s60installs/eabi/QtMultimediau.def74
-rw-r--r--src/s60installs/eabi/QtNetworku.def12
-rw-r--r--src/s60installs/eabi/QtSqlu.def2
-rw-r--r--src/s60installs/eabi/QtSvgu.def4
-rw-r--r--src/s60installs/eabi/QtTestu.def40
-rw-r--r--src/s60installs/selfsigned.cer (renamed from selfsigned.cer)0
-rw-r--r--src/s60installs/selfsigned.key (renamed from selfsigned.key)0
-rw-r--r--src/script/api/qscriptengine.cpp11
-rw-r--r--src/script/api/qscriptengine_p.h3
-rw-r--r--src/script/bridge/qscriptactivationobject.cpp2
-rw-r--r--src/script/bridge/qscriptfunction.cpp4
-rw-r--r--src/script/bridge/qscriptobject.cpp4
-rw-r--r--src/scripttools/debugging/qscriptbreakpointswidget.cpp4
-rw-r--r--src/scripttools/debugging/qscriptdebugger.cpp2
-rw-r--r--src/scripttools/debugging/qscriptdebugger_p.h5
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp12
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.h4
-rw-r--r--src/src.pro1
-rw-r--r--src/testlib/qtestcase.cpp11
-rw-r--r--tests/auto/auto.pro26
-rw-r--r--tests/auto/networkselftest/networkselftest.pro15
-rw-r--r--tests/auto/networkselftest/rfc3252.txt899
-rw-r--r--tests/auto/networkselftest/tst_networkselftest.cpp34
-rw-r--r--tests/auto/q3popupmenu/tst_q3popupmenu.cpp4
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp2
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp34
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp34
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp10
-rw-r--r--tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp22
-rw-r--r--tests/auto/qdom/tst_qdom.cpp15
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp42
-rw-r--r--tests/auto/qeasingcurve/tst_qeasingcurve.cpp12
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp8
-rw-r--r--tests/auto/qfilesystemmodel/qfilesystemmodel.pro1
-rw-r--r--tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp12
-rw-r--r--tests/auto/qfocusevent/tst_qfocusevent.cpp10
-rw-r--r--tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp47
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp6
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp79
-rw-r--r--tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp12
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp126
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp4
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp15
-rw-r--r--tests/auto/qmdiarea/tst_qmdiarea.cpp30
-rw-r--r--tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp6
-rw-r--r--tests/auto/qmessagebox/tst_qmessagebox.cpp11
-rw-r--r--tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp4
-rw-r--r--tests/auto/qpixmapcache/tst_qpixmapcache.cpp22
-rw-r--r--tests/auto/qprocess/qprocess.pro3
-rw-r--r--tests/auto/qprocess/test/test.pro100
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp23
-rw-r--r--tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp6
-rw-r--r--tests/auto/qscriptcontext/tst_qscriptcontext.cpp101
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp11
-rw-r--r--tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp6
-rw-r--r--tests/auto/qsharedmemory/lackey/lackey.pro2
-rw-r--r--tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro6
-rw-r--r--tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp26
-rw-r--r--tests/auto/qsharedmemory/src/qsystemlock_p.h2
-rw-r--r--tests/auto/qsharedmemory/test/test.pro2
-rw-r--r--tests/auto/qsharedmemory/tst_qsharedmemory.cpp10
-rw-r--r--tests/auto/qsharedpointer/externaltests.pri2
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp3
-rw-r--r--tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp54
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp8
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp8
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp4
-rw-r--r--tests/auto/qstatemachine/tst_qstatemachine.cpp114
-rw-r--r--tests/auto/qsystemsemaphore/test/test.pro2
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp1
-rw-r--r--tests/auto/qtextdocument/tst_qtextdocument.cpp10
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp103
-rw-r--r--tests/auto/qwindowsurface/tst_qwindowsurface.cpp2
-rw-r--r--tests/auto/windowsmobile/test/testQMenuBar_current.pngbin23702 -> 22964 bytes
-rw-r--r--tests/auto/windowsmobile/test/testSimpleWidget_current.pngbin22034 -> 23841 bytes
-rw-r--r--tests/auto/windowsmobile/test/tst_windowsmobile.cpp17
-rw-r--r--tests/benchmarks/qanimation/rectanimation.cpp4
-rw-r--r--tests/benchmarks/qanimation/rectanimation.h2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menubar.cpp2
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp11
-rw-r--r--tools/designer/translations/translations.pro2
-rw-r--r--tools/linguist/linguist/linguist.pro3
-rw-r--r--tools/linguist/lupdate/cpp.cpp6
-rw-r--r--tools/linguist/phrasebooks/russian.qph92
-rw-r--r--tools/qdoc3/cppcodeparser.cpp3
-rw-r--r--tools/qdoc3/htmlgenerator.cpp2
-rw-r--r--tools/qdoc3/test/assistant.qdocconf2
-rw-r--r--tools/qdoc3/test/designer.qdocconf2
-rw-r--r--tools/qdoc3/test/linguist.qdocconf2
-rw-r--r--tools/qdoc3/test/qmake.qdocconf2
-rw-r--r--tools/qdoc3/test/qt-api-only-with-xcode.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf8
-rw-r--r--translations/translations.pri2
-rwxr-xr-xutil/webkit/mkdist-webkit2
405 files changed, 7757 insertions, 3154 deletions
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index 4597b04..7e87758 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -146,9 +146,9 @@ my $signed_sis_name = $pkgoutputbasename.".sis";
my $scriptpath = dirname(__FILE__);
my $certtext = $certificate;
my $certpath = $scriptpath;
-$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash
-$certpath = $certpath."../"; # certificates are one step up in hierarcy
-$certpath =~ s-/-\\-go; # for those working with UNIX shells
+$certpath =~ s-^(.*[^\\])$-$1\\-o; # ensure path ends with a backslash
+$certpath =~ s-/-\\-go; # for those working with UNIX shells
+$certpath =~ s-bin\\$-src\\s60installs\\-; # certificates are one step up in hierarcy
# Check some pre-conditions and print error messages if needed
unless (length($templatepkg) && length($platform) && length($target)) {
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 2fcf703..bfd34f0 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -51,8 +51,8 @@ sub Usage() {
print("specified for deployment in a .pkg file.\n");
print("If no capabilities are given, the binaries will be given the\n");
print("capabilities supported by self-signed certificates.\n");
- print("\nUsage: patch_capabilities.pl pkg_filename [target-platform] [capability list]\n");
- print(" If template .pkg file is given, next agrument must be 'target-platform'.\n");
+ print("\n *** NOTE: If *_template.pkg file is given, 'target-platform' is REQUIRED. ***\n");
+ print("\nUsage: patch_capabilities.pl pkg_filename <target-platform> [capability list]\n");
print("\nE.g. patch_capabilities.pl myapp_template.pkg release-armv5 \"All -TCB\"\n");
exit();
}
diff --git a/bin/syncqt b/bin/syncqt
index 5cb5d86..6605bfa 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -529,7 +529,7 @@ sub findFiles {
} else {
($dir =~ /\/$/) || ($dir .= "/");
}
- foreach $file ( readdir(D) ) {
+ foreach $file ( sort readdir(D) ) {
next if ( $file =~ /^\.\.?$/ );
$p = $file;
($file =~ /$match/) && (push @files, $p);
diff --git a/configure b/configure
index 6a4b079..f89da70 100755
--- a/configure
+++ b/configure
@@ -6383,7 +6383,7 @@ else
fi
if [ "$CFG_SCRIPT" = "auto" ]; then
- CFG_SCRIPT="$canBuildWebKit"
+ CFG_SCRIPT="yes"
fi
if [ "$CFG_SCRIPT" = "yes" ]; then
diff --git a/demos/boxes/main.cpp b/demos/boxes/main.cpp
index 557afc9..957f183 100644
--- a/demos/boxes/main.cpp
+++ b/demos/boxes/main.cpp
@@ -68,7 +68,7 @@ protected:
inline bool matchString(const char *extensionString, const char *subString)
{
int subStringLength = strlen(subString);
- return (strncmp(extensionString, subString, subStringLength) == 0)
+ return (strncmp(extensionString, subString, subStringLength) == 0)
&& ((extensionString[subStringLength] == ' ') || (extensionString[subStringLength] == '\0'));
}
@@ -137,11 +137,12 @@ int main(int argc, char **argv)
"This demo can be GPU and CPU intensive and may\n"
"work poorly or not at all on your system.");
+ widget->makeCurrent(); // The current context must be set before calling Scene's constructor
+ Scene scene(1024, 768, maxTextureSize);
GraphicsView view;
view.setViewport(widget);
view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
- widget->makeCurrent(); // The current context must be set before calling Scene's constructor
- view.setScene(new Scene(1024, 768, maxTextureSize));
+ view.setScene(&scene);
view.show();
return app.exec();
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
index afc25e3..407030f 100644
--- a/demos/browser/browser.pro
+++ b/demos/browser/browser.pro
@@ -6,6 +6,8 @@ CONFIG += qt warn_on
contains(QT_BUILD_PARTS, tools):!symbian:!embedded: CONFIG += uitools
else: DEFINES += QT_NO_UITOOLS
+release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
+
FORMS += \
addbookmarkdialog.ui \
bookmarks.ui \
diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp
index 1ad2311..fba3ac5 100644
--- a/demos/browser/browsermainwindow.cpp
+++ b/demos/browser/browsermainwindow.cpp
@@ -740,7 +740,7 @@ void BrowserMainWindow::closeEvent(QCloseEvent *event)
if (m_tabWidget->count() > 1) {
int ret = QMessageBox::warning(this, QString(),
tr("Are you sure you want to close the window?"
- " There are %1 tab open").arg(m_tabWidget->count()),
+ " There are %1 tabs open").arg(m_tabWidget->count()),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No);
if (ret == QMessageBox::No) {
diff --git a/demos/browser/tabwidget.cpp b/demos/browser/tabwidget.cpp
index f2f1b32..8a7ae0b 100644
--- a/demos/browser/tabwidget.cpp
+++ b/demos/browser/tabwidget.cpp
@@ -560,10 +560,13 @@ void TabWidget::closeTab(int index)
}
hasFocus = tab->hasFocus();
- m_recentlyClosedTabsAction->setEnabled(true);
- m_recentlyClosedTabs.prepend(tab->url());
- if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
- m_recentlyClosedTabs.removeLast();
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
+ m_recentlyClosedTabsAction->setEnabled(true);
+ m_recentlyClosedTabs.prepend(tab->url());
+ if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
+ m_recentlyClosedTabs.removeLast();
+ }
}
QWidget *lineEdit = m_lineEdits->widget(index);
m_lineEdits->removeWidget(lineEdit);
diff --git a/demos/embedded/desktopservices/contenttab.cpp b/demos/embedded/desktopservices/contenttab.cpp
index 69b7cf8..d218702 100644
--- a/demos/embedded/desktopservices/contenttab.cpp
+++ b/demos/embedded/desktopservices/contenttab.cpp
@@ -145,9 +145,20 @@ void ContentTab::handleErrorInOpen(QListWidgetItem *item)
// NEW SLOTS
void ContentTab::openItem(QListWidgetItem *item)
{
- bool ret = QDesktopServices::openUrl(itemUrl(item));
- if (!ret)
- handleErrorInOpen(item);
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+ // Opening music files doesn't work in Symbian emulator and in some SDKs freezes the
+ // emulator entirely, so prevent it.
+ QStringList nameFilters = m_ContentDir.nameFilters();
+ if (nameFilters.contains("*.mp3")) {
+ QMessageBox::warning(this, tr("Operation Failed"), tr("Action not supported in emulator."),
+ QMessageBox::Close);
+ } else
+#endif
+ {
+ bool ret = QDesktopServices::openUrl(itemUrl(item));
+ if (!ret)
+ handleErrorInOpen(item);
+ }
}
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.cpp b/demos/embedded/fluidlauncher/fluidlauncher.cpp
index 808f362..c065bc9 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.cpp
+++ b/demos/embedded/fluidlauncher/fluidlauncher.cpp
@@ -54,6 +54,11 @@ FluidLauncher::FluidLauncher(QStringList* args)
slideShowWidget = new SlideShow();
inputTimer = new QTimer();
+ addWidget(pictureFlowWidget);
+ addWidget(slideShowWidget);
+ setCurrentWidget(pictureFlowWidget);
+ pictureFlowWidget->setFocus();
+
QRect screen_size = QApplication::desktop()->screenGeometry();
QObject::connect(pictureFlowWidget, SIGNAL(itemActivated(int)), this, SLOT(launchApplication(int)));
@@ -80,7 +85,7 @@ FluidLauncher::FluidLauncher(QStringList* args)
if (success) {
populatePictureFlow();
- pictureFlowWidget->showFullScreen();
+ showFullScreen();
inputTimer->start();
} else {
pictureFlowWidget->setAttribute(Qt::WA_DeleteOnClose, true);
@@ -222,7 +227,6 @@ void FluidLauncher::launchApplication(int index)
}
inputTimer->stop();
- pictureFlowWidget->hide();
QObject::connect(demoList[index], SIGNAL(demoFinished()), this, SLOT(demoFinished()));
@@ -234,6 +238,7 @@ void FluidLauncher::switchToLauncher()
{
slideShowWidget->stopShow();
inputTimer->start();
+ setCurrentWidget(pictureFlowWidget);
}
@@ -253,11 +258,28 @@ void FluidLauncher::switchToSlideshow()
{
inputTimer->stop();
slideShowWidget->startShow();
+ setCurrentWidget(slideShowWidget);
}
void FluidLauncher::demoFinished()
{
- pictureFlowWidget->showFullScreen();
+ setCurrentWidget(pictureFlowWidget);
inputTimer->start();
}
+void FluidLauncher::changeEvent(QEvent* event)
+{
+ if (event->type() == QEvent::ActivationChange) {
+ if (isActiveWindow()) {
+ if(currentWidget() == pictureFlowWidget) {
+ resetInputTimeout();
+ } else {
+ slideShowWidget->startShow();
+ }
+ } else {
+ inputTimer->stop();
+ slideShowWidget->stopShow();
+ }
+ }
+ QStackedWidget::changeEvent(event);
+}
diff --git a/demos/embedded/fluidlauncher/fluidlauncher.h b/demos/embedded/fluidlauncher/fluidlauncher.h
index 2c40526..ff742e2 100644
--- a/demos/embedded/fluidlauncher/fluidlauncher.h
+++ b/demos/embedded/fluidlauncher/fluidlauncher.h
@@ -50,7 +50,7 @@
#include "slideshow.h"
#include "demoapplication.h"
-class FluidLauncher : public QObject
+class FluidLauncher : public QStackedWidget
{
Q_OBJECT
@@ -65,6 +65,9 @@ public slots:
void inputTimedout();
void demoFinished();
+protected:
+ void changeEvent(QEvent *event);
+
private:
PictureFlow* pictureFlowWidget;
SlideShow* slideShowWidget;
diff --git a/demos/embedded/fluidlauncher/slideshow.cpp b/demos/embedded/fluidlauncher/slideshow.cpp
index a397c2b..55daedf 100644
--- a/demos/embedded/fluidlauncher/slideshow.cpp
+++ b/demos/embedded/fluidlauncher/slideshow.cpp
@@ -83,7 +83,8 @@ void SlideShowPrivate::showNextSlide()
-SlideShow::SlideShow()
+SlideShow::SlideShow(QWidget* parent) :
+ QWidget(parent)
{
d = new SlideShowPrivate;
@@ -125,7 +126,6 @@ void SlideShow::clearImages()
void SlideShow::startShow()
{
- showFullScreen();
d->interSlideTimer.start(d->slideInterval, this);
d->showNextSlide();
update();
@@ -134,7 +134,6 @@ void SlideShow::startShow()
void SlideShow::stopShow()
{
- hide();
d->interSlideTimer.stop();
}
diff --git a/demos/embedded/fluidlauncher/slideshow.h b/demos/embedded/fluidlauncher/slideshow.h
index 6d51662..214652e 100644
--- a/demos/embedded/fluidlauncher/slideshow.h
+++ b/demos/embedded/fluidlauncher/slideshow.h
@@ -53,7 +53,7 @@ class SlideShow : public QWidget
Q_PROPERTY(int slideInterval READ slideInterval WRITE setSlideInterval)
public:
- SlideShow();
+ SlideShow(QWidget* parent = 0);
~SlideShow();
void addImage(QString filename);
void addImageDir(QString dirName);
diff --git a/demos/embedded/raycasting/raycasting.cpp b/demos/embedded/raycasting/raycasting.cpp
index 3836dc1..c3b21b6 100644
--- a/demos/embedded/raycasting/raycasting.cpp
+++ b/demos/embedded/raycasting/raycasting.cpp
@@ -71,7 +71,8 @@ public:
, angle(0.5)
, playerPos(1.5, 1.5)
, angleDelta(0)
- , moveDelta(0) {
+ , moveDelta(0)
+ , touchDevice(false) {
// http://www.areyep.com/RIPandMCS-TextureLibrary.html
textureImg.load(":/textures.png");
@@ -83,6 +84,7 @@ public:
watch.start();
ticker.start(25, this);
setAttribute(Qt::WA_OpaquePaintEvent, true);
+ setMouseTracking(false);
}
void updatePlayer() {
@@ -114,10 +116,12 @@ public:
void render() {
// setup the screen surface
- if (buffer.size() != size())
- buffer = QImage(size(), QImage::Format_ARGB32);
+ if (buffer.size() != bufferSize)
+ buffer = QImage(bufferSize, QImage::Format_ARGB32);
int bufw = buffer.width();
int bufh = buffer.height();
+ if (bufw <= 0 || bufh <= 0)
+ return;
// we intentionally cheat here, to avoid detach
const uchar *ptr = buffer.bits();
@@ -241,11 +245,36 @@ public:
*pixel2 = qRgb(96, 96, 96);
}
- update();
+ update(QRect(QPoint(0, 0), bufferSize));
}
protected:
+ void resizeEvent(QResizeEvent*) {
+#if defined(Q_OS_SYMBIAN)
+ // FIXME: use HAL
+ if (width() > 480 || height() > 480)
+ touchDevice = true;
+#else
+ touchDevice = false;
+#endif
+ if (touchDevice) {
+ if (width() < height()) {
+ trackPad = QRect(0, height() / 2, width(), height() / 2);
+ centerPad = QPoint(width() / 2, height() * 3 / 4);
+ bufferSize = QSize(width(), height() / 2);
+ } else {
+ trackPad = QRect(width() / 2, 0, width() / 2, height());
+ centerPad = QPoint(width() * 3 / 4, height() / 2);
+ bufferSize = QSize(width() / 2, height());
+ }
+ } else {
+ trackPad = QRect();
+ bufferSize = size();
+ }
+ update();
+ }
+
void timerEvent(QTimerEvent*) {
updatePlayer();
render();
@@ -255,7 +284,33 @@ protected:
void paintEvent(QPaintEvent *event) {
QPainter p(this);
p.setCompositionMode(QPainter::CompositionMode_Source);
+
p.drawImage(event->rect(), buffer, event->rect());
+
+ if (touchDevice && event->rect().intersects(trackPad)) {
+ p.fillRect(trackPad, Qt::white);
+ p.setPen(QPen(QColor(224, 224, 224), 6));
+ int rad = qMin(trackPad.width(), trackPad.height()) * 0.3;
+ p.drawEllipse(centerPad, rad, rad);
+
+ p.setPen(Qt::NoPen);
+ p.setBrush(Qt::gray);
+
+ QPolygon poly;
+ poly << QPoint(-30, 0);
+ poly << QPoint(0, -40);
+ poly << QPoint(30, 0);
+
+ p.translate(centerPad);
+ for (int i = 0; i < 4; ++i) {
+ p.rotate(90);
+ p.translate(0, 20 - rad);
+ p.drawPolygon(poly);
+ p.translate(0, rad - 20);
+ }
+ }
+
+ p.end();
}
void keyPressEvent(QKeyEvent *event) {
@@ -282,6 +337,25 @@ protected:
moveDelta = (moveDelta < 0) ? 0 : moveDelta;
}
+ void mousePressEvent(QMouseEvent *event) {
+ qreal dx = centerPad.x() - event->pos().x();
+ qreal dy = centerPad.y() - event->pos().y();
+ angleDelta = dx * 2 * M_PI / width();
+ moveDelta = dy * 10 / height();
+ }
+
+ void mouseMoveEvent(QMouseEvent *event) {
+ qreal dx = centerPad.x() - event->pos().x();
+ qreal dy = centerPad.y() - event->pos().y();
+ angleDelta = dx * 2 * M_PI / width();
+ moveDelta = dy * 10 / height();
+ }
+
+ void mouseReleaseEvent(QMouseEvent*) {
+ angleDelta = 0;
+ moveDelta = 0;
+ }
+
private:
QTime watch;
QBasicTimer ticker;
@@ -292,6 +366,10 @@ private:
qreal moveDelta;
QImage textureImg;
int textureCount;
+ bool touchDevice;
+ QRect trackPad;
+ QPoint centerPad;
+ QSize bufferSize;
};
int main(int argc, char **argv)
diff --git a/demos/sub-attaq/states.cpp b/demos/sub-attaq/states.cpp
index 4a9d845..10c173e 100644
--- a/demos/sub-attaq/states.cpp
+++ b/demos/sub-attaq/states.cpp
@@ -54,7 +54,6 @@
#include <QtGui/QGraphicsView>
#include <QtCore/QStateMachine>
#include <QtGui/QKeyEventTransition>
-#include <QtCore/QSignalEvent>
#include <QtCore/QFinalState>
PlayState::PlayState(GraphicsScene *scene, QState *parent)
@@ -295,7 +294,7 @@ bool UpdateScoreTransition::eventTest(QEvent *event)
if (!QSignalTransition::eventTest(event))
return false;
else {
- QSignalEvent *se = static_cast<QSignalEvent*>(event);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(event);
game->score += se->arguments().at(0).toInt();
scene->progressItem->setScore(game->score);
return true;
@@ -315,7 +314,7 @@ bool WinTransition::eventTest(QEvent *event)
if (!QSignalTransition::eventTest(event))
return false;
else {
- QSignalEvent *se = static_cast<QSignalEvent*>(event);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(event);
game->score += se->arguments().at(0).toInt();
scene->progressItem->setScore(game->score);
return true;
diff --git a/dist/changes-4.5.3 b/dist/changes-4.5.3
index df282b0..d797b4c 100644
--- a/dist/changes-4.5.3
+++ b/dist/changes-4.5.3
@@ -33,11 +33,49 @@ Third party components
* Library *
****************************************************************************
+- QDirIterator
+ * [258230] Fixed inconsistencies in value returned from
+ QDirIterator::next().
+
+- QColorDialog
+ * [256164] Fixed the setting of alpha values in QColorDialog.
+
+- QDoubleSpinBox
+ * [255019] Fixed a crash when using large value for decimals.
+
+- QInputDialog
+ * [255502] Fixed bug in getDouble()
+
+- QNetworkAccessManager
+ * [256240] Proper handling of HTTP redirect in AlwaysCache mode.
+ * [257662] Fix timing issues that could trigger double sending of an
+ HTTP request.
+ * [256630] Fix usage of QProgressDialog together with QNetworkReply.
+
+- QSslCertificate
+ * [256066] Fix loading of a PEM when the length was a multiple of 64.
+
+- QTemporaryFile
+ * [260165] Fixed a bug where temporary files would be left behind when
+ copying a file to a non-existing directory.
****************************************************************************
* Database Drivers *
****************************************************************************
-
+- [QT-353] (ODBC) Fixed issue of forward only datasets failing when not
+ explicitly set so.
+- [222678] Fixed QSqlTableModel: trying to delete the wrong row.
+- (Interbase) Fixed crash when calling numRows on unknown query type.
+- Fixed several database autotests.
+- Fixed determination of end of odbc string on deficient driver.
+- Fixed formatting of date strings in psql driver.
+- Fixed mysql queries automatically getting prepared. Now have to explicitly
+ prepare them if you want that functionality.
+- Fixed failure when QSqlTableModel has null fields to update.
+- Fixed missing isnan/isinf on some platforms (needed for postgres driver)
+- Fixed ::record for dialect 3 named tables in interbase/firebird.
+- Fixed invalid length for numeric fields in oracle.
+- (ODBC) Fixed non-unicode strings should be strings, not bytearrays.
****************************************************************************
* Platform Specific Changes *
@@ -46,6 +84,10 @@ Third party components
Qt for Linux/X11
----------------
+- Fixed a bug where an empty KDEDIRS variable would bring /share into the icon
+ search path.
+- [KDE 191759] Plasma spinning in endless loop.
+
Qt for Windows
--------------
@@ -53,7 +95,16 @@ Qt for Windows
Qt for Mac OS X
---------------
+[252088] Drag and drop events will now consider the WA_TransparentForMouseEvents
+ in Cocoa port.
+[255428] Fixed an an issue when Calling QWidget::raise() on hidden windows making
+ them visible in Cocoa port.
+[256269] Window resize events triggered from QWidget::adjustSize() will now
+ be sent as non-spontaneous event in the Cocoa port.
+[258822] Fixed a crash when inserting the same menu twice in a menubar in Cocoa port.
+- Fixed the wizard background images for Snow Leopard.
+
Qt for Embedded Linux
---------------------
@@ -61,7 +112,7 @@ Qt for Embedded Linux
Qt for Windows CE
-----------------
-
+[260702] Fixed restoring of minimized Windows.
****************************************************************************
* Compiler Specific Changes *
diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc
index 65b6baa..4f4db85 100644
--- a/doc/src/development/designer-manual.qdoc
+++ b/doc/src/development/designer-manual.qdoc
@@ -61,8 +61,8 @@
\l{Getting To Know Qt Designer} document. For a quick tutorial on how to
use \QD, refer to \l{A Quick Start to Qt Designer}.
- Qt Designer 4.5 boasts a long list of improvements. For a detailed list of
- what is new, refer \l{What's New in Qt Designer 4.5}.
+ Qt Designer 4.6 boasts a long list of improvements. For a detailed list of
+ what is new, refer \l{What's New in Qt Designer 4.6}.
\image designer-multiple-screenshot.png
@@ -114,124 +114,6 @@
*/
-
-/*!
- \page designer-whats-new.html
- \contentspage {Qt Designer Manual}{Contents}
-
-
- \title What's New in Qt Designer 4.5
-
- \section1 General Changes
-
-
- \table
- \header
- \i Widget Filter Box
- \i Widget Morphing
- \i Disambiguation Field
- \row
- \i \inlineimage designer-widget-filter.png
- \i \inlineimage designer-widget-morph.png
- \i \inlineimage designer-disambiguation.png
- \endtable
-
- \list 1
- \i Displaying only icons in the \gui{Widget Box}: It is now possible
- for the \gui{Widget Box} to display icons only. Simply select
- \gui{Icon View} from the context menu.
- \i Filter for \gui{Widget Box}: A filter is now provided to quickly
- locate the widget you need. If you use a particular widget
- frequently, you can always add it to the
- \l{Getting to Know Qt Designer#WidgetBox}{scratch pad}.
- \i Support for QButtonGroup: It is available via the context
- menu of a selection of QAbstractButton objects.
- \i Improved support for item widgets: The item widgets' (e.g.,
- QListWidget, QTableWidget, and QTreeWidget) contents dialogs have
- been improved. You can now add translation comments and also modify
- the header properties.
- \i Widget morphing: A widget can now be morphed from one type to
- another with its layout and properties preserved. To begin, click
- on your widget and select \gui{Morph into} from the context menu.
- \i Disambiguation field: The property editor now shows this extra
- field under the \gui{accessibleDescription} property. This field
- has been introduced to aid translators in the case of two source
- texts being the same but used for different purposes. For example,
- a dialog could have two \gui{Add} buttons for two different
- reasons. \note To maintain compatibility, comments in UI files
- created prior to Qt 4.5 will be listed in the \gui{Disambiguation}
- field.
- \endlist
-
-
-
- \section1 Improved Shortcuts for the Editing Mode
-
- \list
- \i The \key{Shift+Click} key combination now selects the ancestor for
- nested layouts. This iterates from one ancestor to the other.
-
- \i The \key{Ctrl} key is now used to toggle and copy drag. Previously
- this was done with the \key{Shift} key but is now changed to
- conform to standards.
-
- \i The left mouse button does rubber band selection for form windows;
- the middle mouse button does rubber band selection everywhere.
- \endlist
-
-
- \section1 Layouts
- \list
- \i It is now possible to switch a widget's layout without breaking it
- first. Simply select the existing layout and change it to another
- type using the context menu or the layout buttons on the toolbar.
-
- \i To quickly populate a \gui{Form Layout}, you can now use the
- \gui{Add form layout row...} item available in the context menu or
- double-click on the red layout.
- \endlist
-
-
- \section1 Support for Embedded Design
-
- \table
- \header
- \i Comboboxes to Select a Device Profile
- \row
- \i \inlineimage designer-embedded-preview.png
- \endtable
-
- It is now possible to specify embedded device profiles, e.g., Style, Font,
- Screen DPI, resolution, default font, etc., in \gui{Preferences}. These
- settings will affect the \gui{Form Editor}. The profiles will also be
- visible with \gui{Preview}.
-
-
- \section1 Related Classes
-
- \list
- \i QUiLoader \mdash forms loaded with this class will now react to
- QEvent::LanguageChange if QUiLoader::setLanguageChangeEnabled() or
- QUiLoader::isLanguageChangeEnabled() is set to true.
-
- \i QDesignerCustomWidgetInterface \mdash the
- \l{QDesignerCustomWidgetInterface::}{domXml()} function now has new
- attributes for its \c{<ui>} element. These attributes are
- \c{language} and \c{displayname}. The \c{language} element can be
- one of the following "", "c++", "jambi". If this element is
- specified, it must match the language in which Designer is running.
- Otherwise, this element will not be available. The \c{displayname}
- element represents the name that will be displayed in the
- \gui{Widget Box}. Previously this was hardcoded to be the class
- name.
-
- \i QWizard \mdash QWizard's page now has a string \c{id} attribute that
- can be used to fill in enumeration values to be used by the
- \c{uic}. However, this attribute has no effect on QUiLoader.
- \endlist
-*/
-
-
/*!
\page designer-to-know.html
\contentspage {Qt Designer Manual}{Contents}
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 861c772..f2cae5b 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -4056,6 +4056,8 @@
You can test for any other platform-compiler combination as long as a
specification exists for it in the \c mkspecs directory.
+ The scope \c unix is true for the Symbian platform.
+
\section1 Variables
Many of the variables used in project files are special variables that
diff --git a/doc/src/examples/hellogl.qdoc b/doc/src/examples/hellogl.qdoc
index 77deefe..5fd2c6f 100644
--- a/doc/src/examples/hellogl.qdoc
+++ b/doc/src/examples/hellogl.qdoc
@@ -203,14 +203,14 @@
This class encapsulates the OpenGL geometry data which will be rendered
in the basic 3D scene.
- \snippet examples/opengl/hellogl/qtlogo.h 0
+ \snippet examples/opengl/shared/qtlogo.h 0
The geometry is divided into a list of parts which may be rendered in
different ways. The data itself is contained in a Geometry structure that
includes the vertices, their lighting normals and index values which
point into the vertices, grouping them into faces.
- \snippet examples/opengl/hellogl/qtlogo.cpp 0
+ \snippet examples/opengl/shared/qtlogo.cpp 0
The data in the Geometry class is stored in QVector<QVector3D> members
which are convenient for use with OpenGL because they expose raw
@@ -218,7 +218,7 @@
are included for adding new vertex data, either with smooth normals, or
facetted normals; and for enabling the geometry ready for rendering.
- \snippet examples/opengl/hellogl/qtlogo.cpp 1
+ \snippet examples/opengl/shared/qtlogo.cpp 1
The higher level Patch class has methods for accumulating the geometry
one face at a time, and treating collections of faces or "patches" with
@@ -226,14 +226,14 @@
may be added as triangles or quads, at the OpenGL level all data is
treated as triangles for compatibility with OpenGL/ES.
- \snippet examples/opengl/hellogl/qtlogo.cpp 2
+ \snippet examples/opengl/shared/qtlogo.cpp 2
Drawing a Patch is simply acheived by applying any transformation,
and material effect, then drawing the data using the index range for
the patch. The model-view matrix is saved and then restored so that
any transformation does not affect other parts of the scene.
- \snippet examples/opengl/hellogl/qtlogo.cpp 3
+ \snippet examples/opengl/shared/qtlogo.cpp 3
The geometry is built once on construction of the QtLogo, and it is
paramaterized on a number of divisions - which controls how "chunky" the
@@ -245,7 +245,7 @@
details) which only exist during the build phase, to assemble the parts
of the scene.
- \snippet examples/opengl/hellogl/qtlogo.cpp 4
+ \snippet examples/opengl/shared/qtlogo.cpp 4
Finally the complete QtLogo scene is simply drawn by enabling the data arrays
and then iterating over the parts, calling draw() on each one.
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index 3eb9249..4f9dc3f 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -194,7 +194,7 @@
\snippet examples/statemachine/rogue/movementtransition.h 1
- The KeyPress events come wrapped in \l{QWrappedEvent}s. \c event
+ The KeyPress events come wrapped in \l{QStateMachine::WrappedEvent}s. \c event
must be confirmed to be a wrapped event because Qt uses other
events internally. After that, it is simply a matter of checking
which key has been pressed.
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index d29ca0e..0ac9732 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -267,7 +267,10 @@
Iterators provide a uniform means to access items in a container.
Qt's container classes provide two types of iterators: Java-style
- iterators and STL-style iterators.
+ iterators and STL-style iterators. Iterators of both types are
+ invalidated when the data in the container is modified or detached
+ from \l{Implicit Sharing}{implicitly shared copies} due to a call
+ to a non-const member function.
\section2 Java-Style Iterators
diff --git a/doc/src/frameworks-technologies/statemachine.qdoc b/doc/src/frameworks-technologies/statemachine.qdoc
index 904b551..ed8bc85 100644
--- a/doc/src/frameworks-technologies/statemachine.qdoc
+++ b/doc/src/frameworks-technologies/statemachine.qdoc
@@ -304,13 +304,42 @@
For parallel state groups, the QState::finished() signal is emitted when \e
all the child states have entered final states.
+ \section1 Targetless Transitions
+
+ A transition need not have a target state. A transition without a target can
+ be triggered the same way as any other transition; the difference is that
+ when a targetless transition is triggered, it doesn't cause any state
+ changes. This allows you to react to a signal or event when your machine is
+ in a certain state, without having to leave that state. Example:
+
+ \code
+ QStateMachine machine;
+ QState *s1 = new QState(&machine);
+
+ QPushButton button;
+ QSignalTransition *trans = new QSignalTransition(&button, SIGNAL(clicked()));
+ s1->addTransition(trans);
+
+ QMessageBox msgBox;
+ msgBox.setText("The button was clicked; carry on.");
+ QObject::connect(trans, SIGNAL(triggered()), &msgBox, SLOT(exec()));
+
+ machine.setInitialState(s1);
+ \endcode
+
+ The message box will be displayed each time the button is clicked, but the
+ state machine will remain in its current state (s1). If the target state
+ were explicitly set to s1, however, s1 would be exited and re-entered each
+ time (e.g. the QAbstractState::entered() and QAbstractState::exited()
+ signals would be emitted).
+
\section1 Events, Transitions and Guards
A QStateMachine runs its own event loop. For signal transitions
(QSignalTransition objects), QStateMachine automatically posts a
- QSignalEvent to itself when it intercepts the corresponding signal;
- similarly, for QObject event transitions (QEventTransition objects) a
- QWrappedEvent is posted.
+ QStateMachine::SignalEvent to itself when it intercepts the corresponding
+ signal; similarly, for QObject event transitions (QEventTransition objects)
+ a QStateMachine::WrappedEvent is posted.
You can post your own events to the state machine using
QStateMachine::postEvent().
diff --git a/doc/src/images/browser-demo.png b/doc/src/images/browser-demo.png
index 466f218..5e0c0be 100644
--- a/doc/src/images/browser-demo.png
+++ b/doc/src/images/browser-demo.png
Binary files differ
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index 61bd779..5f72ce3 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -104,6 +104,12 @@
\table
\header \o Platform
\o Compilers
+ \omit
+ \row \o Windows 7
+ \o MSVC 2008
+ \endomit
+ \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \o As provided by Apple
\row \o Apple Mac OS X 10.4 "Tiger"
\o As provided by Apple
\row \o HPUXi 11.11
@@ -128,7 +134,7 @@
All platforms not specifically listed above are not supported by Nokia. Nokia does
not run its unit test suite or perform any other internal tests on platforms not
- listed above. Qt users should note, however, that there may be various open source
+ listed above. Qt users should note, however, that there may be various open source
projects, community users and/or Qt partners who are able to provide assistance with
platforms not supported by Nokia.
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 558fc89..03d9b29 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -578,8 +578,8 @@
primitives for matrix multiplication, vectors, quaternions
(client-side), and API for vertex and fragment shaders, GLSL/ES.
Future research will, among other things include stencils,
-scissors, vertex buffers and arrays, texture manipulation, and
- geometry shaders.
+ scissors, vertex buffers and arrays, texture manipulation, and
+ geometry shaders.
\section1 Performance Optimizations
@@ -784,7 +784,7 @@ scissors, vertex buffers and arrays, texture manipulation, and
these settings when you edit forms.
More information about these improvements can be found in the
- \l{What's New in Qt Designer 4.5} overview.
+ \l{What's New in Qt Designer 4.6} overview.
\section1 Qt Linguist Improvements
diff --git a/doc/src/snippets/statemachine/eventtest.cpp b/doc/src/snippets/statemachine/eventtest.cpp
index b6397ba..817dbfc 100644
--- a/doc/src/snippets/statemachine/eventtest.cpp
+++ b/doc/src/snippets/statemachine/eventtest.cpp
@@ -52,7 +52,7 @@ protected:
bool eventTest(QEvent *event)
{
if (event->type() == QEvent::Wrapped) {
- QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event();
+ QEvent *wrappedEvent = static_cast<QStateMachine::WrappedEvent *>(event)->event();
if (wrappedEvent->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent);
// Do your event test
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index ea11bfb..84aea6c 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -77,6 +77,12 @@
\row \o \link #QTDS QTDS\endlink \o Sybase Adaptive Server
\endtable
+ SQLite is the in-process database system with the best test coverage
+ and support on all platforms. Oracle via OCI, and PostreSQL and MySQL
+ through either ODBC or a native driver are well-tested on Windows and
+ Linux. The completeness of the support for other systems depends on the
+ availability and quality of client libraries.
+
\bold{Note:} To build a driver plugin you need to have the appropriate
client library for your Database Management System (DBMS). This provides
access to the API exposed by the DBMS, and is typically shipped with it.
@@ -445,7 +451,7 @@
Sybase client library. Refer to the Sybase documentation for information on how to set up
a Sybase client configuration file to enable connections to databases on non-default ports.
- \section3 How to Build the QDTS Plugin on Unix and Mac OS X
+ \section3 How to Build the QTDS Plugin on Unix and Mac OS X
Under Unix, two libraries are available which support the TDS protocol:
@@ -609,7 +615,8 @@
The Qt InterBase plugin makes it possible to access the InterBase and
Firebird databases. InterBase can either be used as a client/server or
without a server in which case it operates on local files. The
- database file must exist before a connection can be established.
+ database file must exist before a connection can be established. Firebird
+ must be used with a server configuration.
Note that InterBase requires you to specify the full path to the
database file, no matter whether it is stored locally or on another
diff --git a/examples/animation/animatedtiles/main.cpp b/examples/animation/animatedtiles/main.cpp
index ca52f47..74164d3 100644
--- a/examples/animation/animatedtiles/main.cpp
+++ b/examples/animation/animatedtiles/main.cpp
@@ -228,51 +228,25 @@ int main(int argc, char **argv)
QAbstractTransition *trans = rootState->addTransition(ellipseButton, SIGNAL(pressed()), ellipseState);
trans->addAnimation(group);
- group = new QParallelAnimationGroup;
- for (int i = 0; i < items.count(); ++i) {
- QPropertyAnimation *anim = new QPropertyAnimation(items[i], "pos");
- anim->setDuration(750 + i * 25);
- anim->setEasingCurve(QEasingCurve::InOutBack);
- group->addAnimation(anim);
- }
trans = rootState->addTransition(figure8Button, SIGNAL(pressed()), figure8State);
trans->addAnimation(group);
- group = new QParallelAnimationGroup;
- for (int i = 0; i < items.count(); ++i) {
- QPropertyAnimation *anim = new QPropertyAnimation(items[i], "pos");
- anim->setDuration(750 + i * 25);
- anim->setEasingCurve(QEasingCurve::InOutBack);
- group->addAnimation(anim);
- }
trans = rootState->addTransition(randomButton, SIGNAL(pressed()), randomState);
trans->addAnimation(group);
- group = new QParallelAnimationGroup;
- for (int i = 0; i < items.count(); ++i) {
- QPropertyAnimation *anim = new QPropertyAnimation(items[i], "pos");
- anim->setDuration(750 + i * 25);
- anim->setEasingCurve(QEasingCurve::InOutBack);
- group->addAnimation(anim);
- }
trans = rootState->addTransition(tiledButton, SIGNAL(pressed()), tiledState);
trans->addAnimation(group);
- group = new QParallelAnimationGroup;
- for (int i = 0; i < items.count(); ++i) {
- QPropertyAnimation *anim = new QPropertyAnimation(items[i], "pos");
- anim->setDuration(750 + i * 25);
- anim->setEasingCurve(QEasingCurve::InOutBack);
- group->addAnimation(anim);
- }
trans = rootState->addTransition(centeredButton, SIGNAL(pressed()), centeredState);
trans->addAnimation(group);
- states.start();
QTimer timer;
timer.start(125);
timer.setSingleShot(true);
- rootState->addTransition(&timer, SIGNAL(timeout()), ellipseState);
+ trans = rootState->addTransition(&timer, SIGNAL(timeout()), ellipseState);
+ trans->addAnimation(group);
+
+ states.start();
#ifdef QT_KEYPAD_NAVIGATION
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
diff --git a/examples/animation/easing/animation.h b/examples/animation/easing/animation.h
index 78fdc14..bd58be0 100644
--- a/examples/animation/easing/animation.h
+++ b/examples/animation/easing/animation.h
@@ -68,7 +68,7 @@ public:
m_path = QPainterPath();
}
- void updateCurrentTime()
+ void updateCurrentTime(int currentTime)
{
if (m_pathType == CirclePath) {
if (m_path.isEmpty()) {
@@ -78,7 +78,7 @@ public:
m_path.addEllipse(QRectF(from, to));
}
int dura = duration();
- const qreal progress = ((dura == 0) ? 1 : ((((currentTime() - 1) % dura) + 1) / qreal(dura)));
+ const qreal progress = ((dura == 0) ? 1 : ((((currentTime - 1) % dura) + 1) / qreal(dura)));
qreal easedProgress = easingCurve().valueForProgress(progress);
if (easedProgress > 1.0) {
@@ -90,7 +90,7 @@ public:
updateCurrentValue(pt);
emit valueChanged(pt);
} else {
- QPropertyAnimation::updateCurrentTime();
+ QPropertyAnimation::updateCurrentTime(currentTime);
}
}
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index f5dca74..250fb85 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -64,7 +64,7 @@ public:
virtual bool eventTest(QEvent *e)
{
if (QSignalTransition::eventTest(e)) {
- QVariant key = static_cast<QSignalEvent*>(e)->arguments().at(0);
+ QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
return (key.toInt() == int(m_key));
}
diff --git a/examples/graphicsview/anchorlayout/anchorlayout.pro b/examples/graphicsview/anchorlayout/anchorlayout.pro
index c969c8b..c2a1bea 100644
--- a/examples/graphicsview/anchorlayout/anchorlayout.pro
+++ b/examples/graphicsview/anchorlayout/anchorlayout.pro
@@ -12,3 +12,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/graphicsview/anchorlayout
INSTALLS += target sources
TARGET = anchorlayout_example
+CONFIG+=console \ No newline at end of file
diff --git a/examples/statemachine/factorial/main.cpp b/examples/statemachine/factorial/main.cpp
index 54f4ec0..018b84f 100644
--- a/examples/statemachine/factorial/main.cpp
+++ b/examples/statemachine/factorial/main.cpp
@@ -98,13 +98,13 @@ public:
{
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return se->arguments().at(0).toInt() > 1;
}
virtual void onTransition(QEvent *e)
{
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
int x = se->arguments().at(0).toInt();
int fac = m_fact->property("fac").toInt();
m_fact->setProperty("fac", x * fac);
@@ -128,7 +128,7 @@ public:
{
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return se->arguments().at(0).toInt() <= 1;
}
diff --git a/examples/statemachine/rogue/movementtransition.h b/examples/statemachine/rogue/movementtransition.h
index dbaf8d9..b919360 100644
--- a/examples/statemachine/rogue/movementtransition.h
+++ b/examples/statemachine/rogue/movementtransition.h
@@ -62,8 +62,8 @@ public:
protected:
bool eventTest(QEvent *event) {
if (event->type() == QEvent::Wrapped &&
- static_cast<QWrappedEvent *>(event)->event()->type() == QEvent::KeyPress) {
- QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event();
+ static_cast<QStateMachine::WrappedEvent *>(event)->event()->type() == QEvent::KeyPress) {
+ QEvent *wrappedEvent = static_cast<QStateMachine::WrappedEvent *>(event)->event();
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent);
int key = keyEvent->key();
@@ -78,7 +78,7 @@ protected:
//![2]
void onTransition(QEvent *event) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(
- static_cast<QWrappedEvent *>(event)->event());
+ static_cast<QStateMachine::WrappedEvent *>(event)->event());
int key = keyEvent->key();
switch (key) {
diff --git a/examples/webkit/formextractor/formextractor.cpp b/examples/webkit/formextractor/formextractor.cpp
index 10bd9af..3ce888c 100644
--- a/examples/webkit/formextractor/formextractor.cpp
+++ b/examples/webkit/formextractor/formextractor.cpp
@@ -67,15 +67,15 @@ void FormExtractor::submit()
QWebElement femaleGender = frame->findFirstElement("#genderFemale");
QWebElement updates = frame->findFirstElement("#updates");
- ui.firstNameEdit->setText(firstName.scriptableProperty("value").toString());
- ui.lastNameEdit->setText(lastName.scriptableProperty("value").toString());
+ ui.firstNameEdit->setText(firstName.evaluateScript("this.value").toString());
+ ui.lastNameEdit->setText(lastName.evaluateScript("this.value").toString());
- if (maleGender.scriptableProperty("checked").toBool())
- ui.genderEdit->setText(maleGender.scriptableProperty("value").toString());
- else if (femaleGender.scriptableProperty("checked").toBool())
- ui.genderEdit->setText(femaleGender.scriptableProperty("value").toString());
+ if (maleGender.evaluateScript("this.checked").toBool())
+ ui.genderEdit->setText(maleGender.evaluateScript("this.value").toString());
+ else if (femaleGender.evaluateScript("this.checked").toBool())
+ ui.genderEdit->setText(femaleGender.evaluateScript("this.value").toString());
- if (updates.scriptableProperty("checked").toBool())
+ if (updates.evaluateScript("this.checked").toBool())
ui.updatesEdit->setText("Yes");
else
ui.updatesEdit->setText("No");
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 8956ef7..243a829 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -45,6 +45,10 @@ defineTest(qtAddLibrary) {
}
}
}
+ symbian*:isEqual(LIB_NAME, QtGui) {
+ # Needed for #include <QtGui> because qs60mainapplication.h includes aknapp.h
+ INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE
+ }
isEmpty(LINKAGE) {
CONFIG(debug, debug|release) {
win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h b/src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h
index 8072162..811818d 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h
@@ -43,11 +43,12 @@ namespace JSC {
#if PLATFORM(QT)
#ifdef QT_BUILD_SCRIPT_LIB
- virtual void scriptUnload(qint64 id)
+ virtual void scriptUnload(QT_PREPEND_NAMESPACE(qint64) id)
{
UNUSED_PARAM(id);
};
- virtual void scriptLoad(qint64 id, const UString &program,
+ virtual void scriptLoad(QT_PREPEND_NAMESPACE(qint64) id,
+ const UString &program,
const UString &fileName, int baseLineNumber)
{
UNUSED_PARAM(id);
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
index 7d3a84d..4200023 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
@@ -435,7 +435,7 @@ void Interpreter::dumpRegisters(CallFrame* callFrame)
printf("[ReturnPC] | %10p | %p \n", it, (*it).vPC()); ++it;
printf("[ReturnValueRegister] | %10p | %d \n", it, (*it).i()); ++it;
printf("[ArgumentCount] | %10p | %d \n", it, (*it).i()); ++it;
- printf("[Callee] | %10p | %p \n", it, (*it).function()); ++it;
+ printf("[Callee] | %10p | %p \n", it, (*it).object()); ++it;
printf("[OptionalCalleeArguments] | %10p | %p \n", it, (*it).arguments()); ++it;
printf("-----------------------------------------------------------------------------\n");
@@ -885,13 +885,21 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec
}
Register* oldEnd = m_registerFile.end();
+#ifdef QT_BUILD_SCRIPT_LIB //with QtScript, we do not necesserly start from scratch
+ Register* newEnd = oldEnd + globalRegisterOffset + codeBlock->m_numCalleeRegisters;
+#else
Register* newEnd = m_registerFile.start() + globalRegisterOffset + codeBlock->m_numCalleeRegisters;
+#endif
if (!m_registerFile.grow(newEnd)) {
*exception = createStackOverflowError(callFrame);
return jsNull();
}
+#ifdef QT_BUILD_SCRIPT_LIB //with QtScript, we do not necesserly start from scratch
+ CallFrame* newCallFrame = CallFrame::create(oldEnd + globalRegisterOffset);
+#else
CallFrame* newCallFrame = CallFrame::create(m_registerFile.start() + globalRegisterOffset);
+#endif
// a 0 codeBlock indicates a built-in caller
newCallFrame->r(codeBlock->thisRegister()) = JSValue(thisObj);
@@ -3071,8 +3079,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (callType == CallTypeHost) {
ScopeChainNode* scopeChain = callFrame->scopeChain();
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset);
+#ifdef QT_BUILD_SCRIPT_LIB //we need the returnValue to be 0 as it is used as flags
+ newCallFrame->init(0, vPC + 5, scopeChain, callFrame, 0, argCount, asObject(v));
+#else
newCallFrame->init(0, vPC + 5, scopeChain, callFrame, dst, argCount, asObject(v));
-
+#endif
Register* thisRegister = newCallFrame->registers() - RegisterFile::CallFrameHeaderSize - argCount;
ArgList args(thisRegister + 1, argCount - 1);
@@ -3113,7 +3124,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
exceptionValue = createStackOverflowError(callFrame);
goto vm_throw;
}
- ASSERT(!callFrame->callee()->isHostFunction());
+ ASSERT(!asFunction(callFrame->callee())->isHostFunction());
int32_t expectedParams = static_cast<JSFunction*>(callFrame->callee())->jsExecutable()->parameterCount();
int32_t inplaceArgs = min(argCount, expectedParams);
int32_t i = 0;
@@ -3225,7 +3236,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (callType == CallTypeHost) {
ScopeChainNode* scopeChain = callFrame->scopeChain();
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset);
+#ifdef QT_BUILD_SCRIPT_LIB //we need the returnValue to be 0 as it is used as flags
+ newCallFrame->init(0, vPC + 5, scopeChain, callFrame, 0, argCount, asObject(v));
+#else
newCallFrame->init(0, vPC + 5, scopeChain, callFrame, dst, argCount, asObject(v));
+#endif
+
Register* thisRegister = newCallFrame->registers() - RegisterFile::CallFrameHeaderSize - argCount;
ArgList args(thisRegister + 1, argCount - 1);
@@ -3469,7 +3485,8 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
structure = callDataScopeChain->globalObject()->emptyObjectStructure();
#ifdef QT_BUILD_SCRIPT_LIB
// ### world-class hack
- QScriptObject* newObject = new (globalData) QScriptObject(structure);
+ QT_PREPEND_NAMESPACE(QScriptObject)* newObject
+ = new (globalData) QT_PREPEND_NAMESPACE(QScriptObject)(structure);
#else
JSObject* newObject = new (globalData) JSObject(structure);
#endif
@@ -3500,7 +3517,11 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
ScopeChainNode* scopeChain = callFrame->scopeChain();
CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset);
+#ifdef QT_BUILD_SCRIPT_LIB //we need the returnValue to be 0 as it is used as flags
+ newCallFrame->init(0, vPC + 7, scopeChain, callFrame, 0, argCount, asObject(v));
+#else
newCallFrame->init(0, vPC + 7, scopeChain, callFrame, dst, argCount, asObject(v));
+#endif
JSValue returnValue;
{
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h
index 12e2a32..3274fcc 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h
@@ -191,11 +191,6 @@ public:
{
User::IMB_Range(code, static_cast<char*>(code) + size);
}
-#elif PLATFORM(ARM) && COMPILER(GCC) && (GCC_VERSION >= 30406) && !defined(DISABLE_BUILTIN_CLEAR_CACHE)
- static void cacheFlush(void* code, size_t size)
- {
- __clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(code) + size);
- }
#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
static void cacheFlush(void* code, size_t size)
{
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
index a110dcd..0b147df 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp
@@ -1777,7 +1777,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct)
else
structure = constructor->scope().node()->globalObject()->emptyObjectStructure();
#ifdef QT_BUILD_SCRIPT_LIB
- return new (stackFrame.globalData) QScriptObject(structure);
+ return new (stackFrame.globalData) QT_PREPEND_NAMESPACE(QScriptObject)(structure);
#else
return new (stackFrame.globalData) JSObject(structure);
#endif
@@ -3108,4 +3108,4 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, vm_throw)
} // namespace JSC
-#endif // ENABLE(JIT)
+ #endif // ENABLE(JIT)
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
index cc40336..39cafab 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
@@ -257,7 +257,8 @@
#define WTF_PLATFORM_MIDDLE_ENDIAN 1
#endif
#define ARM_ARCH_VERSION 3
-#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
+#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || defined(ARMV4I) \
+ || defined(_ARMV4I_) || defined(armv4i)
#undef ARM_ARCH_VERSION
#define ARM_ARCH_VERSION 4
#endif
diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
index 6160986..ae70d26 100644
--- a/src/3rdparty/javascriptcore/VERSION
+++ b/src/3rdparty/javascriptcore/VERSION
@@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
The commit imported was from the
- jsc-for-qtscript-4.6-staging-24092009 branch/tag
+ jsc-for-qtscript-4.6-staging-28092009 branch/tag
and has the sha1 checksum
- 6906f46c84e6b20612db58018334cb6823d0a18a
+ b98dec961e9389ddd5e10d7c4086de9a297cb984
diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog
index 9065b3a..e2c1ef5 100644
--- a/src/3rdparty/webkit/ChangeLog
+++ b/src/3rdparty/webkit/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-26 David Kilzer <ddkilzer@apple.com>
+
+ GTK BUILD FIX: add ENABLE_ORIENTATION_EVENTS support to configure.ac
+
+ * configure.ac: Added support for ENABLE_ORIENTATION_EVENTS.
+
2009-09-23 Xan Lopez <xlopez@igalia.com>
Reviewed by Gustavo Noronha.
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 4899919..f6a644a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,252 @@
+2009-09-28 Joerg Bornemann <joerg.bornemann@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add ARM version detection for Windows CE.
+
+ * wtf/Platform.h:
+
+2009-09-26 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Add MarkStackSymbian.cpp to build JavascriptCore for Symbian.
+
+ Re-use Windows shrinkAllocation implementation because Symbian doesn't
+ support releasing part of memory region.
+
+ Use fastMalloc and fastFree to implement allocateStack and releaseStack
+ for Symbian port.
+
+ * JavaScriptCore.pri:
+ * runtime/MarkStack.h:
+ (JSC::MarkStack::MarkStackArray::shrinkAllocation):
+ * runtime/MarkStackSymbian.cpp: Added.
+ (JSC::MarkStack::initializePagesize):
+ (JSC::MarkStack::allocateStack):
+ (JSC::MarkStack::releaseStack):
+
+2009-09-25 Gabor Loki <loki@inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ Fix unaligned data access in YARR_JIT on ARMv5 and below.
+ https://bugs.webkit.org/show_bug.cgi?id=29695
+
+ On ARMv5 and below all data access should be naturally aligned.
+ In the YARR_JIT there is a case when character pairs are
+ loaded from the input string, but this data access is not
+ naturally aligned. This fix introduces load32WithUnalignedHalfWords
+ and branch32WithUnalignedHalfWords functions which contain
+ naturally aligned memory loads - half word loads - on ARMv5 and below.
+
+ * assembler/MacroAssemblerARM.cpp:
+ (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
+ * assembler/MacroAssemblerARM.h:
+ (JSC::MacroAssemblerARM::load32WithUnalignedHalfWords):
+ (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
+ * assembler/MacroAssemblerARMv7.h:
+ (JSC::MacroAssemblerARMv7::load32WithUnalignedHalfWords):
+ (JSC::MacroAssemblerARMv7::branch32):
+ (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
+ * assembler/MacroAssemblerX86Common.h:
+ (JSC::MacroAssemblerX86Common::load32WithUnalignedHalfWords):
+ (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
+ * wtf/Platform.h:
+ * yarr/RegexJIT.cpp:
+ (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
+
+2009-09-25 Jeremy Orlow <jorlow@chromium.org>
+
+ This is breaking Chromium try bots, so I'm counting this as a build fix.
+
+ Add more svn:ignore exceptions. On different platforms, these files are
+ generated with different case for JavaScriptCore. Also there are some
+ wtf project files that get built apparently.
+
+ * JavaScriptCore.gyp: Changed property svn:ignore.
+
+2009-09-25 Ada Chan <adachan@apple.com>
+
+ Build fix.
+
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+ * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
+
+2009-09-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Inlined some object creation code, including lexicalGlobalObject access
+ https://bugs.webkit.org/show_bug.cgi?id=29750
+
+ SunSpider says 0.5% faster.
+
+ 0.8% speedup on bench-alloc-nonretained.js.
+ 2.5% speedup on v8-splay.js.
+
+ * interpreter/CachedCall.h:
+ (JSC::CachedCall::CachedCall):
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::lexicalGlobalObject):
+ (JSC::ExecState::globalThisValue):
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::dumpRegisters):
+ (JSC::Interpreter::execute):
+ (JSC::Interpreter::privateExecute):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/FunctionConstructor.cpp:
+ (JSC::constructFunction):
+ * runtime/ScopeChain.cpp:
+ (JSC::ScopeChainNode::print):
+ * runtime/ScopeChain.h:
+ (JSC::ScopeChainNode::ScopeChainNode):
+ (JSC::ScopeChainNode::~ScopeChainNode):
+ (JSC::ScopeChainNode::push):
+ (JSC::ScopeChain::ScopeChain):
+ (JSC::ScopeChain::globalObject): Added a globalObject data member to ScopeChainNode.
+ Replaced accessor function for globalObject() with data member. Replaced
+ globalThisObject() accessor with direct access to globalThis, to match.
+
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init):
+ * runtime/JSGlobalObject.h: Inlined array and object construction.
+
+2009-09-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Add ARM version detection rules for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=29715
+
+ * wtf/Platform.h:
+
+2009-09-24 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Mark "Do It!" Rowe.
+
+ Some GCC versions don't like C++-style comments in preprocessor
+ directives, change to C-style to shut them up.
+
+ * wtf/Platform.h:
+
+2009-09-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Division is needlessly slow in 64-bit
+ https://bugs.webkit.org/show_bug.cgi?id=29723
+
+ Add codegen for op_div on x86-64
+
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ * jit/JITArithmetic.cpp:
+ (JSC::JIT::compileBinaryArithOpSlowCase):
+ (JSC::JIT::emit_op_div):
+ (JSC::JIT::emitSlow_op_div):
+ * jit/JITInlineMethods.h:
+ (JSC::JIT::isOperandConstantImmediateDouble):
+ (JSC::JIT::addressFor):
+ (JSC::JIT::emitLoadDouble):
+ (JSC::JIT::emitLoadInt32ToDouble):
+ (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber):
+
+2009-09-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add GYP generated files to svn:ignore
+ https://bugs.webkit.org/show_bug.cgi?id=29724
+
+ Adding the following files to the svn:ignore list (all in the
+ JavaScriptCore/JavaScriptCore.gyp directory)
+
+ JavaScriptCore.xcodeproj
+ JavaScriptCore.sln
+ JavaScriptCore.vcproj
+ JavaScriptCore_Debug.rules
+ JavaScriptCore_Release.rules
+ JavaScriptCore_Release - no tcmalloc.rules
+ JavaScriptCore_Purify.rules
+ JavaScriptCore.mk
+ JavaScriptCore_Debug_rules.mk
+ JavaScriptCore_Release_rules.mk
+ JavaScriptCore_Release - no tcmalloc_rules.mk
+ JavaScriptCore_Purify_rules.mk
+ JavaScriptCore.scons
+ JavaScriptCore_main.scons
+
+ * JavaScriptCore.gyp: Changed property svn:ignore.
+
+2009-09-24 Yong Li <yong.li@torchmobile.com>
+
+ Reviewed by Adam Barth.
+
+ Replace platform-dependent code with WTF::currentTime()
+ https://bugs.webkit.org/show_bug.cgi?id=29148
+
+ * jsc.cpp:
+ (StopWatch::start):
+ (StopWatch::stop):
+ (StopWatch::getElapsedMS):
+ * runtime/TimeoutChecker.cpp:
+ (JSC::getCPUTime):
+
+2009-09-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/7215058> FastMalloc scavenging thread should be named
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_PageHeap::scavengerThread): Set the thread name.
+ * wtf/Platform.h: Move the knowledge of whether pthread_setname_np exists to here as HAVE(PTHREAD_SETNAME_NP).
+ * wtf/ThreadingPthreads.cpp:
+ (WTF::setThreadNameInternal): Use HAVE(PTHREAD_SETNAME_NP).
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Renamed clear to removeAll, as suggested by Darin Adler.
+
+ * wtf/HashCountedSet.h:
+ (WTF::::removeAll):
+
+2009-09-24 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Fix FastMalloc to build with assertions enabled.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::TCMalloc_Central_FreeList::ReleaseToSpans):
+ * wtf/TCSpinLock.h:
+ (TCMalloc_SpinLock::IsHeld):
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Suggested by Darin Adler.
+
+ Removed some unnecessary parameter names.
+
+ * wtf/HashCountedSet.h:
+
+2009-09-24 Janne Koskinen <janne.p.koskinen@digia.com>
+
+ Reviewed by Simon Hausmann.
+
+ On Windows JSChar is typedef'ed to wchar_t.
+
+ When building with WINSCW for Symbian we need to do the
+ same typedef.
+
+ * API/JSStringRef.h:
+
2009-09-23 Geoffrey Garen <ggaren@apple.com>
A piece of my last patch that I forgot.
diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
index 7a815e3..73791e0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri
@@ -128,12 +128,16 @@ SOURCES += \
yarr/RegexJIT.cpp \
interpreter/RegisterFile.cpp
-win32-*|wince* {
- SOURCES += jit/ExecutableAllocatorWin.cpp \
- runtime/MarkStackWin.cpp
+symbian {
+ SOURCES += runtime/MarkStackSymbian.cpp
} else {
- SOURCES += jit/ExecutableAllocatorPosix.cpp \
- runtime/MarkStackPosix.cpp
+ win32-*|wince* {
+ SOURCES += jit/ExecutableAllocatorWin.cpp \
+ runtime/MarkStackWin.cpp
+ } else {
+ SOURCES += jit/ExecutableAllocatorPosix.cpp \
+ runtime/MarkStackPosix.cpp
+ }
}
# AllInOneFile.cpp helps gcc analize and optimize code
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp
index 43648c4..d726ecd 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.cpp
@@ -62,6 +62,33 @@ static bool isVFPPresent()
const bool MacroAssemblerARM::s_isVFPPresent = isVFPPresent();
+#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
+void MacroAssemblerARM::load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
+{
+ ARMWord op2;
+
+ ASSERT(address.scale >= 0 && address.scale <= 3);
+ op2 = m_assembler.lsl(address.index, static_cast<int>(address.scale));
+
+ if (address.offset >= 0 && address.offset + 0x2 <= 0xff) {
+ m_assembler.add_r(ARMRegisters::S0, address.base, op2);
+ m_assembler.ldrh_u(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset));
+ m_assembler.ldrh_u(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(address.offset + 0x2));
+ } else if (address.offset < 0 && address.offset >= -0xff) {
+ m_assembler.add_r(ARMRegisters::S0, address.base, op2);
+ m_assembler.ldrh_d(dest, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset));
+ m_assembler.ldrh_d(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::getOp2Byte(-address.offset - 0x2));
+ } else {
+ m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset);
+ m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, op2);
+ m_assembler.ldrh_r(dest, address.base, ARMRegisters::S0);
+ m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::OP2_IMM | 0x2);
+ m_assembler.ldrh_r(ARMRegisters::S0, address.base, ARMRegisters::S0);
+ }
+ m_assembler.orr_r(dest, dest, m_assembler.lsl(ARMRegisters::S0, 16));
+}
+#endif
+
}
#endif // ENABLE(ASSEMBLER) && PLATFORM(ARM_TRADITIONAL)
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h
index 0c696c9..aa8cbb0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARM.h
@@ -198,6 +198,15 @@ public:
m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast<int>(address.scale), address.offset);
}
+#if defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_REQUIRE_NATURAL_ALIGNMENT
+ void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest);
+#else
+ void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
+ {
+ load32(address, dest);
+ }
+#endif
+
DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest)
{
DataLabel32 dataLabel(this);
@@ -364,6 +373,12 @@ public:
return branch32(cond, ARMRegisters::S1, right);
}
+ Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right)
+ {
+ load32WithUnalignedHalfWords(left, ARMRegisters::S1);
+ return branch32(cond, ARMRegisters::S1, right);
+ }
+
Jump branch16(Condition cond, BaseIndex left, RegisterID right)
{
UNUSED_PARAM(cond);
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
index 999056b..a549604 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerARMv7.h
@@ -375,6 +375,11 @@ public:
load32(setupArmAddress(address), dest);
}
+ void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
+ {
+ load32(setupArmAddress(address), dest);
+ }
+
void load32(void* address, RegisterID dest)
{
move(ImmPtr(address), addressTempRegister);
@@ -717,6 +722,13 @@ public:
return branch32(cond, addressTempRegister, right);
}
+ Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right)
+ {
+ // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/
+ load32WithUnalignedHalfWords(left, addressTempRegister);
+ return branch32(cond, addressTempRegister, right);
+ }
+
Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right)
{
load32(left.m_ptr, dataTempRegister);
diff --git a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h
index 61e0e17..5ebefa7 100644
--- a/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h
+++ b/src/3rdparty/webkit/JavaScriptCore/assembler/MacroAssemblerX86Common.h
@@ -306,6 +306,11 @@ public:
m_assembler.movl_mr(address.offset, address.base, address.index, address.scale, dest);
}
+ void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest)
+ {
+ load32(address, dest);
+ }
+
DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest)
{
m_assembler.movl_mr_disp32(address.offset, address.base, dest);
@@ -604,6 +609,11 @@ public:
return Jump(m_assembler.jCC(x86Condition(cond)));
}
+ Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, Imm32 right)
+ {
+ return branch32(cond, left, right);
+ }
+
Jump branch16(Condition cond, BaseIndex left, RegisterID right)
{
m_assembler.cmpw_rm(right, left.offset, left.base, left.index, left.scale);
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
index b9fa484..e903b79 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CachedCall.h
@@ -38,7 +38,7 @@ namespace JSC {
: m_valid(false)
, m_interpreter(callFrame->interpreter())
, m_exception(exception)
- , m_globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : function->scope().node()->globalObject())
+ , m_globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : function->scope().globalObject())
{
ASSERT(!function->isHostFunction());
m_closure = m_interpreter->prepareForRepeatCall(function->jsExecutable(), callFrame, function, argCount, function->scope().node(), exception);
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
index 92ec06e..b4d49db 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/CallFrame.h
@@ -51,14 +51,14 @@ namespace JSC {
// Differs from dynamicGlobalObject() during function calls across web browser frames.
JSGlobalObject* lexicalGlobalObject() const
{
- return scopeChain()->globalObject();
+ return scopeChain()->globalObject;
}
// Differs from lexicalGlobalObject because this will have DOM window shell rather than
// the actual DOM window, which can't be "this" for security reasons.
JSObject* globalThisValue() const
{
- return scopeChain()->globalThisObject();
+ return scopeChain()->globalThis;
}
// FIXME: Elsewhere, we use JSGlobalData* rather than JSGlobalData&.
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
index 8a8fb3c..2aaa325 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
@@ -385,7 +385,7 @@ void Interpreter::dumpRegisters(CallFrame* callFrame)
printf("-----------------------------------------------------------------------------\n");
CodeBlock* codeBlock = callFrame->codeBlock();
- RegisterFile* registerFile = &callFrame->scopeChain()->globalObject()->globalData()->interpreter->registerFile();
+ RegisterFile* registerFile = &callFrame->scopeChain()->globalObject->globalData()->interpreter->registerFile();
const Register* it;
const Register* end;
JSValue v;
@@ -629,7 +629,7 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S
return jsNull();
}
- DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject());
+ DynamicGlobalObjectScope globalObjectScope(callFrame, scopeChain->globalObject);
JSGlobalObject* lastGlobalObject = m_registerFile.globalObject();
JSGlobalObject* globalObject = callFrame->dynamicGlobalObject();
@@ -689,7 +689,7 @@ JSValue Interpreter::execute(FunctionExecutable* functionExecutable, CallFrame*
return jsNull();
}
- DynamicGlobalObjectScope globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : scopeChain->globalObject());
+ DynamicGlobalObjectScope globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : scopeChain->globalObject);
CallFrame* newCallFrame = CallFrame::create(oldEnd);
size_t dst = 0;
@@ -819,7 +819,7 @@ JSValue Interpreter::execute(EvalExecutable* eval, CallFrame* callFrame, JSObjec
}
}
- DynamicGlobalObjectScope globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : scopeChain->globalObject());
+ DynamicGlobalObjectScope globalObjectScope(callFrame, callFrame->globalData().dynamicGlobalObject ? callFrame->globalData().dynamicGlobalObject : scopeChain->globalObject);
EvalCodeBlock* codeBlock = &eval->bytecode(callFrame, scopeChain);
@@ -1242,7 +1242,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
*/
int dst = (++vPC)->u.operand;
int regExp = (++vPC)->u.operand;
- callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject()->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
+ callFrame->r(dst) = JSValue(new (globalData) RegExpObject(callFrame->scopeChain()->globalObject->regExpStructure(), callFrame->codeBlock()->regexp(regExp)));
++vPC;
NEXT_INSTRUCTION();
@@ -2981,7 +2981,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
Register* newCallFrame = callFrame->registers() + registerOffset;
Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
JSValue thisValue = argv[0].jsValue();
- JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject();
+ JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject;
if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
JSValue result = callEval(callFrame, registerFile, argv, argCount, registerOffset, exceptionValue);
@@ -3429,7 +3429,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi
if (prototype.isObject())
structure = asObject(prototype)->inheritorID();
else
- structure = callDataScopeChain->globalObject()->emptyObjectStructure();
+ structure = callDataScopeChain->globalObject->emptyObjectStructure();
JSObject* newObject = new (globalData) JSObject(structure);
callFrame->r(thisRegister) = JSValue(newObject); // "this" value
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
index 12e2a32..3274fcc 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/ExecutableAllocator.h
@@ -191,11 +191,6 @@ public:
{
User::IMB_Range(code, static_cast<char*>(code) + size);
}
-#elif PLATFORM(ARM) && COMPILER(GCC) && (GCC_VERSION >= 30406) && !defined(DISABLE_BUILTIN_CLEAR_CACHE)
- static void cacheFlush(void* code, size_t size)
- {
- __clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(code) + size);
- }
#elif PLATFORM(ARM_TRADITIONAL) && PLATFORM(LINUX)
static void cacheFlush(void* code, size_t size)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
index bf3a418..ea8434e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.cpp
@@ -195,7 +195,7 @@ void JIT::privateCompileMainPass()
switch (m_interpreter->getOpcodeID(currentInstruction->u.opcode)) {
DEFINE_BINARY_OP(op_del_by_val)
-#if !USE(JSVALUE32_64)
+#if USE(JSVALUE32)
DEFINE_BINARY_OP(op_div)
#endif
DEFINE_BINARY_OP(op_in)
@@ -230,7 +230,7 @@ void JIT::privateCompileMainPass()
DEFINE_OP(op_create_arguments)
DEFINE_OP(op_debug)
DEFINE_OP(op_del_by_id)
-#if USE(JSVALUE32_64)
+#if !USE(JSVALUE32)
DEFINE_OP(op_div)
#endif
DEFINE_OP(op_end)
@@ -379,7 +379,7 @@ void JIT::privateCompileSlowCases()
DEFINE_SLOWCASE_OP(op_construct)
DEFINE_SLOWCASE_OP(op_construct_verify)
DEFINE_SLOWCASE_OP(op_convert_this)
-#if USE(JSVALUE32_64)
+#if !USE(JSVALUE32)
DEFINE_SLOWCASE_OP(op_div)
#endif
DEFINE_SLOWCASE_OP(op_eq)
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
index 5c58e9d..3b35935 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JIT.h
@@ -379,14 +379,18 @@ namespace JSC {
enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
+ bool isOperandConstantImmediateDouble(unsigned src);
+
+ void emitLoadDouble(unsigned index, FPRegisterID value);
+ void emitLoadInt32ToDouble(unsigned index, FPRegisterID value);
+
+ Address addressFor(unsigned index, RegisterID base = callFrameRegister);
#if USE(JSVALUE32_64)
Address tagFor(unsigned index, RegisterID base = callFrameRegister);
Address payloadFor(unsigned index, RegisterID base = callFrameRegister);
- Address addressFor(unsigned index, RegisterID base = callFrameRegister);
bool getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant);
- bool isOperandConstantImmediateDouble(unsigned src);
void emitLoadTag(unsigned index, RegisterID tag);
void emitLoadPayload(unsigned index, RegisterID payload);
@@ -394,8 +398,6 @@ namespace JSC {
void emitLoad(const JSValue& v, RegisterID tag, RegisterID payload);
void emitLoad(unsigned index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
void emitLoad2(unsigned index1, RegisterID tag1, RegisterID payload1, unsigned index2, RegisterID tag2, RegisterID payload2);
- void emitLoadDouble(unsigned index, FPRegisterID value);
- void emitLoadInt32ToDouble(unsigned index, FPRegisterID value);
void emitStore(unsigned index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
void emitStore(unsigned index, const JSValue constant, RegisterID base = callFrameRegister);
@@ -499,6 +501,7 @@ namespace JSC {
JIT::Jump emitJumpIfNotImmediateInteger(RegisterID);
JIT::Jump emitJumpIfNotImmediateIntegers(RegisterID, RegisterID, RegisterID);
void emitJumpSlowCaseIfNotImmediateInteger(RegisterID);
+ void emitJumpSlowCaseIfNotImmediateNumber(RegisterID);
void emitJumpSlowCaseIfNotImmediateIntegers(RegisterID, RegisterID, RegisterID);
#if !USE(JSVALUE64)
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp
index 3be13cb..fb44386 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITArithmetic.cpp
@@ -1978,9 +1978,11 @@ void JIT::compileBinaryArithOpSlowCase(OpcodeID opcodeID, Vector<SlowCaseEntry>:
addDouble(fpRegT2, fpRegT1);
else if (opcodeID == op_sub)
subDouble(fpRegT2, fpRegT1);
- else {
- ASSERT(opcodeID == op_mul);
+ else if (opcodeID == op_mul)
mulDouble(fpRegT2, fpRegT1);
+ else {
+ ASSERT(opcodeID == op_div);
+ divDouble(fpRegT2, fpRegT1);
}
moveDoubleToPtr(fpRegT1, regT0);
subPtr(tagTypeNumberRegister, regT0);
@@ -2082,6 +2084,103 @@ void JIT::emitSlow_op_mul(Instruction* currentInstruction, Vector<SlowCaseEntry>
compileBinaryArithOpSlowCase(op_mul, iter, result, op1, op2, types);
}
+void JIT::emit_op_div(Instruction* currentInstruction)
+{
+ unsigned dst = currentInstruction[1].u.operand;
+ unsigned op1 = currentInstruction[2].u.operand;
+ unsigned op2 = currentInstruction[3].u.operand;
+ OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
+
+ if (isOperandConstantImmediateDouble(op1)) {
+ emitGetVirtualRegister(op1, regT0);
+ addPtr(tagTypeNumberRegister, regT0);
+ movePtrToDouble(regT0, fpRegT0);
+ } else if (isOperandConstantImmediateInt(op1)) {
+ emitLoadInt32ToDouble(op1, fpRegT0);
+ } else {
+ emitGetVirtualRegister(op1, regT0);
+ if (!types.first().definitelyIsNumber())
+ emitJumpSlowCaseIfNotImmediateNumber(regT0);
+ Jump notInt = emitJumpIfNotImmediateInteger(regT0);
+ convertInt32ToDouble(regT0, fpRegT0);
+ Jump skipDoubleLoad = jump();
+ notInt.link(this);
+ addPtr(tagTypeNumberRegister, regT0);
+ movePtrToDouble(regT0, fpRegT0);
+ skipDoubleLoad.link(this);
+ }
+
+ if (isOperandConstantImmediateDouble(op2)) {
+ emitGetVirtualRegister(op2, regT1);
+ addPtr(tagTypeNumberRegister, regT1);
+ movePtrToDouble(regT1, fpRegT1);
+ } else if (isOperandConstantImmediateInt(op2)) {
+ emitLoadInt32ToDouble(op2, fpRegT1);
+ } else {
+ emitGetVirtualRegister(op2, regT1);
+ if (!types.second().definitelyIsNumber())
+ emitJumpSlowCaseIfNotImmediateNumber(regT1);
+ Jump notInt = emitJumpIfNotImmediateInteger(regT1);
+ convertInt32ToDouble(regT1, fpRegT1);
+ Jump skipDoubleLoad = jump();
+ notInt.link(this);
+ addPtr(tagTypeNumberRegister, regT1);
+ movePtrToDouble(regT1, fpRegT1);
+ skipDoubleLoad.link(this);
+ }
+ divDouble(fpRegT1, fpRegT0);
+
+ JumpList doubleResult;
+ Jump end;
+ bool attemptIntConversion = (!isOperandConstantImmediateInt(op1) || getConstantOperand(op1).asInt32() > 1) && isOperandConstantImmediateInt(op2);
+ if (attemptIntConversion) {
+ m_assembler.cvttsd2si_rr(fpRegT0, regT0);
+ doubleResult.append(branchTest32(Zero, regT0));
+ m_assembler.ucomisd_rr(fpRegT1, fpRegT0);
+
+ doubleResult.append(m_assembler.jne());
+ doubleResult.append(m_assembler.jp());
+ emitFastArithIntToImmNoCheck(regT0, regT0);
+ end = jump();
+ }
+
+ // Double result.
+ doubleResult.link(this);
+ moveDoubleToPtr(fpRegT0, regT0);
+ subPtr(tagTypeNumberRegister, regT0);
+
+ if (attemptIntConversion)
+ end.link(this);
+ emitPutVirtualRegister(dst, regT0);
+}
+
+void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
+{
+ unsigned result = currentInstruction[1].u.operand;
+ unsigned op1 = currentInstruction[2].u.operand;
+ unsigned op2 = currentInstruction[3].u.operand;
+ OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
+ if (types.first().definitelyIsNumber() && types.second().definitelyIsNumber()) {
+#ifndef NDEBUG
+ breakpoint();
+#endif
+ return;
+ }
+ if (!isOperandConstantImmediateDouble(op1) && !isOperandConstantImmediateInt(op1)) {
+ if (!types.first().definitelyIsNumber())
+ linkSlowCase(iter);
+ }
+ if (!isOperandConstantImmediateDouble(op2) && !isOperandConstantImmediateInt(op2)) {
+ if (!types.second().definitelyIsNumber())
+ linkSlowCase(iter);
+ }
+ // There is an extra slow case for (op1 * -N) or (-N * op2), to check for 0 since this should produce a result of -0.
+ JITStubCall stubCall(this, cti_op_div);
+ stubCall.addArgument(op1, regT2);
+ stubCall.addArgument(op2, regT2);
+ stubCall.call(result);
+}
+
void JIT::emit_op_sub(Instruction* currentInstruction)
{
unsigned result = currentInstruction[1].u.operand;
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
index e69e273..f26457a 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITInlineMethods.h
@@ -65,6 +65,11 @@ ALWAYS_INLINE void JIT::emitGetJITStubArg(unsigned argumentNumber, RegisterID ds
peek(dst, argumentStackOffset);
}
+ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(unsigned src)
+{
+ return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isDouble();
+}
+
ALWAYS_INLINE JSValue JIT::getConstantOperand(unsigned src)
{
ASSERT(m_codeBlock->isConstantRegisterIndex(src));
@@ -305,6 +310,11 @@ ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)
#endif
#endif
+inline JIT::Address JIT::addressFor(unsigned index, RegisterID base)
+{
+ return Address(base, (index * sizeof(Register)));
+}
+
#if USE(JSVALUE32_64)
inline JIT::Address JIT::tagFor(unsigned index, RegisterID base)
@@ -317,11 +327,6 @@ inline JIT::Address JIT::payloadFor(unsigned index, RegisterID base)
return Address(base, (index * sizeof(Register)) + OBJECT_OFFSETOF(JSValue, u.asBits.payload));
}
-inline JIT::Address JIT::addressFor(unsigned index, RegisterID base)
-{
- return Address(base, (index * sizeof(Register)));
-}
-
inline void JIT::emitLoadTag(unsigned index, RegisterID tag)
{
RegisterID mappedTag;
@@ -579,11 +584,6 @@ ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(unsigned op1, unsigned op
return false;
}
-ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(unsigned src)
-{
- return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isDouble();
-}
-
/* Deprecated: Please use JITStubCall instead. */
ALWAYS_INLINE void JIT::emitPutJITStubArg(RegisterID tag, RegisterID payload, unsigned argumentNumber)
@@ -732,6 +732,24 @@ ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotImmediateNumber(RegisterID reg)
{
return branchTestPtr(Zero, reg, tagTypeNumberRegister);
}
+
+inline void JIT::emitLoadDouble(unsigned index, FPRegisterID value)
+{
+ if (m_codeBlock->isConstantRegisterIndex(index)) {
+ Register& inConstantPool = m_codeBlock->constantRegister(index);
+ loadDouble(&inConstantPool, value);
+ } else
+ loadDouble(addressFor(index), value);
+}
+
+inline void JIT::emitLoadInt32ToDouble(unsigned index, FPRegisterID value)
+{
+ if (m_codeBlock->isConstantRegisterIndex(index)) {
+ Register& inConstantPool = m_codeBlock->constantRegister(index);
+ convertInt32ToDouble(AbsoluteAddress(&inConstantPool), value);
+ } else
+ convertInt32ToDouble(addressFor(index), value);
+}
#endif
ALWAYS_INLINE JIT::Jump JIT::emitJumpIfImmediateInteger(RegisterID reg)
@@ -769,6 +787,11 @@ ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotImmediateIntegers(RegisterID reg1,
addSlowCase(emitJumpIfNotImmediateIntegers(reg1, reg2, scratch));
}
+ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotImmediateNumber(RegisterID reg)
+{
+ addSlowCase(emitJumpIfNotImmediateNumber(reg));
+}
+
#if !USE(JSVALUE64)
ALWAYS_INLINE void JIT::emitFastArithDeTagImmediate(RegisterID reg)
{
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index 055a536..065b7ea 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -1182,7 +1182,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_method_check)
// for now. For now it performs a check on a special object on the global object only used for this
// purpose. The object is in no way exposed, and as such the check will always pass.
if (slot.slotBase() == baseValue) {
- JIT::patchMethodCallProto(codeBlock, methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject()->methodCallDummy(), STUB_RETURN_ADDRESS);
+ JIT::patchMethodCallProto(codeBlock, methodCallLinkInfo, callee, structure, callFrame->scopeChain()->globalObject->methodCallDummy(), STUB_RETURN_ADDRESS);
return JSValue::encode(result);
}
}
@@ -1738,7 +1738,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_construct_JSConstruct)
if (stackFrame.args[3].jsValue().isObject())
structure = asObject(stackFrame.args[3].jsValue())->inheritorID();
else
- structure = constructor->scope().node()->globalObject()->emptyObjectStructure();
+ structure = constructor->scope().node()->globalObject->emptyObjectStructure();
return new (stackFrame.globalData) JSObject(structure);
}
@@ -2641,7 +2641,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_eval)
Register* newCallFrame = callFrame->registers() + registerOffset;
Register* argv = newCallFrame - RegisterFile::CallFrameHeaderSize - argCount;
JSValue thisValue = argv[0].jsValue();
- JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject();
+ JSGlobalObject* globalObject = callFrame->scopeChain()->globalObject;
if (thisValue == globalObject && funcVal == globalObject->evalFunction()) {
JSValue exceptionValue;
diff --git a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
index 92b1e58..ee4e393 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jsc.cpp
@@ -24,6 +24,7 @@
#include "BytecodeGenerator.h"
#include "Completion.h"
+#include "CurrentTime.h"
#include "InitializeThreading.h"
#include "JSArray.h"
#include "JSFunction.h"
@@ -118,53 +119,23 @@ public:
long getElapsedMS(); // call stop() first
private:
-#if PLATFORM(QT)
- uint m_startTime;
- uint m_stopTime;
-#elif PLATFORM(WIN_OS)
- DWORD m_startTime;
- DWORD m_stopTime;
-#else
- // Windows does not have timeval, disabling this class for now (bug 7399)
- timeval m_startTime;
- timeval m_stopTime;
-#endif
+ double m_startTime;
+ double m_stopTime;
};
void StopWatch::start()
{
-#if PLATFORM(QT)
- QDateTime t = QDateTime::currentDateTime();
- m_startTime = t.toTime_t() * 1000 + t.time().msec();
-#elif PLATFORM(WIN_OS)
- m_startTime = timeGetTime();
-#else
- gettimeofday(&m_startTime, 0);
-#endif
+ m_startTime = currentTime();
}
void StopWatch::stop()
{
-#if PLATFORM(QT)
- QDateTime t = QDateTime::currentDateTime();
- m_stopTime = t.toTime_t() * 1000 + t.time().msec();
-#elif PLATFORM(WIN_OS)
- m_stopTime = timeGetTime();
-#else
- gettimeofday(&m_stopTime, 0);
-#endif
+ m_stopTime = currentTime();
}
long StopWatch::getElapsedMS()
{
-#if PLATFORM(WIN_OS) || PLATFORM(QT)
- return m_stopTime - m_startTime;
-#else
- timeval elapsedTime;
- timersub(&m_stopTime, &m_startTime, &elapsedTime);
-
- return elapsedTime.tv_sec * 1000 + lroundf(elapsedTime.tv_usec / 1000.0f);
-#endif
+ return static_cast<long>((m_stopTime - m_startTime) * 1000);
}
class GlobalObject : public JSGlobalObject {
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp
index d5eb20f..f28b3bd 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/FunctionConstructor.cpp
@@ -92,7 +92,7 @@ JSObject* constructFunction(ExecState* exec, const ArgList& args, const Identifi
return throwError(exec, SyntaxError, errMsg, errLine, source.provider()->asID(), source.provider()->url());
JSGlobalObject* globalObject = exec->lexicalGlobalObject();
- ScopeChain scopeChain(globalObject, globalObject->globalData(), exec->globalThisValue());
+ ScopeChain scopeChain(globalObject, globalObject->globalData(), globalObject, exec->globalThisValue());
return new (exec) JSFunction(exec, function, scopeChain.node());
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
index 101f543..7671c96 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
@@ -1066,26 +1066,4 @@ void JSArray::checkConsistency(ConsistencyCheckType type)
#endif
-JSArray* constructEmptyArray(ExecState* exec)
-{
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure());
-}
-
-JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength)
-{
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), initialLength);
-}
-
-JSArray* constructArray(ExecState* exec, JSValue singleItemValue)
-{
- MarkedArgumentBuffer values;
- values.append(singleItemValue);
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
-}
-
-JSArray* constructArray(ExecState* exec, const ArgList& values)
-{
- return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
-}
-
} // namespace JSC
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h
index 4f2f86a..7d28aab 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.h
@@ -116,11 +116,6 @@ namespace JSC {
JSArray* asArray(JSValue);
- JSArray* constructEmptyArray(ExecState*);
- JSArray* constructEmptyArray(ExecState*, unsigned initialLength);
- JSArray* constructArray(ExecState*, JSValue singleItemValue);
- JSArray* constructArray(ExecState*, const ArgList& values);
-
inline JSArray* asArray(JSCell* cell)
{
ASSERT(cell->inherits(&JSArray::info));
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp
index 8d71ac3..9907a8f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -129,7 +129,7 @@ void JSGlobalObject::init(JSObject* thisValue)
ASSERT(JSLock::currentThreadIsHoldingLock());
d()->globalData = Heap::heap(this)->globalData();
- d()->globalScopeChain = ScopeChain(this, d()->globalData.get(), thisValue);
+ d()->globalScopeChain = ScopeChain(this, d()->globalData.get(), this, thisValue);
JSGlobalObject::globalExec()->init(0, 0, d()->globalScopeChain.node(), CallFrame::noCaller(), 0, 0, 0);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
index 5f7137f..cda07e1 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalObject.h
@@ -22,6 +22,7 @@
#ifndef JSGlobalObject_h
#define JSGlobalObject_h
+#include "JSArray.h"
#include "JSGlobalData.h"
#include "JSVariableObject.h"
#include "NativeFunctionWrapper.h"
@@ -343,14 +344,6 @@ namespace JSC {
return symbolTableGet(propertyName, slot, slotIsWriteable);
}
- inline JSGlobalObject* ScopeChainNode::globalObject() const
- {
- const ScopeChainNode* n = this;
- while (n->next)
- n = n->next;
- return asGlobalObject(n->object);
- }
-
inline JSValue Structure::prototypeForLookup(ExecState* exec) const
{
if (typeInfo().type() == ObjectType)
@@ -405,6 +398,33 @@ namespace JSC {
return globalData().dynamicGlobalObject;
}
+ inline JSObject* constructEmptyObject(ExecState* exec)
+ {
+ return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure());
+ }
+
+ inline JSArray* constructEmptyArray(ExecState* exec)
+ {
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure());
+ }
+
+ inline JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength)
+ {
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), initialLength);
+ }
+
+ inline JSArray* constructArray(ExecState* exec, JSValue singleItemValue)
+ {
+ MarkedArgumentBuffer values;
+ values.append(singleItemValue);
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
+ }
+
+ inline JSArray* constructArray(ExecState* exec, const ArgList& values)
+ {
+ return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), values);
+ }
+
class DynamicGlobalObjectScope : public Noncopyable {
public:
DynamicGlobalObjectScope(CallFrame* callFrame, JSGlobalObject* dynamicGlobalObject)
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp
index 74af4b1..db2a9b2 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp
@@ -513,11 +513,6 @@ void JSObject::allocatePropertyStorage(size_t oldSize, size_t newSize)
allocatePropertyStorageInline(oldSize, newSize);
}
-JSObject* constructEmptyObject(ExecState* exec)
-{
- return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure());
-}
-
bool JSObject::getOwnPropertyDescriptor(ExecState*, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
unsigned attributes = 0;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h
index 3fd1e3c..24b1ad6 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.h
@@ -264,8 +264,6 @@ namespace JSC {
RefPtr<Structure> m_inheritorID;
};
-JSObject* constructEmptyObject(ExecState*);
-
inline JSObject* asObject(JSCell* cell)
{
ASSERT(cell->isObject());
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h
index 5bc85fa..ba00057e0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStack.h
@@ -153,7 +153,7 @@ namespace JSC {
ASSERT(0 == (size % MarkStack::pageSize()));
if (size == m_allocated)
return;
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) || PLATFORM(SYMBIAN)
// We cannot release a part of a region with VirtualFree. To get around this,
// we'll release the entire region and reallocate the size that we want.
releaseStack(m_data, m_allocated);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp
index 43f8b29..8e78ff3 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackPosix.cpp
@@ -29,44 +29,22 @@
#include "MarkStack.h"
#include <unistd.h>
-#if defined (__SYMBIAN32__)
-#include "wtf/FastMalloc.h"
-#include <e32base.h>
-#include <e32std.h>
-#include <e32hal.h>
-#include <hal.h>
-#else
#include <sys/mman.h>
-#endif
namespace JSC {
void MarkStack::initializePagesize()
{
-#if defined (__SYMBIAN32__)
- TInt page_size;
- UserHal::PageSizeInBytes(page_size);
- MarkStack::s_pageSize = page_size;
-#else
MarkStack::s_pageSize = getpagesize();
-#endif
}
void* MarkStack::allocateStack(size_t size)
{
-#if defined (__SYMBIAN32__)
- return fastMalloc(size);
-#else
return mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
-#endif
}
void MarkStack::releaseStack(void* addr, size_t size)
{
-#if defined (__SYMBIAN32__)
- fastFree(addr);
-#else
munmap(addr, size);
-#endif
}
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackSymbian.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackSymbian.cpp
new file mode 100644
index 0000000..a0ce8f6
--- /dev/null
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/MarkStackSymbian.cpp
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "config.h"
+#include "MarkStack.h"
+
+#include <e32hal.h>
+
+namespace JSC {
+
+void MarkStack::initializePagesize()
+{
+ TInt page_size;
+ UserHal::PageSizeInBytes(page_size);
+ MarkStack::s_pageSize = page_size;
+}
+
+void* MarkStack::allocateStack(size_t size)
+{
+ return fastMalloc(size);
+}
+
+void MarkStack::releaseStack(void* addr, size_t size)
+{
+ return fastFree(addr);
+}
+
+}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp
index 960c525..981794b 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.cpp
@@ -36,8 +36,8 @@ void ScopeChainNode::print() const
ScopeChainIterator scopeEnd = end();
for (ScopeChainIterator scopeIter = begin(); scopeIter != scopeEnd; ++scopeIter) {
JSObject* o = *scopeIter;
- PropertyNameArray propertyNames(globalObject()->globalExec());
- o->getPropertyNames(globalObject()->globalExec(), propertyNames);
+ PropertyNameArray propertyNames(globalObject->globalExec());
+ o->getPropertyNames(globalObject->globalExec(), propertyNames);
PropertyNameArray::const_iterator propEnd = propertyNames.end();
fprintf(stderr, "----- [scope %p] -----\n", o);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h b/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h
index c5e16c9..0b15b67 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/ScopeChain.h
@@ -33,14 +33,16 @@ namespace JSC {
class ScopeChainNode : public FastAllocBase {
public:
- ScopeChainNode(ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSObject* globalThis)
+ ScopeChainNode(ScopeChainNode* next, JSObject* object, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis)
: next(next)
, object(object)
, globalData(globalData)
+ , globalObject(globalObject)
, globalThis(globalThis)
, refCount(1)
{
ASSERT(globalData);
+ ASSERT(globalObject);
}
#ifndef NDEBUG
// Due to the number of subtle and timing dependent bugs that have occurred due
@@ -51,6 +53,7 @@ namespace JSC {
next = 0;
object = 0;
globalData = 0;
+ globalObject = 0;
globalThis = 0;
}
#endif
@@ -58,6 +61,7 @@ namespace JSC {
ScopeChainNode* next;
JSObject* object;
JSGlobalData* globalData;
+ JSGlobalObject* globalObject;
JSObject* globalThis;
int refCount;
@@ -82,9 +86,6 @@ namespace JSC {
ScopeChainIterator begin() const;
ScopeChainIterator end() const;
- JSGlobalObject* globalObject() const; // defined in JSGlobalObject.h
- JSObject* globalThisObject() const { return globalThis; }
-
#ifndef NDEBUG
void print() const;
#endif
@@ -93,7 +94,7 @@ namespace JSC {
inline ScopeChainNode* ScopeChainNode::push(JSObject* o)
{
ASSERT(o);
- return new ScopeChainNode(this, o, globalData, globalThis);
+ return new ScopeChainNode(this, o, globalData, globalObject, globalThis);
}
inline ScopeChainNode* ScopeChainNode::pop()
@@ -163,8 +164,8 @@ namespace JSC {
{
}
- ScopeChain(JSObject* o, JSGlobalData* globalData, JSObject* globalThis)
- : m_node(new ScopeChainNode(0, o, globalData, globalThis))
+ ScopeChain(JSObject* o, JSGlobalData* globalData, JSGlobalObject* globalObject, JSObject* globalThis)
+ : m_node(new ScopeChainNode(0, o, globalData, globalObject, globalThis))
{
}
@@ -203,7 +204,7 @@ namespace JSC {
void pop() { m_node = m_node->pop(); }
void clear() { m_node->deref(); m_node = 0; }
- JSGlobalObject* globalObject() const { return m_node->globalObject(); }
+ JSGlobalObject* globalObject() const { return m_node->globalObject; }
void markAggregate(MarkStack&) const;
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
index 30ba6e9..2a056c9 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.cpp
@@ -35,18 +35,10 @@
#if PLATFORM(DARWIN)
#include <mach/mach.h>
-#endif
-
-#if HAVE(SYS_TIME_H)
-#include <sys/time.h>
-#endif
-
-#if PLATFORM(WIN_OS)
+#elif PLATFORM(WIN_OS)
#include <windows.h>
-#endif
-
-#if PLATFORM(QT)
-#include <QDateTime>
+#else
+#include "CurrentTime.h"
#endif
using namespace std;
@@ -75,14 +67,6 @@ static inline unsigned getCPUTime()
time += info.system_time.seconds * 1000 + info.system_time.microseconds / 1000;
return time;
-#elif HAVE(SYS_TIME_H)
- // FIXME: This should probably use getrusage with the RUSAGE_THREAD flag.
- struct timeval tv;
- gettimeofday(&tv, 0);
- return tv.tv_sec * 1000 + tv.tv_usec / 1000;
-#elif PLATFORM(QT)
- QDateTime t = QDateTime::currentDateTime();
- return t.toTime_t() * 1000 + t.time().msec();
#elif PLATFORM(WIN_OS)
union {
FILETIME fileTime;
@@ -97,7 +81,8 @@ static inline unsigned getCPUTime()
return userTime.fileTimeAsLong / 10000 + kernelTime.fileTimeAsLong / 10000;
#else
-#error Platform does not have getCurrentTime function
+ // FIXME: We should return the time the current thread has spent executing.
+ return currentTime() * 1000;
#endif
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
index afb0220..a9472c9 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/FastMalloc.cpp
@@ -2283,6 +2283,10 @@ static void sleep(unsigned seconds)
void TCMalloc_PageHeap::scavengerThread()
{
+#if HAVE(PTHREAD_SETNAME_NP)
+ pthread_setname_np("JavaScriptCore: FastMalloc scavenger");
+#endif
+
while (1) {
if (!shouldContinueScavenging()) {
pthread_mutex_lock(&m_scavengeMutex);
@@ -2388,7 +2392,7 @@ ALWAYS_INLINE void TCMalloc_Central_FreeList::ReleaseToSpans(void* object) {
// The following check is expensive, so it is disabled by default
if (false) {
// Check that object does not occur in list
- int got = 0;
+ unsigned got = 0;
for (void* p = span->objects; p != NULL; p = *((void**) p)) {
ASSERT(p != object);
got++;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h b/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h
index 1fda9c1..165eb41 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/HashCountedSet.h
@@ -49,24 +49,24 @@ namespace WTF {
const_iterator begin() const;
const_iterator end() const;
- iterator find(const ValueType& value);
- const_iterator find(const ValueType& value) const;
- bool contains(const ValueType& value) const;
- unsigned count(const ValueType& value) const;
+ iterator find(const ValueType&);
+ const_iterator find(const ValueType&) const;
+ bool contains(const ValueType&) const;
+ unsigned count(const ValueType&) const;
// increases the count if an equal value is already present
// the return value is a pair of an interator to the new value's location,
// and a bool that is true if an new entry was added
- std::pair<iterator, bool> add(const ValueType &value);
+ std::pair<iterator, bool> add(const ValueType&);
// reduces the count of the value, and removes it if count
// goes down to zero
- void remove(const ValueType& value);
- void remove(iterator it);
+ void remove(const ValueType&);
+ void remove(iterator);
// removes the value, regardless of its count
- void clear(iterator it);
- void clear(const ValueType& value);
+ void removeAll(iterator);
+ void removeAll(const ValueType&);
// clears the whole set
void clear();
@@ -171,13 +171,13 @@ namespace WTF {
}
template<typename Value, typename HashFunctions, typename Traits>
- inline void HashCountedSet<Value, HashFunctions, Traits>::clear(const ValueType& value)
+ inline void HashCountedSet<Value, HashFunctions, Traits>::removeAll(const ValueType& value)
{
- clear(find(value));
+ removeAll(find(value));
}
template<typename Value, typename HashFunctions, typename Traits>
- inline void HashCountedSet<Value, HashFunctions, Traits>::clear(iterator it)
+ inline void HashCountedSet<Value, HashFunctions, Traits>::removeAll(iterator it)
{
if (it == end())
return;
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
index e508f77..576e986 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
@@ -229,8 +229,7 @@
#define PLATFORM_ARM_ARCH(N) (PLATFORM(ARM) && ARM_ARCH_VERSION >= N)
#if defined(arm) \
- || defined(__arm__) \
- || defined(__MARM__)
+ || defined(__arm__)
#define WTF_PLATFORM_ARM 1
#if defined(__ARMEB__)
#define WTF_PLATFORM_BIG_ENDIAN 1
@@ -238,7 +237,8 @@
#define WTF_PLATFORM_MIDDLE_ENDIAN 1
#endif
#define ARM_ARCH_VERSION 3
-#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
+#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || defined(__MARM_ARMV4__) \
+ || defined(_ARMV4I_)
#undef ARM_ARCH_VERSION
#define ARM_ARCH_VERSION 4
#endif
@@ -254,16 +254,20 @@
#undef ARM_ARCH_VERSION
#define ARM_ARCH_VERSION 6
#endif
-#if defined(__ARM_ARCH_7A__) || defined(__ARMV7__)
+#if defined(__ARM_ARCH_7A__)
#undef ARM_ARCH_VERSION
#define ARM_ARCH_VERSION 7
#endif
+/* On ARMv5 and below the natural alignment is required. */
+#if !defined(ARM_REQUIRE_NATURAL_ALIGNMENT) && ARM_ARCH_VERSION <= 5
+#define ARM_REQUIRE_NATURAL_ALIGNMENT 1
+#endif
/* Defines two pseudo-platforms for ARM and Thumb-2 instruction set. */
#if !defined(WTF_PLATFORM_ARM_TRADITIONAL) && !defined(WTF_PLATFORM_ARM_THUMB2)
# if defined(thumb2) || defined(__thumb2__)
# define WTF_PLATFORM_ARM_TRADITIONAL 0
# define WTF_PLATFORM_ARM_THUMB2 1
-# elif PLATFORM_ARM_ARCH(4) || PLATFORM_ARM_ARCH(5)
+# elif PLATFORM_ARM_ARCH(4)
# define WTF_PLATFORM_ARM_TRADITIONAL 1
# define WTF_PLATFORM_ARM_THUMB2 0
# else
@@ -419,7 +423,7 @@
#endif
#define HAVE_READLINE 1
#define HAVE_RUNLOOP_TIMER 1
-#endif // PLATFORM(MAC) && !PLATFORM(IPHONE)
+#endif /* PLATFORM(MAC) && !PLATFORM(IPHONE) */
#if PLATFORM(CHROMIUM) && PLATFORM(DARWIN)
#define WTF_PLATFORM_CF 1
@@ -496,6 +500,7 @@
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
#define HAVE_MADV_FREE_REUSE 1
#define HAVE_MADV_FREE 1
+#define HAVE_PTHREAD_SETNAME_NP 1
#endif
#if PLATFORM(IPHONE)
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h b/src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h
index 74c02f3..b8fce7e 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/TCSpinLock.h
@@ -215,6 +215,13 @@ struct TCMalloc_SpinLock {
inline void Unlock() {
if (pthread_mutex_unlock(&private_lock_) != 0) CRASH();
}
+ bool IsHeld() {
+ if (pthread_mutex_trylock(&private_lock_))
+ return true;
+
+ Unlock();
+ return false;
+ }
};
#define SPINLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp
index c241bd9..e4fb419 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ThreadingPthreads.cpp
@@ -186,7 +186,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
void setThreadNameInternal(const char* threadName)
{
-#if PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
+#if HAVE(PTHREAD_SETNAME_NP)
pthread_setname_np(threadName);
#else
UNUSED_PARAM(threadName);
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
index 4390b5b..d777424 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexJIT.cpp
@@ -549,11 +549,11 @@ class RegexGenerator : private MacroAssembler {
}
if (mask) {
- load32(BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), character);
+ load32WithUnalignedHalfWords(BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), character);
or32(Imm32(mask), character);
state.jumpToBacktrack(branch32(NotEqual, character, Imm32(chPair | mask)), this);
} else
- state.jumpToBacktrack(branch32(NotEqual, BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), Imm32(chPair)), this);
+ state.jumpToBacktrack(branch32WithUnalignedHalfWords(NotEqual, BaseIndex(input, index, TimesTwo, state.inputOffset() * sizeof(UChar)), Imm32(chPair)), this);
}
void generatePatternCharacterFixed(TermGenerationState& state)
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index e13219b..cbec79c 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,8 +4,8 @@ This is a snapshot of the Qt port of WebKit from
The commit imported was from the
- qtwebkit-4.6-snapshot-24092009 branch/tag
+ qtwebkit-4.6-snapshot-29092009-2 branch/tag
and has the sha1 checksum
- 75c44947a340d74a9e0098a3dfffabce0c9512ef
+ 999c28aa9f6ad9e0d6a26a794220e1cb45408a97
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 5d83c7b..036fb5e 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,1293 @@
+2009-09-27 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29760
+ Implement CSSOM Range.getClientRects/getBoundingClientRect
+
+ Tests: fast/dom/Range/getBoundingClientRect-getClientRects-relative-to-viewport.html
+ fast/dom/Range/getBoundingClientRect.html
+ fast/dom/Range/getClientRects.html
+
+ * dom/Range.cpp:
+ (WebCore::Range::getClientRects):
+ (WebCore::Range::getBoundingClientRect):
+ (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoom):
+ (WebCore::Range::getBorderAndTextQuads):
+ * dom/Range.h:
+ * dom/Range.idl:
+ Implement Range.getClientRects/getBoundingClientRect.
+
+ * dom/Element.cpp:
+ * rendering/RenderObject.h:
+ (WebCore::adjustForAbsoluteZoom):
+ (WebCore::adjustIntRectForAbsoluteZoom):
+ (WebCore::adjustFloatPointForAbsoluteZoom):
+ (WebCore::adjustFloatQuadForAbsoluteZoom):
+ Move point/quad adjustment methods from Element.cpp to RenderObject.h
+ so that Range.cpp can use them as well.
+
+2009-09-27 Simon Hausmann <hausmann@webkit.org>
+
+ Unreviewed fix for WebInspector with Qt build.
+
+ Simply re-generate the Qt resource file by running
+ WebKitTools/Scripts/generate-qt-inspector-resource
+
+ * inspector/front-end/WebKit.qrc:
+
+2009-09-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by nobody (trivial ChangeLog fix).
+
+ Restore WebCore/ChangeLog truncated in r48778.
+
+2009-09-27 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: DOM store is being unbound twice, leading to assertion failure.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29770
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::didOpenDatabase):
+ (WebCore::InspectorController::didUseDOMStorage):
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::unbind):
+
+2009-09-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not track DOM changes while inspector window is closed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29769
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+ (WebCore::InspectorController::populateScriptObjects):
+ (WebCore::InspectorController::resetScriptObjects):
+ (WebCore::InspectorController::didCommitLoad):
+ * inspector/InspectorController.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::setDocument):
+ * inspector/InspectorDOMAgent.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::dispatchWindowObjectAvailable):
+ * page/android/InspectorControllerAndroid.cpp:
+ (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+
+2009-09-26 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: [REGRESSION] Double Clicking Resources Fails to Open in New Window
+
+ https://bugs.webkit.org/show_bug.cgi?id=29762
+
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript.setStyleText):
+ (InjectedScript.openInInspectedWindow):
+ * inspector/front-end/InjectedScriptAccess.js:
+ * inspector/front-end/ResourcesPanel.js:
+ (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
+
+2009-09-26 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
+
+ Reviewed by Darin Adler.
+
+ Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
+
+ * DerivedSources.make: Moved Platform.h check for
+ ENABLE_ORIENTATION_EVENTS into Mac-only section and added
+ default of ENABLE_ORIENTATION_EVENTS = 0 to non-Mac section.
+ Added ifndef test to make it possible to override both
+ ENABLE_DASHBOARD_SUPPORT and ENABLE_ORIENTATION_EVENTS external
+ to the makefile. Moved addition of ENABLE_ORIENTATION_EVENTS to
+ ADDITIONAL_IDL_DEFINES to common section.
+ * GNUmakefile.am: Added support for ENABLE_ORIENTATION_EVENTS if
+ it is ever used.
+ * WebCore.pro: Ditto.
+
+2009-09-26 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Kilzer.
+
+ Move placeholder-related code to HTMLTextFormControlElement from
+ HTMLInputElement, WMLInputElement, InputElement, and
+ HTMLTextAreaElement.
+ https://bugs.webkit.org/show_bug.cgi?id=28703
+
+ * dom/InputElement.cpp:
+ (WebCore::InputElement::dispatchFocusEvent):
+ (WebCore::InputElement::dispatchBlurEvent):
+ (WebCore::InputElement::setValueFromRenderer):
+ * dom/InputElement.h:
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement):
+ (WebCore::HTMLTextFormControlElement::~HTMLTextFormControlElement):
+ (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
+ (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
+ (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
+ (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
+ * html/HTMLFormControlElement.h:
+ (WebCore::HTMLTextFormControlElement::handleFocusEvent):
+ (WebCore::HTMLTextFormControlElement::handleBlurEvent):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::HTMLInputElement):
+ (WebCore::HTMLInputElement::handleFocusEvent):
+ (WebCore::HTMLInputElement::handleBlurEvent):
+ (WebCore::HTMLInputElement::parseMappedAttribute):
+ (WebCore::HTMLInputElement::createRenderer):
+ (WebCore::HTMLInputElement::setValue):
+ (WebCore::HTMLInputElement::setValueFromRenderer):
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::supportsPlaceholder):
+ (WebCore::HTMLInputElement::isEmptyValue):
+ * html/HTMLIsIndexElement.cpp:
+ (WebCore::HTMLIsIndexElement::parseMappedAttribute):
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
+ (WebCore::HTMLTextAreaElement::createRenderer):
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::supportsPlaceholder):
+ (WebCore::HTMLTextAreaElement::isEmptyValue):
+ * rendering/RenderTextControl.cpp:
+ (WebCore::RenderTextControl::RenderTextControl):
+ * rendering/RenderTextControl.h:
+ * rendering/RenderTextControlMultiLine.cpp:
+ (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
+ * rendering/RenderTextControlMultiLine.h:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
+ (WebCore::RenderTextControlSingleLine::updateFromElement):
+ * rendering/RenderTextControlSingleLine.h:
+ * wml/WMLInputElement.cpp:
+ (WebCore::WMLInputElement::setValue):
+ (WebCore::WMLInputElement::createRenderer):
+ * wml/WMLInputElement.h:
+
+2009-09-26 Shu Chang <Chang.Shu@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Optimize the code so only the text from start to end is scanned.
+ https://bugs.webkit.org/show_bug.cgi?id=29092
+
+ On a platform with webkit+Qt+Symbian, the parsing time for a 600K text
+ file improved from 400ms to 40ms (10x faster).
+
+ * dom/Text.cpp:
+ (WebCore::Text::createWithLengthLimit):
+
+2009-09-26 Xiaomei Ji <xji@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ This Patch fixes [chromium] the drop-down is always left-aligned even
+ for RTL element.
+ https://bugs.webkit.org/show_bug.cgi?id=29612
+
+ For auto-complete, the items in drop-down should be right-aligned if
+ the directionality of <input> field is RTL.
+ For <select><option>, the items in drop-down should be right-aligned
+ if the directionality of <select> is RTL.
+
+ No automatic test is possible. Manual tests are added.
+
+ * manual-tests/autofill_alignment.html: Added.
+ * manual-tests/select_alignment.html: Added.
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::paintRow): Adjust the starting x-axis of text to
+ be paint if it should be right-aligned.
+
+2009-09-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION (r48775) FontList.plist written by TOT WebKit causes Safari 4
+ to crash on launch
+ https://bugs.webkit.org/show_bug.cgi?id=29759
+
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::writeFontDatabaseToPlist): Reverted to saving the CG font DB
+ property list at the root of FontList.plist, but with an additional
+ key for the last value of the Fonts registry key.
+ (WebCore::populateFontDatabase): Pass the FontList.plist in its entirety
+ to populatFontDatabaseFromPlist.
+
+2009-09-25 Kevin Ollivier <kevino@theolliviers.com>
+
+ Build fix. Adding missing header files.
+
+ * bindings/js/JSNamedNodeMapCustom.cpp:
+
+2009-09-25 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
+
+ Reviewed by Darin Adler.
+
+ * DerivedSources.make: Move tests for ENABLE_CONTEXT_MENUS,
+ ENABLE_DRAG_SUPPORT and ENABLE_INSPECTOR into Mac-only section.
+
+2009-09-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Load blocks during unload should not affect targeted loads
+ https://bugs.webkit.org/show_bug.cgi?id=29747
+
+ Move the check of the unload state after checking for targeted links.
+
+ Test: fast/loader/unload-hyperlink-targeted.html
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::loadURL):
+
+2009-09-25 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Add initial V8 bindings for WebGL
+ https://bugs.webkit.org/show_bug.cgi?id=29664
+
+ * WebCore.gypi:
+ * bindings/scripts/CodeGeneratorV8.pm:
+ * bindings/v8/DOMObjectsInclude.h:
+ * bindings/v8/DerivedSourcesAllInOne.cpp:
+ * bindings/v8/V8DOMWrapper.cpp:
+ (WebCore::V8DOMWrapper::getTemplate):
+ * bindings/v8/V8Index.cpp:
+ * bindings/v8/V8Index.h:
+ * bindings/v8/custom/V8CanvasArrayBufferCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8CanvasArrayCustom.h: Added.
+ (WebCore::constructCanvasArray):
+ * bindings/v8/custom/V8CanvasByteArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasFloatArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasIntArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp: Added.
+ (WebCore::jsArrayToFloatArray):
+ (WebCore::jsArrayToIntArray):
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::):
+ (WebCore::vertexAttribAndUniformHelperf):
+ (WebCore::uniformHelperi):
+ (WebCore::uniformMatrixHelper):
+ * bindings/v8/custom/V8CanvasShortArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp: Added.
+ (WebCore::CALLBACK_FUNC_DECL):
+ (WebCore::INDEXED_PROPERTY_GETTER):
+ (WebCore::INDEXED_PROPERTY_SETTER):
+ * bindings/v8/custom/V8CustomBinding.h:
+ * bindings/v8/custom/V8DocumentCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
+ (WebCore::CALLBACK_FUNC_DECL):
+ * platform/graphics/GraphicsContext3D.h:
+
+2009-09-25 Jeremy Orlow <jorlow@chromium.org>
+
+ This is breaking Chromium try bots, so I'm counting this as a build fix.
+
+ Add more svn:ignore exceptions. On different platforms, these files are
+ generated with different case for WebCore.
+
+ * WebCore.gyp: Changed property svn:ignore.
+
+2009-09-25 Alexey Proskuryakov <ap@apple.com>
+
+ Reverting r48767, as it broke Windows build in a non-trivial way.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ (WebCore::JSEventListener::jsFunction):
+ (WebCore::JSEventListener::markJSFunction):
+ (WebCore::JSEventListener::handleEvent):
+ (WebCore::JSEventListener::reportError):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::create):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSLazyEventListener.cpp:
+ (WebCore::JSLazyEventListener::JSLazyEventListener):
+ (WebCore::JSLazyEventListener::jsFunction):
+ (WebCore::JSLazyEventListener::parseCode):
+ * bindings/js/JSLazyEventListener.h:
+ (WebCore::JSLazyEventListener::create):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/js/ScriptEventListener.cpp:
+ (WebCore::createAttributeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventListener.h:
+ (WebCore::EventListener::reportError):
+ (WebCore::EventListener::jsFunction):
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+
+2009-09-24 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add a gyp variable to allow building a debug webcore without debug
+ symbols. This allows for faster compile, link, and gdb times.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29721
+
+ No new tests, build config change.
+
+ * WebCore.gyp/WebCore.gyp:
+
+2009-09-25 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Declare RegisteredEventListener as a class instead of a struct.
+ This fixes a warning in the Chromium build.
+
+ * dom/RegisteredEventListener.h:
+
+2009-09-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ WebCore part of
+ <rdar://problem/7211635> 2 byte characters are displayed as garbaged
+ <rdar://problem/7212626> garbled/gibberish text (off-by-one)
+
+ When the Windows Fonts directory contains more than one font file for a
+ given font name, which of the fonts gets assigned to the name in the
+ Core Graphics font database was determined arbitrarily and did not
+ always match the font GDI used for the same font name. The mismatch
+ caused character-to-glyph mapping to use one font and glyph rendering to
+ use another.
+
+ The fix is to update the Core Graphics font database from the registry
+ entries (that reflect the name-to-font mapping that GDI uses) after
+ populating it with the result of scanning the Fonts directory. As a
+ consequence, the directory needs to be scanned at startup every time the
+ registry key changes, so the last value of the registry key is kept
+ in the property list on disk so that it could be compared to the current
+ value on startup.
+
+ * platform/graphics/win/FontDatabase.cpp:
+ (WebCore::populateFontDatabaseFromPlist): Now takes a property list as
+ a parameter and avoids round-tripping through XML by calling
+ wkAddFontsFromPlist() instead of wkAddFontsFromPlistRepresentation().
+ (WebCore::fontFilenamesFromRegistryKey):
+ (WebCore::cgFontDBKey):
+ (WebCore::writeFontDatabaseToPlist): Now takes the CG font DB property
+ list and a property list with the font filenames from the registry and
+ writes a dictionary with those property lists as values.
+ (WebCore::fontFilenamesFromRegistry): Added. Returns an array with the
+ values in the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
+ registry key.
+ (WebCore::populateFontDatabase): Changed to read the contents of the
+ Fonts registry key and compare it with the last-saved value from the
+ property list, and to call wkAddFontsFromRegistry() after populating the
+ CG font DB from the file system. Uses wkCreateFontsPlist() instead of
+ wkCreateFontsPlistRepresentation() to avoid round-tripping through XML.
+
+2009-09-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Inlined some object creation code, including lexicalGlobalObject access
+ https://bugs.webkit.org/show_bug.cgi?id=29750
+
+ * bindings/js/JSInspectorBackendCustom.cpp:
+ (WebCore::JSInspectorBackend::currentCallFrame):
+ * inspector/JavaScriptDebugServer.cpp:
+ (WebCore::JavaScriptDebugServer::hasBreakpoint): Updated for JavaScriptCore
+ API changes.
+
+2009-09-25 Dave Hyatt <hyatt@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24399
+ Make @import work in user stylesheets. The first bug was that the URL wasn't being set on the
+ user sheets themselves, so relative @import URLs couldn't resolve properly. The second bug
+ was that the loads would be denied. This is fixed by using the requestUserCSSStyleSheet method
+ instead of the normal request method. In order to know when to do this, CSSStyleSheets now have
+ a propagated boolean, m_isUserStyleSheet, that lets them know if they are user stylesheets or not.
+
+ * css/CSSImportRule.cpp:
+ (WebCore::CSSImportRule::insertedIntoParent):
+ * css/CSSStyleSheet.cpp:
+ (WebCore::CSSStyleSheet::CSSStyleSheet):
+ * css/CSSStyleSheet.h:
+ (WebCore::CSSStyleSheet::setIsUserStyleSheet):
+ (WebCore::CSSStyleSheet::isUserStyleSheet):
+ * dom/Document.cpp:
+ (WebCore::Document::pageUserSheet):
+ (WebCore::Document::pageGroupUserSheets):
+
+2009-09-25 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Crash with hardware accelerated rotation of a PDF image in a data URL
+ <rdar://problem/7250378>
+
+ PDF images don't return a color space from CGImageGetColorSpace(),
+ so we need to null-check the return value before use.
+
+ Test: compositing/color-matching/pdf-image-match.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::GraphicsLayerCA::setContentsToImage):
+
+2009-09-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoffrey Garen.
+
+ Null-deref when first access to an Attr node is after its Element is destroyed
+ https://bugs.webkit.org/show_bug.cgi?id=29748
+
+ Test: fast/dom/Attr/access-after-element-destruction.html
+
+ * bindings/js/JSAttrCustom.cpp:
+ (WebCore::JSAttr::markChildren): Added. Keeps the ownerElement alive as
+ long as the Attr is alive.
+
+ * bindings/js/JSNamedNodeMapCustom.cpp:
+ (WebCore::JSNamedNodeMap::markChildren): Added. Keeps the Element alive as
+ long as the NamedNodeMap is alive.
+
+ * dom/Attr.idl: Added CustomMarkFunction attribute.
+
+ * dom/NamedAttrMap.cpp:
+ (WebCore::NamedNodeMap::getAttributeItem): Tweaked formatting.
+ (WebCore::NamedNodeMap::detachFromElement): Call clearAttributes so we don't
+ have attributes hanging around that might need an Attr node created; that way
+ we won't crash with a null-dereference trying to deal with one of them. This
+ can't happen when working with JavaScript since the Element will be kept
+ alive due to the change above.
+ (WebCore::NamedNodeMap::addAttribute): Fix function name in comment.
+ (WebCore::NamedNodeMap::removeAttribute): Removed unneeded "+ 1" and added
+ missing braces.
+
+ * dom/NamedAttrMap.h: Made the element function public so it can be used by
+ the JavaScript binding to keep the Element alive.
+
+ * dom/NamedNodeMap.idl: Added CustomMarkFunction attribute.
+
+2009-09-24 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Darin Adler and Sam Weinig.
+
+ Onclick not fired for an element copied with cloneContents() or cloneNode()
+ https://bugs.webkit.org/show_bug.cgi?id=25130
+
+ The change here is that JS event listeners don't keep a reference to a global object from
+ where they were created, and instead take it as a parameter when parsing source code. Also,
+ the listener creation won't fail just because it happens for an element in a frameless
+ document.
+ Thus, moving nodes between documents no longer results in having incorrect registered
+ lazy event listeners on them.
+
+ Tests: fast/events/attribute-listener-cloned-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-cloned-from-frameless-doc-context.html
+ fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
+ fast/events/attribute-listener-extracted-from-frameless-doc-context-2.html
+ fast/events/attribute-listener-extracted-from-frameless-doc-context.html
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener): Don't take a reference to JSDOMGlobalObject.
+ (WebCore::JSEventListener::jsFunction): Take ScriptExecutionContext as a parameter for
+ getting to JSDOMGlobalObject. It's not used in base class, but is in JSLazyEventListner.
+ (WebCore::JSEventListener::markJSFunction): Don't mark the global object.
+ (WebCore::JSEventListener::handleEvent): Get global object from ScriptExecutionContext.
+ (WebCore::JSEventListener::reportError): Ditto.
+
+ * bindings/js/JSEventListener.h: (WebCore::JSEventListener::create): Don't keep a reference
+ to JSDOMGlobalObject.
+
+ * bindings/js/JSLazyEventListener.cpp: (WebCore::JSLazyEventListener::parseCode): Listener
+ creation was split between this function and ScriptEventListener; moved it here, as JS
+ global object can be different now.
+
+ * bindings/js/JSLazyEventListener.h: (WebCore::JSLazyEventListener::create): Keep source URL,
+ which can not be determined at parsing time.
+
+ * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): Moved code
+ for listener creation to JSLazyEventListener. XSSAuditor code remains here, because tests
+ expect that errors are logged at document parsing time, and because I don't know what other
+ side effects moving it vould have.
+
+ * dom/EventListener.h: handleEvent() and reportError() now take ScriptExecutionContext,
+ because JSC needs a global context here.
+
+ * bindings/js/JSAbstractWorkerCustom.cpp:
+ (WebCore::JSAbstractWorker::addEventListener):
+ (WebCore::JSAbstractWorker::removeEventListener):
+ * bindings/js/JSDOMApplicationCacheCustom.cpp:
+ (WebCore::JSDOMApplicationCache::addEventListener):
+ (WebCore::JSDOMApplicationCache::removeEventListener):
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::addEventListener):
+ (WebCore::JSDOMWindow::removeEventListener):
+ * bindings/js/JSEventSourceCustom.cpp:
+ (WebCore::JSEventSource::addEventListener):
+ (WebCore::JSEventSource::removeEventListener):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::JSMessagePort::addEventListener):
+ (WebCore::JSMessagePort::removeEventListener):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::addEventListener):
+ (WebCore::JSNode::removeEventListener):
+ * bindings/js/JSSVGElementInstanceCustom.cpp:
+ (WebCore::JSSVGElementInstance::addEventListener):
+ (WebCore::JSSVGElementInstance::removeEventListener):
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::addEventListener):
+ (WebCore::JSWorkerContext::removeEventListener):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::addEventListener):
+ (WebCore::JSXMLHttpRequest::removeEventListener):
+ * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
+ (WebCore::JSXMLHttpRequestUpload::addEventListener):
+ (WebCore::JSXMLHttpRequestUpload::removeEventListener):
+ * bindings/objc/ObjCEventListener.h:
+ * bindings/objc/ObjCEventListener.mm:
+ (WebCore::ObjCEventListener::handleEvent):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ * dom/EventTarget.cpp:
+ (WebCore::EventTarget::fireEventListeners):
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::handleEvent):
+ * inspector/InspectorDOMAgent.h:
+ * inspector/InspectorDOMStorageResource.cpp:
+ (WebCore::InspectorDOMStorageResource::handleEvent):
+ * inspector/InspectorDOMStorageResource.h:
+ * loader/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ * svg/animation/SVGSMILElement.cpp:
+ (WebCore::ConditionEventListener::handleEvent):
+ * workers/WorkerContext.cpp:
+ (WebCore::WorkerContext::reportException):
+ Don't pass global object to JSEventListener::create(), which no longer needs it.
+ Note that some of these functions still have an early return for null global object, which
+ can probably be removed in a later patch.
+ Pass ScriptExecutionContext to EventListener methods that now need it.
+
+2009-09-25 Enrica Casucci <enrica@apple.com>
+
+ Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29740
+ <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
+
+ Change the way style is preserved when inserting a new paragraph.
+ The original code handled insertion at the beginning and at the end of a paragraph as special
+ cases. The newly created paragraph contained a set of nodes generated starting from the
+ computed style of the insertion node. This approach has two problems:
+ 1. if the insertion node has a non opaque background color and one of the parent element did have
+ a solid background color the new paragraph did not have the element with the solid color in the tree.
+ 2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
+ background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
+ The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
+ paragraph where the insertion point is.
+
+ Test: editing/inserting/insert-bg-font.html
+
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
+ between the insert node and the outer block.
+ (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
+ in the new paragraph the same element hierarchy present in the starting paragraph.
+ (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
+ in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
+ at the end of the paragraph to use the new methods instead of applying the calculated style.
+ * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
+
+2009-09-25 Patrick Mueller <Patrick_Mueller@us.ibm.com>
+
+ Reviewed by Timothy Hatcher.
+
+ Content-type parameters not taken into account when building form-data
+ https://bugs.webkit.org/show_bug.cgi?id=28970
+
+ existing manual test case extended with new tests
+
+ * English.lproj/localizedStrings.js:
+ * inspector/front-end/ResourceView.js:
+ (WebInspector.ResourceView.prototype._refreshFormData):
+ (WebInspector.ResourceView.prototype._refreshParms):
+ * manual-tests/inspector/display-form-data.html:
+
+2009-09-25 Yuan Song <song.yuan@ericsson.com>
+
+ Reviewed by Darin Adler.
+
+ https://bugs.webkit.org/show_bug.cgi?id=14566
+
+ Raise SECURITY_ERR exception if an attempt is made to change document.domain to an invalid value.
+
+ Test: fast/js/invalid-domain-change-throws-exception.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::setDomain):
+ * dom/Document.h:
+ * dom/Document.idl:
+
+2009-09-25 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Teach ScheduledAction::execute about isolated worlds
+ https://bugs.webkit.org/show_bug.cgi?id=27703
+
+ When setTimeout is called with a string argument in an isolated
+ world, we now compile the string in the isolated world.
+
+ Last time we tried this change, we got a lot of crashes. This
+ time we're using a fresh local handle as our context to avoid
+ trouble if the peristent handle gets disposed before we leave
+ the context.
+
+ Test: fast/dom/timer-clear-interval-in-handler-and-generate-error.html
+
+ * bindings/v8/ScheduledAction.cpp:
+ (WebCore::ScheduledAction::execute):
+
+2009-09-25 Paul Godavari <paul@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Fix a regression in Mac Chromium popup menus, where the user's
+ selection was ignored and the popup became unresponsive.
+ https://bugs.webkit.org/show_bug.cgi?id=29726
+
+ The fix is to notify the popup's client that the popup was hidden,
+ even if the popup has no parent.
+
+ * platform/chromium/PopupMenuChromium.cpp:
+ (WebCore::PopupListBox::hidePopup):
+
+2009-09-25 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Enable Pasteboard::writePlainText for Chromium and fix code style nits.
+ https://bugs.webkit.org/show_bug.cgi?id=29734
+
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writePlainText):
+
+2009-09-25 Yongjun Zhang <yongjun.zhang@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28876
+ [Qt] reduce peak memory consumption of text decoding.
+
+ Chop large input buffer into small buffers to reduce peak memory
+ during decoding.
+
+ * platform/text/qt/TextCodecQt.cpp:
+ (WebCore::TextCodecQt::decode):
+
+2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Add a mechanism for automatically halting plug-ins.
+
+ Reviewed by Oliver Hunt and Alice Liu.
+
+ * GNUmakefile.am:
+
+ * WebCore.base.exp:
+ Update export of Page constructor.
+
+ * WebCore.gypi:
+
+ * WebCore.pro:
+
+ * WebCore.vcproj/WebCore.vcproj:
+ Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
+ HaltablePlugin.h.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Add files to Mac project.
+
+ * loader/EmptyClients.h:
+ Added an empty PluginHalterClient.
+ (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
+ Return false.
+
+ * page/PluginHalter.cpp: Added.
+ (WebCore::PluginHalter::PluginHalter):
+ (WebCore::PluginHalter::didStartPlugin):
+ Add the object to the plug-in set. If this is the only item in the set,
+ set m_oldestStartTime to this object's time, and start the timer.
+ (WebCore::PluginHalter::didStopPlugin):
+ Remove the plug-in from the set.
+ (WebCore::PluginHalter::timerFired):
+ Find the cut-off time as the current time minus the allowed run time;
+ plug-ins older than this may be halted. Iterate over the plug-ins. Find
+ the object with the oldest start time that is too young to be halted;
+ we'll use its start time to set the timer's next fire time. For all
+ plug-ins that are candidates to be halted, call the
+ PluginHalterClient's shouldHaltPlugin(). If this function returns true,
+ call the plug-in's halt() function. Remove these objects from the set
+ of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
+ (WebCore::PluginHalter::startTimerIfNecessary):
+ If the timer is set to fire, or the set of tracked plug-ins is empty,
+ return early. Set the timer to fire after the oldest plug-in has run
+ for the allowed run time.
+
+ * page/PluginHalter.h: Added.
+ (WebCore::PluginHalter::setPluginAllowedRunTime):
+
+ * page/PluginHalterClient.h: Added.
+ (WebCore::PluginHalterClient::~PluginHalterClient):
+
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
+ to create the PluginHalter if necessary.
+ (WebCore::Page::pluginHalterEnabledStateChanged):
+ If plug-in halting is enabled, create the PluginHalter. If it is
+ disabled, clear it.
+ (WebCore::Page::pluginAllowedRunTimeChanged):
+ If there is a plug-in halter, call its setPluginAllowedRunTime().
+ (WebCore::Page::didStartPlugin):
+ If there is a plug-in halter, call its didStartPlugin().
+ (WebCore::Page::didStopPlugin):
+ If there is a plug-in halter, call its didStopPlugin().
+
+ * page/Page.h:
+ Add a parameter to the Page constructor for the PluginHalterClient.
+ Added declarations for didStartPlugin() and didStopPlugin(), which are
+ called when HaltablePlugins are added to or removed from the page. Adds
+ pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
+ notify the Page when these settings are changed. Added members to hold
+ the PluginHalter and the PluginHalterClient.
+
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setPluginHalterEnabled):
+ If the enabled state has changed, call the Page's
+ pluginHalterEnabledStateChanged().
+ (WebCore::Settings::setPluginAllowedRunTime):
+ Call the Page's pluginAllowedRunTimeChanged().
+
+ * page/Settings.h:
+ (WebCore::Settings::pluginHalterEnabled):
+ (WebCore::Settings::pluginAllowedRunTime):
+
+ * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
+ can be automatically halted.
+ (WebCore::HaltablePlugin::~HaltablePlugin):
+
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged):
+ Pass a dummy PluginHalterClient.
+
+2009-09-24 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ REGRESSION: webkit-transform scale no longer works properly in nightly build
+ https://bugs.webkit.org/show_bug.cgi?id=29730
+
+ When the initial or final state of a scale animation does not specify a transform,
+ use a default scale of 1, rather than zero.
+
+ Test: compositing/transitions/scale-transition-no-start.html
+
+ * platform/graphics/mac/GraphicsLayerCA.mm:
+ (WebCore::getTransformFunctionValue):
+
+2009-09-24 John Gregg <johnnyg@google.com>
+
+ Reviewed by Eric Seidel.
+
+ isEnabled switch for notifications (experimental) in Page Settings
+ https://bugs.webkit.org/show_bug.cgi?id=28930
+
+ Adds a run-time flag in Settings object that controls whether
+ to expose desktop notifications.
+
+ No new test, but test code also modified to set this preference.
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings):
+ (WebCore::Settings::setExperimentalNotificationsEnabled):
+ * page/Settings.h:
+ (WebCore::Settings::experimentalNotificationsEnabled):
+
+2009-09-24 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Fix <rdar://problem/7162000> Crash while trying to
+ calculate the horizontal position of image
+
+ Test: fast/inline-block/relative-positioned-rtl-crash.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::calcAbsoluteHorizontalReplaced): Corrected an
+ isInline() test to isRenderInline(). This is similar to r41259.
+
+2009-09-24 Jessie Berlin <jberlin@webkit.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Fix expanding profile call stacks being broken after sorting.
+ https://bugs.webkit.org/show_bug.cgi?id=26423
+
+ * inspector/front-end/ProfileDataGridTree.js:
+ (WebInspector.ProfileDataGridNode.prototype.sort):
+ Set shouldRefreshChildren to true on collapsed nodes with children so that expanding it
+ causes the children to be placed in the right positions.
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Stephanie Lewis.
+
+ Fixed sudden termination console spew due to too many calls to
+ enableSuddenTermination.
+
+ <rdar://problem/7063125> 10A410: Safari logging enableSuddenTermination errors
+
+ * page/DOMWindow.cpp:
+ (WebCore::removeUnloadEventListener):
+ (WebCore::removeAllUnloadEventListeners):
+ (WebCore::removeBeforeUnloadEventListener):
+ (WebCore::removeAllBeforeUnloadEventListeners): Only
+ enableSuddenTermination if the set of listeners is empty *and* this
+ window was in the set. Otherwise, a no-op will cause us to enableSuddenTermination.
+
+2009-09-24 Carol Szabo <carol.szabo@nokia.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebKit returns "" instead of null when getting
+ inexistent, forbidden or invalidly named headers.
+ https://bugs.webkit.org/show_bug.cgi?id=29140
+
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::getResponseHeader):
+ Changed to return null as it should according to the spec.
+
+2009-09-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add GYP generated files to svn:ignore
+ https://bugs.webkit.org/show_bug.cgi?id=29724
+
+ Adding the following files to the svn:ignore list (all in the
+ WebCore/WebCore.gyp directory)
+
+ WebCore.xcodeproj
+ WebCore.sln
+ WebCore.vcproj
+ WebCore_Debug.rules
+ WebCore_Release.rules
+ WebCore_Release - no tcmalloc.rules
+ WebCore_Purify.rules
+ WebCore.mk
+ WebCore_Debug_rules.mk
+ WebCore_Release_rules.mk
+ WebCore_Release - no tcmalloc_rules.mk
+ WebCore_Purify_rules.mk
+ WebCore.scons
+ WebCore_main.scons
+
+ * WebCore.gyp: Changed property svn:ignore.
+
+2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Unreviewed. Mac build fix.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
+ remove unused parameter from function signature;
+
+2009-09-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Oliver Hunt.
+
+ Implement correct horizontal scrollbar behavior for GTK+ also on
+ styled scrollbars.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29348
+ [Gtk] Scrollwheel on horizontal scrollbars should slide horizontally
+
+ Test: platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleWheelEvent): on GTK+, when using the
+ wheel with the pointer on the horizontal scrollbar, scroll
+ horizontally;
+ * platform/PlatformWheelEvent.h:
+ * platform/gtk/WheelEventGtk.cpp:
+ (WebCore::PlatformWheelEvent::swapOrientation): allow adding a
+ vertical scroll to the horizontal one;
+
+2009-09-24 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ StorageNamespace::storageArea() should take in a PassRefPtr<StorageOrigin>
+ https://bugs.webkit.org/show_bug.cgi?id=29290
+
+ Modified StorageNamespace::storageArea() to take in a PassRefPtr<StorageOrigin>
+ per http://webkit.org/coding/RefPtr.html
+
+ No behavior change, so no tests.
+
+ * storage/StorageNamespace.h:
+ * storage/StorageNamespaceImpl.cpp:
+ (WebCore::StorageNamespaceImpl::storageArea):
+ * storage/StorageNamespaceImpl.h:
+
+2009-09-24 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Added back enable/disableSuddenTermination() functionality I accidentally
+ removed in my last patch.
+
+ * page/DOMWindow.cpp:
+ (WebCore::addUnloadEventListener):
+ (WebCore::removeUnloadEventListener):
+ (WebCore::removeAllUnloadEventListeners):
+ (WebCore::addBeforeUnloadEventListener):
+ (WebCore::removeBeforeUnloadEventListener):
+ (WebCore::removeAllBeforeUnloadEventListeners):
+ (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
+ (WebCore::DOMWindow::~DOMWindow):
+ (WebCore::DOMWindow::addEventListener):
+ (WebCore::DOMWindow::removeEventListener):
+ (WebCore::DOMWindow::removeAllEventListeners):
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Steve Falkenburg and Mark Rowe.
+
+ Don't pass -F to GCC on non-mac platforms since it is an darwin only.
+
+ * DerivedSources.make:
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Fix windows build.
+
+ * dom/Element.idl:
+
+2009-09-23 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Revert the relevant parts of r47925, and implement an alternate
+ fix (localize the coordinate check to GraphicsContext::clipPath()).
+ This fixes http://crbug.com/21174.
+
+ Covered by LayoutTests/svg/dynamic-updates/SVGClipPathElement-dom-clipPathUnits-attr.html.
+
+ * platform/graphics/skia/GraphicsContextSkia.cpp:
+ (WebCore::GraphicsContext::clipPath):
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (PlatformContextSkia::currentPathInLocalCoordinates):
+
+2009-09-24 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Merge changes from Mozilla's FTP directory parser.
+ <rdar://problem/7227620> and https://bugs.webkit.org/show_bug.cgi?id=29294
+
+ FTP layout tests not possible at this time.
+ https://bugs.webkit.org/show_bug.cgi?id=29719 tracks making them possible.
+
+ * loader/FTPDirectoryParser.cpp:
+ (WebCore::ParsingFailed):
+ (WebCore::parseOneFTPLine):
+
+2009-09-24 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] re-enable some media tests
+ https://bugs.webkit.org/show_bug.cgi?id=29716
+
+ make canPlayType() return "probably" if mime-type is known
+ and codecs string is not empty. If codecs is empty return
+ "maybe".
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::supportsType):
+
+2009-09-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Dan Bernstein.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=29703
+ Add a function to element to check whether it matches a CSS selector
+
+ Implement Element.webkitMatchesSelector.
+
+ * css/CSSSelectorList.cpp:
+ (WebCore::forEachTagSelector):
+ (WebCore::forEachSelector):
+ (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
+ (WebCore::CSSSelectorList::selectorsNeedNamespaceResolution):
+ * css/CSSSelectorList.h:
+ Moved code to iterate the CSSSelectorList and determine if any
+ selectors need namespace resolution from a static function in
+ Node.cpp to CSSSelectorList so that it can be used by webkitMatchesSelector
+ as well as querySelector/querySelectorAll.
+
+ * dom/Element.cpp:
+ (WebCore::Element::webkitMatchesSelector):
+ * dom/Element.h:
+ * dom/Element.idl:
+ Implement the new function. Handles exceptional cases identically to
+ querySelector/querySelectorAll.
+
+ * dom/Node.cpp:
+ (WebCore::Node::querySelector):
+ (WebCore::Node::querySelectorAll):
+ Moved selectorsNeedNamespaceResolution to CSSSelectorList from here.
+
+2009-09-24 Vitaly Repeshko <vitalyr@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [V8] Fixed bindings build after http://trac.webkit.org/changeset/48701
+ https://bugs.webkit.org/show_bug.cgi?id=29713
+
+ Got rid of isWindowEvent in function signatures:
+ * bindings/v8/V8AbstractEventListener.cpp:
+ (WebCore::V8AbstractEventListener::invokeEventHandler):
+ (WebCore::V8AbstractEventListener::handleEvent):
+ (WebCore::V8AbstractEventListener::getReceiverObject):
+ * bindings/v8/V8AbstractEventListener.h:
+ * bindings/v8/V8LazyEventListener.cpp:
+ (WebCore::V8LazyEventListener::callListenerFunction):
+ * bindings/v8/V8LazyEventListener.h:
+ * bindings/v8/V8WorkerContextEventListener.cpp:
+ (WebCore::V8WorkerContextEventListener::handleEvent):
+ (WebCore::V8WorkerContextEventListener::callListenerFunction):
+ (WebCore::V8WorkerContextEventListener::getReceiverObject):
+ * bindings/v8/V8WorkerContextEventListener.h:
+ * bindings/v8/custom/V8CustomEventListener.cpp:
+ (WebCore::V8EventListener::callListenerFunction):
+ * bindings/v8/custom/V8CustomEventListener.h:
+
+ Switched to EventTarget methods of adding/removing listeners:
+ * bindings/v8/custom/V8DOMApplicationCacheCustom.cpp:
+ (WebCore::toEventID):
+ (WebCore::ACCESSOR_SETTER):
+
+ * dom/EventTarget.h: Some functions were incorrectly marked
+ as JSC-specific.
+
+2009-09-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Color-code watch expression errors with red.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29707
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+ (WebInspector.WatchExpressionTreeElement.prototype.update):
+ * inspector/front-end/inspector.css:
+
+2009-09-24 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Fix formatting for messages derived from resource warnings,
+ couple of drive-by formatting fixes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29705
+
+ * inspector/InspectorFrontend.cpp:
+ (WebCore::InspectorFrontend::addMessageToConsole):
+ * inspector/front-end/ConsoleView.js:
+ * inspector/front-end/InjectedScript.js:
+ (InjectedScript._evaluateAndWrap):
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype.update):
+
+2009-09-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ WebInspector: Implement InspectorController::copyNode(id).
+
+ https://bugs.webkit.org/show_bug.cgi?id=28357
+
+ * inspector/InspectorBackend.cpp:
+ (WebCore::InspectorBackend::copyNode):
+ * inspector/InspectorBackend.h:
+ * inspector/InspectorBackend.idl:
+ * inspector/front-end/ElementsPanel.js:
+ (WebInspector.ElementsPanel.prototype.handleCopyEvent):
+
+2009-09-24 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by NOBODY(rollout)
+
+ Roll out r48712 as it is incorrect.
+
+ Overriding getPropertyNames is incorrect.
+
+ * bridge/runtime_array.cpp:
+ * bridge/runtime_array.h:
+
+2009-09-24 Xan Lopez <xlopez@igalia.com>
+
+ Revert r48697, since it broke key handling notification to GTK+.
+
+ * platform/gtk/KeyEventGtk.cpp:
+ (WebCore::keyIdentifierForGdkKeyCode):
+ (WebCore::singleCharacterString):
+
+2009-09-24 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GStreamer MediaPlayer is unable to correctly querry duration
+ https://bugs.webkit.org/show_bug.cgi?id=24639
+
+ check duration returned by gst_element_query_duration() only
+ when using GStreamer < 0.10.23.
+
+ * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivate::duration):
+
+2009-09-24 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Eric Seidel.
+
+ The indices of RuntimeArray should be enumerated like for a regular array.
+ https://bugs.webkit.org/show_bug.cgi?id=29005
+
+ * bridge/runtime_array.cpp:
+ (JSC::RuntimeArray::getPropertyNames):
+ * bridge/runtime_array.h:
+
+2009-09-23 Alexander Pavlov <apavlov@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Introduce Pasteboard::writePlaintext(const String&) so that copying
+ of the inspected elements HTML will be possible in WebInspector.
+ https://bugs.webkit.org/show_bug.cgi?id=29634
+
+ * platform/Pasteboard.h:
+ * platform/android/TemporaryLinkStubs.cpp:
+ (Pasteboard::writePlainText):
+ * platform/chromium/ChromiumBridge.h:
+ * platform/chromium/PasteboardChromium.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/gtk/PasteboardGtk.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/haiku/PasteboardHaiku.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/qt/PasteboardQt.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ * platform/wince/PasteboardWince.cpp:
+ (WebCore::Pasteboard::writePlainText):
+ * platform/wx/PasteboardWx.cpp:
+ (WebCore::Pasteboard::writeSelection):
+ (WebCore::Pasteboard::writePlainText):
+ (WebCore::Pasteboard::writeURL):
+
2009-09-24 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 758d99d..e91076b 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.gypi
+++ b/src/3rdparty/webkit/WebCore/WebCore.gypi
@@ -76,11 +76,27 @@
'dom/WebKitAnimationEvent.idl',
'dom/WebKitTransitionEvent.idl',
'dom/WheelEvent.idl',
+ 'html/canvas/CanvasArray.idl',
+ 'html/canvas/CanvasArrayBuffer.idl',
+ 'html/canvas/CanvasBuffer.idl',
+ 'html/canvas/CanvasByteArray.idl',
+ 'html/canvas/CanvasFloatArray.idl',
+ 'html/canvas/CanvasFramebuffer.idl',
'html/canvas/CanvasGradient.idl',
+ 'html/canvas/CanvasIntArray.idl',
'html/canvas/CanvasPattern.idl',
'html/canvas/CanvasPixelArray.idl',
+ 'html/canvas/CanvasProgram.idl',
+ 'html/canvas/CanvasRenderbuffer.idl',
'html/canvas/CanvasRenderingContext.idl',
'html/canvas/CanvasRenderingContext2D.idl',
+ 'html/canvas/CanvasRenderingContext3D.idl',
+ 'html/canvas/CanvasShader.idl',
+ 'html/canvas/CanvasShortArray.idl',
+ 'html/canvas/CanvasUnsignedByteArray.idl',
+ 'html/canvas/CanvasUnsignedIntArray.idl',
+ 'html/canvas/CanvasUnsignedShortArray.idl',
+ 'html/canvas/CanvasTexture.idl',
'html/DataGridColumn.idl',
'html/DataGridColumnList.idl',
'html/File.idl',
@@ -607,7 +623,17 @@
'bindings/v8/custom/V8AbstractWorkerCustom.cpp',
'bindings/v8/custom/V8AttrCustom.cpp',
'bindings/v8/custom/V8CanvasPixelArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasArrayCustom.h',
+ 'bindings/v8/custom/V8CanvasArrayBufferCustom.cpp',
+ 'bindings/v8/custom/V8CanvasByteArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasIntArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasFloatArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasShortArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasUnsignedByteArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasUnsignedIntArrayCustom.cpp',
+ 'bindings/v8/custom/V8CanvasUnsignedShortArrayCustom.cpp',
'bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp',
+ 'bindings/v8/custom/V8CanvasRenderingContext3DCustom.cpp',
'bindings/v8/custom/V8ClientRectListCustom.cpp',
'bindings/v8/custom/V8ClipboardCustom.cpp',
'bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp',
@@ -1221,18 +1247,52 @@
'history/HistoryItem.h',
'history/PageCache.cpp',
'history/PageCache.h',
+ 'html/canvas/CanvasArray.cpp',
+ 'html/canvas/CanvasArray.h',
+ 'html/canvas/CanvasArrayBuffer.cpp',
+ 'html/canvas/CanvasArrayBuffer.h',
+ 'html/canvas/CanvasBuffer.cpp',
+ 'html/canvas/CanvasBuffer.h',
+ 'html/canvas/CanvasByteArray.cpp',
+ 'html/canvas/CanvasByteArray.h',
+ 'html/canvas/CanvasFloatArray.cpp',
+ 'html/canvas/CanvasFloatArray.h',
+ 'html/canvas/CanvasFramebuffer.cpp',
+ 'html/canvas/CanvasFramebuffer.h',
'html/canvas/CanvasGradient.cpp',
'html/canvas/CanvasGradient.h',
+ 'html/canvas/CanvasIntArray.cpp',
+ 'html/canvas/CanvasIntArray.h',
+ 'html/canvas/CanvasObject.cpp',
+ 'html/canvas/CanvasObject.h',
'html/canvas/CanvasPattern.cpp',
'html/canvas/CanvasPattern.h',
'html/canvas/CanvasPixelArray.cpp',
'html/canvas/CanvasPixelArray.h',
+ 'html/canvas/CanvasProgram.cpp',
+ 'html/canvas/CanvasProgram.h',
+ 'html/canvas/CanvasRenderbuffer.cpp',
+ 'html/canvas/CanvasRenderbuffer.h',
'html/canvas/CanvasRenderingContext.cpp',
'html/canvas/CanvasRenderingContext.h',
'html/canvas/CanvasRenderingContext2D.cpp',
'html/canvas/CanvasRenderingContext2D.h',
+ 'html/canvas/CanvasRenderingContext3D.cpp',
+ 'html/canvas/CanvasRenderingContext3D.h',
+ 'html/canvas/CanvasShader.cpp',
+ 'html/canvas/CanvasShader.h',
+ 'html/canvas/CanvasShortArray.cpp',
+ 'html/canvas/CanvasShortArray.h',
'html/canvas/CanvasStyle.cpp',
'html/canvas/CanvasStyle.h',
+ 'html/canvas/CanvasTexture.cpp',
+ 'html/canvas/CanvasTexture.h',
+ 'html/canvas/CanvasUnsignedByteArray.cpp',
+ 'html/canvas/CanvasUnsignedByteArray.h',
+ 'html/canvas/CanvasUnsignedIntArray.cpp',
+ 'html/canvas/CanvasUnsignedIntArray.h',
+ 'html/canvas/CanvasUnsignedShortArray.cpp',
+ 'html/canvas/CanvasUnsignedShortArray.h',
'html/CollectionCache.cpp',
'html/CollectionCache.h',
'html/CollectionType.h',
@@ -1667,6 +1727,7 @@
'page/Geolocation.cpp',
'page/Geolocation.h',
'page/Geoposition.h',
+ 'page/HaltablePlugin.h',
'page/History.cpp',
'page/History.h',
'page/Location.cpp',
@@ -1685,6 +1746,9 @@
'page/PageGroup.h',
'page/PageGroupLoadDeferrer.cpp',
'page/PageGroupLoadDeferrer.h',
+ 'page/PluginHalter.cpp',
+ 'page/PluginHalter.h',
+ 'page/PluginHalterClient.h',
'page/PositionCallback.h',
'page/PositionError.h',
'page/PositionErrorCallback.h',
@@ -2081,6 +2145,7 @@
'platform/graphics/Gradient.h',
'platform/graphics/GraphicsContext.cpp',
'platform/graphics/GraphicsContext.h',
+ 'platform/graphics/GraphicsContext3D.h',
'platform/graphics/GraphicsContextPrivate.h',
'platform/graphics/GraphicsLayer.cpp',
'platform/graphics/GraphicsLayer.h',
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index de3717d..540abad 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -113,6 +113,7 @@ contains(DEFINES, ENABLE_SINGLE_THREADED=1) {
!contains(DEFINES, ENABLE_DOM_STORAGE=.): DEFINES += ENABLE_DOM_STORAGE=1
!contains(DEFINES, ENABLE_ICONDATABASE=.): DEFINES += ENABLE_ICONDATABASE=1
!contains(DEFINES, ENABLE_CHANNEL_MESSAGING=.): DEFINES += ENABLE_CHANNEL_MESSAGING=1
+!contains(DEFINES, ENABLE_ORIENTATION_EVENTS=.): DEFINES += ENABLE_ORIENTATION_EVENTS=0
# turn on SQLITE support if any of the dependent features are turned on
!contains(DEFINES, ENABLE_SQLITE=.) {
@@ -1137,6 +1138,7 @@ SOURCES += \
page/Page.cpp \
page/PageGroup.cpp \
page/PageGroupLoadDeferrer.cpp \
+ page/PluginHalter.cpp \
page/PrintContext.cpp \
page/SecurityOrigin.cpp \
page/Screen.cpp \
@@ -1811,6 +1813,7 @@ HEADERS += \
page/FrameView.h \
page/Geolocation.h \
page/Geoposition.h \
+ page/HaltablePlugin.h \
page/History.h \
page/Location.h \
page/MouseEventWithHitTestResults.h \
@@ -1819,6 +1822,8 @@ HEADERS += \
page/PageGroup.h \
page/PageGroupLoadDeferrer.h \
page/Page.h \
+ page/PluginHalter.h \
+ page/PluginHalterClient.h \
page/PrintContext.h \
page/Screen.h \
page/SecurityOrigin.h \
@@ -2482,6 +2487,10 @@ contains(DEFINES, ENABLE_CHANNEL_MESSAGING=1) {
FEATURE_DEFINES_JAVASCRIPT += ENABLE_CHANNEL_MESSAGING=1
}
+contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
+ FEATURE_DEFINES_JAVASCRIPT += ENABLE_ORIENTATION_EVENTS=1
+}
+
contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=0) {
DASHBOARDSUPPORTCSSPROPERTIES -= $$PWD/css/DashboardSupportCSSPropertyNames.in
}
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp
index e217023..14457c4 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSAttrCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -59,4 +59,16 @@ void JSAttr::setValue(ExecState* exec, JSValue value)
setDOMException(exec, ec);
}
+void JSAttr::markChildren(MarkStack& markStack)
+{
+ Base::markChildren(markStack);
+
+ // Mark the element so that this will work to access the attribute even if the last
+ // other reference goes away.
+ if (Element* element = impl()->ownerElement()) {
+ if (JSNode* wrapper = getCachedDOMNodeWrapper(element->document(), element))
+ markStack.append(wrapper);
+ }
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp
index c80441d..583d971 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSInspectorBackendCustom.cpp
@@ -254,7 +254,7 @@ JSValue JSInspectorBackend::currentCallFrame(ExecState* exec, const ArgList&)
return jsUndefined();
// FIXME: I am not sure if this is actually needed. Can we just use exec?
- ExecState* globalExec = callFrame->scopeChain()->globalObject()->globalExec();
+ ExecState* globalExec = callFrame->scopeChain()->globalObject->globalExec();
JSLock lock(SilenceAssertionsOnly);
return JSInspectedObjectWrapper::wrap(globalExec, toJS(exec, callFrame));
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
index 7bd95b4..1974ab0 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,10 +27,9 @@
#include "JSNamedNodeMap.h"
#include "JSNode.h"
+
+#include "Element.h"
#include "NamedNodeMap.h"
-#include "Node.h"
-#include "PlatformString.h"
-#include "JSDOMBinding.h"
using namespace JSC;
@@ -47,4 +46,16 @@ JSValue JSNamedNodeMap::nameGetter(ExecState* exec, const Identifier& propertyNa
return toJS(exec, thisObj->impl()->getNamedItem(propertyName));
}
+void JSNamedNodeMap::markChildren(MarkStack& markStack)
+{
+ Base::markChildren(markStack);
+
+ // Mark the element so that this will work to access the attribute even if the last
+ // other reference goes away.
+ if (Element* element = impl()->element()) {
+ if (JSNode* wrapper = getCachedDOMNodeWrapper(element->document(), element))
+ markStack.append(wrapper);
+ }
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
index a18de49..1cbe8d2 100644
--- a/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/src/3rdparty/webkit/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -1596,7 +1596,24 @@ sub IsRefPtrType
{
my $type = shift;
return 1 if $type eq "Attr";
+ return 1 if $type eq "CanvasArray";
+ return 1 if $type eq "CanvasArrayBuffer";
+ return 1 if $type eq "CanvasBooleanArray";
+ return 1 if $type eq "CanvasByteArray";
+ return 1 if $type eq "CanvasBuffer";
+ return 1 if $type eq "CanvasFloatArray";
+ return 1 if $type eq "CanvasFramebuffer";
return 1 if $type eq "CanvasGradient";
+ return 1 if $type eq "CanvasIntArray";
+ return 1 if $type eq "CanvasObject";
+ return 1 if $type eq "CanvasProgram";
+ return 1 if $type eq "CanvasRenderbuffer";
+ return 1 if $type eq "CanvasShader";
+ return 1 if $type eq "CanvasShortArray";
+ return 1 if $type eq "CanvasTexture";
+ return 1 if $type eq "CanvasUnsignedByteArray";
+ return 1 if $type eq "CanvasUnsignedIntArray";
+ return 1 if $type eq "CanvasUnsignedShortArray";
return 1 if $type eq "ClientRect";
return 1 if $type eq "ClientRectList";
return 1 if $type eq "CDATASection";
@@ -1725,6 +1742,19 @@ sub GetNativeType
my %typeCanFailConversion = (
"AtomicString" => 0,
"Attr" => 1,
+ "CanvasArray" => 0,
+ "CanvasBuffer" => 0,
+ "CanvasByteArray" => 0,
+ "CanvasFloatArray" => 0,
+ "CanvasFramebuffer" => 0,
+ "CanvasGradient" => 0,
+ "CanvasIntArray" => 0,
+ "CanvasPixelArray" => 0,
+ "CanvasProgram" => 0,
+ "CanvasRenderbuffer" => 0,
+ "CanvasShader" => 0,
+ "CanvasShortArray" => 0,
+ "CanvasTexture" => 0,
"CompareHow" => 0,
"DataGridColumn" => 0,
"DOMString" => 0,
@@ -1734,8 +1764,11 @@ my %typeCanFailConversion = (
"Event" => 0,
"EventListener" => 0,
"EventTarget" => 0,
+ "HTMLCanvasElement" => 0,
"HTMLElement" => 0,
+ "HTMLImageElement" => 0,
"HTMLOptionElement" => 0,
+ "HTMLVideoElement" => 0,
"Node" => 0,
"NodeFilter" => 0,
"MessagePort" => 0,
diff --git a/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp b/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
index 9dafba9..6e62f6d 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
@@ -111,7 +111,10 @@ void CSSImportRule::insertedIntoParent()
root = curr;
}
- m_cachedSheet = docLoader->requestCSSStyleSheet(absHref, parentSheet->charset());
+ if (parentSheet->isUserStyleSheet())
+ m_cachedSheet = docLoader->requestUserCSSStyleSheet(absHref, parentSheet->charset());
+ else
+ m_cachedSheet = docLoader->requestCSSStyleSheet(absHref, parentSheet->charset());
if (m_cachedSheet) {
// if the import rule is issued dynamically, the sheet may be
// removed from the pending sheet count, so let the doc know
diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp
index f12d64f..7f82ca4 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.cpp
@@ -89,4 +89,51 @@ void CSSSelectorList::deleteSelectors()
}
}
+
+template <typename Functor>
+static bool forEachTagSelector(Functor& functor, CSSSelector* selector)
+{
+ ASSERT(selector);
+
+ do {
+ if (functor(selector))
+ return true;
+ if (CSSSelector* simpleSelector = selector->simpleSelector()) {
+ if (forEachTagSelector(functor, simpleSelector))
+ return true;
+ }
+ } while ((selector = selector->tagHistory()));
+
+ return false;
+}
+
+template <typename Functor>
+static bool forEachSelector(Functor& functor, const CSSSelectorList* selectorList)
+{
+ for (CSSSelector* selector = selectorList->first(); selector; selector = CSSSelectorList::next(selector)) {
+ if (forEachTagSelector(functor, selector))
+ return true;
+ }
+
+ return false;
+}
+
+class SelectorNeedsNamespaceResolutionFunctor {
+public:
+ bool operator()(CSSSelector* selector)
+ {
+ if (selector->hasTag() && selector->m_tag.prefix() != nullAtom && selector->m_tag.prefix() != starAtom)
+ return true;
+ if (selector->hasAttribute() && selector->attribute().prefix() != nullAtom && selector->attribute().prefix() != starAtom)
+ return true;
+ return false;
+ }
+};
+
+bool CSSSelectorList::selectorsNeedNamespaceResolution()
+{
+ SelectorNeedsNamespaceResolutionFunctor functor;
+ return forEachSelector(functor, this);
}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h
index 3518139..9e40ef8 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h
+++ b/src/3rdparty/webkit/WebCore/css/CSSSelectorList.h
@@ -31,25 +31,27 @@
namespace WebCore {
- class CSSSelectorList : public Noncopyable {
- public:
- CSSSelectorList() : m_selectorArray(0) { }
- ~CSSSelectorList();
-
- void adopt(CSSSelectorList& list);
- void adoptSelectorVector(Vector<CSSSelector*>& selectorVector);
-
- CSSSelector* first() const { return m_selectorArray ? m_selectorArray : 0; }
- static CSSSelector* next(CSSSelector* previous) { return previous->isLastInSelectorList() ? 0 : previous + 1; }
- bool hasOneSelector() const { return m_selectorArray ? m_selectorArray->isLastInSelectorList() : false; }
-
- private:
- void deleteSelectors();
-
- // End of the array is indicated by m_isLastInSelectorList bit in the last item.
- CSSSelector* m_selectorArray;
- };
-
-}
-
-#endif
+class CSSSelectorList : public Noncopyable {
+public:
+ CSSSelectorList() : m_selectorArray(0) { }
+ ~CSSSelectorList();
+
+ void adopt(CSSSelectorList& list);
+ void adoptSelectorVector(Vector<CSSSelector*>& selectorVector);
+
+ CSSSelector* first() const { return m_selectorArray ? m_selectorArray : 0; }
+ static CSSSelector* next(CSSSelector* previous) { return previous->isLastInSelectorList() ? 0 : previous + 1; }
+ bool hasOneSelector() const { return m_selectorArray ? m_selectorArray->isLastInSelectorList() : false; }
+
+ bool selectorsNeedNamespaceResolution();
+
+private:
+ void deleteSelectors();
+
+ // End of the array is indicated by m_isLastInSelectorList bit in the last item.
+ CSSSelector* m_selectorArray;
+};
+
+} // namespace WebCore
+
+#endif // CSSSelectorList_h
diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp b/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
index ce50af6..1579999 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
+++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
@@ -40,20 +40,22 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, con
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(!parentSheet || parentSheet->useStrictParsing())
+ , m_isUserStyleSheet(parentSheet ? parentSheet->isUserStyleSheet() : false)
{
}
-CSSStyleSheet::CSSStyleSheet(Node *parentNode, const String& href, const String& charset)
+CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const String& charset)
: StyleSheet(parentNode, href)
, m_doc(parentNode->document())
, m_namespaces(0)
, m_charset(charset)
, m_loadCompleted(false)
, m_strictParsing(false)
+ , m_isUserStyleSheet(false)
{
}
-CSSStyleSheet::CSSStyleSheet(CSSRule *ownerRule, const String& href, const String& charset)
+CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset)
: StyleSheet(ownerRule, href)
, m_namespaces(0)
, m_charset(charset)
@@ -62,6 +64,7 @@ CSSStyleSheet::CSSStyleSheet(CSSRule *ownerRule, const String& href, const Strin
{
CSSStyleSheet* parentSheet = ownerRule ? ownerRule->parentStyleSheet() : 0;
m_doc = parentSheet ? parentSheet->doc() : 0;
+ m_isUserStyleSheet = parentSheet ? parentSheet->isUserStyleSheet() : false;
}
CSSStyleSheet::~CSSStyleSheet()
diff --git a/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h b/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
index 8646ee9..f534104 100644
--- a/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
+++ b/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
@@ -93,6 +93,9 @@ public:
void setStrictParsing(bool b) { m_strictParsing = b; }
bool useStrictParsing() const { return m_strictParsing; }
+ void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
+ bool isUserStyleSheet() const { return m_isUserStyleSheet; }
+
private:
CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset);
@@ -106,6 +109,7 @@ private:
String m_charset;
bool m_loadCompleted : 1;
bool m_strictParsing : 1;
+ bool m_isUserStyleSheet : 1;
};
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/dom/Attr.idl b/src/3rdparty/webkit/WebCore/dom/Attr.idl
index 29f4be1..c01f34a 100644
--- a/src/3rdparty/webkit/WebCore/dom/Attr.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Attr.idl
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
module core {
interface [
+ CustomMarkFunction,
GenerateConstructor,
GenerateNativeConverter,
InterfaceUUID=EEE8E22B-22C3-4e50-95F4-5E0B8AAD8231,
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.cpp b/src/3rdparty/webkit/WebCore/dom/Document.cpp
index 5422bf0..174c0ee 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Document.cpp
@@ -1941,7 +1941,8 @@ CSSStyleSheet* Document::pageUserSheet()
return 0;
// Parse the sheet and cache it.
- m_pageUserSheet = CSSStyleSheet::create(this);
+ m_pageUserSheet = CSSStyleSheet::create(this, settings()->userStyleSheetLocation());
+ m_pageUserSheet->setIsUserStyleSheet(true);
m_pageUserSheet->parseString(userSheetText, !inCompatMode());
return m_pageUserSheet.get();
}
@@ -1973,7 +1974,8 @@ const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const
const UserStyleSheetVector* sheets = it->second;
for (unsigned i = 0; i < sheets->size(); ++i) {
const UserStyleSheet* sheet = sheets->at(i).get();
- RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this));
+ RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this), sheet->url());
+ parsedSheet->setIsUserStyleSheet(true);
parsedSheet->parseString(sheet->source(), !inCompatMode());
if (!m_pageGroupUserSheets)
m_pageGroupUserSheets.set(new Vector<RefPtr<CSSStyleSheet> >);
@@ -3011,7 +3013,7 @@ String Document::domain() const
return securityOrigin()->domain();
}
-void Document::setDomain(const String& newDomain)
+void Document::setDomain(const String& newDomain, ExceptionCode& ec)
{
// Both NS and IE specify that changing the domain is only allowed when
// the new domain is a suffix of the old domain.
@@ -3034,19 +3036,25 @@ void Document::setDomain(const String& newDomain)
int oldLength = domain().length();
int newLength = newDomain.length();
// e.g. newDomain = webkit.org (10) and domain() = www.webkit.org (14)
- if (newLength >= oldLength)
+ if (newLength >= oldLength) {
+ ec = SECURITY_ERR;
return;
+ }
String test = domain();
// Check that it's a subdomain, not e.g. "ebkit.org"
- if (test[oldLength - newLength - 1] != '.')
+ if (test[oldLength - newLength - 1] != '.') {
+ ec = SECURITY_ERR;
return;
+ }
// Now test is "webkit.org" from domain()
// and we check that it's the same thing as newDomain
test.remove(0, oldLength - newLength);
- if (test != newDomain)
+ if (test != newDomain) {
+ ec = SECURITY_ERR;
return;
+ }
securityOrigin()->setDomainFromDOM(newDomain);
if (m_frame)
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.h b/src/3rdparty/webkit/WebCore/dom/Document.h
index 454304b..2805562 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.h
+++ b/src/3rdparty/webkit/WebCore/dom/Document.h
@@ -672,7 +672,7 @@ public:
String referrer() const;
String domain() const;
- void setDomain(const String& newDomain);
+ void setDomain(const String& newDomain, ExceptionCode&);
String lastModified() const;
diff --git a/src/3rdparty/webkit/WebCore/dom/Document.idl b/src/3rdparty/webkit/WebCore/dom/Document.idl
index 34a9771..822f860 100644
--- a/src/3rdparty/webkit/WebCore/dom/Document.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Document.idl
@@ -155,7 +155,8 @@ module core {
attribute [ConvertNullToNullString] DOMString title;
readonly attribute DOMString referrer;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
- attribute [ConvertNullToNullString] DOMString domain;
+ attribute [ConvertNullToNullString] DOMString domain
+ setter raises (DOMException);
#else
readonly attribute DOMString domain;
#endif
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp
index f04723f..50ff033 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp
@@ -28,6 +28,8 @@
#include "AXObjectCache.h"
#include "Attr.h"
+#include "CSSParser.h"
+#include "CSSSelectorList.h"
#include "CSSStyleSelector.h"
#include "CString.h"
#include "ClientRect.h"
@@ -280,42 +282,6 @@ static int adjustForLocalZoom(int value, RenderObject* renderer)
return static_cast<int>(value / zoomFactor);
}
-static int adjustForAbsoluteZoom(int value, RenderObject* renderer)
-{
- float zoomFactor = renderer->style()->effectiveZoom();
- if (zoomFactor == 1)
- return value;
- // Needed because computeLengthInt truncates (rather than rounds) when scaling up.
- if (zoomFactor > 1)
- value++;
- return static_cast<int>(value / zoomFactor);
-}
-
-static FloatPoint adjustFloatPointForAbsoluteZoom(const FloatPoint& point, RenderObject* renderer)
-{
- // The result here is in floats, so we don't need the truncation hack from the integer version above.
- float zoomFactor = renderer->style()->effectiveZoom();
- if (zoomFactor == 1)
- return point;
- return FloatPoint(point.x() / zoomFactor, point.y() / zoomFactor);
-}
-
-static void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject* renderer)
-{
- quad.setP1(adjustFloatPointForAbsoluteZoom(quad.p1(), renderer));
- quad.setP2(adjustFloatPointForAbsoluteZoom(quad.p2(), renderer));
- quad.setP3(adjustFloatPointForAbsoluteZoom(quad.p3(), renderer));
- quad.setP4(adjustFloatPointForAbsoluteZoom(quad.p4(), renderer));
-}
-
-static void adjustIntRectForAbsoluteZoom(IntRect& rect, RenderObject* renderer)
-{
- rect.setX(adjustForAbsoluteZoom(rect.x(), renderer));
- rect.setY(adjustForAbsoluteZoom(rect.y(), renderer));
- rect.setWidth(adjustForAbsoluteZoom(rect.width(), renderer));
- rect.setHeight(adjustForAbsoluteZoom(rect.height(), renderer));
-}
-
int Element::offsetLeft()
{
document()->updateLayoutIgnorePendingStylesheets();
@@ -1406,6 +1372,39 @@ unsigned Element::childElementCount() const
return count;
}
+bool Element::webkitMatchesSelector(const String& selector, ExceptionCode& ec)
+{
+ if (selector.isEmpty()) {
+ ec = SYNTAX_ERR;
+ return false;
+ }
+
+ bool strictParsing = !document()->inCompatMode();
+ CSSParser p(strictParsing);
+
+ CSSSelectorList selectorList;
+ p.parseSelector(selector, document(), selectorList);
+
+ if (!selectorList.first()) {
+ ec = SYNTAX_ERR;
+ return false;
+ }
+
+ // Throw a NAMESPACE_ERR if the selector includes any namespace prefixes.
+ if (selectorList.selectorsNeedNamespaceResolution()) {
+ ec = NAMESPACE_ERR;
+ return false;
+ }
+
+ CSSStyleSelector::SelectorChecker selectorChecker(document(), strictParsing);
+ for (CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector)) {
+ if (selectorChecker.checkSelector(selector, this))
+ return true;
+ }
+
+ return false;
+}
+
KURL Element::getURLAttribute(const QualifiedName& name) const
{
#ifndef NDEBUG
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.h b/src/3rdparty/webkit/WebCore/dom/Element.h
index 4ecf932..d27976a 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.h
+++ b/src/3rdparty/webkit/WebCore/dom/Element.h
@@ -231,6 +231,8 @@ public:
Element* nextElementSibling() const;
unsigned childElementCount() const;
+ bool webkitMatchesSelector(const String& selectors, ExceptionCode&);
+
virtual bool isFormControlElement() const { return false; }
virtual bool isEnabledFormControl() const { return true; }
virtual bool isReadOnlyFormControl() const { return false; }
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.idl b/src/3rdparty/webkit/WebCore/dom/Element.idl
index cbb36d9..d90f819 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Element.idl
@@ -111,6 +111,10 @@ module core {
raises(DOMException);
#if !defined(LANGUAGE_COM) || !LANGUAGE_COM
+ // WebKit extension, pending specification.
+ boolean webkitMatchesSelector(in DOMString selectors)
+ raises(DOMException);
+
// ElementTraversal API
readonly attribute Element firstElementChild;
readonly attribute Element lastElementChild;
diff --git a/src/3rdparty/webkit/WebCore/dom/EventTarget.h b/src/3rdparty/webkit/WebCore/dom/EventTarget.h
index 4499328..2d612e1 100644
--- a/src/3rdparty/webkit/WebCore/dom/EventTarget.h
+++ b/src/3rdparty/webkit/WebCore/dom/EventTarget.h
@@ -202,6 +202,7 @@ namespace WebCore {
d->eventListenerMap.clear();
}
+#endif
inline bool EventTarget::isFiringEventListeners()
{
@@ -227,8 +228,6 @@ namespace WebCore {
return d->eventListenerMap.contains(eventType);
}
-#endif
-
} // namespace WebCore
#endif // EventTarget_h
diff --git a/src/3rdparty/webkit/WebCore/dom/InputElement.cpp b/src/3rdparty/webkit/WebCore/dom/InputElement.cpp
index 96e31f4..c29cb1c 100644
--- a/src/3rdparty/webkit/WebCore/dom/InputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/InputElement.cpp
@@ -56,8 +56,6 @@ void InputElement::dispatchFocusEvent(InputElement* inputElement, Element* eleme
if (!inputElement->isTextField())
return;
- updatePlaceholderVisibility(inputElement, element);
-
Document* document = element->document();
if (inputElement->isPasswordField() && document->frame())
document->setUseSecureKeyboardEntryWhenActive(true);
@@ -73,29 +71,12 @@ void InputElement::dispatchBlurEvent(InputElement* inputElement, Element* elemen
if (!frame)
return;
- updatePlaceholderVisibility(inputElement, element);
-
if (inputElement->isPasswordField())
document->setUseSecureKeyboardEntryWhenActive(false);
frame->textFieldDidEndEditing(element);
}
-bool InputElement::placeholderShouldBeVisible(const InputElement* inputElement, const Element* element)
-{
- return inputElement->value().isEmpty()
- && element->document()->focusedNode() != element
- && !inputElement->placeholder().isEmpty();
-}
-
-void InputElement::updatePlaceholderVisibility(InputElement* inputElement, Element* element, bool placeholderValueChanged)
-{
- ASSERT(inputElement->isTextField());
- bool placeholderVisible = inputElement->placeholderShouldBeVisible();
- if (element->renderer())
- toRenderTextControlSingleLine(element->renderer())->updatePlaceholderVisibility(placeholderVisible, placeholderValueChanged);
-}
-
void InputElement::updateFocusAppearance(InputElementData& data, InputElement* inputElement, Element* element, bool restorePreviousSelection)
{
ASSERT(inputElement->isTextField());
@@ -138,10 +119,7 @@ void InputElement::aboutToUnload(InputElement* inputElement, Element* element)
void InputElement::setValueFromRenderer(InputElementData& data, InputElement* inputElement, Element* element, const String& value)
{
// Renderer and our event handler are responsible for sanitizing values.
- ASSERT(value == inputElement->sanitizeValue(value) || inputElement->sanitizeValue(value).isEmpty());
-
- if (inputElement->isTextField())
- updatePlaceholderVisibility(inputElement, element);
+ ASSERT_UNUSED(inputElement, value == inputElement->sanitizeValue(value) || inputElement->sanitizeValue(value).isEmpty());
// Workaround for bug where trailing \n is included in the result of textContent.
// The assert macro above may also be simplified to: value == constrainValue(value)
diff --git a/src/3rdparty/webkit/WebCore/dom/InputElement.h b/src/3rdparty/webkit/WebCore/dom/InputElement.h
index 746e4f2..e0e7110 100644
--- a/src/3rdparty/webkit/WebCore/dom/InputElement.h
+++ b/src/3rdparty/webkit/WebCore/dom/InputElement.h
@@ -44,16 +44,12 @@ public:
virtual bool isSearchField() const = 0;
virtual bool isTextField() const = 0;
- virtual bool placeholderShouldBeVisible() const = 0;
virtual bool searchEventsShouldBeDispatched() const = 0;
virtual int size() const = 0;
virtual String value() const = 0;
virtual void setValue(const String&) = 0;
- virtual String placeholder() const = 0;
- virtual void setPlaceholder(const String&) = 0;
-
virtual String sanitizeValue(const String&) const = 0;
virtual void setValueFromRenderer(const String&) = 0;
@@ -66,8 +62,6 @@ public:
protected:
static void dispatchFocusEvent(InputElement*, Element*);
static void dispatchBlurEvent(InputElement*, Element*);
- static bool placeholderShouldBeVisible(const InputElement*, const Element*);
- static void updatePlaceholderVisibility(InputElement*, Element*, bool placeholderValueChanged = false);
static void updateFocusAppearance(InputElementData&, InputElement*, Element*, bool restorePreviousSelection);
static void updateSelectionRange(InputElement*, Element*, int start, int end);
static void aboutToUnload(InputElement*, Element*);
diff --git a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
index fe631c8..d4ec598 100644
--- a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.cpp
@@ -178,10 +178,8 @@ Attribute* NamedNodeMap::getAttributeItem(const String& name, bool shouldIgnoreA
{
unsigned len = length();
for (unsigned i = 0; i < len; ++i) {
- if (!m_attributes[i]->name().hasPrefix() &&
- m_attributes[i]->name().localName() == name)
- return m_attributes[i].get();
-
+ if (!m_attributes[i]->name().hasPrefix() && m_attributes[i]->name().localName() == name)
+ return m_attributes[i].get();
if (shouldIgnoreAttributeCase ? equalIgnoringCase(m_attributes[i]->name().toString(), name) : name == m_attributes[i]->name().toString())
return m_attributes[i].get();
}
@@ -206,10 +204,12 @@ void NamedNodeMap::clearAttributes()
void NamedNodeMap::detachFromElement()
{
- // we allow a NamedNodeMap w/o an element in case someone still has a reference
- // to if after the element gets deleted - but the map is now invalid
+ // This can't happen if the holder of the map is JavaScript, because we mark the
+ // element if the map is alive. So it has no impact on web page behavior. Because
+ // of that, we can simply clear all the attributes to avoid accessing stale
+ // pointers to do things like create Attr objects.
m_element = 0;
- detachAttributesFromElement();
+ clearAttributes();
}
void NamedNodeMap::setAttributes(const NamedNodeMap& other)
@@ -251,7 +251,7 @@ void NamedNodeMap::addAttribute(PassRefPtr<Attribute> prpAttribute)
attr->m_element = m_element;
// Notify the element that the attribute has been added, and dispatch appropriate mutation events
- // Note that element may be null here if we are called from insertAttr() during parsing
+ // Note that element may be null here if we are called from insertAttribute() during parsing
if (m_element) {
m_element->attributeChanged(attribute.get());
// Because of our updateStyleAttribute() style modification events are never sent at the right time, so don't bother sending them.
@@ -265,12 +265,13 @@ void NamedNodeMap::addAttribute(PassRefPtr<Attribute> prpAttribute)
void NamedNodeMap::removeAttribute(const QualifiedName& name)
{
unsigned len = length();
- unsigned index = len + 1;
- for (unsigned i = 0; i < len; ++i)
+ unsigned index = len;
+ for (unsigned i = 0; i < len; ++i) {
if (m_attributes[i]->name().matches(name)) {
index = i;
break;
}
+ }
if (index >= len)
return;
diff --git a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h
index 4fb96de..759900b 100644
--- a/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h
+++ b/src/3rdparty/webkit/WebCore/dom/NamedAttrMap.h
@@ -94,11 +94,11 @@ public:
void addAttribute(PassRefPtr<Attribute>);
void removeAttribute(const QualifiedName&);
+ Element* element() const { return m_element; }
+
protected:
virtual void clearAttributes();
- Element* element() const { return m_element; }
-
private:
void detachAttributesFromElement();
void detachFromElement();
diff --git a/src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl b/src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl
index 3310ded..8166853 100644
--- a/src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl
+++ b/src/3rdparty/webkit/WebCore/dom/NamedNodeMap.idl
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,6 +21,7 @@
module core {
interface [
+ CustomMarkFunction,
GenerateConstructor,
HasIndexGetter,
HasNameGetter,
diff --git a/src/3rdparty/webkit/WebCore/dom/Node.cpp b/src/3rdparty/webkit/WebCore/dom/Node.cpp
index 2240dd8..c899f3d 100644
--- a/src/3rdparty/webkit/WebCore/dom/Node.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Node.cpp
@@ -1626,52 +1626,6 @@ PassRefPtr<NodeList> Node::getElementsByClassName(const String& classNames)
return ClassNodeList::create(this, classNames, result.first->second.get());
}
-template <typename Functor>
-static bool forEachTagSelector(Functor& functor, CSSSelector* selector)
-{
- ASSERT(selector);
-
- do {
- if (functor(selector))
- return true;
- if (CSSSelector* simpleSelector = selector->simpleSelector()) {
- if (forEachTagSelector(functor, simpleSelector))
- return true;
- }
- } while ((selector = selector->tagHistory()));
-
- return false;
-}
-
-template <typename Functor>
-static bool forEachSelector(Functor& functor, const CSSSelectorList& selectorList)
-{
- for (CSSSelector* selector = selectorList.first(); selector; selector = CSSSelectorList::next(selector)) {
- if (forEachTagSelector(functor, selector))
- return true;
- }
-
- return false;
-}
-
-class SelectorNeedsNamespaceResolutionFunctor {
-public:
- bool operator()(CSSSelector* selector)
- {
- if (selector->hasTag() && selector->m_tag.prefix() != nullAtom && selector->m_tag.prefix() != starAtom)
- return true;
- if (selector->hasAttribute() && selector->attribute().prefix() != nullAtom && selector->attribute().prefix() != starAtom)
- return true;
- return false;
- }
-};
-
-static bool selectorNeedsNamespaceResolution(const CSSSelectorList& selectorList)
-{
- SelectorNeedsNamespaceResolutionFunctor functor;
- return forEachSelector(functor, selectorList);
-}
-
PassRefPtr<Element> Node::querySelector(const String& selectors, ExceptionCode& ec)
{
if (selectors.isEmpty()) {
@@ -1690,7 +1644,7 @@ PassRefPtr<Element> Node::querySelector(const String& selectors, ExceptionCode&
}
// throw a NAMESPACE_ERR if the selector includes any namespace prefixes.
- if (selectorNeedsNamespaceResolution(querySelectorList)) {
+ if (querySelectorList.selectorsNeedNamespaceResolution()) {
ec = NAMESPACE_ERR;
return 0;
}
@@ -1738,7 +1692,7 @@ PassRefPtr<NodeList> Node::querySelectorAll(const String& selectors, ExceptionCo
}
// Throw a NAMESPACE_ERR if the selector includes any namespace prefixes.
- if (selectorNeedsNamespaceResolution(querySelectorList)) {
+ if (querySelectorList.selectorsNeedNamespaceResolution()) {
ec = NAMESPACE_ERR;
return 0;
}
diff --git a/src/3rdparty/webkit/WebCore/dom/Range.cpp b/src/3rdparty/webkit/WebCore/dom/Range.cpp
index 0503597..122130d 100644
--- a/src/3rdparty/webkit/WebCore/dom/Range.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Range.cpp
@@ -3,7 +3,7 @@
* (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
* (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
* (C) 2001 Peter Kelly (pmk@post.com)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,7 +26,10 @@
#include "RangeException.h"
#include "CString.h"
+#include "ClientRect.h"
+#include "ClientRectList.h"
#include "DocumentFragment.h"
+#include "FrameView.h"
#include "HTMLElement.h"
#include "NodeWithIndex.h"
#include "ProcessingInstruction.h"
@@ -1821,4 +1824,89 @@ void Range::expand(const String& unit, ExceptionCode& ec)
setEnd(end.deepEquivalent().containerNode(), end.deepEquivalent().computeOffsetInContainerNode(), ec);
}
+PassRefPtr<ClientRectList> Range::getClientRects() const
+{
+ if (!m_start.container())
+ return 0;
+
+ m_ownerDocument->updateLayoutIgnorePendingStylesheets();
+
+ Vector<FloatQuad> quads;
+ getBorderAndTextQuads(quads);
+
+ return ClientRectList::create(quads);
+}
+
+PassRefPtr<ClientRect> Range::getBoundingClientRect() const
+{
+ if (!m_start.container())
+ return 0;
+
+ m_ownerDocument->updateLayoutIgnorePendingStylesheets();
+
+ Vector<FloatQuad> quads;
+ getBorderAndTextQuads(quads);
+
+ if (quads.isEmpty())
+ return ClientRect::create();
+
+ IntRect result;
+ for (size_t i = 0; i < quads.size(); ++i)
+ result.unite(quads[i].enclosingBoundingBox());
+
+ return ClientRect::create(result);
+}
+
+static void adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>& quads, Document* document, RenderObject* renderer)
+{
+ FrameView* view = document->view();
+ if (!view)
+ return;
+
+ IntRect visibleContentRect = view->visibleContentRect();
+ for (size_t i = 0; i < quads.size(); ++i) {
+ quads[i].move(-visibleContentRect.x(), -visibleContentRect.y());
+ adjustFloatQuadForAbsoluteZoom(quads[i], renderer);
+ }
+}
+
+void Range::getBorderAndTextQuads(Vector<FloatQuad>& quads) const
+{
+ Node* startContainer = m_start.container();
+ Node* endContainer = m_end.container();
+ Node* stopNode = pastLastNode();
+
+ HashSet<Node*> nodeSet;
+ for (Node* node = firstNode(); node != stopNode; node = node->traverseNextNode()) {
+ if (node->isElementNode())
+ nodeSet.add(node);
+ }
+
+ for (Node* node = firstNode(); node != stopNode; node = node->traverseNextNode()) {
+ if (node->isElementNode()) {
+ if (!nodeSet.contains(node->parentNode())) {
+ if (RenderBoxModelObject* renderBoxModelObject = static_cast<Element*>(node)->renderBoxModelObject()) {
+ Vector<FloatQuad> elementQuads;
+ renderBoxModelObject->absoluteQuads(elementQuads);
+ adjustFloatQuadsForScrollAndAbsoluteZoom(elementQuads, m_ownerDocument.get(), renderBoxModelObject);
+
+ quads.append(elementQuads);
+ }
+ }
+ } else if (node->isTextNode()) {
+ if (RenderObject* renderer = static_cast<Text*>(node)->renderer()) {
+ RenderText* renderText = toRenderText(renderer);
+ int startOffset = (node == startContainer) ? m_start.offset() : 0;
+ int endOffset = (node == endContainer) ? m_end.offset() : INT_MAX;
+
+ Vector<FloatQuad> textQuads;
+ renderText->absoluteQuadsForRange(textQuads, startOffset, endOffset);
+ adjustFloatQuadsForScrollAndAbsoluteZoom(textQuads, m_ownerDocument.get(), renderText);
+
+ quads.append(textQuads);
+ }
+ }
+ }
}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/dom/Range.h b/src/3rdparty/webkit/WebCore/dom/Range.h
index 3382c84..e2e282b 100644
--- a/src/3rdparty/webkit/WebCore/dom/Range.h
+++ b/src/3rdparty/webkit/WebCore/dom/Range.h
@@ -3,7 +3,7 @@
* (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
* (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
* (C) 2001 Peter Kelly (pmk@post.com)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -25,12 +25,15 @@
#ifndef Range_h
#define Range_h
+#include "FloatQuad.h"
#include "RangeBoundaryPoint.h"
+#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
namespace WebCore {
+class ClientRect;
+class ClientRectList;
class DocumentFragment;
class NodeWithIndex;
class Text;
@@ -117,6 +120,9 @@ public:
// for details.
void expand(const String&, ExceptionCode&);
+ PassRefPtr<ClientRectList> getClientRects() const;
+ PassRefPtr<ClientRect> getBoundingClientRect() const;
+
#ifndef NDEBUG
void formatForDebugger(char* buffer, unsigned length) const;
#endif
@@ -135,6 +141,8 @@ private:
enum ActionType { DELETE_CONTENTS, EXTRACT_CONTENTS, CLONE_CONTENTS };
PassRefPtr<DocumentFragment> processContents(ActionType, ExceptionCode&);
+ void getBorderAndTextQuads(Vector<FloatQuad>&) const;
+
RefPtr<Document> m_ownerDocument;
RangeBoundaryPoint m_start;
RangeBoundaryPoint m_end;
diff --git a/src/3rdparty/webkit/WebCore/dom/Range.idl b/src/3rdparty/webkit/WebCore/dom/Range.idl
index 633bd90..9024e09 100644
--- a/src/3rdparty/webkit/WebCore/dom/Range.idl
+++ b/src/3rdparty/webkit/WebCore/dom/Range.idl
@@ -85,6 +85,13 @@ module ranges {
void detach()
raises(DOMException);
+#if defined(LANGUAGE_JAVASCRIPT) || LANGUAGE_JAVASCRIPT
+ // CSSOM View Module API extensions
+
+ ClientRectList getClientRects();
+ ClientRect getBoundingClientRect();
+#endif
+
// extensions
DocumentFragment createContextualFragment(in DOMString html)
diff --git a/src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h b/src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h
index 88d2279..c34a341 100644
--- a/src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h
+++ b/src/3rdparty/webkit/WebCore/dom/RegisteredEventListener.h
@@ -29,7 +29,8 @@
namespace WebCore {
- struct RegisteredEventListener {
+ class RegisteredEventListener {
+ public:
RegisteredEventListener(PassRefPtr<EventListener> listener, bool useCapture)
: listener(listener)
, useCapture(useCapture)
diff --git a/src/3rdparty/webkit/WebCore/dom/Text.cpp b/src/3rdparty/webkit/WebCore/dom/Text.cpp
index 00db1c1..1ce074a 100644
--- a/src/3rdparty/webkit/WebCore/dom/Text.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Text.cpp
@@ -315,10 +315,15 @@ PassRefPtr<Text> Text::createWithLengthLimit(Document* document, const String& d
unsigned end = start + min(charsLeft, maxChars);
// Check we are not on an unbreakable boundary.
- TextBreakIterator* it = characterBreakIterator(data.characters(), dataLength);
- if (end < dataLength && !isTextBreak(it, end))
- end = textBreakPreceding(it, end);
-
+ // Some text break iterator implementations work best if the passed buffer is as small as possible,
+ // see <https://bugs.webkit.org/show_bug.cgi?id=29092>.
+ // We need at least two characters look-ahead to account for UTF-16 surrogates.
+ if (end < dataLength) {
+ TextBreakIterator* it = characterBreakIterator(data.characters() + start, (end + 2 > dataLength) ? dataLength - start : end - start + 2);
+ if (!isTextBreak(it, end - start))
+ end = textBreakPreceding(it, end - start) + start;
+ }
+
// If we have maxChars of unbreakable characters the above could lead to
// an infinite loop.
// FIXME: It would be better to just have the old value of end before calling
diff --git a/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp b/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp
index 9823aba..695f46a 100644
--- a/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp
+++ b/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.cpp
@@ -103,6 +103,30 @@ bool InsertParagraphSeparatorCommand::shouldUseDefaultParagraphElement(Node* enc
enclosingBlock->hasTagName(h5Tag);
}
+void InsertParagraphSeparatorCommand::getAncestorsInsideBlock(const Node* insertionNode, Element* outerBlock, Vector<Element*>& ancestors)
+{
+ ancestors.clear();
+
+ // Build up list of ancestors elements between the insertion node and the outer block.
+ if (insertionNode != outerBlock) {
+ for (Element* n = insertionNode->parentElement(); n && n != outerBlock; n = n->parentElement())
+ ancestors.append(n);
+ }
+}
+
+PassRefPtr<Element> InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock(const Vector<Element*>& ancestors, PassRefPtr<Element> blockToInsert)
+{
+ // Make clones of ancestors in between the start node and the start block.
+ RefPtr<Element> parent = blockToInsert;
+ for (size_t i = ancestors.size(); i != 0; --i) {
+ RefPtr<Element> child = ancestors[i - 1]->cloneElementWithoutChildren();
+ appendNode(child, parent);
+ parent = child.release();
+ }
+
+ return parent.release();
+}
+
void InsertParagraphSeparatorCommand::doApply()
{
bool splitText = false;
@@ -193,12 +217,18 @@ void InsertParagraphSeparatorCommand::doApply()
insertNodeAfter(blockToInsert, startBlock);
}
- appendBlockPlaceholder(blockToInsert);
- setEndingSelection(VisibleSelection(Position(blockToInsert.get(), 0), DOWNSTREAM));
- if (shouldApplyStyleAfterInsertion)
- applyStyleAfterInsertion(startBlock);
+ // Recreate the same structure in the new paragraph.
+
+ Vector<Element*> ancestors;
+ getAncestorsInsideBlock(insertionPosition.node(), startBlock, ancestors);
+ RefPtr<Element> parent = cloneHierarchyUnderNewBlock(ancestors, blockToInsert);
+
+ appendBlockPlaceholder(parent);
+
+ setEndingSelection(VisibleSelection(Position(parent.get(), 0), DOWNSTREAM));
return;
}
+
//---------------------------------------------------------------------
// Handle case when position is in the first visible position in its block, and
@@ -217,9 +247,15 @@ void InsertParagraphSeparatorCommand::doApply()
insertionPosition = insertionPosition.downstream();
insertNodeBefore(blockToInsert, refNode);
- appendBlockPlaceholder(blockToInsert.get());
- setEndingSelection(VisibleSelection(Position(blockToInsert.get(), 0), DOWNSTREAM));
- applyStyleAfterInsertion(startBlock);
+
+ // Recreate the same structure in the new paragraph.
+
+ Vector<Element*> ancestors;
+ getAncestorsInsideBlock(positionAvoidingSpecialElementBoundary(insertionPosition).node(), startBlock, ancestors);
+
+ appendBlockPlaceholder(cloneHierarchyUnderNewBlock(ancestors, blockToInsert));
+
+ // In this case, we need to set the new ending selection.
setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM));
return;
}
@@ -248,10 +284,7 @@ void InsertParagraphSeparatorCommand::doApply()
// Build up list of ancestors in between the start node and the start block.
Vector<Element*> ancestors;
- if (insertionPosition.node() != startBlock) {
- for (Element* n = insertionPosition.node()->parentElement(); n && n != startBlock; n = n->parentElement())
- ancestors.append(n);
- }
+ getAncestorsInsideBlock(insertionPosition.node(), startBlock, ancestors);
// Make sure we do not cause a rendered space to become unrendered.
// FIXME: We need the affinity for pos, but pos.downstream() does not give it
@@ -284,13 +317,8 @@ void InsertParagraphSeparatorCommand::doApply()
updateLayout();
- // Make clones of ancestors in between the start node and the start block.
- RefPtr<Element> parent = blockToInsert;
- for (size_t i = ancestors.size(); i != 0; --i) {
- RefPtr<Element> child = ancestors[i - 1]->cloneElementWithoutChildren();
- appendNode(child, parent);
- parent = child.release();
- }
+ // Make clones of ancestors in between the start node and the outer block.
+ RefPtr<Element> parent = cloneHierarchyUnderNewBlock(ancestors, blockToInsert);
// If the paragraph separator was inserted at the end of a paragraph, an empty line must be
// created. All of the nodes, starting at visiblePos, are about to be added to the new paragraph
diff --git a/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h b/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h
index 01c08bf..23ee51c 100644
--- a/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h
+++ b/src/3rdparty/webkit/WebCore/editing/InsertParagraphSeparatorCommand.h
@@ -44,6 +44,8 @@ private:
void calculateStyleBeforeInsertion(const Position&);
void applyStyleAfterInsertion(Node* originalEnclosingBlock);
+ void getAncestorsInsideBlock(const Node* insertionNode, Element* outerBlock, Vector<Element*>& ancestors);
+ PassRefPtr<Element> cloneHierarchyUnderNewBlock(const Vector<Element*>& ancestors, PassRefPtr<Element> blockToInsert);
bool shouldUseDefaultParagraphElement(Node*) const;
diff --git a/src/3rdparty/webkit/WebCore/generated/JSAttr.h b/src/3rdparty/webkit/WebCore/generated/JSAttr.h
index e7fd69c..c6843ec 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSAttr.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSAttr.h
@@ -44,6 +44,8 @@ public:
return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));
}
+ virtual void markChildren(JSC::MarkStack&);
+
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
// Custom attributes
@@ -62,6 +64,10 @@ public:
static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
static const JSC::ClassInfo s_info;
+ static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
+ {
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));
+ }
JSAttrPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
};
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
index 772be76..9820998 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSDocument.cpp
@@ -1045,7 +1045,9 @@ void setJSDocumentTitle(ExecState* exec, JSObject* thisObject, JSValue value)
void setJSDocumentDomain(ExecState* exec, JSObject* thisObject, JSValue value)
{
Document* imp = static_cast<Document*>(static_cast<JSDocument*>(thisObject)->impl());
- imp->setDomain(valueToStringWithNullCheck(exec, value));
+ ExceptionCode ec = 0;
+ imp->setDomain(valueToStringWithNullCheck(exec, value), ec);
+ setDOMException(exec, ec);
}
void setJSDocumentCookie(ExecState* exec, JSObject* thisObject, JSValue value)
diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
index f487532..c074e40 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSElement.cpp
@@ -171,7 +171,7 @@ bool JSElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Ident
/* Hash table for prototype */
-static const HashTableValue JSElementPrototypeTableValues[28] =
+static const HashTableValue JSElementPrototypeTableValues[29] =
{
{ "getAttribute", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionGetAttribute, (intptr_t)1 },
{ "setAttribute", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionSetAttribute, (intptr_t)2 },
@@ -198,6 +198,7 @@ static const HashTableValue JSElementPrototypeTableValues[28] =
{ "getElementsByClassName", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionGetElementsByClassName, (intptr_t)1 },
{ "querySelector", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionQuerySelector, (intptr_t)1 },
{ "querySelectorAll", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionQuerySelectorAll, (intptr_t)1 },
+ { "webkitMatchesSelector", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionWebkitMatchesSelector, (intptr_t)1 },
{ "getClientRects", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionGetClientRects, (intptr_t)0 },
{ "getBoundingClientRect", DontDelete|Function, (intptr_t)jsElementPrototypeFunctionGetBoundingClientRect, (intptr_t)0 },
{ 0, 0, 0, 0 }
@@ -1633,6 +1634,22 @@ JSValue JSC_HOST_CALL jsElementPrototypeFunctionQuerySelectorAll(ExecState* exec
return result;
}
+JSValue JSC_HOST_CALL jsElementPrototypeFunctionWebkitMatchesSelector(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSElement::s_info))
+ return throwError(exec, TypeError);
+ JSElement* castedThisObj = static_cast<JSElement*>(asObject(thisValue));
+ Element* imp = static_cast<Element*>(castedThisObj->impl());
+ ExceptionCode ec = 0;
+ const UString& selectors = args.at(0).toString(exec);
+
+
+ JSC::JSValue result = jsBoolean(imp->webkitMatchesSelector(selectors, ec));
+ setDOMException(exec, ec);
+ return result;
+}
+
JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetClientRects(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSElement.h b/src/3rdparty/webkit/WebCore/generated/JSElement.h
index 8d72032..770dc43 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSElement.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSElement.h
@@ -116,6 +116,7 @@ JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionScrollByPages(JSC::ExecStat
JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetElementsByClassName(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionQuerySelector(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionQuerySelectorAll(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionWebkitMatchesSelector(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetClientRects(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsElementPrototypeFunctionGetBoundingClientRect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
// Attributes
diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp
index 77b4b7c..7059003 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp
@@ -96,7 +96,7 @@ bool JSInspectorBackendConstructor::getOwnPropertyDescriptor(ExecState* exec, co
/* Hash table for prototype */
-static const HashTableValue JSInspectorBackendPrototypeTableValues[69] =
+static const HashTableValue JSInspectorBackendPrototypeTableValues[70] =
{
{ "hideDOMNodeHighlight", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHideDOMNodeHighlight, (intptr_t)0 },
{ "highlightDOMNode", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHighlightDOMNode, (intptr_t)1 },
@@ -156,6 +156,7 @@ static const HashTableValue JSInspectorBackendPrototypeTableValues[69] =
{ "setAttribute", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetAttribute, (intptr_t)4 },
{ "removeAttribute", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionRemoveAttribute, (intptr_t)3 },
{ "setTextNodeValue", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionSetTextNodeValue, (intptr_t)3 },
+ { "copyNode", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionCopyNode, (intptr_t)1 },
{ "nodeForId", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionNodeForId, (intptr_t)1 },
{ "wrapObject", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionWrapObject, (intptr_t)1 },
{ "unwrapObject", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionUnwrapObject, (intptr_t)1 },
@@ -955,6 +956,19 @@ JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetTextNodeValue(ExecSt
return jsUndefined();
}
+JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCopyNode(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSInspectorBackend::s_info))
+ return throwError(exec, TypeError);
+ JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue));
+ InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl());
+ int nodeId = args.at(0).toInt32(exec);
+
+ imp->copyNode(nodeId);
+ return jsUndefined();
+}
+
JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionNodeForId(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h
index fec9031..37fd8b8 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h
@@ -148,6 +148,7 @@ JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionGetChildNodes(JSC:
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionRemoveAttribute(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionSetTextNodeValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionCopyNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionNodeForId(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionWrapObject(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionUnwrapObject(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h
index 3b73a2d..11b3101 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSNamedNodeMap.h
@@ -47,6 +47,8 @@ public:
return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));
}
+ virtual void markChildren(JSC::MarkStack&);
+
virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&);
static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
NamedNodeMap* impl() const { return m_impl.get(); }
@@ -72,7 +74,7 @@ public:
virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
{
- return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::HasDefaultMark));
+ return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType));
}
JSNamedNodeMapPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }
};
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
index 9968a29..8faa98f 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
+++ b/src/3rdparty/webkit/WebCore/generated/JSRange.cpp
@@ -21,7 +21,11 @@
#include "config.h"
#include "JSRange.h"
+#include "ClientRect.h"
+#include "ClientRectList.h"
#include "DocumentFragment.h"
+#include "JSClientRect.h"
+#include "JSClientRectList.h"
#include "JSDocumentFragment.h"
#include "JSNode.h"
#include "JSRange.h"
@@ -114,7 +118,7 @@ bool JSRangeConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identif
/* Hash table for prototype */
-static const HashTableValue JSRangePrototypeTableValues[33] =
+static const HashTableValue JSRangePrototypeTableValues[35] =
{
{ "START_TO_START", DontDelete|ReadOnly, (intptr_t)jsRangeSTART_TO_START, (intptr_t)0 },
{ "START_TO_END", DontDelete|ReadOnly, (intptr_t)jsRangeSTART_TO_END, (intptr_t)0 },
@@ -142,6 +146,8 @@ static const HashTableValue JSRangePrototypeTableValues[33] =
{ "cloneRange", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionCloneRange, (intptr_t)0 },
{ "toString", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionToString, (intptr_t)0 },
{ "detach", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionDetach, (intptr_t)0 },
+ { "getClientRects", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionGetClientRects, (intptr_t)0 },
+ { "getBoundingClientRect", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionGetBoundingClientRect, (intptr_t)0 },
{ "createContextualFragment", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionCreateContextualFragment, (intptr_t)1 },
{ "intersectsNode", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionIntersectsNode, (intptr_t)1 },
{ "compareNode", DontDelete|Function, (intptr_t)jsRangePrototypeFunctionCompareNode, (intptr_t)1 },
@@ -155,7 +161,7 @@ static JSC_CONST_HASHTABLE HashTable JSRangePrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
{ 1023, JSRangePrototypeTableValues, 0 };
#else
- { 72, 63, JSRangePrototypeTableValues, 0 };
+ { 132, 127, JSRangePrototypeTableValues, 0 };
#endif
const ClassInfo JSRangePrototype::s_info = { "RangePrototype", 0, &JSRangePrototypeTable, 0 };
@@ -545,6 +551,32 @@ JSValue JSC_HOST_CALL jsRangePrototypeFunctionDetach(ExecState* exec, JSObject*,
return jsUndefined();
}
+JSValue JSC_HOST_CALL jsRangePrototypeFunctionGetClientRects(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSRange::s_info))
+ return throwError(exec, TypeError);
+ JSRange* castedThisObj = static_cast<JSRange*>(asObject(thisValue));
+ Range* imp = static_cast<Range*>(castedThisObj->impl());
+
+
+ JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getClientRects()));
+ return result;
+}
+
+JSValue JSC_HOST_CALL jsRangePrototypeFunctionGetBoundingClientRect(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
+{
+ UNUSED_PARAM(args);
+ if (!thisValue.inherits(&JSRange::s_info))
+ return throwError(exec, TypeError);
+ JSRange* castedThisObj = static_cast<JSRange*>(asObject(thisValue));
+ Range* imp = static_cast<Range*>(castedThisObj->impl());
+
+
+ JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->getBoundingClientRect()));
+ return result;
+}
+
JSValue JSC_HOST_CALL jsRangePrototypeFunctionCreateContextualFragment(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
diff --git a/src/3rdparty/webkit/WebCore/generated/JSRange.h b/src/3rdparty/webkit/WebCore/generated/JSRange.h
index 1752888..6bd51e9 100644
--- a/src/3rdparty/webkit/WebCore/generated/JSRange.h
+++ b/src/3rdparty/webkit/WebCore/generated/JSRange.h
@@ -91,6 +91,8 @@ JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionSurroundContents(JSC::ExecSta
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionCloneRange(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionToString(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionDetach(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionGetClientRects(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
+JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionGetBoundingClientRect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionCreateContextualFragment(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionIntersectsNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
JSC::JSValue JSC_HOST_CALL jsRangePrototypeFunctionCompareNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
index bc74ecf..8e66fe0 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.cpp
@@ -39,6 +39,7 @@
#include "MappedAttribute.h"
#include "Page.h"
#include "RenderBox.h"
+#include "RenderTextControl.h"
#include "RenderTheme.h"
#include "ValidityState.h"
@@ -368,4 +369,43 @@ void HTMLFormControlElementWithState::finishParsingChildren()
}
}
+HTMLTextFormControlElement::HTMLTextFormControlElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* form)
+ : HTMLFormControlElementWithState(tagName, doc, form)
+{
+}
+
+HTMLTextFormControlElement::~HTMLTextFormControlElement()
+{
+}
+
+void HTMLTextFormControlElement::dispatchFocusEvent()
+{
+ if (supportsPlaceholder())
+ updatePlaceholderVisibility(false);
+ handleFocusEvent();
+ HTMLFormControlElementWithState::dispatchFocusEvent();
+}
+
+void HTMLTextFormControlElement::dispatchBlurEvent()
+{
+ if (supportsPlaceholder())
+ updatePlaceholderVisibility(false);
+ handleBlurEvent();
+ HTMLFormControlElementWithState::dispatchBlurEvent();
+}
+
+bool HTMLTextFormControlElement::placeholderShouldBeVisible() const
+{
+ return supportsPlaceholder()
+ && isEmptyValue()
+ && document()->focusedNode() != this
+ && !getAttribute(placeholderAttr).isEmpty();
+}
+
+void HTMLTextFormControlElement::updatePlaceholderVisibility(bool placeholderValueChanged)
+{
+ if (supportsPlaceholder() && renderer())
+ toRenderTextControl(renderer())->updatePlaceholderVisibility(placeholderShouldBeVisible(), placeholderValueChanged);
+}
+
} // namespace Webcore
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
index ee7d772..7b3cfbd 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLFormControlElement.h
@@ -143,6 +143,28 @@ protected:
virtual void didMoveToNewOwnerDocument();
};
+class HTMLTextFormControlElement : public HTMLFormControlElementWithState {
+public:
+ HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement*);
+ virtual ~HTMLTextFormControlElement();
+ virtual void dispatchFocusEvent();
+ virtual void dispatchBlurEvent();
+
+protected:
+ bool placeholderShouldBeVisible() const;
+ void updatePlaceholderVisibility(bool);
+
+private:
+ // A subclass should return true if placeholder processing is needed.
+ virtual bool supportsPlaceholder() const = 0;
+ // Returns true if user-editable value is empty. This is used to check placeholder visibility.
+ virtual bool isEmptyValue() const = 0;
+ // Called in dispatchFocusEvent(), after placeholder process, before calling parent's dispatchFocusEvent().
+ virtual void handleFocusEvent() { }
+ // Called in dispatchBlurEvent(), after placeholder process, before calling parent's dispatchBlurEvent().
+ virtual void handleBlurEvent() { }
+};
+
} //namespace
#endif
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
index 5ba780a..0aefe7f 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
@@ -71,7 +71,7 @@ using namespace HTMLNames;
const int maxSavedResults = 256;
HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* doc, HTMLFormElement* f)
- : HTMLFormControlElementWithState(tagName, doc, f)
+ : HTMLTextFormControlElement(tagName, doc, f)
, m_xPos(0)
, m_yPos(0)
, m_maxResults(-1)
@@ -257,20 +257,17 @@ bool HTMLInputElement::shouldUseInputMethod() const
return m_type == TEXT || m_type == SEARCH || m_type == ISINDEX;
}
-void HTMLInputElement::dispatchFocusEvent()
+void HTMLInputElement::handleFocusEvent()
{
InputElement::dispatchFocusEvent(this, this);
if (isTextField())
m_autofilled = false;
-
- HTMLFormControlElementWithState::dispatchFocusEvent();
}
-void HTMLInputElement::dispatchBlurEvent()
+void HTMLInputElement::handleBlurEvent()
{
InputElement::dispatchBlurEvent(this, this);
- HTMLFormControlElementWithState::dispatchBlurEvent();
}
void HTMLInputElement::setType(const String& t)
@@ -741,8 +738,7 @@ void HTMLInputElement::parseMappedAttribute(MappedAttribute *attr)
}
setNeedsStyleRecalc();
} else if (attr->name() == placeholderAttr) {
- if (isTextField())
- updatePlaceholderVisibility();
+ updatePlaceholderVisibility(true);
} else if (attr->name() == autosaveAttr ||
attr->name() == incrementalAttr ||
attr->name() == minAttr ||
@@ -814,7 +810,7 @@ RenderObject *HTMLInputElement::createRenderer(RenderArena *arena, RenderStyle *
case TELEPHONE:
case TEXT:
case URL:
- return new (arena) RenderTextControlSingleLine(this);
+ return new (arena) RenderTextControlSingleLine(this, placeholderShouldBeVisible());
}
ASSERT(false);
return 0;
@@ -1111,7 +1107,7 @@ void HTMLInputElement::setValue(const String& value)
else {
m_data.setValue(sanitizeValue(value));
if (isTextField()) {
- InputElement::updatePlaceholderVisibility(this, this);
+ updatePlaceholderVisibility(false);
if (inDocument())
document()->updateStyleIfNeeded();
}
@@ -1151,6 +1147,7 @@ void HTMLInputElement::setValueFromRenderer(const String& value)
{
// File upload controls will always use setFileListFromRenderer.
ASSERT(inputType() != FILE);
+ updatePlaceholderVisibility(false);
InputElement::setValueFromRenderer(m_data, this, this, value);
}
@@ -1790,11 +1787,6 @@ bool HTMLInputElement::willValidate() const
inputType() != BUTTON && inputType() != RESET;
}
-bool HTMLInputElement::placeholderShouldBeVisible() const
-{
- return InputElement::placeholderShouldBeVisible(this, this);
-}
-
bool HTMLInputElement::formStringToDouble(const String& src, double* out)
{
// See HTML5 2.4.4.3 `Real numbers.'
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
index 8f273cb..63d1634 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLInputElement.h
@@ -37,7 +37,7 @@ class HTMLOptionElement;
class KURL;
class VisibleSelection;
-class HTMLInputElement : public HTMLFormControlElementWithState, public InputElement {
+class HTMLInputElement : public HTMLTextFormControlElement, public InputElement {
public:
enum InputType {
TEXT,
@@ -75,8 +75,6 @@ public:
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
virtual bool isMouseFocusable() const;
virtual bool isEnumeratable() const { return inputType() != IMAGE; }
- virtual void dispatchFocusEvent();
- virtual void dispatchBlurEvent();
virtual void updateFocusAppearance(bool restorePreviousSelection);
virtual void aboutToUnload();
virtual bool shouldUseInputMethod() const;
@@ -230,8 +228,6 @@ public:
virtual bool willValidate() const;
- virtual bool placeholderShouldBeVisible() const;
-
// Converts the specified string to a floating number.
// If the conversion fails, the return value is false. Take care that leading or trailing unnecessary characters make failures. This returns false for an empty string input.
// The double* parameter may be 0.
@@ -241,11 +237,6 @@ protected:
virtual void willMoveToNewOwnerDocument();
virtual void didMoveToNewOwnerDocument();
- void updatePlaceholderVisibility()
- {
- InputElement::updatePlaceholderVisibility(this, this, true);
- }
-
private:
bool storesValueSeparateFromAttribute() const;
@@ -253,6 +244,11 @@ private:
void registerForActivationCallbackIfNeeded();
void unregisterForActivationCallbackIfNeeded();
+ virtual bool supportsPlaceholder() const { return isTextField(); }
+ virtual bool isEmptyValue() const { return value().isEmpty(); }
+ virtual void handleFocusEvent();
+ virtual void handleBlurEvent();
+
virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); }
virtual bool isRequiredFormControl() const;
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp
index bcfa623..31fafa6 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLIsIndexElement.cpp
@@ -44,7 +44,7 @@ void HTMLIsIndexElement::parseMappedAttribute(MappedAttribute* attr)
if (attr->name() == promptAttr)
setValue(attr->value());
else if (attr->name() == placeholderAttr)
- updatePlaceholderVisibility();
+ updatePlaceholderVisibility(true);
else
// don't call HTMLInputElement::parseMappedAttribute here, as it would
// accept attributes this element does not support
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp
index 3cf4852..f398fc2 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.cpp
@@ -63,7 +63,7 @@ static inline void notifyFormStateChanged(const HTMLTextAreaElement* element)
}
HTMLTextAreaElement::HTMLTextAreaElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
- : HTMLFormControlElementWithState(tagName, document, form)
+ : HTMLTextFormControlElement(tagName, document, form)
, m_rows(defaultRows)
, m_cols(defaultCols)
, m_wrap(SoftWrap)
@@ -211,7 +211,7 @@ void HTMLTextAreaElement::parseMappedAttribute(MappedAttribute* attr)
RenderObject* HTMLTextAreaElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- return new (arena) RenderTextControlMultiLine(this);
+ return new (arena) RenderTextControlMultiLine(this, placeholderShouldBeVisible());
}
bool HTMLTextAreaElement::appendFormData(FormDataList& encoding, bool)
@@ -448,29 +448,4 @@ bool HTMLTextAreaElement::shouldUseInputMethod() const
return true;
}
-bool HTMLTextAreaElement::placeholderShouldBeVisible() const
-{
- return value().isEmpty()
- && document()->focusedNode() != this
- && !getAttribute(placeholderAttr).isEmpty();
-}
-
-void HTMLTextAreaElement::updatePlaceholderVisibility(bool placeholderValueChanged)
-{
- if (renderer())
- toRenderTextControl(renderer())->updatePlaceholderVisibility(placeholderShouldBeVisible(), placeholderValueChanged);
-}
-
-void HTMLTextAreaElement::dispatchFocusEvent()
-{
- updatePlaceholderVisibility(false);
- HTMLFormControlElementWithState::dispatchFocusEvent();
-}
-
-void HTMLTextAreaElement::dispatchBlurEvent()
-{
- updatePlaceholderVisibility(false);
- HTMLFormControlElementWithState::dispatchBlurEvent();
-}
-
} // namespace
diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h
index fbf519d..ef96fc5 100644
--- a/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h
+++ b/src/3rdparty/webkit/WebCore/html/HTMLTextAreaElement.h
@@ -31,7 +31,7 @@ namespace WebCore {
class BeforeTextInsertedEvent;
class VisibleSelection;
-class HTMLTextAreaElement : public HTMLFormControlElementWithState {
+class HTMLTextAreaElement : public HTMLTextFormControlElement {
public:
HTMLTextAreaElement(const QualifiedName&, Document*, HTMLFormElement* = 0);
@@ -97,17 +97,15 @@ public:
virtual bool shouldUseInputMethod() const;
- bool placeholderShouldBeVisible() const;
-
private:
enum WrapMethod { NoWrap, SoftWrap, HardWrap };
void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent*) const;
static String sanitizeUserInputValue(const String&, unsigned maxLength);
void updateValue() const;
- void updatePlaceholderVisibility(bool placeholderValueChanged);
- virtual void dispatchFocusEvent();
- virtual void dispatchBlurEvent();
+
+ virtual bool supportsPlaceholder() const { return true; }
+ virtual bool isEmptyValue() const { return value().isEmpty(); }
virtual bool isOptionalFormControl() const { return !isRequiredFormControl(); }
virtual bool isRequiredFormControl() const { return required(); }
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp
index c140b13..ad0c510 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp
@@ -45,6 +45,7 @@
#include "InspectorDOMAgent.h"
#include "InspectorFrontend.h"
#include "InspectorResource.h"
+#include "Pasteboard.h"
#include "ScriptFunctionCall.h"
#if ENABLE(DOM_STORAGE)
@@ -57,6 +58,8 @@
using namespace JSC;
#endif
+#include "markup.h"
+
#include <wtf/RefPtr.h>
#include <wtf/StdLibExtras.h>
@@ -446,6 +449,15 @@ void InspectorBackend::setTextNodeValue(long callId, long nodeId, const String&
domAgent->setTextNodeValue(callId, nodeId, value);
}
+void InspectorBackend::copyNode(long nodeId)
+{
+ Node* node = nodeForId(nodeId);
+ if (!node)
+ return;
+ String markup = createMarkup(node);
+ Pasteboard::generalPasteboard()->writePlainText(markup);
+}
+
void InspectorBackend::highlight(long nodeId)
{
if (Node* node = nodeForId(nodeId))
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h
index 038ae14..739d28e 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h
@@ -138,6 +138,7 @@ public:
void setAttribute(long callId, long elementId, const String& name, const String& value);
void removeAttribute(long callId, long elementId, const String& name);
void setTextNodeValue(long callId, long nodeId, const String& value);
+ void copyNode(long nodeId);
// Generic code called from custom implementations.
void highlight(long nodeId);
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl
index 395e7fd..d8ccf9f 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl
@@ -109,6 +109,7 @@ module core {
void setAttribute(in long callId, in long elementId, in DOMString name, in DOMString value);
void removeAttribute(in long callId, in long elementId, in DOMString name);
void setTextNodeValue(in long callId, in long nodeId, in DOMString value);
+ void copyNode(in long nodeId);
// Called from InjectedScript.
[Custom] DOMObject nodeForId(in long nodeId);
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
index 69a7e60..e65f21c 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.cpp
@@ -503,6 +503,13 @@ void InspectorController::handleMousePressOnNode(Node* node)
inspect(node);
}
+void InspectorController::inspectedWindowScriptObjectCleared(Frame* frame)
+{
+ if (!enabled() || !m_frontend || frame != m_inspectedPage->mainFrame())
+ return;
+ resetInjectedScript();
+}
+
void InspectorController::windowScriptObjectAvailable()
{
if (!m_page || !enabled())
@@ -644,9 +651,7 @@ void InspectorController::populateScriptObjects()
if (!m_frontend)
return;
- // Initialize dom agent and reset injected script state first.
- if (m_domAgent->setDocument(m_inspectedPage->mainFrame()->document()))
- resetInjectedScript();
+ m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
ResourcesMap::iterator resourcesEnd = m_resources.end();
for (ResourcesMap::iterator it = m_resources.begin(); it != resourcesEnd; ++it)
@@ -694,6 +699,7 @@ void InspectorController::resetScriptObjects()
m_timelineAgent->reset();
m_frontend->reset();
+ m_domAgent->setDocument(0);
}
void InspectorController::pruneResources(ResourcesMap* resourceMap, DocumentLoader* loaderToKeep)
@@ -758,10 +764,9 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
// identifierForInitialRequest.
m_mainResource = 0;
}
+ if (windowVisible())
+ m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
}
-
- if (m_domAgent && m_domAgent->setDocument(m_inspectedPage->mainFrame()->document()))
- resetInjectedScript();
}
for (Frame* frame = loader->frame(); frame; frame = frame->tree()->traverseNext(loader->frame()))
@@ -1089,7 +1094,8 @@ void InspectorController::didOpenDatabase(Database* database, const String& doma
m_databaseResources.add(resource);
- if (m_frontend)
+ // Resources are only bound while visible.
+ if (m_frontend && windowVisible())
resource->bind(m_frontend.get());
}
#endif
@@ -1109,7 +1115,9 @@ void InspectorController::didUseDOMStorage(StorageArea* storageArea, bool isLoca
RefPtr<InspectorDOMStorageResource> resource = InspectorDOMStorageResource::create(domStorage.get(), isLocalStorage, frame);
m_domStorageResources.add(resource);
- if (m_frontend)
+
+ // Resources are only bound while visible.
+ if (m_frontend && windowVisible())
resource->bind(m_frontend.get());
}
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
index 20295aa..ff7a516 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h
@@ -196,6 +196,7 @@ public:
void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags);
void handleMousePressOnNode(Node*);
+ void inspectedWindowScriptObjectCleared(Frame*);
void windowScriptObjectAvailable();
void setFrontendProxyObject(ScriptState* state, ScriptObject webInspectorObj, ScriptObject injectedScriptObj = ScriptObject());
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp
index 4a4902d..d893796 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.cpp
@@ -70,10 +70,10 @@ InspectorDOMAgent::~InspectorDOMAgent()
setDocument(0);
}
-bool InspectorDOMAgent::setDocument(Document* doc)
+void InspectorDOMAgent::setDocument(Document* doc)
{
if (doc == mainFrameDocument())
- return false;
+ return;
discardBindings();
ListHashSet<RefPtr<Document> > copy = m_documents;
@@ -88,7 +88,6 @@ bool InspectorDOMAgent::setDocument(Document* doc)
pushDocumentToFrontend();
}
}
- return true;
}
void InspectorDOMAgent::releaseDanglingNodes()
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h
index bd539a5..c430c57 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMAgent.h
@@ -75,7 +75,7 @@ namespace WebCore {
void getCookies(long callId);
// Methods called from the InspectorController.
- bool setDocument(Document* document);
+ void setDocument(Document* document);
void releaseDanglingNodes();
Node* nodeForId(long nodeId);
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMStorageResource.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMStorageResource.cpp
index 99a2dba..7ed0d7f 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorDOMStorageResource.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorDOMStorageResource.cpp
@@ -79,7 +79,9 @@ void InspectorDOMStorageResource::bind(InspectorFrontend* frontend)
void InspectorDOMStorageResource::unbind()
{
- ASSERT(m_frontend);
+ if (!m_frontend)
+ return; // Already unbound.
+
if (m_reportingChangesToFrontend) {
m_frame->domWindow()->removeEventListener(eventNames().storageEvent, this, true);
m_reportingChangesToFrontend = false;
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
index 3bdfa97..c9793cb 100644
--- a/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/InspectorFrontend.cpp
@@ -83,13 +83,8 @@ void InspectorFrontend::addMessageToConsole(const ScriptObject& messageObj, cons
} else if (!wrappedArguments.isEmpty()) {
for (unsigned i = 0; i < wrappedArguments.size(); ++i)
function->appendArgument(m_inspectorController->wrapObject(wrappedArguments[i]));
- } else {
- // FIXME: avoid manual wrapping here.
- ScriptObject textWrapper = ScriptObject::createNew(m_scriptState);
- textWrapper.set("type", "string");
- textWrapper.set("description", message);
- function->appendArgument(textWrapper);
- }
+ } else
+ function->appendArgument(message);
function->call();
}
diff --git a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
index 6657120..e460ae8 100644
--- a/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
+++ b/src/3rdparty/webkit/WebCore/inspector/JavaScriptDebugServer.cpp
@@ -235,7 +235,7 @@ bool JavaScriptDebugServer::hasBreakpoint(intptr_t sourceID, unsigned lineNumber
// An erroneous condition counts as "false".
return false;
}
- return result.toBoolean(m_currentCallFrame->scopeChain()->globalObject()->globalExec());
+ return result.toBoolean(m_currentCallFrame->scopeChain()->globalObject->globalExec());
}
void JavaScriptDebugServer::clearBreakpoints()
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js
index 575b13a..4f50ecc 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ConsoleView.js
@@ -608,7 +608,7 @@ WebInspector.ConsoleMessage.prototype = {
this.formattedMessage = span;
break;
case WebInspector.ConsoleMessage.MessageType.Object:
- this.formattedMessage = this._format([WebInspector.ObjectProxy.wrapPrimitiveValue("%O"), args[0]]);
+ this.formattedMessage = this._format(["%O", args[0]]);
break;
default:
this.formattedMessage = this._format(args);
@@ -631,6 +631,13 @@ WebInspector.ConsoleMessage.prototype = {
if (!parameters.length)
return formattedResult;
+ // Formatting code below assumes that parameters are all wrappers whereas frontend console
+ // API allows passing arbitrary values as messages (strings, numberts, etc.). Wrap them here.
+ for (var i = 0; i < parameters.length; ++i) {
+ if (typeof parameters[i] !== "object" && typeof parameters[i] !== "function")
+ parameters[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(parameters[i]);
+ }
+
function formatForConsole(obj)
{
return WebInspector.console._format(obj);
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js
index 49a1188..928da52 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ElementsPanel.js
@@ -987,27 +987,9 @@ WebInspector.ElementsPanel.prototype = {
// Don't prevent the normal copy if the user has a selection.
if (!window.getSelection().isCollapsed)
return;
-
- switch (this.focusedDOMNode.nodeType) {
- case Node.ELEMENT_NODE:
- // TODO: Introduce InspectorController.copyEvent that pushes appropriate markup into the clipboard.
- var data = null;
- break;
-
- case Node.COMMENT_NODE:
- var data = "<!--" + this.focusedDOMNode.nodeValue + "-->";
- break;
-
- default:
- case Node.TEXT_NODE:
- var data = this.focusedDOMNode.nodeValue;
- }
-
event.clipboardData.clearData();
event.preventDefault();
-
- if (data)
- event.clipboardData.setData("text/plain", data);
+ InspectorController.copyNode(this.focusedDOMNode.id);
},
rightSidebarResizerDragStart: function(event)
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js b/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js
index 726c7cc..87293b8 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScript.js
@@ -44,6 +44,10 @@ InjectedScript.reset();
InjectedScript.dispatch = function(methodName, args)
{
var result = InjectedScript[methodName].apply(InjectedScript, JSON.parse(args));
+ if (typeof result === "undefined") {
+ InjectedScript._window().console.error("Web Inspector error: InjectedScript.%s returns undefined", methodName);
+ result = null;
+ }
return JSON.stringify(result);
}
@@ -150,6 +154,7 @@ InjectedScript.applyStyleText = function(styleId, styleText, propertyName)
InjectedScript.setStyleText = function(style, cssText)
{
style.cssText = cssText;
+ return true;
}
InjectedScript.toggleStyleEnabled = function(styleId, propertyName, disabled)
@@ -536,11 +541,11 @@ InjectedScript._evaluateAndWrap = function(evalFunction, object, expression)
result.value = InspectorController.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression));
// Handle error that might have happened while describing result.
if (result.value.errorText) {
- result.value = InspectorController.wrapObject(result.value.errorText);
+ result.value = result.value.errorText;
result.isException = true;
}
} catch (e) {
- result.value = InspectorController.wrapObject(e.toString());
+ result.value = e.toString();
result.isException = true;
}
return result;
@@ -812,7 +817,10 @@ InjectedScript.searchCanceled = function()
InjectedScript.openInInspectedWindow = function(url)
{
- InjectedScript._window().open(url);
+ // Don't call window.open on wrapper - popup blocker mutes it.
+ // URIs should have no double quotes.
+ InjectedScript._window().eval("window.open(\"" + url + "\")");
+ return true;
}
InjectedScript.getCallFrames = function()
@@ -1100,10 +1108,6 @@ Object.describe = function(obj, abbreviated)
return objectText;
case "regexp":
return String(obj).replace(/([\\\/])/g, "\\$1").replace(/\\(\/[gim]*)$/, "$1").substring(1);
- case "boolean":
- case "number":
- case "null":
- return obj;
default:
return String(obj);
}
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js b/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js
index da85d03..67312f7 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/InjectedScriptAccess.js
@@ -51,6 +51,9 @@ InjectedScriptAccess._installHandler = function(methodName)
};
}
+// InjectedScriptAccess message forwarding puts some constraints on the way methods are imlpemented and called:
+// - Make sure corresponding methods in InjectedScript return non-null and non-undefined values,
+// - Make sure last parameter of all the InjectedSriptAccess.* calls is a callback function.
InjectedScriptAccess._installHandler("getStyles");
InjectedScriptAccess._installHandler("getComputedStyle");
InjectedScriptAccess._installHandler("getInlineStyle");
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ProfileDataGridTree.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ProfileDataGridTree.js
index 356f57d..3fb0e00 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ProfileDataGridTree.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ProfileDataGridTree.js
@@ -153,8 +153,11 @@ WebInspector.ProfileDataGridNode.prototype = {
// If the grid node is collapsed, then don't sort children (save operation for later).
// If the grid node has the same sorting as previously, then there is no point in sorting it again.
- if (!force && !gridNode.expanded || gridNode.lastComparator === comparator)
+ if (!force && !gridNode.expanded || gridNode.lastComparator === comparator) {
+ if (gridNode.children.length)
+ gridNode.shouldRefreshChildren = true;
continue;
+ }
gridNode.lastComparator = comparator;
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js
index d915055..4fcc956 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourceView.js
@@ -178,7 +178,7 @@ WebInspector.ResourceView.prototype = {
var isFormEncoded = false;
var requestContentType = this._getHeaderValue(this.resource.requestHeaders, "Content-Type");
- if (requestContentType == "application/x-www-form-urlencoded")
+ if (requestContentType.match(/^application\/x-www-form-urlencoded\s*(;.*)?$/i))
isFormEncoded = true;
if (isFormEncoded) {
@@ -217,14 +217,27 @@ WebInspector.ResourceView.prototype = {
for (var i = 0; i < parms.length; ++i) {
var key = parms[i][0];
- var val = parms[i][1];
-
- if (val.indexOf("%") >= 0)
- if (this._decodeRequestParameters)
- val = decodeURIComponent(val).replace(/\+/g, " ");
+ var value = parms[i][1];
+
+ var errorDecoding = false;
+ if (this._decodeRequestParameters) {
+ if (value.indexOf("%") >= 0) {
+ try {
+ value = decodeURIComponent(value);
+ } catch(e) {
+ errorDecoding = true;
+ }
+ }
+
+ value = value.replace(/\+/g, " ");
+ }
+
+ valueEscaped = value.escapeHTML();
+ if (errorDecoding)
+ valueEscaped += " <span class=\"error-message\">" + WebInspector.UIString("(unable to decode value)").escapeHTML() + "</span>";
var title = "<div class=\"header-name\">" + key.escapeHTML() + ":</div>";
- title += "<div class=\"header-value\">" + val.escapeHTML() + "</div>";
+ title += "<div class=\"header-value\">" + valueEscaped + "</div>";
var parmTreeElement = new TreeElement(title, null, false);
parmTreeElement.selectable = false;
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
index 680f66c..2c96974 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/ResourcesPanel.js
@@ -1209,7 +1209,7 @@ WebInspector.ResourceSidebarTreeElement.prototype = {
ondblclick: function(treeElement, event)
{
- InjectedScriptAccess.openInInspectedWindow(this.resource.url);
+ InjectedScriptAccess.openInInspectedWindow(this.resource.url, function() {});
},
get mainTitle()
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js b/src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
index b568939..d6d1d61 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
@@ -84,18 +84,23 @@ WebInspector.WatchExpressionsSection.prototype = {
{
function appendResult(expression, watchIndex, result, exception)
{
- // The null check catches some other cases, like null itself, and NaN
- if ((typeof result !== "object") || (result == null))
- result = new WebInspector.ObjectProxy(null, [], 0, String(result), false);
+ if (exception) {
+ // Exception results are not wrappers, but text messages.
+ result = WebInspector.ObjectProxy.wrapPrimitiveValue(result);
+ } else if (result.type === "string") {
+ // Evaluation result is intentionally not abbreviated. However, we'd like to distinguish between null and "null"
+ result.description = "\"" + result.description + "\"";
+ }
var property = new WebInspector.ObjectPropertyProxy(expression, result);
property.watchIndex = watchIndex;
+ property.isException = exception;
// For newly added, empty expressions, set description to "",
// since otherwise you get DOMWindow
if (property.name === WebInspector.WatchExpressionsSection.NewWatchExpression)
property.value.description = "";
-
+
// To clarify what's going on here:
// In the outer function, we calculate the number of properties
// that we're going to be updating, and set that in the
@@ -218,6 +223,9 @@ WebInspector.WatchExpressionTreeElement.prototype = {
{
WebInspector.ObjectPropertyTreeElement.prototype.update.call(this);
+ if (this.property.isException)
+ this.valueElement.addStyleClass("watch-expressions-error-level");
+
var deleteButton = document.createElement("input");
deleteButton.type = "button";
deleteButton.title = WebInspector.UIString("Delete watch expression.");
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
index b4dff4e..0c50bb7 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/WebKit.qrc
@@ -92,6 +92,7 @@
<file>Images/enableSolidButtonGlyph.png</file>
<file>Images/errorIcon.png</file>
<file>Images/errorMediumIcon.png</file>
+ <file>Images/errorRedDot.png</file>
<file>Images/excludeButtonGlyph.png</file>
<file>Images/focusButtonGlyph.png</file>
<file>Images/forward.png</file>
@@ -153,6 +154,7 @@
<file>Images/statusbarResizerHorizontal.png</file>
<file>Images/statusbarResizerVertical.png</file>
<file>Images/storageIcon.png</file>
+ <file>Images/successGreenDot.png</file>
<file>Images/timelineHollowPillBlue.png</file>
<file>Images/timelineHollowPillGray.png</file>
<file>Images/timelineHollowPillGreen.png</file>
@@ -184,6 +186,7 @@
<file>Images/userInputResultIcon.png</file>
<file>Images/warningIcon.png</file>
<file>Images/warningMediumIcon.png</file>
+ <file>Images/warningOrangeDot.png</file>
<file>Images/warningsErrors.png</file>
</qresource>
</RCC>
diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
index 2ae4aac..4513886 100644
--- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
+++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css
@@ -1409,6 +1409,10 @@ li.editing .swatch, li.editing .enabled-button, li.editing-sub-part .delete-but
display: none;
}
+.watch-expressions-error-level {
+ color: red;
+}
+
.section .properties li.editing-sub-part {
padding: 3px 6px 8px 18px;
margin: -3px -6px -8px -6px;
diff --git a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
index 41b6ebc..14d36f1 100644
--- a/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
+++ b/src/3rdparty/webkit/WebCore/loader/EmptyClients.h
@@ -39,6 +39,7 @@
#include "FormState.h"
#include "FrameLoaderClient.h"
#include "InspectorClient.h"
+#include "PluginHalterClient.h"
#include "ResourceError.h"
#include "SharedBuffer.h"
@@ -483,6 +484,12 @@ public:
virtual void inspectorWindowObjectCleared() { }
};
+class EmptyPluginHalterClient : public PluginHalterClient
+{
+public:
+ virtual bool shouldHaltPlugin(Node*) const { return false; }
+};
+
}
#endif // EmptyClients_h
diff --git a/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp b/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp
index 6573fb6..40bd714 100644
--- a/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/FTPDirectoryParser.cpp
@@ -57,6 +57,13 @@ static struct tm *gmtimeQt(const time_t *const timep, struct tm *result)
#endif
#endif
+static inline FTPEntryType ParsingFailed(ListState& state)
+{
+ if (state.parsedOne || state.listStyle) /* junk if we fail to parse */
+ return FTPJunkEntry; /* this time but had previously parsed sucessfully */
+ return FTPMiscEntry; /* its part of a comment or error message */
+}
+
FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& result)
{
result.clear();
@@ -126,6 +133,9 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
}
}
+ if (!numtoks)
+ return ParsingFailed(state);
+
linelen_sans_wsp = &(tokens[numtoks-1][toklen[numtoks-1]]) - tokens[0];
if (numtoks == (sizeof(tokens)/sizeof(tokens[0])) )
{
@@ -356,11 +366,16 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
pos++;
p++;
}
- if (lstyle && pos < (toklen[0]-1) && *p == ']')
+ if (lstyle && pos < (toklen[0]-1))
{
+ /* ']' was found and there is at least one character after it */
+ ASSERT(*p == ']');
pos++;
p++;
tokmarker = pos; /* length of leading "[DIR1.DIR2.etc]" */
+ } else {
+ /* not a CMU style listing */
+ lstyle = 0;
}
}
while (lstyle && pos < toklen[0] && *p != ';')
@@ -387,7 +402,7 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
pos -= tokmarker; /* => fnlength sans "[DIR1.DIR2.etc]" */
p = &(tokens[0][tokmarker]); /* offset of basename */
- if (!lstyle || pos > 80) /* VMS filenames can't be longer than that */
+ if (!lstyle || pos == 0 || pos > 80) /* VMS filenames can't be longer than that */
{
lstyle = 0;
}
@@ -780,7 +795,7 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
state.parsedOne = true;
state.listStyle = lstyle;
- p = &(line[linelen_sans_wsp]); /* line end sans wsp */
+ p = &(line[linelen]); /* line end */
result.caseSensitive = true;
result.filename = tokens[3];
result.filenameLength = p - tokens[3];
@@ -788,29 +803,46 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
if (*tokens[2] != '<') /* not <DIR> or <JUNCTION> */
{
+ // try to handle correctly spaces at the beginning of the filename
+ // filesize (token[2]) must end at offset 38
+ if (tokens[2] + toklen[2] - line == 38) {
+ result.filename = &(line[39]);
+ result.filenameLength = p - result.filename;
+ }
result.type = FTPFileEntry;
pos = toklen[2];
result.fileSize = String(tokens[2], pos);
}
- else if ((tokens[2][1]) != 'D') /* not <DIR> */
- {
- result.type = FTPJunkEntry; /* unknown until junc for sure */
- if (result.filenameLength > 4)
+ else {
+ // try to handle correctly spaces at the beginning of the filename
+ // token[2] must begin at offset 24, the length is 5 or 10
+ // token[3] must begin at offset 39 or higher
+ if (tokens[2] - line == 24 && (toklen[2] == 5 || toklen[2] == 10) &&
+ tokens[3] - line >= 39) {
+ result.filename = &(line[39]);
+ result.filenameLength = p - result.filename;
+ }
+
+ if ((tokens[2][1]) != 'D') /* not <DIR> */
{
- p = result.filename;
- for (pos = result.filenameLength - 4; pos > 0; pos--)
+ result.type = FTPJunkEntry; /* unknown until junc for sure */
+ if (result.filenameLength > 4)
{
- if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' &&
- (p[1] == '=' || p[1] == '-'))
+ p = result.filename;
+ for (pos = result.filenameLength - 4; pos > 0; pos--)
{
- result.type = FTPLinkEntry;
- result.filenameLength = p - result.filename;
- result.linkname = p + 4;
- result.linknameLength = &(line[linelen_sans_wsp])
- - result.linkname;
- break;
+ if (p[0] == ' ' && p[3] == ' ' && p[2] == '>' &&
+ (p[1] == '=' || p[1] == '-'))
+ {
+ result.type = FTPLinkEntry;
+ result.filenameLength = p - result.filename;
+ result.linkname = p + 4;
+ result.linknameLength = &(line[linelen])
+ - result.linkname;
+ break;
+ }
+ p++;
}
- p++;
}
}
}
@@ -821,8 +853,13 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
result.modifiedTime.tm_mon--;
result.modifiedTime.tm_mday = atoi(tokens[0]+3);
result.modifiedTime.tm_year = atoi(tokens[0]+6);
+ /* if year has only two digits then assume that
+ 00-79 is 2000-2079
+ 80-99 is 1980-1999 */
if (result.modifiedTime.tm_year < 80)
- result.modifiedTime.tm_year += 100;
+ result.modifiedTime.tm_year += 2000;
+ else if (result.modifiedTime.tm_year < 100)
+ result.modifiedTime.tm_year += 1900;
}
result.modifiedTime.tm_hour = atoi(tokens[1]+0);
@@ -974,6 +1011,8 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
* "drwxr-xr-x 2 0 0 512 May 28 22:17 etc"
*/
+ bool isOldHellsoft = false;
+
if (numtoks >= 6)
{
/* there are two perm formats (Hellsoft/NetWare and *IX strmode(3)).
@@ -999,6 +1038,8 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
{
/* rest is FMA[S] or AFM[S] */
lstyle = 'U'; /* very likely one of the NetWare servers */
+ if (toklen[0] == 10)
+ isOldHellsoft = true;
}
}
}
@@ -1063,7 +1104,7 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
/* check that size is numeric */
p = tokens[tokmarker];
- for (pos = 0; lstyle && pos < toklen[tokmarker]; pos++)
+ for (unsigned int i = 0; lstyle && i < toklen[tokmarker]; ++i)
{
if (!isASCIIDigit(*p++))
lstyle = 0;
@@ -1072,11 +1113,11 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
{
month_num = 0;
p = tokens[tokmarker+1];
- for (pos = 0;pos < (12*3); pos+=3)
+ for (unsigned int i = 0; i < (12*3); i+=3)
{
- if (p[0] == month_names[pos+0] &&
- p[1] == month_names[pos+1] &&
- p[2] == month_names[pos+2])
+ if (p[0] == month_names[i+0] &&
+ p[1] == month_names[i+1] &&
+ p[2] == month_names[i+2])
break;
month_num++;
}
@@ -1084,8 +1125,8 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
lstyle = 0;
}
} /* relative position test */
- } /* while (pos+5) < numtoks */
- } /* if (numtoks >= 4) */
+ } /* for (pos = (numtoks-5); !lstyle && pos > 1; pos--) */
+ } /* if (lstyle == 'U') */
if (lstyle == 'U')
{
@@ -1144,24 +1185,49 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
} /* time/year */
- result.filename = tokens[tokmarker+4];
- result.filenameLength = (&(line[linelen_sans_wsp]))
+ // there is exacly 1 space between filename and previous token in all
+ // outputs except old Hellsoft
+ if (!isOldHellsoft)
+ result.filename = tokens[tokmarker+3] + toklen[tokmarker+3] + 1;
+ else
+ result.filename = tokens[tokmarker+4];
+
+ result.filenameLength = (&(line[linelen]))
- (result.filename);
if (result.type == FTPLinkEntry && result.filenameLength > 4)
{
- p = result.filename + 1;
- for (pos = 1; pos < (result.filenameLength - 4); pos++)
+ /* First try to use result.fe_size to find " -> " sequence.
+ This can give proper result for cases like "aaa -> bbb -> ccc". */
+ unsigned int fileSize = result.fileSize.toUInt();
+
+ if (result.filenameLength > (fileSize + 4) &&
+ strncmp(result.filename + result.filenameLength - fileSize - 4, " -> ", 4) == 0)
+ {
+ result.linkname = result.filename + (result.filenameLength - fileSize);
+ result.linknameLength = (&(line[linelen])) - (result.linkname);
+ result.filenameLength -= fileSize + 4;
+ }
+ else
{
- if (*p == ' ' && p[1] == '-' && p[2] == '>' && p[3] == ' ')
+ /* Search for sequence " -> " from the end for case when there are
+ more occurrences. F.e. if ftpd returns "a -> b -> c" assume
+ "a -> b" as a name. Powerusers can remove unnecessary parts
+ manually but there is no way to follow the link when some
+ essential part is missing. */
+ p = result.filename + (result.filenameLength - 5);
+ for (pos = (result.filenameLength - 5); pos > 0; pos--)
{
- result.linkname = p + 4;
- result.linknameLength = (&(line[linelen_sans_wsp]))
- - (result.linkname);
- result.filenameLength = pos;
- break;
+ if (strncmp(p, " -> ", 4) == 0)
+ {
+ result.linkname = p + 4;
+ result.linknameLength = (&(line[linelen]))
+ - (result.linkname);
+ result.filenameLength = pos;
+ break;
+ }
+ p--;
}
- p++;
}
}
@@ -1618,9 +1684,7 @@ FTPEntryType parseOneFTPLine(const char* line, ListState& state, ListResult& res
} /* if (linelen > 0) */
- if (state.parsedOne || state.listStyle) /* junk if we fail to parse */
- return FTPJunkEntry; /* this time but had previously parsed sucessfully */
- return FTPMiscEntry; /* its part of a comment or error message */
+ return ParsingFailed(state);
}
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
index 807edef..57cf85a 100644
--- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
@@ -2312,9 +2312,6 @@ void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis
void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const String& frameName, bool lockHistory, FrameLoadType newLoadType,
PassRefPtr<Event> event, PassRefPtr<FormState> prpFormState)
{
- if (m_unloadEventBeingDispatched)
- return;
-
RefPtr<FormState> formState = prpFormState;
bool isFormSubmission = formState;
@@ -2337,6 +2334,9 @@ void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const Stri
return;
}
+ if (m_unloadEventBeingDispatched)
+ return;
+
NavigationAction action(newURL, newLoadType, isFormSubmission, event);
if (!targetFrame && !frameName.isEmpty()) {
@@ -5193,6 +5193,8 @@ void FrameLoader::dispatchWindowObjectAvailable()
#if ENABLE(INSPECTOR)
if (Page* page = m_frame->page()) {
+ if (InspectorController* inspector = page->inspectorController())
+ inspector->inspectedWindowScriptObjectCleared(m_frame);
if (InspectorController* inspector = page->parentInspectorController())
inspector->windowScriptObjectAvailable();
}
diff --git a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
index 809d541..5ac4049 100644
--- a/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
+++ b/src/3rdparty/webkit/WebCore/page/DOMWindow.cpp
@@ -34,6 +34,8 @@
#include "CString.h"
#include "Chrome.h"
#include "Console.h"
+#include "Database.h"
+#include "DOMApplicationCache.h"
#include "DOMSelection.h"
#include "DOMTimer.h"
#include "PageTransitionEvent.h"
@@ -55,6 +57,7 @@
#include "Media.h"
#include "MessageEvent.h"
#include "Navigator.h"
+#include "NotificationCenter.h"
#include "Page.h"
#include "PageGroup.h"
#include "PlatformScreen.h"
@@ -62,29 +65,14 @@
#include "Screen.h"
#include "SecurityOrigin.h"
#include "Settings.h"
+#include "Storage.h"
+#include "StorageArea.h"
+#include "StorageNamespace.h"
#include "SuddenTermination.h"
#include "WebKitPoint.h"
#include <algorithm>
#include <wtf/MathExtras.h>
-#if ENABLE(DATABASE)
-#include "Database.h"
-#endif
-
-#if ENABLE(DOM_STORAGE)
-#include "Storage.h"
-#include "StorageArea.h"
-#include "StorageNamespace.h"
-#endif
-
-#if ENABLE(OFFLINE_WEB_APPLICATIONS)
-#include "DOMApplicationCache.h"
-#endif
-
-#if ENABLE(NOTIFICATIONS)
-#include "NotificationCenter.h"
-#endif
-
using std::min;
using std::max;
@@ -137,6 +125,66 @@ static DOMWindowSet& windowsWithBeforeUnloadEventListeners()
return windowsWithBeforeUnloadEventListeners;
}
+static void addUnloadEventListener(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithUnloadEventListeners();
+ if (set.isEmpty())
+ disableSuddenTermination();
+ set.add(domWindow);
+}
+
+static void removeUnloadEventListener(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithUnloadEventListeners();
+ DOMWindowSet::iterator it = set.find(domWindow);
+ if (it == set.end())
+ return;
+ set.remove(it);
+ if (set.isEmpty())
+ enableSuddenTermination();
+}
+
+static void removeAllUnloadEventListeners(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithUnloadEventListeners();
+ DOMWindowSet::iterator it = set.find(domWindow);
+ if (it == set.end())
+ return;
+ set.removeAll(it);
+ if (set.isEmpty())
+ enableSuddenTermination();
+}
+
+static void addBeforeUnloadEventListener(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
+ if (set.isEmpty())
+ disableSuddenTermination();
+ set.add(domWindow);
+}
+
+static void removeBeforeUnloadEventListener(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
+ DOMWindowSet::iterator it = set.find(domWindow);
+ if (it == set.end())
+ return;
+ set.remove(it);
+ if (set.isEmpty())
+ enableSuddenTermination();
+}
+
+static void removeAllBeforeUnloadEventListeners(DOMWindow* domWindow)
+{
+ DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
+ DOMWindowSet::iterator it = set.find(domWindow);
+ if (it == set.end())
+ return;
+ set.removeAll(it);
+ if (set.isEmpty())
+ enableSuddenTermination();
+}
+
static bool allowsBeforeUnloadListeners(DOMWindow* window)
{
ASSERT_ARG(window, window);
@@ -193,7 +241,7 @@ unsigned DOMWindow::pendingUnloadEventListeners() const
void DOMWindow::dispatchAllPendingUnloadEvents()
{
- DOMWindowSet& set = windowsWithBeforeUnloadEventListeners();
+ DOMWindowSet& set = windowsWithUnloadEventListeners();
if (set.isEmpty())
return;
@@ -328,8 +376,8 @@ DOMWindow::~DOMWindow()
if (m_frame)
m_frame->clearFormerDOMWindow(this);
- windowsWithUnloadEventListeners().clear(this);
- windowsWithBeforeUnloadEventListeners().clear(this);
+ removeAllUnloadEventListeners(this);
+ removeAllBeforeUnloadEventListeners(this);
}
ScriptExecutionContext* DOMWindow::scriptExecutionContext() const
@@ -552,15 +600,12 @@ Storage* DOMWindow::localStorage() const
if (!page->settings()->localStorageEnabled())
return 0;
- StorageNamespace* localStorage = page->group().localStorage();
- RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(document->securityOrigin()) : 0;
- if (storageArea) {
+ RefPtr<StorageArea> storageArea = page->group().localStorage()->storageArea(document->securityOrigin());
#if ENABLE(INSPECTOR)
- page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
+ page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m_frame);
#endif
- m_localStorage = Storage::create(m_frame, storageArea.release());
- }
+ m_localStorage = Storage::create(m_frame, storageArea.release());
return m_localStorage.get();
}
#endif
@@ -579,6 +624,9 @@ NotificationCenter* DOMWindow::webkitNotifications() const
if (!page)
return 0;
+ if (!page->settings()->experimentalNotificationsEnabled())
+ return 0;
+
NotificationPresenter* provider = page->chrome()->notificationPresenter();
if (provider)
m_notifications = NotificationCenter::create(document, provider);
@@ -1215,9 +1263,9 @@ bool DOMWindow::addEventListener(const AtomicString& eventType, PassRefPtr<Event
document->addListenerTypeIfNeeded(eventType);
if (eventType == eventNames().unloadEvent)
- windowsWithUnloadEventListeners().add(this);
+ addUnloadEventListener(this);
else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
- windowsWithBeforeUnloadEventListeners().add(this);
+ addBeforeUnloadEventListener(this);
return true;
}
@@ -1228,9 +1276,9 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
return false;
if (eventType == eventNames().unloadEvent)
- windowsWithUnloadEventListeners().remove(this);
+ removeUnloadEventListener(this);
else if (eventType == eventNames().beforeunloadEvent && allowsBeforeUnloadListeners(this))
- windowsWithBeforeUnloadEventListeners().remove(this);
+ removeBeforeUnloadEventListener(this);
return true;
}
@@ -1266,8 +1314,8 @@ void DOMWindow::removeAllEventListeners()
{
EventTarget::removeAllEventListeners();
- windowsWithUnloadEventListeners().clear(this);
- windowsWithBeforeUnloadEventListeners().clear(this);
+ removeAllUnloadEventListeners(this);
+ removeAllBeforeUnloadEventListeners(this);
}
void DOMWindow::captureEvents()
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
index 8d519ef..3772d65 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp
@@ -1758,6 +1758,13 @@ bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
return swallowEvent;
}
+#if !PLATFORM(GTK)
+bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const
+{
+ return false;
+}
+#endif
+
bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
{
Document* doc = m_frame->document();
@@ -1777,11 +1784,12 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
bool isOverWidget;
bool didSetLatchedNode = false;
+ HitTestRequest request(HitTestRequest::ReadOnly);
+ HitTestResult result(vPoint);
+ doc->renderView()->layer()->hitTest(request, result);
+
if (m_useLatchedWheelEventNode) {
if (!m_latchedWheelEventNode) {
- HitTestRequest request(HitTestRequest::ReadOnly);
- HitTestResult result(vPoint);
- doc->renderView()->layer()->hitTest(request, result);
m_latchedWheelEventNode = result.innerNode();
m_widgetIsLatched = result.isOverWidget();
didSetLatchedNode = true;
@@ -1795,13 +1803,13 @@ bool EventHandler::handleWheelEvent(PlatformWheelEvent& e)
if (m_previousWheelScrolledNode)
m_previousWheelScrolledNode = 0;
- HitTestRequest request(HitTestRequest::ReadOnly);
- HitTestResult result(vPoint);
- doc->renderView()->layer()->hitTest(request, result);
node = result.innerNode();
isOverWidget = result.isOverWidget();
}
+ if (shouldTurnVerticalTicksIntoHorizontal(result))
+ e.turnVerticalTicksIntoHorizontal();
+
if (node) {
// Figure out which view to send the event to.
RenderObject* target = node->renderer();
diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h
index 7066252..e1a02db 100644
--- a/src/3rdparty/webkit/WebCore/page/EventHandler.h
+++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h
@@ -125,6 +125,8 @@ public:
bool shouldDragAutoNode(Node*, const IntPoint&) const; // -webkit-user-drag == auto
#endif
+ bool shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&) const;
+
bool tabsToLinks(KeyboardEvent*) const;
bool tabsToAllControls(KeyboardEvent*) const;
diff --git a/src/3rdparty/webkit/WebCore/page/HaltablePlugin.h b/src/3rdparty/webkit/WebCore/page/HaltablePlugin.h
new file mode 100644
index 0000000..a5fe0f4
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/page/HaltablePlugin.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef HaltablePlugin_h
+#define HaltablePlugin_h
+
+namespace WebCore {
+
+class Node;
+
+class HaltablePlugin {
+public:
+ virtual ~HaltablePlugin() { }
+
+ virtual void halt() = 0;
+ virtual void restart() = 0;
+ virtual Node* node() const = 0;
+};
+
+} // namespace WebCore
+
+#endif // HaltablePlugin_h
diff --git a/src/3rdparty/webkit/WebCore/page/Page.cpp b/src/3rdparty/webkit/WebCore/page/Page.cpp
index 182d22c..2d0c91c 100644
--- a/src/3rdparty/webkit/WebCore/page/Page.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Page.cpp
@@ -49,6 +49,7 @@
#include "NetworkStateNotifier.h"
#include "PageGroup.h"
#include "PluginData.h"
+#include "PluginHalter.h"
#include "ProgressTracker.h"
#include "RenderWidget.h"
#include "RenderTheme.h"
@@ -99,7 +100,7 @@ static void networkStateChanged()
frames[i]->document()->dispatchWindowEvent(Event::create(eventName, false, false));
}
-Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, EditorClient* editorClient, DragClient* dragClient, InspectorClient* inspectorClient)
+Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, EditorClient* editorClient, DragClient* dragClient, InspectorClient* inspectorClient, PluginHalterClient* pluginHalterClient)
: m_chrome(new Chrome(this, chromeClient))
, m_dragCaretController(new SelectionController(0, true))
#if ENABLE(DRAG_SUPPORT)
@@ -135,6 +136,7 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
, m_customHTMLTokenizerTimeDelay(-1)
, m_customHTMLTokenizerChunkSize(-1)
, m_canStartPlugins(true)
+ , m_pluginHalterClient(pluginHalterClient)
{
#if !ENABLE(CONTEXT_MENUS)
UNUSED_PARAM(contextMenuClient);
@@ -154,6 +156,8 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
ASSERT(!allPages->contains(this));
allPages->add(this);
+ pluginHalterEnabledStateChanged();
+
#if ENABLE(JAVASCRIPT_DEBUGGER)
JavaScriptDebugServer::shared().pageCreated(this);
#endif
@@ -679,4 +683,32 @@ InspectorTimelineAgent* Page::inspectorTimelineAgent() const
}
#endif
+void Page::pluginHalterEnabledStateChanged()
+{
+ if (m_settings->pluginHalterEnabled()) {
+ ASSERT(!m_pluginHalter);
+ m_pluginHalter.set(new PluginHalter(m_pluginHalterClient));
+ m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
+ } else
+ m_pluginHalter = 0;
+}
+
+void Page::pluginAllowedRunTimeChanged()
+{
+ if (m_pluginHalter)
+ m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
+}
+
+void Page::didStartPlugin(HaltablePlugin* obj)
+{
+ if (m_pluginHalter)
+ m_pluginHalter->didStartPlugin(obj);
+}
+
+void Page::didStopPlugin(HaltablePlugin* obj)
+{
+ if (m_pluginHalter)
+ m_pluginHalter->didStopPlugin(obj);
+}
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/Page.h b/src/3rdparty/webkit/WebCore/page/Page.h
index d3f7ddb..602d99b 100644
--- a/src/3rdparty/webkit/WebCore/page/Page.h
+++ b/src/3rdparty/webkit/WebCore/page/Page.h
@@ -54,12 +54,15 @@ namespace WebCore {
class EditorClient;
class FocusController;
class Frame;
+ class HaltablePlugin;
class InspectorClient;
class InspectorController;
class InspectorTimelineAgent;
class Node;
class PageGroup;
class PluginData;
+ class PluginHalter;
+ class PluginHalterClient;
class PluginView;
class ProgressTracker;
class RenderTheme;
@@ -82,7 +85,7 @@ namespace WebCore {
public:
static void setNeedsReapplyStyles();
- Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*);
+ Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*);
~Page();
RenderTheme* theme() const { return m_theme.get(); };
@@ -181,6 +184,11 @@ namespace WebCore {
void userStyleSheetLocationChanged();
const String& userStyleSheet() const;
+ void didStartPlugin(HaltablePlugin*);
+ void didStopPlugin(HaltablePlugin*);
+ void pluginAllowedRunTimeChanged();
+ void pluginHalterEnabledStateChanged();
+
static void setDebuggerForAllPages(JSC::Debugger*);
void setDebugger(JSC::Debugger*);
JSC::Debugger* debugger() const { return m_debugger; }
@@ -284,6 +292,9 @@ namespace WebCore {
bool m_canStartPlugins;
HashSet<PluginView*> m_unstartedPlugins;
+ OwnPtr<PluginHalter> m_pluginHalter;
+ PluginHalterClient* m_pluginHalterClient;
+
#if ENABLE(DOM_STORAGE)
RefPtr<StorageNamespace> m_sessionStorage;
#endif
diff --git a/src/3rdparty/webkit/WebCore/page/PluginHalter.cpp b/src/3rdparty/webkit/WebCore/page/PluginHalter.cpp
new file mode 100644
index 0000000..8025337
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/page/PluginHalter.cpp
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "PluginHalter.h"
+
+#include "HaltablePlugin.h"
+#include "PluginHalterClient.h"
+#include <wtf/CurrentTime.h>
+#include <wtf/Vector.h>
+
+using namespace std;
+
+namespace WebCore {
+
+PluginHalter::PluginHalter(PluginHalterClient* client)
+ : m_client(client)
+ , m_timer(this, &PluginHalter::timerFired)
+ , m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
+{
+ ASSERT_ARG(client, client);
+}
+
+void PluginHalter::didStartPlugin(HaltablePlugin* obj)
+{
+ ASSERT_ARG(obj, obj);
+ ASSERT_ARG(obj, !m_plugins.contains(obj));
+
+ double currentTime = WTF::currentTime();
+
+ m_plugins.add(obj, currentTime);
+
+ if (m_plugins.size() == 1)
+ m_oldestStartTime = currentTime;
+
+ startTimerIfNecessary();
+}
+
+void PluginHalter::didStopPlugin(HaltablePlugin* obj)
+{
+ m_plugins.remove(obj);
+}
+
+void PluginHalter::timerFired(Timer<PluginHalter>*)
+{
+ if (m_plugins.isEmpty())
+ return;
+
+ Vector<HaltablePlugin*> plugins;
+ copyKeysToVector(m_plugins, plugins);
+
+ // Plug-ins older than this are candidates to be halted.
+ double pluginCutOffTime = WTF::currentTime() - m_pluginAllowedRunTime;
+
+ m_oldestStartTime = numeric_limits<double>::max();
+
+ for (size_t i = 0; i < plugins.size(); ++i) {
+ double thisStartTime = m_plugins.get(plugins[i]);
+ if (thisStartTime > pluginCutOffTime) {
+ // This plug-in is too young to be halted. We find the oldest
+ // plug-in that is not old enough to be halted and use it to set
+ // the timer's next fire time.
+ if (thisStartTime < m_oldestStartTime)
+ m_oldestStartTime = thisStartTime;
+ continue;
+ }
+
+ if (m_client->shouldHaltPlugin(plugins[i]->node()))
+ plugins[i]->halt();
+
+ m_plugins.remove(plugins[i]);
+ }
+
+ startTimerIfNecessary();
+}
+
+void PluginHalter::startTimerIfNecessary()
+{
+ if (m_timer.isActive())
+ return;
+
+ if (m_plugins.isEmpty())
+ return;
+
+ double nextFireInterval = static_cast<double>(m_pluginAllowedRunTime) - (currentTime() - m_oldestStartTime);
+ m_timer.startOneShot(nextFireInterval < 0 ? 0 : nextFireInterval);
+}
+
+} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/page/PluginHalter.h b/src/3rdparty/webkit/WebCore/page/PluginHalter.h
new file mode 100644
index 0000000..26f5101
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/page/PluginHalter.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PluginHalter_h
+#define PluginHalter_h
+
+#include "Timer.h"
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+class HaltablePlugin;
+class PluginHalterClient;
+
+class PluginHalter {
+public:
+ PluginHalter(PluginHalterClient*);
+
+ void didStartPlugin(HaltablePlugin*);
+ void didStopPlugin(HaltablePlugin*);
+
+ void setPluginAllowedRunTime(unsigned runTime) { m_pluginAllowedRunTime = runTime; }
+
+private:
+ void timerFired(Timer<PluginHalter>*);
+ void startTimerIfNecessary();
+
+ PluginHalterClient* m_client;
+ Timer<PluginHalter> m_timer;
+ unsigned m_pluginAllowedRunTime;
+ double m_oldestStartTime;
+ HashMap<HaltablePlugin*, double> m_plugins;
+};
+
+} // namespace WebCore
+
+#endif // PluginHalter_h
diff --git a/src/3rdparty/webkit/WebCore/page/PluginHalterClient.h b/src/3rdparty/webkit/WebCore/page/PluginHalterClient.h
new file mode 100644
index 0000000..7ea460a
--- /dev/null
+++ b/src/3rdparty/webkit/WebCore/page/PluginHalterClient.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PluginHalterClient_h
+#define PluginHalterClient_h
+
+namespace WebCore {
+
+class Node;
+
+class PluginHalterClient {
+public:
+ virtual ~PluginHalterClient() { }
+
+ virtual bool shouldHaltPlugin(Node*) const = 0;
+};
+
+} // namespace WebCore
+
+#endif // PluginHalterClient_h
diff --git a/src/3rdparty/webkit/WebCore/page/Settings.cpp b/src/3rdparty/webkit/WebCore/page/Settings.cpp
index da36fee..708d595 100644
--- a/src/3rdparty/webkit/WebCore/page/Settings.cpp
+++ b/src/3rdparty/webkit/WebCore/page/Settings.cpp
@@ -61,6 +61,7 @@ Settings::Settings(Page* page)
, m_defaultFontSize(0)
, m_defaultFixedFontSize(0)
, m_maximumDecodedImageSize(numeric_limits<size_t>::max())
+ , m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
, m_isJavaEnabled(false)
, m_loadsImagesAutomatically(false)
, m_privateBrowsingEnabled(false)
@@ -114,6 +115,8 @@ Settings::Settings(Page* page)
, m_downloadableBinaryFontsEnabled(true)
, m_xssAuditorEnabled(false)
, m_acceleratedCompositingEnabled(true)
+ , m_experimentalNotificationsEnabled(false)
+ , m_pluginHalterEnabled(false)
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
@@ -497,6 +500,27 @@ void Settings::setAcceleratedCompositingEnabled(bool enabled)
setNeedsReapplyStylesInAllFrames(m_page);
}
+void Settings::setExperimentalNotificationsEnabled(bool enabled)
+{
+ m_experimentalNotificationsEnabled = enabled;
+}
+
+void Settings::setPluginHalterEnabled(bool enabled)
+{
+ if (m_pluginHalterEnabled == enabled)
+ return;
+
+ m_pluginHalterEnabled = enabled;
+
+ m_page->pluginHalterEnabledStateChanged();
+}
+
+void Settings::setPluginAllowedRunTime(unsigned runTime)
+{
+ m_pluginAllowedRunTime = runTime;
+ m_page->pluginAllowedRunTimeChanged();
+}
+
#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
void Settings::setShouldUseHighResolutionTimers(bool shouldUseHighResolutionTimers)
{
diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h
index 7900c91..b3daf19 100644
--- a/src/3rdparty/webkit/WebCore/page/Settings.h
+++ b/src/3rdparty/webkit/WebCore/page/Settings.h
@@ -253,11 +253,20 @@ namespace WebCore {
void setAcceleratedCompositingEnabled(bool);
bool acceleratedCompositingEnabled() const { return m_acceleratedCompositingEnabled; }
+ void setExperimentalNotificationsEnabled(bool);
+ bool experimentalNotificationsEnabled() const { return m_experimentalNotificationsEnabled; }
+
#if PLATFORM(WIN) || (PLATFORM(WIN_OS) && PLATFORM(WX))
static void setShouldUseHighResolutionTimers(bool);
static bool shouldUseHighResolutionTimers() { return gShouldUseHighResolutionTimers; }
#endif
+ void setPluginHalterEnabled(bool);
+ bool pluginHalterEnabled() const { return m_pluginHalterEnabled; }
+
+ void setPluginAllowedRunTime(unsigned);
+ unsigned pluginAllowedRunTime() const { return m_pluginAllowedRunTime; }
+
private:
Page* m_page;
@@ -278,6 +287,7 @@ namespace WebCore {
int m_defaultFontSize;
int m_defaultFixedFontSize;
size_t m_maximumDecodedImageSize;
+ unsigned m_pluginAllowedRunTime;
bool m_isJavaEnabled : 1;
bool m_loadsImagesAutomatically : 1;
bool m_privateBrowsingEnabled : 1;
@@ -322,6 +332,8 @@ namespace WebCore {
bool m_downloadableBinaryFontsEnabled : 1;
bool m_xssAuditorEnabled : 1;
bool m_acceleratedCompositingEnabled : 1;
+ bool m_experimentalNotificationsEnabled : 1;
+ bool m_pluginHalterEnabled : 1;
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
diff --git a/src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp b/src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp
index 3ba64e9..978bc25 100644
--- a/src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp
+++ b/src/3rdparty/webkit/WebCore/page/android/InspectorControllerAndroid.cpp
@@ -90,6 +90,7 @@ void InspectorController::addProfile(PassRefPtr<JSC::Profile>, unsigned int, con
void InspectorController::inspectedPageDestroyed() {}
void InspectorController::resourceRetrievedByXMLHttpRequest(unsigned long identifier, JSC::UString& sourceString) {}
+void InspectorController::inspectedWindowScriptObjectCleared(Frame* frame) {}
void InspectorController::startGroup(MessageSource source, JSC::ExecState* exec, const JSC::ArgList& arguments, unsigned lineNumber, const String& sourceURL) {}
void InspectorController::endGroup(MessageSource source, unsigned lineNumber, const String& sourceURL) {}
void InspectorController::startTiming(const JSC::UString& title) {}
diff --git a/src/3rdparty/webkit/WebCore/platform/Pasteboard.h b/src/3rdparty/webkit/WebCore/platform/Pasteboard.h
index cd6a3b5..188b962 100644
--- a/src/3rdparty/webkit/WebCore/platform/Pasteboard.h
+++ b/src/3rdparty/webkit/WebCore/platform/Pasteboard.h
@@ -86,6 +86,7 @@ public:
static Pasteboard* generalPasteboard();
void writeSelection(Range*, bool canSmartCopyOrDelete, Frame*);
+ void writePlainText(const String&);
void writeURL(const KURL&, const String&, Frame* = 0);
void writeImage(Node*, const KURL&, const String& title);
#if PLATFORM(MAC)
diff --git a/src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h b/src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h
index 537deac..9a4a0cb 100644
--- a/src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h
+++ b/src/3rdparty/webkit/WebCore/platform/PlatformWheelEvent.h
@@ -93,6 +93,15 @@ namespace WebCore {
void accept() { m_isAccepted = true; }
void ignore() { m_isAccepted = false; }
+ void turnVerticalTicksIntoHorizontal()
+ {
+ m_deltaX = m_deltaY;
+ m_deltaY = 0;
+
+ m_wheelTicksX = m_wheelTicksY;
+ m_wheelTicksY = 0;
+ }
+
#if PLATFORM(GTK)
PlatformWheelEvent(GdkEventScroll*);
#endif
diff --git a/src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp b/src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp
index b68a74c..c0b57a6 100644
--- a/src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -175,6 +175,11 @@ void Pasteboard::writeSelection(Range*, bool, Frame*)
notImplemented();
}
+void Pasteboard::writePlainText(const String&)
+{
+ notImplemented();
+}
+
void Pasteboard::writeURL(const KURL&, const String&, Frame*)
{
notImplemented();
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h
index cbbf2b4..edda215 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/GraphicsContext3D.h
@@ -62,6 +62,11 @@ namespace WebCore {
class ImageData;
class WebKitCSSMatrix;
+ // FIXME: ideally this would be used on all platforms.
+#if PLATFORM(SKIA)
+ class GraphicsContext3DInternal;
+#endif
+
class GraphicsContext3D : Noncopyable {
public:
enum ShaderType { FRAGMENT_SHADER, VERTEX_SHADER };
@@ -308,10 +313,6 @@ namespace WebCore {
private:
int m_currentWidth, m_currentHeight;
-#if PLATFORM(SKIA)
-#include "GraphicsContext3DSkia.h"
-#endif
-
#if PLATFORM(MAC)
Vector<Vector<float> > m_vertexArray;
@@ -320,6 +321,12 @@ namespace WebCore {
GLuint m_fbo;
GLuint m_depthBuffer;
#endif
+
+ // FIXME: ideally this would be used on all platforms.
+#if PLATFORM(SKIA)
+ friend class GraphicsContext3DInternal;
+ OwnPtr<GraphicsContext3DInternal> m_internal;
+#endif
};
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm b/src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm
index e21f549..f048791 100644
--- a/src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm
+++ b/src/3rdparty/webkit/WebCore/platform/mac/PasteboardMac.mm
@@ -135,8 +135,8 @@ static NSAttributedString *stripAttachmentCharacters(NSAttributedString *string)
void Pasteboard::writeSelection(NSPasteboard* pasteboard, Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
{
- if (WebArchivePboardType == nil)
- Pasteboard::generalPasteboard(); //Initialises pasteboard types
+ if (!WebArchivePboardType)
+ Pasteboard::generalPasteboard(); // Initialises pasteboard types
ASSERT(selectedRange);
NSAttributedString *attributedString = [[[NSAttributedString alloc] _initWithDOMRange:kit(selectedRange)] autorelease];
@@ -203,12 +203,24 @@ void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete,
Pasteboard::writeSelection(m_pasteboard.get(), selectedRange, canSmartCopyOrDelete, frame);
}
+void Pasteboard::writePlainText(const String& text)
+{
+ if (!WebArchivePboardType)
+ Pasteboard::generalPasteboard(); // Initialises pasteboard types
+
+ NSArray *types = [NSArray arrayWithObject:NSStringPboardType];
+ NSPasteboard *pasteboard = m_pasteboard.get();
+ [pasteboard declareTypes:types owner:nil];
+
+ [pasteboard setString:text forType:NSStringPboardType];
+}
+
void Pasteboard::writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame)
{
- if (WebArchivePboardType == nil)
- Pasteboard::generalPasteboard(); //Initialises pasteboard types
+ if (!WebArchivePboardType)
+ Pasteboard::generalPasteboard(); // Initialises pasteboard types
- if (types == nil) {
+ if (!types) {
types = writableTypesForURL();
[pasteboard declareTypes:types owner:nil];
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp
index 969de62..209a573 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/PasteboardQt.cpp
@@ -119,6 +119,18 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefP
return 0;
}
+void Pasteboard::writePlainText(const String& text)
+{
+#ifndef QT_NO_CLIPBOARD
+ QMimeData* md = new QMimeData;
+ QString qtext = text;
+ qtext.replace(QChar(0xa0), QLatin1Char(' '));
+ md->setText(qtext);
+ QApplication::clipboard()->setMimeData(md, m_selectionMode ?
+ QClipboard::Selection : QClipboard::Clipboard);
+#endif
+}
+
void Pasteboard::writeURL(const KURL& _url, const String&, Frame*)
{
ASSERT(!_url.isEmpty());
diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp
index c6c02cf..e351522 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextCodecQt.cpp
@@ -94,7 +94,26 @@ TextCodecQt::~TextCodecQt()
String TextCodecQt::decode(const char* bytes, size_t length, bool flush, bool /*stopOnError*/, bool& sawError)
{
- QString unicode = m_codec->toUnicode(bytes, length, &m_state);
+ // We chop input buffer to smaller buffers to avoid excessive memory consumption
+ // when the input buffer is big. This helps reduce peak memory consumption in
+ // mobile devices where system RAM is limited.
+#if PLATFORM(SYMBIAN)
+ static const int MaxInputChunkSize = 32 * 1024;
+#else
+ static const int MaxInputChunkSize = 1024 * 1024;
+#endif
+ const char* buf = bytes;
+ const char* end = buf + length;
+ String unicode;
+
+ while (buf < end) {
+ int size = end - buf;
+ size = qMin(size, MaxInputChunkSize);
+ QString decoded = m_codec->toUnicode(buf, size, &m_state);
+ unicode.append(decoded);
+ buf += size;
+ }
+
sawError = m_state.invalidChars != 0;
if (flush) {
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
index cea226e..dd58ed1 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBox.cpp
@@ -2456,7 +2456,7 @@ void RenderBox::calcAbsoluteHorizontalReplaced()
// positioned, inline containing block because right now, it is using the xPos
// of the first line box when really it should use the last line box. When
// this is fixed elsewhere, this block should be removed.
- if (containerBlock->isInline() && containerBlock->style()->direction() == RTL) {
+ if (containerBlock->isRenderInline() && containerBlock->style()->direction() == RTL) {
const RenderInline* flow = toRenderInline(containerBlock);
InlineFlowBox* firstLine = flow->firstLineBox();
InlineFlowBox* lastLine = flow->lastLineBox();
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
index e5a0c16..34f2b8b 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderObject.h
@@ -985,6 +985,42 @@ inline void makeMatrixRenderable(TransformationMatrix& matrix, bool has3DRenderi
#endif
}
+inline int adjustForAbsoluteZoom(int value, RenderObject* renderer)
+{
+ float zoomFactor = renderer->style()->effectiveZoom();
+ if (zoomFactor == 1)
+ return value;
+ // Needed because computeLengthInt truncates (rather than rounds) when scaling up.
+ if (zoomFactor > 1)
+ value++;
+ return static_cast<int>(value / zoomFactor);
+}
+
+inline void adjustIntRectForAbsoluteZoom(IntRect& rect, RenderObject* renderer)
+{
+ rect.setX(adjustForAbsoluteZoom(rect.x(), renderer));
+ rect.setY(adjustForAbsoluteZoom(rect.y(), renderer));
+ rect.setWidth(adjustForAbsoluteZoom(rect.width(), renderer));
+ rect.setHeight(adjustForAbsoluteZoom(rect.height(), renderer));
+}
+
+inline FloatPoint adjustFloatPointForAbsoluteZoom(const FloatPoint& point, RenderObject* renderer)
+{
+ // The result here is in floats, so we don't need the truncation hack from the integer version above.
+ float zoomFactor = renderer->style()->effectiveZoom();
+ if (zoomFactor == 1)
+ return point;
+ return FloatPoint(point.x() / zoomFactor, point.y() / zoomFactor);
+}
+
+inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject* renderer)
+{
+ quad.setP1(adjustFloatPointForAbsoluteZoom(quad.p1(), renderer));
+ quad.setP2(adjustFloatPointForAbsoluteZoom(quad.p2(), renderer));
+ quad.setP3(adjustFloatPointForAbsoluteZoom(quad.p3(), renderer));
+ quad.setP4(adjustFloatPointForAbsoluteZoom(quad.p4(), renderer));
+}
+
} // namespace WebCore
#ifndef NDEBUG
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
index cd90854..f430399 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.cpp
@@ -67,9 +67,9 @@ static Color disabledTextColor(const Color& textColor, const Color& backgroundCo
return disabledColor;
}
-RenderTextControl::RenderTextControl(Node* node)
+RenderTextControl::RenderTextControl(Node* node, bool placeholderVisible)
: RenderBlock(node)
- , m_placeholderVisible(false)
+ , m_placeholderVisible(placeholderVisible)
, m_edited(false)
, m_userEdited(false)
{
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h
index 3212a1b..cdd8716 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControl.h
@@ -59,7 +59,7 @@ public:
void updatePlaceholderVisibility(bool, bool);
protected:
- RenderTextControl(Node*);
+ RenderTextControl(Node*, bool);
int scrollbarThickness() const;
void adjustInnerTextStyle(const RenderStyle* startStyle, RenderStyle* textBlockStyle) const;
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp
index 3f0d041..8478432 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.cpp
@@ -31,10 +31,9 @@
namespace WebCore {
-RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node)
- : RenderTextControl(node)
+RenderTextControlMultiLine::RenderTextControlMultiLine(Node* node, bool placeholderVisible)
+ : RenderTextControl(node, placeholderVisible)
{
- m_placeholderVisible = static_cast<HTMLTextAreaElement*>(node)->placeholderShouldBeVisible();
}
RenderTextControlMultiLine::~RenderTextControlMultiLine()
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h
index 333cfa8..3371a8f 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlMultiLine.h
@@ -28,7 +28,7 @@ namespace WebCore {
class RenderTextControlMultiLine : public RenderTextControl {
public:
- RenderTextControlMultiLine(Node*);
+ RenderTextControlMultiLine(Node*, bool);
virtual ~RenderTextControlMultiLine();
void forwardEvent(Event*);
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
index 794be17..8d8ba97 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.cpp
@@ -48,14 +48,13 @@ namespace WebCore {
using namespace HTMLNames;
-RenderTextControlSingleLine::RenderTextControlSingleLine(Node* node)
- : RenderTextControl(node)
+RenderTextControlSingleLine::RenderTextControlSingleLine(Node* node, bool placeholderVisible)
+ : RenderTextControl(node, placeholderVisible)
, m_searchPopupIsVisible(false)
, m_shouldDrawCapsLockIndicator(false)
, m_searchEventTimer(this, &RenderTextControlSingleLine::searchEventTimerFired)
, m_searchPopup(0)
{
- m_placeholderVisible = inputElement()->placeholderShouldBeVisible();
}
RenderTextControlSingleLine::~RenderTextControlSingleLine()
@@ -460,7 +459,7 @@ void RenderTextControlSingleLine::updateFromElement()
if (m_placeholderVisible) {
ExceptionCode ec = 0;
- innerTextElement()->setInnerText(inputElement()->placeholder(), ec);
+ innerTextElement()->setInnerText(static_cast<Element*>(node())->getAttribute(placeholderAttr), ec);
ASSERT(!ec);
} else
setInnerTextValue(inputElement()->value());
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h
index 817efb2..4a17918 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderTextControlSingleLine.h
@@ -36,7 +36,7 @@ class TextControlInnerElement;
class RenderTextControlSingleLine : public RenderTextControl, private PopupMenuClient {
public:
- RenderTextControlSingleLine(Node*);
+ RenderTextControlSingleLine(Node*, bool);
virtual ~RenderTextControlSingleLine();
bool placeholderIsVisible() const { return m_placeholderVisible; }
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp
index 0d69216..66447d3 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.cpp
@@ -47,6 +47,11 @@ StorageAreaImpl::~StorageAreaImpl()
{
}
+PassRefPtr<StorageAreaImpl> StorageAreaImpl::create(StorageType storageType, PassRefPtr<SecurityOrigin> origin, PassRefPtr<StorageSyncManager> syncManager)
+{
+ return adoptRef(new StorageAreaImpl(storageType, origin, syncManager));
+}
+
StorageAreaImpl::StorageAreaImpl(StorageType storageType, PassRefPtr<SecurityOrigin> origin, PassRefPtr<StorageSyncManager> syncManager)
: m_storageType(storageType)
, m_securityOrigin(origin)
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h
index b98482b..a7cc9f6 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageAreaImpl.h
@@ -30,6 +30,7 @@
#include "StorageArea.h"
+#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
namespace WebCore {
@@ -40,7 +41,7 @@ namespace WebCore {
class StorageAreaImpl : public StorageArea {
public:
- StorageAreaImpl(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
+ static PassRefPtr<StorageAreaImpl> create(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
virtual ~StorageAreaImpl();
// The HTML5 DOM Storage API (and contains)
@@ -60,6 +61,7 @@ namespace WebCore {
SecurityOrigin* securityOrigin();
private:
+ StorageAreaImpl(StorageType, PassRefPtr<SecurityOrigin>, PassRefPtr<StorageSyncManager>);
StorageAreaImpl(StorageAreaImpl*);
void blockUntilImportComplete() const;
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
index 825581f..6866746 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespace.h
@@ -45,7 +45,7 @@ namespace WebCore {
static PassRefPtr<StorageNamespace> sessionStorageNamespace();
virtual ~StorageNamespace() { }
- virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*) = 0;
+ virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
virtual PassRefPtr<StorageNamespace> copy() = 0;
virtual void close() = 0;
virtual void unlock() = 0;
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp
index 5ac22cf..d5af31f 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.cpp
@@ -99,17 +99,18 @@ PassRefPtr<StorageNamespace> StorageNamespaceImpl::copy()
return adoptRef(newNamespace);
}
-PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(SecurityOrigin* origin)
+PassRefPtr<StorageArea> StorageNamespaceImpl::storageArea(PassRefPtr<SecurityOrigin> prpOrigin)
{
ASSERT(isMainThread());
ASSERT(!m_isShutdown);
+ RefPtr<SecurityOrigin> origin = prpOrigin;
RefPtr<StorageAreaImpl> storageArea;
if (storageArea = m_storageAreaMap.get(origin))
return storageArea.release();
- storageArea = adoptRef(new StorageAreaImpl(m_storageType, origin, m_syncManager));
- m_storageAreaMap.set(origin, storageArea);
+ storageArea = StorageAreaImpl::create(m_storageType, origin, m_syncManager);
+ m_storageAreaMap.set(origin.release(), storageArea);
return storageArea.release();
}
diff --git a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h
index d3ef37f..05a12ad 100644
--- a/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h
+++ b/src/3rdparty/webkit/WebCore/storage/StorageNamespaceImpl.h
@@ -46,7 +46,7 @@ namespace WebCore {
static PassRefPtr<StorageNamespace> sessionStorageNamespace();
virtual ~StorageNamespaceImpl();
- virtual PassRefPtr<StorageArea> storageArea(SecurityOrigin*);
+ virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>);
virtual PassRefPtr<StorageNamespace> copy();
virtual void close();
virtual void unlock();
diff --git a/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp b/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
index e301c86..bb68b82 100644
--- a/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/graphics/SVGImage.cpp
@@ -239,13 +239,14 @@ bool SVGImage::dataChanged(bool allDataReceived)
static DragClient* dummyDragClient = 0;
#endif
static InspectorClient* dummyInspectorClient = new EmptyInspectorClient;
+ static PluginHalterClient* dummyPluginHalterClient = new EmptyPluginHalterClient;
m_chromeClient.set(new SVGImageChromeClient(this));
// FIXME: If this SVG ends up loading itself, we might leak the world.
// THe comment said that the Cache code does not know about CachedImages
// holding Frames and won't know to break the cycle. But
- m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyEditorClient, dummyDragClient, dummyInspectorClient));
+ m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyEditorClient, dummyDragClient, dummyInspectorClient, dummyPluginHalterClient));
m_page->settings()->setJavaScriptEnabled(false);
m_page->settings()->setPluginsEnabled(false);
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLInputElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLInputElement.cpp
index 2dbdaf0..b027bf0 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLInputElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLInputElement.cpp
@@ -134,7 +134,6 @@ String WMLInputElement::value() const
void WMLInputElement::setValue(const String& value)
{
- InputElement::updatePlaceholderVisibility(this, this);
setFormControlValueMatchesRenderer(false);
m_data.setValue(constrainValue(value));
if (inDocument())
@@ -221,7 +220,7 @@ void WMLInputElement::copyNonAttributeProperties(const Element* source)
RenderObject* WMLInputElement::createRenderer(RenderArena* arena, RenderStyle*)
{
- return new (arena) RenderTextControlSingleLine(this);
+ return new (arena) RenderTextControlSingleLine(this, false);
}
void WMLInputElement::detach()
@@ -318,11 +317,6 @@ void WMLInputElement::documentDidBecomeActive()
reset();
}
-bool WMLInputElement::placeholderShouldBeVisible() const
-{
- return InputElement::placeholderShouldBeVisible(this, this);
-}
-
void WMLInputElement::willMoveToNewOwnerDocument()
{
// Always unregister for cache callbacks when leaving a document, even if we would otherwise like to be registered
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLInputElement.h b/src/3rdparty/webkit/WebCore/wml/WMLInputElement.h
index 7eb2455..98ea13a 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLInputElement.h
+++ b/src/3rdparty/webkit/WebCore/wml/WMLInputElement.h
@@ -58,8 +58,6 @@ public:
virtual const AtomicString& formControlName() const;
virtual String value() const;
virtual void setValue(const String&);
- virtual String placeholder() const { return String(); }
- virtual void setPlaceholder(const String&) { }
virtual void setValueFromRenderer(const String&);
virtual bool saveFormControlState(String& value) const;
@@ -82,7 +80,6 @@ public:
virtual String sanitizeValue(const String& proposedValue) const { return constrainValue(proposedValue); }
virtual void documentDidBecomeActive();
- virtual bool placeholderShouldBeVisible() const;
virtual void willMoveToNewOwnerDocument();
virtual void didMoveToNewOwnerDocument();
diff --git a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
index 798ae00..ca48d8d 100644
--- a/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XMLHttpRequest.cpp
@@ -709,23 +709,19 @@ String XMLHttpRequest::getResponseHeader(const AtomicString& name, ExceptionCode
{
if (m_state < HEADERS_RECEIVED) {
ec = INVALID_STATE_ERR;
- return "";
+ return String();
}
- if (!isValidToken(name))
- return "";
-
// See comment in getAllResponseHeaders above.
if (isSetCookieHeader(name) && !scriptExecutionContext()->securityOrigin()->canLoadLocalResources()) {
reportUnsafeUsage(scriptExecutionContext(), "Refused to get unsafe header \"" + name + "\"");
- return "";
+ return String();
}
if (!m_sameOriginRequest && !isOnAccessControlResponseHeaderWhitelist(name)) {
reportUnsafeUsage(scriptExecutionContext(), "Refused to get unsafe header \"" + name + "\"");
- return "";
+ return String();
}
-
return m_response.httpHeaderField(name);
}
diff --git a/src/3rdparty/webkit/WebKit/ChangeLog b/src/3rdparty/webkit/WebKit/ChangeLog
index b317193..7d55d82 100644
--- a/src/3rdparty/webkit/WebKit/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-26 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: <http://webkit.org/b/29753> DerivedSources.make broken for non-Mac targets
+
+ Reviewed by Darin Adler.
+
+ Fix ENABLE_ORIENTATION_EVENTS for non-Mac platforms.
+
+ * chromium/features.gypi: Added 'ENABLE_ORIENTATION_EVENTS=0' to
+ disable this feature by default.
+
2009-09-22 Yaar Schnitman <yaar@chromium.org>
Reviewed by David Levin.
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
index ff086f6..939d881 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp
@@ -95,16 +95,6 @@ public:
It is possible to replace the contents of child elements using
setPlainText() and setInnerXml(). To replace the element itself and its
contents, use setOuterXml().
-
- In the JavaScript DOM interfaces, elements can have additional functions
- depending on their type. For example, an HTML form element can be triggered
- to submit the entire form to the web server using the submit() function. A
- list of these special functions can be obtained in QWebElement using
- functions(); they can be invoked using callFunction().
-
- Similarly, element specific properties can be obtained using
- scriptableProperties() and read or written using scriptableProperty() or
- setScriptableProperty().
*/
/*!
@@ -473,6 +463,33 @@ bool QWebElement::hasAttributes() const
}
/*!
+ Returns true if the element has keyboard input focus; otherwise, returns false
+
+ \sa setFocus()
+*/
+bool QWebElement::hasFocus() const
+{
+ if (!m_element)
+ return false;
+ if (m_element->document())
+ return m_element == m_element->document()->focusedNode();
+ return false;
+}
+
+/*!
+ Gives keyboard input focus to this element
+
+ \sa hasFocus()
+*/
+void QWebElement::setFocus()
+{
+ if (!m_element)
+ return;
+ if (m_element->document() && m_element->isFocusable())
+ m_element->document()->setFocusedNode(m_element);
+}
+
+/*!
Returns the geometry of this element, relative to its containing frame.
\sa tagName()
@@ -673,41 +690,10 @@ static bool setupScriptContext(WebCore::Element* element, JSC::JSValue& thisValu
}
-static bool setupScriptObject(WebCore::Element* element, ScriptObject& object, ScriptState*& state, ScriptController*& scriptController)
-{
- if (!element)
- return false;
-
- Document* document = element->document();
- if (!document)
- return false;
-
- Frame* frame = document->frame();
- if (!frame)
- return false;
-
- scriptController = frame->script();
-
- state = scriptController->globalObject()->globalExec();
-
- JSC::JSValue thisValue = toJS(state, element);
- if (!thisValue)
- return false;
-
- JSC::JSObject* thisObject = thisValue.toObject(state);
- if (!thisObject)
- return false;
-
- object = ScriptObject(state, thisObject);
- return true;
-}
-
/*!
Executes \a scriptSource with this element as \c this object.
-
- \sa callFunction()
*/
-QVariant QWebElement::evaluateScript(const QString& scriptSource)
+QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
{
if (scriptSource.isEmpty())
return QVariant();
@@ -734,256 +720,25 @@ QVariant QWebElement::evaluateScript(const QString& scriptSource)
}
/*!
- Calls the function with the given \a name and \a arguments.
-
- The underlying DOM element that QWebElement wraps may have dedicated
- functions, depending on its type. For example, a form element can have the
- \c submit function, that would submit the form to the destination specified
- in the HTML.
-
- \sa functions()
-*/
-QVariant QWebElement::callFunction(const QString &name, const QVariantList &arguments)
-{
- ScriptState* state = 0;
- ScriptObject thisObject;
- ScriptController* scriptController = 0;
-
- if (!setupScriptObject(m_element, thisObject, state, scriptController))
- return QVariant();
-
- ScriptFunctionCall functionCall(state, thisObject, name);
-
- for (QVariantList::ConstIterator it = arguments.constBegin(), end = arguments.constEnd();
- it != end; ++it)
- functionCall.appendArgument(JSC::Bindings::convertQVariantToValue(state, scriptController->bindingRootObject(), *it));
-
- bool hadException = false;
- ScriptValue result = functionCall.call(hadException);
- if (hadException)
- return QVariant();
-
- int distance = 0;
- return JSC::Bindings::convertValueToQVariant(state, result.jsValue(), QMetaType::Void, &distance);
-}
-
-/*!
- Returns a list of function names this element supports.
-
- The function names returned are the same functions callable from the DOM
- element's JavaScript binding.
-
- \sa callFunction()
-*/
-QStringList QWebElement::functions() const
-{
- ScriptState* state = 0;
- ScriptObject thisObject;
- ScriptController* scriptController = 0;
-
- if (!setupScriptObject(m_element, thisObject, state, scriptController))
- return QStringList();
-
- JSC::JSObject* object = thisObject.jsObject();
- if (!object)
- return QStringList();
-
- QStringList names;
-
- // Enumerate the contents of the object
- JSC::PropertyNameArray properties(state);
- object->getPropertyNames(state, properties);
- for (JSC::PropertyNameArray::const_iterator it = properties.begin();
- it != properties.end(); ++it) {
-
- JSC::JSValue property = object->get(state, *it);
- if (!property)
- continue;
-
- JSC::JSObject* function = property.toObject(state);
- if (!function)
- continue;
-
- JSC::CallData callData;
- JSC::CallType callType = function->getCallData(callData);
- if (callType == JSC::CallTypeNone)
- continue;
-
- JSC::UString ustring = (*it).ustring();
- names << QString::fromUtf16((const ushort*)ustring.rep()->data(), ustring.size());
- }
-
- if (state->hadException())
- state->clearException();
-
- return names;
-}
-
-/*!
- Returns the value of the element's \a name property. If no such property
- exists, an invalid QVariant is returned.
-
- The return value's property has the same value as the corresponding
- property in the element's JavaScript binding with the same name.
-
- Information about all available properties is provided through
- scriptProperties().
-
- \sa setScriptableProperty(), scriptableProperties()
-*/
-QVariant QWebElement::scriptableProperty(const QString &name) const
-{
- ScriptState* state = 0;
- ScriptObject thisObject;
- ScriptController *scriptController = 0;
-
- if (!setupScriptObject(m_element, thisObject, state, scriptController))
- return QVariant();
-
- String wcName(name);
- JSC::JSValue property = thisObject.jsObject()->get(state, JSC::Identifier(state, wcName));
-
- // ###
- if (state->hadException())
- state->clearException();
-
- int distance = 0;
- return JSC::Bindings::convertValueToQVariant(state, property, QMetaType::Void, &distance);
-}
-
-/*!
- Sets the value of the element's \a name property to \a value.
-
- Information about all available properties is provided through
- scriptProperties().
-
- Setting the property will affect the corresponding property in the
- element's JavaScript binding with the same name.
-
- \sa scriptableProperty(), scriptableProperties()
-*/
-void QWebElement::setScriptableProperty(const QString &name, const QVariant &value)
-{
- ScriptState* state = 0;
- ScriptObject thisObject;
- ScriptController* scriptController = 0;
-
- if (!setupScriptObject(m_element, thisObject, state, scriptController))
- return;
-
- JSC::JSValue jsValue = JSC::Bindings::convertQVariantToValue(state, scriptController->bindingRootObject(), value);
- if (!jsValue)
- return;
-
- String wcName(name);
- JSC::PutPropertySlot slot;
- thisObject.jsObject()->put(state, JSC::Identifier(state, wcName), jsValue, slot);
- if (state->hadException())
- state->clearException();
-}
-
-/*!
- Returns a list of property names this element supports.
-
- The function names returned are the same properties that are accessible
- from the DOM element's JavaScript binding.
-
- \sa setScriptableProperty(), scriptableProperty()
-*/
-QStringList QWebElement::scriptableProperties() const
-{
- if (!m_element)
- return QStringList();
-
- Document* document = m_element->document();
- if (!document)
- return QStringList();
-
- Frame* frame = document->frame();
- if (!frame)
- return QStringList();
-
- ScriptController* script = frame->script();
- JSC::ExecState* exec = script->globalObject()->globalExec();
-
- JSC::JSValue thisValue = toJS(exec, m_element);
- if (!thisValue)
- return QStringList();
-
- JSC::JSObject* object = thisValue.toObject(exec);
- if (!object)
- return QStringList();
-
- QStringList names;
-
- // Enumerate the contents of the object
- JSC::PropertyNameArray properties(exec);
- object->getPropertyNames(exec, properties);
- for (JSC::PropertyNameArray::const_iterator it = properties.begin();
- it != properties.end(); ++it) {
-
- JSC::JSValue property = object->get(exec, *it);
- if (!property)
- continue;
-
- JSC::JSObject* function = property.toObject(exec);
- if (!function)
- continue;
-
- JSC::CallData callData;
- JSC::CallType callType = function->getCallData(callData);
- if (callType != JSC::CallTypeNone)
- continue;
-
- JSC::UString ustring = (*it).ustring();
- names << QString::fromUtf16((const ushort*)ustring.rep()->data(), ustring.size());
- }
-
- if (exec->hadException())
- exec->clearException();
-
- return names;
-}
-
-/*!
- \enum QWebElement::ResolveRule
- \since 4.6
+ \enum QWebElement::StyleResolveStrategy
This enum describes how QWebElement's styleProperty resolves the given
property name.
- \value IgnoreCascadingStyles Return the property value as it is defined in
+ \value InlineStyle Return the property value as it is defined in
the element, without respecting style inheritance and other CSS
rules.
- \value RespectCascadingStyles The property's value is determined using the
+ \value CascadedStyle The property's value is determined using the
inheritance and importance rules defined in the document's
stylesheet.
+ \value ComputedStyle The property's value is the absolute value
+ of the style property resolved from the environment.
*/
/*!
- \enum QWebElement::StylePriority
- \since 4.6
-
- This enum describes the priority newly set CSS properties should have when
- set using QWebElement::setStyleProperty().
-
- \value NormalStylePriority Define the property without important priority
- even if "!important" is explicitly set in \a value.
- \value DeclaredStylePriority Define the property respecting the priority
- specified in \a value.
- \value ImportantStylePriority Define the property to have an important
- priority. This is equal to appending "!important" to the value.
-*/
-
-/*!
- Returns the value of the style with the given \a name. If a style with
- \a name does not exist, an empty string is returned.
-
- If \a rule is IgnoreCascadingStyles, the value defined inside the element
- (inline in CSS terminology) is returned.
-
- if \a rule is RespectCascadingStyles, the actual style applied to the
- element is returned.
+ Returns the value of the style with the given \a name using the specified
+ \a strategy. If a style with \a name does not exist, an empty string is
+ returned.
In CSS, the cascading part depends on which CSS rule has priority and is
thus applied. Generally, the last defined rule has priority. Thus, an
@@ -997,7 +752,8 @@ QStringList QWebElement::scriptableProperties() const
\sa setStyleProperty()
*/
-QString QWebElement::styleProperty(const QString &name, ResolveRule rule) const
+
+QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy strategy) const
{
if (!m_element || !m_element->isStyledElement())
return QString();
@@ -1009,10 +765,10 @@ QString QWebElement::styleProperty(const QString &name, ResolveRule rule) const
CSSStyleDeclaration* style = static_cast<StyledElement*>(m_element)->style();
- if (rule == IgnoreCascadingStyles)
+ if (strategy == InlineStyle)
return style->getPropertyValue(propID);
- if (rule == RespectCascadingStyles) {
+ if (strategy == CascadedStyle) {
if (style->getPropertyPriority(propID))
return style->getPropertyValue(propID);
@@ -1040,33 +796,33 @@ QString QWebElement::styleProperty(const QString &name, ResolveRule rule) const
return style->getPropertyValue(propID);
}
+ if (strategy == ComputedStyle) {
+ if (!m_element || !m_element->isStyledElement())
+ return QString();
+
+ int propID = cssPropertyID(name);
+
+ RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element);
+ if (!propID || !style)
+ return QString();
+
+ return style->getPropertyValue(propID);
+ }
+
return QString();
}
/*!
- Sets the value of the style with the given \a name to \a value.
+ Sets the value of the inline style with the given \a name to \a value.
Setting a value, does not necessarily mean that it will become the applied
value, due to the fact that the style property's value might have been set
- earlier with priority in external or embedded style declarations.
-
- In order to ensure that the value will be applied, ImportantStylePriority
- should be used as \a priority.
+ earlier with a higher priority in external or embedded style declarations.
- Following the CSS syntax for property values, this is equal to appending
+ In order to ensure that the value will be applied, you may have to append
"!important" to the value.
-
- This syntax is supported when using DeclaredStylePriority as \a priority.
-
- Using NormalStylePriority as \a priority, the property will have normal
- priority, and any "!important" declaration will be ignored. On the other
- hand, using ImportantStylePriority sets the important priority even when
- it is not explicitly passed in \a value.
-
- By using DeclaredStylePriority as \a priority the property will respect the
- priority specified in \a value.
*/
-void QWebElement::setStyleProperty(const QString &name, const QString &value, StylePriority priority)
+void QWebElement::setStyleProperty(const QString &name, const QString &value)
{
if (!m_element || !m_element->isStyledElement())
return;
@@ -1077,43 +833,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value, St
return;
ExceptionCode exception = 0;
-
- const QRegExp hasImportantTest(QLatin1String("!\\s*important"));
- int index = value.indexOf(hasImportantTest);
-
- QString newValue = (index != -1) ? value.left(index - 1) : value;
-
- switch (priority) {
- case NormalStylePriority:
- style->setProperty(name, newValue, "", exception);
- break;
- case DeclaredStylePriority:
- style->setProperty(name, newValue, (index != -1) ? "important" : "", exception);
- break;
- case ImportantStylePriority:
- style->setProperty(name, newValue, "important", exception);
- break;
- default:
- break;
- }
-}
-
-/*!
- Returns the computed value for style with the given \a name. If a style
- with \a name does not exist, an empty string is returned.
-*/
-QString QWebElement::computedStyleProperty(const QString &name) const
-{
- if (!m_element || !m_element->isStyledElement())
- return QString();
-
- int propID = cssPropertyID(name);
-
- RefPtr<CSSComputedStyleDeclaration> style = computedStyle(m_element);
- if (!propID || !style)
- return QString();
-
- return style->getPropertyValue(propID);
+ style->setProperty(name, value, exception);
}
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
index 5f4870c..3db4637 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h
@@ -74,6 +74,9 @@ public:
void removeClass(const QString& name);
void toggleClass(const QString& name);
+ bool hasFocus() const;
+ void setFocus();
+
QRect geometry() const;
QString tagName() const;
@@ -120,22 +123,15 @@ public:
void removeFromDocument();
void removeChildren();
- QVariant evaluateScript(const QString& scriptSource);
-
- QVariant callFunction(const QString& functionName, const QVariantList& arguments = QVariantList());
- QStringList functions() const;
-
- QVariant scriptableProperty(const QString& name) const;
- void setScriptableProperty(const QString& name, const QVariant& value);
- QStringList scriptableProperties() const;
-
- enum ResolveRule { IgnoreCascadingStyles, RespectCascadingStyles };
- QString styleProperty(const QString& name, ResolveRule = IgnoreCascadingStyles) const;
-
- enum StylePriority { NormalStylePriority, DeclaredStylePriority, ImportantStylePriority };
- void setStyleProperty(const QString& name, const QString& value, StylePriority = DeclaredStylePriority);
+ QVariant evaluateJavaScript(const QString& scriptSource);
- QString computedStyleProperty(const QString& name) const;
+ enum StyleResolveStrategy {
+ InlineStyle,
+ CascadedStyle,
+ ComputedStyle,
+ };
+ QString styleProperty(const QString& name, StyleResolveStrategy strategy) const;
+ void setStyleProperty(const QString& name, const QString& value);
private:
explicit QWebElement(WebCore::Element*);
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h
index b7af4f8..4d327cc 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector_p.h
@@ -20,10 +20,12 @@
#ifndef QWEBINSPECTOR_P_H
#define QWEBINSPECTOR_P_H
+QT_BEGIN_NAMESPACE
class QSize;
+class QWidget;
+QT_END_NAMESPACE
class QWebInspector;
class QWebPage;
-class QWidget;
class QWebInspectorPrivate {
public:
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index a6942a4..45a38c6 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -271,7 +271,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
contextMenuClient = new ContextMenuClientQt();
editorClient = new EditorClientQt(q);
page = new Page(chromeClient, contextMenuClient, editorClient,
- new DragClientQt(q), new InspectorClientQt(q));
+ new DragClientQt(q), new InspectorClientQt(q), 0);
// ### should be configurable
page->settings()->setDefaultTextEncodingName("iso-8859-1");
@@ -1491,9 +1491,11 @@ QWebPage::QWebPage(QObject *parent)
*/
QWebPage::~QWebPage()
{
- FrameLoader *loader = d->mainFrame->d->frame->loader();
- if (loader)
- loader->detachFromParent();
+ if (d->mainFrame) {
+ FrameLoader *loader = d->mainFrame->d->frame->loader();
+ if (loader)
+ loader->detachFromParent();
+ }
if (d->inspector)
d->inspector->setPage(0);
delete d;
@@ -1520,6 +1522,7 @@ QWebFrame *QWebPage::mainFrame() const
*/
QWebFrame *QWebPage::currentFrame() const
{
+ d->createMainFrame();
return static_cast<WebCore::FrameLoaderClientQt *>(d->page->focusController()->focusedOrMainFrame()->loader()->client())->webFrame();
}
@@ -1545,6 +1548,7 @@ QWebFrame* QWebPage::frameAt(const QPoint& pos) const
*/
QWebHistory *QWebPage::history() const
{
+ d->createMainFrame();
return &d->history;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 7020ec0..a8b5c38 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,99 @@
+2009-09-28 Andre Poenitz <andre.poenitz@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Compile fix with namespaced Qt.
+
+ * Api/qwebinspector_p.h:
+
+2009-09-27 Joe Ligman <joseph.ligman@mindspring.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Adding API setFocus and hasFocus to QWebElement. This API is needed for
+ clients that want to check/set the focus node of the document.
+ https://bugs.webkit.org/show_bug.cgi?id=29682
+
+ * Api/qwebelement.cpp:
+ (QWebElement::hasFocus):
+ (QWebElement::setFocus):
+ * Api/qwebelement.h:
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::hasSetFocus):
+
+2009-09-25 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Make tst_qwebframe work if Qt built without SSL support
+ https://bugs.webkit.org/show_bug.cgi?id=29735
+
+ * tests/qwebframe/tst_qwebframe.cpp: Missing #ifndef blocks added.
+
+2009-09-24 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Update QWebElement API to remove script related methods.
+ QWebElement::evaluateScript is the only one kept, these are
+ removed to postpone most of the QtWebKit<->JavaScript API design
+ after 4.6.
+ https://bugs.webkit.org/show_bug.cgi?id=29708
+
+ * Api/qwebelement.cpp:
+ * Api/qwebelement.h:
+ Methods removed:
+ - QWebElement::callFunction
+ - QWebElement::functions
+ - QWebElement::scriptableProperty
+ - QWebElement::setScriptableProperty
+ - QWebElement::scriptableProperties
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::evaluateScript):
+
+2009-09-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Rename QWebElement::evaluateScript
+ to QWebElement::evaluateJavaScript.
+ https://bugs.webkit.org/show_bug.cgi?id=29709
+
+ * Api/qwebelement.cpp:
+ (QWebElement::evaluateJavaScript):
+ * Api/qwebelement.h:
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::evaluateJavaScript):
+
+2009-09-25 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Update the stypeProperty API of QWebElement.
+ https://bugs.webkit.org/show_bug.cgi?id=29711
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty):
+ - Merge the stypeProperty and the computedStyleProperty methods
+ - Remove the default value for the style resolving enum
+ - Rename ResolveRule to StyleResolveStrategy
+ (QWebElement::setStyleProperty):
+ - Remove the priority argument since it is possible to control the
+ behaviour by adding !important or removing in the value.
+ * Api/qwebelement.h:
+ * tests/qwebelement/tst_qwebelement.cpp:
+ (tst_QWebElement::style):
+ (tst_QWebElement::computedStyle):
+ * tests/qwebframe/tst_qwebframe.cpp:
+
+2009-09-24 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Reviewed by Alice Liu.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ Pass 0 for new Page constructor argument.
+
2009-09-24 Martin Smith <msmith@trolltech.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
index f04cd29..069bea2 100644
--- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebview_snippet.cpp
@@ -13,22 +13,22 @@ void wrapInFunction()
//! [2]
- view->triggerAction(QWebPage::Copy);
+ view->triggerPageAction(QWebPage::Copy);
//! [2]
//! [3]
- view->page()->triggerPageAction(QWebPage::Stop);
+ view->page()->triggerAction(QWebPage::Stop);
//! [3]
//! [4]
- view->page()->triggerPageAction(QWebPage::GoBack);
+ view->page()->triggerAction(QWebPage::GoBack);
//! [4]
//! [5]
- view->page()->triggerPageAction(QWebPage::GoForward);
+ view->page()->triggerAction(QWebPage::GoForward);
//! [5]
}
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
index 0819a3a..00783d1 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp
@@ -71,15 +71,11 @@ private slots:
void classes();
void namespaceURI();
void foreachManipulation();
- void evaluateScript();
- void callFunction();
- void callFunctionSubmitForm();
- void functionNames();
+ void evaluateJavaScript();
void documentElement();
void frame();
void style();
void computedStyle();
- void properties();
void appendAndPrepend();
void insertBeforeAndAfter();
void remove();
@@ -90,6 +86,7 @@ private slots:
void nullSelect();
void firstChildNextSibling();
void lastChildPreviousSibling();
+ void hasSetFocus();
private:
QWebView* m_view;
@@ -282,69 +279,31 @@ void tst_QWebElement::foreachManipulation()
QCOMPARE(body.findAll("div").count(), 4);
}
-void tst_QWebElement::evaluateScript()
+void tst_QWebElement::evaluateJavaScript()
{
QVariant result;
m_mainFrame->setHtml("<body><p>test");
QWebElement para = m_mainFrame->findFirstElement("p");
- result = para.evaluateScript("this.tagName");
+ result = para.evaluateJavaScript("this.tagName");
QVERIFY(result.isValid());
QVERIFY(result.type() == QVariant::String);
QCOMPARE(result.toString(), QLatin1String("P"));
- QVERIFY(para.functions().contains("hasAttributes"));
- result = para.evaluateScript("this.hasAttributes()");
+ result = para.evaluateJavaScript("this.hasAttributes()");
QVERIFY(result.isValid());
QVERIFY(result.type() == QVariant::Bool);
QVERIFY(!result.toBool());
- para.evaluateScript("this.setAttribute('align', 'left');");
+ para.evaluateJavaScript("this.setAttribute('align', 'left');");
QCOMPARE(para.attribute("align"), QLatin1String("left"));
- result = para.evaluateScript("this.hasAttributes()");
+ result = para.evaluateJavaScript("this.hasAttributes()");
QVERIFY(result.isValid());
QVERIFY(result.type() == QVariant::Bool);
QVERIFY(result.toBool());
}
-void tst_QWebElement::callFunction()
-{
- m_mainFrame->setHtml("<body><p>test");
- QWebElement body = m_mainFrame->documentElement();
- QVERIFY(body.functions().contains("hasChildNodes"));
- QVariant result = body.callFunction("hasChildNodes");
- QVERIFY(result.isValid());
- QVERIFY(result.type() == QVariant::Bool);
- QVERIFY(result.toBool());
-
- body.callFunction("setAttribute", QVariantList() << "foo" << "bar");
- QCOMPARE(body.attribute("foo"), QString("bar"));
-}
-
-void tst_QWebElement::callFunctionSubmitForm()
-{
- m_mainFrame->setHtml(QString("<html><body><form name='tstform' action='data:text/html,foo'method='get'>"
- "<input type='text'><input type='submit'></form></body></html>"), QUrl());
-
- QWebElement form = m_mainFrame->documentElement().findAll("form").at(0);
- QVERIFY(form.functions().contains("submit"));
- QVERIFY(!form.isNull());
- form.callFunction("submit");
-
- waitForSignal(m_page, SIGNAL(loadFinished(bool)));
- QCOMPARE(m_mainFrame->url().toString(), QString("data:text/html,foo?"));
-}
-
-void tst_QWebElement::functionNames()
-{
- m_mainFrame->setHtml("<body><p>Test");
-
- QWebElement body = m_mainFrame->documentElement();
-
- QVERIFY(body.functions().contains("setAttribute"));
-}
-
void tst_QWebElement::documentElement()
{
m_mainFrame->setHtml("<body><p>Test");
@@ -398,27 +357,27 @@ void tst_QWebElement::style()
m_mainFrame->setHtml(html);
QWebElement p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String("blue"));
- QVERIFY(p.styleProperty("cursor").isEmpty());
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
+ QVERIFY(p.styleProperty("cursor", QWebElement::InlineStyle).isEmpty());
p.setStyleProperty("color", "red");
p.setStyleProperty("cursor", "auto");
- QCOMPARE(p.styleProperty("color"), QLatin1String("red"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("yellow"));
- QCOMPARE(p.styleProperty("cursor"), QLatin1String("auto"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("red"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("yellow"));
+ QCOMPARE(p.styleProperty("cursor", QWebElement::InlineStyle), QLatin1String("auto"));
p.setStyleProperty("color", "green !important");
- QCOMPARE(p.styleProperty("color"), QLatin1String("green"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("green"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("green"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("green"));
p.setStyleProperty("color", "blue");
- QCOMPARE(p.styleProperty("color"), QLatin1String("green"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("green"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("green"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("green"));
- p.setStyleProperty("color", "blue", QWebElement::ImportantStylePriority);
- QCOMPARE(p.styleProperty("color"), QLatin1String("blue"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("blue"));
+ p.setStyleProperty("color", "blue !important");
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("blue"));
QString html2 = "<head>"
"<style type='text/css'>"
@@ -434,8 +393,8 @@ void tst_QWebElement::style()
m_mainFrame->setHtml(html2);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String("blue"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("blue"));
QString html3 = "<head>"
"<style type='text/css'>"
@@ -451,8 +410,8 @@ void tst_QWebElement::style()
m_mainFrame->setHtml(html3);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String("blue"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("blue"));
QString html5 = "<head>"
"<style type='text/css'>"
@@ -468,8 +427,8 @@ void tst_QWebElement::style()
m_mainFrame->setHtml(html5);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String(""));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("red"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String(""));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red"));
QString html6 = "<head>"
"<link rel='stylesheet' href='qrc:/style.css' type='text/css' />"
@@ -489,8 +448,8 @@ void tst_QWebElement::style()
QTest::qWait(200);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String("blue"));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("black"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("blue"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
QString html7 = "<head>"
"<style type='text/css'>"
@@ -507,15 +466,15 @@ void tst_QWebElement::style()
QTest::qWait(200);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("black"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("black"));
QString html8 = "<body><p>some text</p></body>";
m_mainFrame->setHtml(html8);
p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color"), QLatin1String(""));
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String(""));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String(""));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String(""));
}
void tst_QWebElement::computedStyle()
@@ -524,47 +483,16 @@ void tst_QWebElement::computedStyle()
m_mainFrame->setHtml(html);
QWebElement p = m_mainFrame->documentElement().findAll("p").at(0);
- QCOMPARE(p.computedStyleProperty("cursor"), QLatin1String("auto"));
- QVERIFY(!p.computedStyleProperty("cursor").isEmpty());
- QVERIFY(p.styleProperty("cursor").isEmpty());
+ QCOMPARE(p.styleProperty("cursor", QWebElement::ComputedStyle), QLatin1String("auto"));
+ QVERIFY(!p.styleProperty("cursor", QWebElement::ComputedStyle).isEmpty());
+ QVERIFY(p.styleProperty("cursor", QWebElement::InlineStyle).isEmpty());
p.setStyleProperty("cursor", "text");
p.setStyleProperty("color", "red");
- QCOMPARE(p.computedStyleProperty("cursor"), QLatin1String("text"));
- QCOMPARE(p.computedStyleProperty("color"), QLatin1String("rgb(255, 0, 0)"));
- QCOMPARE(p.styleProperty("color"), QLatin1String("red"));
-}
-
-void tst_QWebElement::properties()
-{
- m_mainFrame->setHtml("<body><form><input type=checkbox id=ourcheckbox checked=true>");
-
- QWebElement checkBox = m_mainFrame->findFirstElement("#ourcheckbox");
- QVERIFY(!checkBox.isNull());
-
- QVERIFY(checkBox.scriptableProperties().contains("checked"));
-
- QCOMPARE(checkBox.scriptableProperty("checked"), QVariant(true));
- checkBox.setScriptableProperty("checked", false);
- QCOMPARE(checkBox.scriptableProperty("checked"), QVariant(false));
-
- QVERIFY(!checkBox.scriptableProperties().contains("non_existant"));
- QCOMPARE(checkBox.scriptableProperty("non_existant"), QVariant());
-
- checkBox.setScriptableProperty("non_existant", "test");
-
- QCOMPARE(checkBox.scriptableProperty("non_existant"), QVariant("test"));
- QVERIFY(checkBox.scriptableProperties().contains("non_existant"));
-
- // removing scriptableProperties is currently not supported. We should look into this
- // and consider the option of just allowing through the QtScript API only.
-#if 0
- checkBox.setScriptableProperty("non_existant", QVariant());
-
- QCOMPARE(checkBox.scriptableProperty("non_existant"), QVariant());
- QVERIFY(!checkBox.scriptableProperties().contains("non_existant"));
-#endif
+ QCOMPARE(p.styleProperty("cursor", QWebElement::ComputedStyle), QLatin1String("text"));
+ QCOMPARE(p.styleProperty("color", QWebElement::ComputedStyle), QLatin1String("rgb(255, 0, 0)"));
+ QCOMPARE(p.styleProperty("color", QWebElement::InlineStyle), QLatin1String("red"));
}
void tst_QWebElement::appendAndPrepend()
@@ -878,5 +806,24 @@ void tst_QWebElement::lastChildPreviousSibling()
QVERIFY(p.previousSibling().isNull());
}
+void tst_QWebElement::hasSetFocus()
+{
+ m_mainFrame->setHtml("<html><body>" \
+ "<input type='text' id='input1'/>" \
+ "<br>"\
+ "<input type='text' id='input2'/>" \
+ "</body></html>");
+
+ QList<QWebElement> inputs = m_mainFrame->documentElement().findAll("input");
+ QWebElement input1 = inputs.at(0);
+ input1.setFocus();
+ QVERIFY(input1.hasFocus());
+
+ QWebElement input2 = inputs.at(1);
+ input2.setFocus();
+ QVERIFY(!input1.hasFocus());
+ QVERIFY(input2.hasFocus());
+}
+
QTEST_MAIN(tst_QWebElement)
#include "tst_qwebelement.moc"
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 729b971..797446b 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -33,7 +33,9 @@
#include <QRegExp>
#include <QNetworkRequest>
#include <QNetworkReply>
+#ifndef QT_NO_OPENSSL
#include <qsslerror.h>
+#endif
#include "../util.h"
//TESTED_CLASS=
@@ -2183,8 +2185,11 @@ public:
if (request.url() == QUrl("qrc:/test1.html")) {
setHeader(QNetworkRequest::LocationHeader, QString("qrc:/test2.html"));
setAttribute(QNetworkRequest::RedirectionTargetAttribute, QUrl("qrc:/test2.html"));
- } else if (request.url() == QUrl("qrc:/fake-ssl-error.html"))
+ }
+#ifndef QT_NO_OPENSSL
+ else if (request.url() == QUrl("qrc:/fake-ssl-error.html"))
setError(QNetworkReply::SslHandshakeFailedError, tr("Fake error !")); // force a ssl error
+#endif
else if (request.url() == QUrl("http://abcdef.abcdef/"))
setError(QNetworkReply::HostNotFoundError, tr("Invalid URL"));
@@ -2211,8 +2216,10 @@ private slots:
emit error(this->error());
else if (request().url() == QUrl("http://abcdef.abcdef/"))
emit metaDataChanged();
+#ifndef QT_NO_OPENSSL
else if (request().url() == QUrl("qrc:/fake-ssl-error.html"))
return;
+#endif
emit readyRead();
emit finished();
@@ -2232,12 +2239,14 @@ protected:
if (op == QNetworkAccessManager::GetOperation)
if (url == "qrc:/test1.html" || url == "http://abcdef.abcdef/")
return new FakeReply(request, this);
+#ifndef QT_NO_OPENSSL
else if (url == "qrc:/fake-ssl-error.html") {
FakeReply* reply = new FakeReply(request, this);
QList<QSslError> errors;
emit sslErrors(reply, errors << QSslError(QSslError::UnspecifiedError));
return reply;
}
+#endif
return QNetworkAccessManager::createRequest(op, request, outgoingData);
}
@@ -2271,6 +2280,7 @@ void tst_QWebFrame::requestedUrl()
QCOMPARE(frame->requestedUrl(), QUrl("http://abcdef.abcdef/"));
QCOMPARE(frame->url(), QUrl("http://abcdef.abcdef/"));
+#ifndef QT_NO_OPENSSL
qRegisterMetaType<QList<QSslError> >("QList<QSslError>");
qRegisterMetaType<QNetworkReply* >("QNetworkReply*");
@@ -2280,6 +2290,7 @@ void tst_QWebFrame::requestedUrl()
QCOMPARE(spy2.count(), 1);
QCOMPARE(frame->requestedUrl(), QUrl("qrc:/fake-ssl-error.html"));
QCOMPARE(frame->url(), QUrl("qrc:/fake-ssl-error.html"));
+#endif
}
void tst_QWebFrame::javaScriptWindowObjectCleared_data()
@@ -2356,7 +2367,7 @@ void tst_QWebFrame::setHtmlWithResource()
QCOMPARE(spy.size(), 2);
QWebElement p = frame->documentElement().findAll("p").at(0);
- QCOMPARE(p.styleProperty("color", QWebElement::RespectCascadingStyles), QLatin1String("red"));
+ QCOMPARE(p.styleProperty("color", QWebElement::CascadedStyle), QLatin1String("red"));
}
class TestNetworkManager : public QNetworkAccessManager
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 9027be0..f92c22d 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -194,12 +194,6 @@ QUnifiedTimer *QUnifiedTimer::instance()
void QUnifiedTimer::timerEvent(QTimerEvent *event)
{
- //this is simply the time we last received a tick
- const int oldLastTick = lastTick;
- if (time.isValid())
- lastTick = consistentTiming ? oldLastTick + timingInterval : time.elapsed();
-
-
if (event->timerId() == startStopAnimationTimer.timerId()) {
startStopAnimationTimer.stop();
//we transfer the waiting animations into the "really running" state
@@ -207,13 +201,16 @@ void QUnifiedTimer::timerEvent(QTimerEvent *event)
animationsToStart.clear();
if (animations.isEmpty()) {
animationTimer.stop();
- time = QTime();
} else if (!animationTimer.isActive()) {
animationTimer.start(timingInterval, this);
lastTick = 0;
time.start();
}
} else if (event->timerId() == animationTimer.timerId()) {
+ //this is simply the time we last received a tick
+ const int oldLastTick = lastTick;
+ lastTick = consistentTiming ? oldLastTick + timingInterval : time.elapsed();
+
//we make sure we only call update time if the time has actually changed
//it might happen in some cases that the time doesn't change because events are delayed
//when the CPU load is high
@@ -604,7 +601,7 @@ void QAbstractAnimation::setCurrentTime(int msecs)
}
}
- updateCurrentTime();
+ updateCurrentTime(d->currentTime);
if (d->currentLoop != oldLoop)
emit currentLoopChanged(d->currentLoop);
@@ -705,10 +702,10 @@ bool QAbstractAnimation::event(QEvent *event)
}
/*!
- \fn virtual void QAbstractAnimation::updateCurrentTime() = 0;
+ \fn virtual void QAbstractAnimation::updateCurrentTime(int currentTime) = 0;
- This pure virtual function is called every time the animation's current
- time changes.
+ This pure virtual function is called every time the animation's
+ \a currentTime changes.
\sa updateState()
*/
diff --git a/src/corelib/animation/qabstractanimation.h b/src/corelib/animation/qabstractanimation.h
index 516f5e9..50b07d7 100644
--- a/src/corelib/animation/qabstractanimation.h
+++ b/src/corelib/animation/qabstractanimation.h
@@ -119,7 +119,7 @@ protected:
QAbstractAnimation(QAbstractAnimationPrivate &dd, QObject *parent = 0);
bool event(QEvent *event);
- virtual void updateCurrentTime() = 0;
+ virtual void updateCurrentTime(int currentTime) = 0;
virtual void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
virtual void updateDirection(QAbstractAnimation::Direction direction);
diff --git a/src/corelib/animation/qparallelanimationgroup.cpp b/src/corelib/animation/qparallelanimationgroup.cpp
index 82d5224..5b7fd22 100644
--- a/src/corelib/animation/qparallelanimationgroup.cpp
+++ b/src/corelib/animation/qparallelanimationgroup.cpp
@@ -125,7 +125,7 @@ int QParallelAnimationGroup::duration() const
/*!
\reimp
*/
-void QParallelAnimationGroup::updateCurrentTime()
+void QParallelAnimationGroup::updateCurrentTime(int currentTime)
{
Q_D(QParallelAnimationGroup);
if (d->animations.isEmpty())
@@ -148,7 +148,7 @@ void QParallelAnimationGroup::updateCurrentTime()
}
}
- bool timeFwd = ((d->currentLoop == d->lastLoop && d->currentTime >= d->lastCurrentTime)
+ bool timeFwd = ((d->currentLoop == d->lastLoop && currentTime >= d->lastCurrentTime)
|| d->currentLoop > d->lastLoop);
#ifdef QANIMATION_DEBUG
qDebug("QParallellAnimationGroup %5d: setCurrentTime(%d), loop:%d, last:%d, timeFwd:%d, lastcurrent:%d, %d",
@@ -160,7 +160,7 @@ void QParallelAnimationGroup::updateCurrentTime()
const int dura = animation->totalDuration();
if (dura == -1 && d->isUncontrolledAnimationFinished(animation))
continue;
- if (dura == -1 || (d->currentTime <= dura && dura != 0)
+ if (dura == -1 || (currentTime <= dura && dura != 0)
|| (dura == 0 && d->currentLoop != d->lastLoop)) {
switch (state()) {
case Running:
@@ -177,18 +177,18 @@ void QParallelAnimationGroup::updateCurrentTime()
if (dura <= 0) {
if (dura == -1)
- animation->setCurrentTime(d->currentTime);
+ animation->setCurrentTime(currentTime);
continue;
}
if ((timeFwd && d->lastCurrentTime <= dura)
|| (!timeFwd && d->currentTime <= dura))
- animation->setCurrentTime(d->currentTime);
- if (d->currentTime > dura)
+ animation->setCurrentTime(currentTime);
+ if (currentTime > dura)
animation->stop();
}
d->lastLoop = d->currentLoop;
- d->lastCurrentTime = d->currentTime;
+ d->lastCurrentTime = currentTime;
}
/*!
diff --git a/src/corelib/animation/qparallelanimationgroup.h b/src/corelib/animation/qparallelanimationgroup.h
index 6afe4a7..1cab91e 100644
--- a/src/corelib/animation/qparallelanimationgroup.h
+++ b/src/corelib/animation/qparallelanimationgroup.h
@@ -67,7 +67,7 @@ protected:
QParallelAnimationGroup(QParallelAnimationGroupPrivate &dd, QObject *parent);
bool event(QEvent *event);
- void updateCurrentTime();
+ void updateCurrentTime(int currentTime);
void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
void updateDirection(QAbstractAnimation::Direction direction);
diff --git a/src/corelib/animation/qpauseanimation.cpp b/src/corelib/animation/qpauseanimation.cpp
index c382b19..2fd12aa 100644
--- a/src/corelib/animation/qpauseanimation.cpp
+++ b/src/corelib/animation/qpauseanimation.cpp
@@ -141,7 +141,7 @@ bool QPauseAnimation::event(QEvent *e)
/*!
\reimp
*/
-void QPauseAnimation::updateCurrentTime()
+void QPauseAnimation::updateCurrentTime(int)
{
}
diff --git a/src/corelib/animation/qpauseanimation.h b/src/corelib/animation/qpauseanimation.h
index caac9e9..1b81472 100644
--- a/src/corelib/animation/qpauseanimation.h
+++ b/src/corelib/animation/qpauseanimation.h
@@ -68,7 +68,7 @@ public:
protected:
bool event(QEvent *e);
- void updateCurrentTime();
+ void updateCurrentTime(int);
private:
Q_DISABLE_COPY(QPauseAnimation)
diff --git a/src/corelib/animation/qsequentialanimationgroup.cpp b/src/corelib/animation/qsequentialanimationgroup.cpp
index 9ad433f..5ca560a 100644
--- a/src/corelib/animation/qsequentialanimationgroup.cpp
+++ b/src/corelib/animation/qsequentialanimationgroup.cpp
@@ -334,7 +334,7 @@ int QSequentialAnimationGroup::duration() const
/*!
\reimp
*/
-void QSequentialAnimationGroup::updateCurrentTime()
+void QSequentialAnimationGroup::updateCurrentTime(int currentTime)
{
Q_D(QSequentialAnimationGroup);
if (!d->currentAnimation)
@@ -359,7 +359,7 @@ void QSequentialAnimationGroup::updateCurrentTime()
d->setCurrentAnimation(newAnimationIndex.index);
- const int newCurrentTime = d->currentTime - newAnimationIndex.timeOffset;
+ const int newCurrentTime = currentTime - newAnimationIndex.timeOffset;
if (d->currentAnimation) {
d->currentAnimation->setCurrentTime(newCurrentTime);
diff --git a/src/corelib/animation/qsequentialanimationgroup.h b/src/corelib/animation/qsequentialanimationgroup.h
index 1c9e4cc..f30f851 100644
--- a/src/corelib/animation/qsequentialanimationgroup.h
+++ b/src/corelib/animation/qsequentialanimationgroup.h
@@ -77,7 +77,7 @@ protected:
QSequentialAnimationGroup(QSequentialAnimationGroupPrivate &dd, QObject *parent);
bool event(QEvent *event);
- void updateCurrentTime();
+ void updateCurrentTime(int);
void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
void updateDirection(QAbstractAnimation::Direction direction);
diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
index ae8bf2f..de8185b 100644
--- a/src/corelib/animation/qvariantanimation.cpp
+++ b/src/corelib/animation/qvariantanimation.cpp
@@ -656,7 +656,7 @@ QVariant QVariantAnimation::interpolated(const QVariant &from, const QVariant &t
/*!
\reimp
*/
-void QVariantAnimation::updateCurrentTime()
+void QVariantAnimation::updateCurrentTime(int)
{
d_func()->recalculateCurrentInterval();
}
diff --git a/src/corelib/animation/qvariantanimation.h b/src/corelib/animation/qvariantanimation.h
index 98c1aec..bc57b1c 100644
--- a/src/corelib/animation/qvariantanimation.h
+++ b/src/corelib/animation/qvariantanimation.h
@@ -102,7 +102,7 @@ protected:
QVariantAnimation(QVariantAnimationPrivate &dd, QObject *parent = 0);
bool event(QEvent *event);
- void updateCurrentTime();
+ void updateCurrentTime(int);
void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState);
virtual void updateCurrentValue(const QVariant &value) = 0;
diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp
index 1d43fbb..71bd145 100644
--- a/src/corelib/arch/symbian/qatomic_symbian.cpp
+++ b/src/corelib/arch/symbian/qatomic_symbian.cpp
@@ -86,10 +86,7 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
-// This declspec needs to be explicit. RVCT has a bug which prevents embedded
-// assembler functions from being exported (normally all functions are
-// exported, and Q_CORE_EXPORT resolves to nothing).
-__declspec(dllexport) __asm char q_atomic_swp(volatile char *ptr, char newval)
+Q_CORE_EXPORT __asm char q_atomic_swp(volatile char *ptr, char newval)
{
add r2, pc, #0
bx r2
@@ -100,7 +97,7 @@ __declspec(dllexport) __asm char q_atomic_swp(volatile char *ptr, char newval)
thumb
}
-__declspec(dllexport) __asm int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
+Q_CORE_EXPORT __asm int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
{
add r2, pc, #0
bx r2
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index 29f46f6..36c2cf9 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -847,7 +847,7 @@
#endif
// QPrintPreviewDialog
-#if !defined(QT_NO_PRINTPREVIEWDIALOG) && (defined(QT_NO_PRINTPREVIEWWIDGET) || defined(QT_NO_PRINTDIALOG))
+#if !defined(QT_NO_PRINTPREVIEWDIALOG) && (defined(QT_NO_PRINTPREVIEWWIDGET) || defined(QT_NO_PRINTDIALOG) || defined(QT_NO_MAINWINDOW))
#define QT_NO_PRINTPREVIEWDIALOG
#endif
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 3a6c050..ec47883 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -612,7 +612,7 @@ SeeAlso: ???
Feature: PRINTPREVIEWDIALOG
Description: Provides a dialog for previewing and configuring page layouts for printer output.
Section: Dialogs
-Requires: PRINTPREVIEWWIDGET PRINTDIALOG
+Requires: PRINTPREVIEWWIDGET PRINTDIALOG MAINWINDOW
Name: QPrintPreviewDialog
SeeAlso: ???
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 4974acf..63e2891 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1066,6 +1066,7 @@ bool qSharedBuild()
/*!
\fn QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+ \since 4.6
Returns the version of the Symbian operating system on which the
application is run (Symbian only).
@@ -1073,6 +1074,7 @@ bool qSharedBuild()
/*!
\fn QSysInfo::S60Version QSysInfo::s60Version()
+ \since 4.6
Returns the version of the S60 SDK system on which the
application is run (S60 only).
@@ -1769,25 +1771,6 @@ static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
QSysInfo::S60Version QSysInfo::s60Version()
{
-# ifdef Q_CC_NOKIAX86
- // For emulator builds. Emulators don't support the trick we use to figure
- // out which SDK we are running under, so simply hardcode it there.
-# if defined(__SERIES60_31__)
- return SV_S60_3_1;
-
-# elif defined(__S60_32__)
- return SV_S60_3_2;
-
-# elif defined(__S60_50__)
- return SV_S60_5_0;
-
-# else
- return SV_S60_Unknown;
-
-# endif
-
-# else
- // For hardware builds.
if (cachedS60Version != -1)
return cachedS60Version;
@@ -1818,6 +1801,19 @@ QSysInfo::S60Version QSysInfo::s60Version()
delete contents;
}
+# ifdef Q_CC_NOKIAX86
+ // Some emulator environments may not contain the version specific .sis files, so
+ // simply hardcode the version on those environments.
+# if defined(__SERIES60_31__)
+ return cachedS60Version = SV_S60_3_1;
+# elif defined(__S60_32__)
+ return cachedS60Version = SV_S60_3_2;
+# elif defined(__S60_50__)
+ return cachedS60Version = SV_S60_5_0;
+# else
+ return cachedS60Version = SV_S60_Unknown;
+# endif
+# else
return cachedS60Version = SV_S60_Unknown;
# endif
}
@@ -2718,7 +2714,7 @@ int qrand()
\since 4.6
\brief The QT_TRID_NOOP macro marks an id for dynamic translation.
-
+
The only purpose of this macro is to provide an anchor for attaching
meta data like to qtTrId().
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 18b4d67..40dd1d2 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -1826,9 +1826,7 @@
\value TabFocus the widget accepts focus by tabbing.
\value ClickFocus the widget accepts focus by clicking.
\value StrongFocus the widget accepts focus by both tabbing
- and clicking. On Mac OS X this will also
- be indicate that the widget accepts tab focus
- when in 'Text/List focus mode'.
+ and clicking.
\value WheelFocus like Qt::StrongFocus plus the widget accepts
focus by using the mouse wheel.
\value NoFocus the widget does not accept focus.
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index b01302b..d9b994e 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -248,7 +248,7 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine()
eng = QDnotifyFileSystemWatcherEngine::create();
return eng;
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_MAC)
-# if (defined Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
+# if 0 && (defined Q_OS_MAC) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5)
return QFSEventsFileSystemWatcherEngine::create();
else
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index ce6c844..8e2273d 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1226,6 +1226,9 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
/*!
\fn bool QAbstractItemModel::insertRow(int row, const QModelIndex &parent)
+ \note The base class implementation of this function does nothing and
+ returns false.
+
Inserts a single row before the given \a row in the child items of the
\a parent specified.
@@ -1834,6 +1837,9 @@ void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
}
/*!
+ \note The base class implementation of this function does nothing and
+ returns false.
+
On models that support this, inserts \a count rows into the model before
the given \a row. Items in the new row will be children of the item
represented by the \a parent model index.
@@ -1849,11 +1855,11 @@ void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
Returns true if the rows were successfully inserted; otherwise returns
false.
- The base class implementation does nothing and returns false.
-
If you implement your own model, you can reimplement this function if you
want to support insertions. Alternatively, you can provide your own API for
- altering the data.
+ altering the data. In either case, you will need to call
+ beginInsertRows() and endInsertRows() to notify other components that the
+ model has changed.
\sa insertColumns(), removeRows(), beginInsertRows(), endInsertRows()
*/
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 61b9ee7..8a55bad 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -2067,7 +2067,8 @@ QStringList QCoreApplication::arguments()
;
else if (l1arg == "-style" ||
l1arg == "-session" ||
- l1arg == "-graphicssystem")
+ l1arg == "-graphicssystem" ||
+ l1arg == "-testability")
++a;
else
stripped += arg;
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 746474c..185c305 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -192,6 +192,7 @@ QT_BEGIN_NAMESPACE
\value ShortcutOverride Key press in child, for overriding shortcut key handling (QKeyEvent).
\value Show Widget was shown on screen (QShowEvent).
\value ShowToParent A child widget has been shown.
+ \value Signal A signal delivered to a state machine (QStateMachine::SignalEvent).
\value SockAct Socket activated, used to implement QSocketNotifier.
\value StatusTip A status tip is requested (QStatusTipEvent).
\value StyleChange Widget's style has been changed.
@@ -220,7 +221,7 @@ QT_BEGIN_NAMESPACE
\value WindowStateChange The \l{QWidget::windowState()}{window's state} (minimized, maximized or full-screen) has changed (QWindowStateChangeEvent).
\value WindowTitleChange The window title has changed.
\value WindowUnblocked The window is unblocked after a modal dialog exited.
- \value Wrapped The event is a wrapper for, i.e., contains, another event (QWrappedEvent).
+ \value Wrapped The event is a wrapper for, i.e., contains, another event (QStateMachine::WrappedEvent).
\value ZOrderChange The widget's z-order has changed. This event is never sent to top level windows.
\value KeyboardLayoutChange The keyboard layout has changed.
\value DynamicPropertyChange A dynamic property was added, changed or removed from the object.
@@ -269,8 +270,8 @@ QT_BEGIN_NAMESPACE
\omitvalue NetworkReplyUpdated
\omitvalue FutureCallOut
\omitvalue CocoaRequestModal
- \omitvalue Signal
\omitvalue SymbianDeferredFocusChanged
+ \omitvalue UpdateSoftKeys
\omitvalue NativeGesture
*/
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 6e457f4..665b73e 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -127,16 +127,11 @@ struct GTimerSource
GSource source;
QTimerInfoList timerList;
QEventLoop::ProcessEventsFlags processEventsFlags;
+ bool runWithIdlePriority;
};
-static gboolean timerSourcePrepare(GSource *source, gint *timeout)
+static gboolean timerSourcePrepareHelper(GTimerSource *src, gint *timeout)
{
- gint dummy;
- if (!timeout)
- timeout = &dummy;
-
- GTimerSource *src = reinterpret_cast<GTimerSource *>(source);
-
timeval tv = { 0l, 0l };
if (!(src->processEventsFlags & QEventLoop::X11ExcludeTimers) && src->timerList.timerWait(tv))
*timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000);
@@ -146,10 +141,8 @@ static gboolean timerSourcePrepare(GSource *source, gint *timeout)
return (*timeout == 0);
}
-static gboolean timerSourceCheck(GSource *source)
+static gboolean timerSourceCheckHelper(GTimerSource *src)
{
- GTimerSource *src = reinterpret_cast<GTimerSource *>(source);
-
if (src->timerList.isEmpty()
|| (src->processEventsFlags & QEventLoop::X11ExcludeTimers))
return false;
@@ -160,9 +153,35 @@ static gboolean timerSourceCheck(GSource *source)
return true;
}
+static gboolean timerSourcePrepare(GSource *source, gint *timeout)
+{
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+
+ GTimerSource *src = reinterpret_cast<GTimerSource *>(source);
+ if (src->runWithIdlePriority) {
+ if (timeout)
+ *timeout = -1;
+ return false;
+ }
+
+ return timerSourcePrepareHelper(src, timeout);
+}
+
+static gboolean timerSourceCheck(GSource *source)
+{
+ GTimerSource *src = reinterpret_cast<GTimerSource *>(source);
+ if (src->runWithIdlePriority)
+ return false;
+ return timerSourceCheckHelper(src);
+}
+
static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer)
{
- (void) reinterpret_cast<GTimerSource *>(source)->timerList.activateTimers();
+ GTimerSource *timerSource = reinterpret_cast<GTimerSource *>(source);
+ timerSource->runWithIdlePriority = true;
+ (void) timerSource->timerList.activateTimers();
return true; // ??? don't remove, right again?
}
@@ -175,6 +194,53 @@ static GSourceFuncs timerSourceFuncs = {
NULL
};
+struct GIdleTimerSource
+{
+ GSource source;
+ GTimerSource *timerSource;
+};
+
+static gboolean idleTimerSourcePrepare(GSource *source, gint *timeout)
+{
+ GIdleTimerSource *idleTimerSource = reinterpret_cast<GIdleTimerSource *>(source);
+ GTimerSource *timerSource = idleTimerSource->timerSource;
+ if (!timerSource->runWithIdlePriority) {
+ // Yield to the normal priority timer source
+ if (timeout)
+ *timeout = -1;
+ return false;
+ }
+
+ return timerSourcePrepareHelper(timerSource, timeout);
+}
+
+static gboolean idleTimerSourceCheck(GSource *source)
+{
+ GIdleTimerSource *idleTimerSource = reinterpret_cast<GIdleTimerSource *>(source);
+ GTimerSource *timerSource = idleTimerSource->timerSource;
+ if (!timerSource->runWithIdlePriority) {
+ // Yield to the normal priority timer source
+ return false;
+ }
+ return timerSourceCheckHelper(timerSource);
+}
+
+static gboolean idleTimerSourceDispatch(GSource *source, GSourceFunc, gpointer)
+{
+ GTimerSource *timerSource = reinterpret_cast<GIdleTimerSource *>(source)->timerSource;
+ (void) timerSourceDispatch(&timerSource->source, 0, 0);
+ return true;
+}
+
+static GSourceFuncs idleTimerSourceFuncs = {
+ idleTimerSourcePrepare,
+ idleTimerSourceCheck,
+ idleTimerSourceDispatch,
+ NULL,
+ NULL,
+ NULL
+};
+
struct GPostEventSource
{
GSource source;
@@ -235,14 +301,15 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
g_main_context_ref(mainContext);
} else {
QCoreApplication *app = QCoreApplication::instance();
- if (app && QThread::currentThread() == app->thread()) {
- mainContext = g_main_context_default();
- g_main_context_ref(mainContext);
- } else {
- mainContext = g_main_context_new();
- }
+ if (app && QThread::currentThread() == app->thread()) {
+ mainContext = g_main_context_default();
+ g_main_context_ref(mainContext);
+ } else {
+ mainContext = g_main_context_new();
+ }
}
+ // setup post event source
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
postEventSource->serialNumber = 1;
@@ -257,14 +324,21 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
g_source_set_can_recurse(&socketNotifierSource->source, true);
g_source_attach(&socketNotifierSource->source, mainContext);
- // setup timerSource
+ // setup normal and idle timer sources
timerSource = reinterpret_cast<GTimerSource *>(g_source_new(&timerSourceFuncs,
sizeof(GTimerSource)));
(void) new (&timerSource->timerList) QTimerInfoList();
timerSource->processEventsFlags = QEventLoop::AllEvents;
+ timerSource->runWithIdlePriority = false;
g_source_set_can_recurse(&timerSource->source, true);
- g_source_set_priority(&timerSource->source, G_PRIORITY_DEFAULT_IDLE);
g_source_attach(&timerSource->source, mainContext);
+
+ idleTimerSource = reinterpret_cast<GIdleTimerSource *>(g_source_new(&idleTimerSourceFuncs,
+ sizeof(GIdleTimerSource)));
+ idleTimerSource->timerSource = timerSource;
+ g_source_set_can_recurse(&idleTimerSource->source, true);
+ g_source_set_priority(&idleTimerSource->source, G_PRIORITY_DEFAULT_IDLE);
+ g_source_attach(&idleTimerSource->source, mainContext);
}
QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent)
@@ -272,12 +346,9 @@ QEventDispatcherGlib::QEventDispatcherGlib(QObject *parent)
{
}
-QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext,
- QObject *parent)
- : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)),
- parent)
-{
-}
+QEventDispatcherGlib::QEventDispatcherGlib(GMainContext *mainContext, QObject *parent)
+ : QAbstractEventDispatcher(*(new QEventDispatcherGlibPrivate(mainContext)), parent)
+{ }
QEventDispatcherGlib::~QEventDispatcherGlib()
{
@@ -289,6 +360,9 @@ QEventDispatcherGlib::~QEventDispatcherGlib()
g_source_destroy(&d->timerSource->source);
g_source_unref(&d->timerSource->source);
d->timerSource = 0;
+ g_source_destroy(&d->idleTimerSource->source);
+ g_source_unref(&d->idleTimerSource->source);
+ d->idleTimerSource = 0;
// destroy socket notifier source
for (int i = 0; i < d->socketNotifierSource->pollfds.count(); ++i) {
@@ -324,11 +398,16 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
// tell postEventSourcePrepare() and timerSource about any new flags
QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
d->timerSource->processEventsFlags = flags;
-
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+ d->timerSource->runWithIdlePriority = false;
+ }
+
bool result = g_main_context_iteration(d->mainContext, canWait);
while (!result && canWait)
result = g_main_context_iteration(d->mainContext, canWait);
-
+
d->timerSource->processEventsFlags = savedFlags;
if (canWait)
diff --git a/src/corelib/kernel/qeventdispatcher_glib_p.h b/src/corelib/kernel/qeventdispatcher_glib_p.h
index 8dbc44d..6a4e726 100644
--- a/src/corelib/kernel/qeventdispatcher_glib_p.h
+++ b/src/corelib/kernel/qeventdispatcher_glib_p.h
@@ -98,6 +98,7 @@ protected:
struct GPostEventSource;
struct GSocketNotifierSource;
struct GTimerSource;
+struct GIdleTimerSource;
class Q_CORE_EXPORT QEventDispatcherGlibPrivate : public QAbstractEventDispatcherPrivate
{
@@ -108,6 +109,7 @@ public:
GPostEventSource *postEventSource;
GSocketNotifierSource *socketNotifierSource;
GTimerSource *timerSource;
+ GIdleTimerSource *idleTimerSource;
};
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index a912971..5a0afb8 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -446,10 +446,10 @@ bool QTimerInfoList::timerWait(timeval &tm)
// Find first waiting timer not already active
QTimerInfo *t = 0;
for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
- if (!(*it)->inTimerEvent) {
- t = *it;
- break;
- }
+ if (!(*it)->inTimerEvent) {
+ t = *it;
+ break;
+ }
}
if (!t)
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 83114dc..0474bf3 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -678,7 +678,8 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
|| (msg.message >= WM_MOUSEFIRST
&& msg.message <= WM_MOUSELAST)
|| msg.message == WM_MOUSEWHEEL
- || msg.message == WM_MOUSEHWHEEL)) {
+ || msg.message == WM_MOUSEHWHEEL
+ || msg.message == WM_CLOSE)) {
// queue user input events for later processing
haveMessage = false;
d->queuedUserInputEvents.append(msg);
diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
index 90f4e70..31fd9e9 100644
--- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
+++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
@@ -66,7 +66,7 @@ void QSystemSemaphorePrivate::setErrorString(const QString &function, int err)
error = QSystemSemaphore::AlreadyExists;
break;
case KErrNotFound:
- errorString = QCoreApplication::tr("%1: doesn't exists", "QSystemSemaphore").arg(function);
+ errorString = QCoreApplication::tr("%1: does not exist", "QSystemSemaphore").arg(function);
error = QSystemSemaphore::NotFound;
break;
case KErrNoMemory:
diff --git a/src/corelib/statemachine/qabstracttransition.cpp b/src/corelib/statemachine/qabstracttransition.cpp
index a81fe0f..76baa0a 100644
--- a/src/corelib/statemachine/qabstracttransition.cpp
+++ b/src/corelib/statemachine/qabstracttransition.cpp
@@ -93,6 +93,10 @@ QT_BEGIN_NAMESPACE
\property QAbstractTransition::targetState
\brief the target state of this transition
+
+ If a transition has no target state, the transition may still be
+ triggered, but this will not cause the state machine's configuration to
+ change (i.e. the current state will not be exited and re-entered).
*/
/*!
@@ -187,7 +191,7 @@ QAbstractState *QAbstractTransition::targetState() const
Q_D(const QAbstractTransition);
if (d->targetStates.isEmpty())
return 0;
- return d->targetStates.first();
+ return d->targetStates.first().data();
}
/*!
@@ -211,7 +215,7 @@ QList<QAbstractState*> QAbstractTransition::targetStates() const
Q_D(const QAbstractTransition);
QList<QAbstractState*> result;
for (int i = 0; i < d->targetStates.size(); ++i) {
- QAbstractState *target = d->targetStates.at(i);
+ QAbstractState *target = d->targetStates.at(i).data();
if (target)
result.append(target);
}
@@ -225,7 +229,7 @@ void QAbstractTransition::setTargetStates(const QList<QAbstractState*> &targets)
{
Q_D(QAbstractTransition);
- for (int i=0; i<targets.size(); ++i) {
+ for (int i = 0; i < targets.size(); ++i) {
QAbstractState *target = targets.at(i);
if (!target) {
qWarning("QAbstractTransition::setTargetStates: target state(s) cannot be null");
diff --git a/src/corelib/statemachine/qabstracttransition_p.h b/src/corelib/statemachine/qabstracttransition_p.h
index 7465243..5b4df1b 100644
--- a/src/corelib/statemachine/qabstracttransition_p.h
+++ b/src/corelib/statemachine/qabstracttransition_p.h
@@ -56,7 +56,7 @@
#include <private/qobject_p.h>
#include <QtCore/qlist.h>
-#include <QtCore/qpointer.h>
+#include <QtCore/qsharedpointer.h>
QT_BEGIN_NAMESPACE
@@ -80,7 +80,7 @@ public:
QStateMachine *machine() const;
void emitTriggered();
- QList<QPointer<QAbstractState> > targetStates;
+ QList<QWeakPointer<QAbstractState> > targetStates;
#ifndef QT_NO_ANIMATION
QList<QAbstractAnimation*> animations;
diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp
index 2ce7b4a..f278371 100644
--- a/src/corelib/statemachine/qeventtransition.cpp
+++ b/src/corelib/statemachine/qeventtransition.cpp
@@ -44,7 +44,6 @@
#ifndef QT_NO_STATEMACHINE
#include "qeventtransition_p.h"
-#include "qwrappedevent.h"
#include "qstate.h"
#include "qstate_p.h"
#include "qstatemachine.h"
@@ -83,10 +82,11 @@ QT_BEGIN_NAMESPACE
\section1 Subclassing
When reimplementing the eventTest() function, you should first call the base
- implementation to verify that the event is a QWrappedEvent for the proper
- object and event type. You may then cast the event to a QWrappedEvent and
- get the original event by calling QWrappedEvent::event(), and perform
- additional checks on that object.
+ implementation to verify that the event is a QStateMachine::WrappedEvent for
+ the proper object and event type. You may then cast the event to a
+ QStateMachine::WrappedEvent and get the original event by calling
+ QStateMachine::WrappedEvent::event(), and perform additional checks on that
+ object.
\sa QState::addTransition()
*/
@@ -232,7 +232,7 @@ bool QEventTransition::eventTest(QEvent *event)
{
Q_D(const QEventTransition);
if (event->type() == QEvent::Wrapped) {
- QWrappedEvent *we = static_cast<QWrappedEvent*>(event);
+ QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event);
return (we->object() == d->object)
&& (we->event()->type() == d->eventType);
}
diff --git a/src/corelib/statemachine/qsignalevent.h b/src/corelib/statemachine/qsignalevent.h
deleted file mode 100644
index 6d2bd63..0000000
--- a/src/corelib/statemachine/qsignalevent.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QSIGNALEVENT_H
-#define QSIGNALEVENT_H
-
-#include <QtCore/qcoreevent.h>
-
-#include <QtCore/qlist.h>
-#include <QtCore/qvariant.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Core)
-
-#ifndef QT_NO_STATEMACHINE
-
-class Q_CORE_EXPORT QSignalEvent : public QEvent
-{
-public:
- QSignalEvent(QObject *sender, int signalIndex,
- const QList<QVariant> &arguments);
- ~QSignalEvent();
-
- inline QObject *sender() const { return m_sender; }
- inline int signalIndex() const { return m_signalIndex; }
- inline QList<QVariant> arguments() const { return m_arguments; }
-
-private:
- QObject *m_sender;
- int m_signalIndex;
- QList<QVariant> m_arguments;
-
- friend class QSignalTransitionPrivate;
-};
-
-#endif //QT_NO_STATEMACHINE
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/corelib/statemachine/qsignaltransition.cpp b/src/corelib/statemachine/qsignaltransition.cpp
index 74655e6..9811725 100644
--- a/src/corelib/statemachine/qsignaltransition.cpp
+++ b/src/corelib/statemachine/qsignaltransition.cpp
@@ -44,7 +44,6 @@
#ifndef QT_NO_STATEMACHINE
#include "qsignaltransition_p.h"
-#include "qsignalevent.h"
#include "qstate.h"
#include "qstate_p.h"
#include "qstatemachine.h"
@@ -68,7 +67,7 @@ QT_BEGIN_NAMESPACE
You can subclass QSignalTransition and reimplement eventTest() to make a
signal transition conditional; the event object passed to eventTest() will
- be a QSignalEvent object. Example:
+ be a QStateMachine::SignalEvent object. Example:
\code
class CheckedTransition : public QSignalTransition
@@ -80,7 +79,7 @@ QT_BEGIN_NAMESPACE
bool eventTest(QEvent *e) const {
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return (se->arguments().at(0).toInt() == Qt::Checked);
}
};
@@ -212,9 +211,9 @@ void QSignalTransition::setSignal(const QByteArray &signal)
/*!
\reimp
- The \a event is a QSignalEvent object. The default implementation returns
- true if the event's sender and signal index match this transition, and
- returns false otherwise.
+ The default implementation returns true if the \a event is a
+ QStateMachine::SignalEvent object and the event's sender and signal index
+ match this transition, and returns false otherwise.
*/
bool QSignalTransition::eventTest(QEvent *event)
{
@@ -222,7 +221,7 @@ bool QSignalTransition::eventTest(QEvent *event)
if (event->type() == QEvent::Signal) {
if (d->signalIndex == -1)
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(event);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(event);
return (se->sender() == d->sender)
&& (se->signalIndex() == d->signalIndex);
}
@@ -250,7 +249,7 @@ void QSignalTransitionPrivate::callOnTransition(QEvent *e)
Q_Q(QSignalTransition);
if (e->type() == QEvent::Signal) {
- QSignalEvent *se = static_cast<QSignalEvent *>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent *>(e);
int savedSignalIndex = se->m_signalIndex;
se->m_signalIndex = originalSignalIndex;
q->onTransition(e);
diff --git a/src/corelib/statemachine/qstate.cpp b/src/corelib/statemachine/qstate.cpp
index 70026b8..a6e4a57 100644
--- a/src/corelib/statemachine/qstate.cpp
+++ b/src/corelib/statemachine/qstate.cpp
@@ -291,9 +291,9 @@ QAbstractTransition *QState::addTransition(QAbstractTransition *transition)
}
transition->setParent(this);
- const QList<QPointer<QAbstractState> > &targets = QAbstractTransitionPrivate::get(transition)->targetStates;
+ const QList<QWeakPointer<QAbstractState> > &targets = QAbstractTransitionPrivate::get(transition)->targetStates;
for (int i = 0; i < targets.size(); ++i) {
- QAbstractState *t = targets.at(i);
+ QAbstractState *t = targets.at(i).data();
if (!t) {
qWarning("QState::addTransition: cannot add transition to null state");
return 0;
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 7876d43..8d50870c 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -50,7 +50,6 @@
#include "qabstracttransition_p.h"
#include "qsignaltransition.h"
#include "qsignaltransition_p.h"
-#include "qsignalevent.h"
#include "qsignaleventgenerator_p.h"
#include "qabstractstate.h"
#include "qabstractstate_p.h"
@@ -63,7 +62,6 @@
#ifndef QT_NO_STATEMACHINE_EVENTFILTER
#include "qeventtransition.h"
#include "qeventtransition_p.h"
-#include "qwrappedevent.h"
#endif
#ifndef QT_NO_ANIMATION
@@ -806,6 +804,14 @@ void QStateMachinePrivate::applyProperties(const QList<QAbstractTransition*> &tr
}
if (hasValidEndValue) {
+ if (anim->state() == QAbstractAnimation::Running) {
+ // The animation is still running. This can happen if the
+ // animation is a group, and one of its children just finished,
+ // and that caused a state to emit its polished() signal, and
+ // that triggered a transition in the machine.
+ // Just stop the animation so it is correctly restarted again.
+ anim->stop();
+ }
anim->start();
}
}
@@ -1270,12 +1276,19 @@ void QStateMachinePrivate::_q_process()
}
}
-void QStateMachinePrivate::scheduleProcess()
+void QStateMachinePrivate::processEvents(EventProcessingMode processingMode)
{
if ((state != Running) || processing || processingScheduled)
return;
- processingScheduled = true;
- QMetaObject::invokeMethod(q_func(), "_q_process", Qt::QueuedConnection);
+ switch (processingMode) {
+ case DirectProcessing:
+ _q_process();
+ break;
+ case QueuedProcessing:
+ processingScheduled = true;
+ QMetaObject::invokeMethod(q_func(), "_q_process", Qt::QueuedConnection);
+ break;
+ }
}
namespace {
@@ -1337,7 +1350,7 @@ void QStateMachinePrivate::goToState(QAbstractState *targetState)
trans->setTargetState(targetState);
}
- scheduleProcess();
+ processEvents(QueuedProcessing);
}
void QStateMachinePrivate::registerTransitions(QAbstractState *state)
@@ -1514,6 +1527,15 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio
}
QEventTransitionPrivate::get(transition)->registered = false;
}
+
+void QStateMachinePrivate::handleFilteredEvent(QObject *watched, QEvent *event)
+{
+ Q_ASSERT(qobjectEvents.contains(watched));
+ if (qobjectEvents[watched].contains(event->type())) {
+ internalEventQueue.append(new QStateMachine::WrappedEvent(watched, handler->cloneEvent(event)));
+ processEvents(DirectProcessing);
+ }
+}
#endif
void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalIndex,
@@ -1534,8 +1556,8 @@ void QStateMachinePrivate::handleTransitionSignal(QObject *sender, int signalInd
qDebug() << q_func() << ": sending signal event ( sender =" << sender
<< ", signal =" << sender->metaObject()->method(signalIndex).signature() << ')';
#endif
- internalEventQueue.append(new QSignalEvent(sender, signalIndex, vargs));
- scheduleProcess();
+ internalEventQueue.append(new QStateMachine::SignalEvent(sender, signalIndex, vargs));
+ processEvents(DirectProcessing);
}
/*!
@@ -1770,7 +1792,7 @@ void QStateMachine::stop()
break;
case QStateMachinePrivate::Running:
d->stop = true;
- d->scheduleProcess();
+ d->processEvents(QStateMachinePrivate::QueuedProcessing);
break;
}
}
@@ -1800,7 +1822,7 @@ void QStateMachine::postEvent(QEvent *event, int delay)
d->delayedEvents[tid] = event;
} else {
d->externalEventQueue.append(event);
- d->scheduleProcess();
+ d->processEvents(QStateMachinePrivate::QueuedProcessing);
}
}
@@ -1816,7 +1838,7 @@ void QStateMachine::postInternalEvent(QEvent *event)
qDebug() << this << ": posting internal event" << event;
#endif
d->internalEventQueue.append(event);
- d->scheduleProcess();
+ d->processEvents(QStateMachinePrivate::QueuedProcessing);
}
/*!
@@ -1864,7 +1886,7 @@ bool QStateMachine::event(QEvent *e)
killTimer(tid);
QEvent *ee = d->delayedEvents.take(tid);
d->externalEventQueue.append(ee);
- d->scheduleProcess();
+ d->processEvents(QStateMachinePrivate::DirectProcessing);
return true;
}
}
@@ -1878,9 +1900,7 @@ bool QStateMachine::event(QEvent *e)
bool QStateMachine::eventFilter(QObject *watched, QEvent *event)
{
Q_D(QStateMachine);
- Q_ASSERT(d->qobjectEvents.contains(watched));
- if (d->qobjectEvents[watched].contains(event->type()))
- postEvent(new QWrappedEvent(watched, d->handler->cloneEvent(event)));
+ d->handleFilteredEvent(watched, event);
return false;
}
#endif
@@ -2076,16 +2096,16 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent)
}
/*!
- \class QSignalEvent
+ \class QStateMachine::SignalEvent
- \brief The QSignalEvent class represents a Qt signal event.
+ \brief The SignalEvent class represents a Qt signal event.
\since 4.6
\ingroup statemachine
A signal event is generated by a QStateMachine in response to a Qt
signal. The QSignalTransition class provides a transition associated with a
- signal event. QSignalEvent is part of \l{The State Machine Framework}.
+ signal event. QStateMachine::SignalEvent is part of \l{The State Machine Framework}.
The sender() function returns the object that generated the signal. The
signalIndex() function returns the index of the signal. The arguments()
@@ -2097,25 +2117,25 @@ QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent)
/*!
\internal
- Constructs a new QSignalEvent object with the given \a sender, \a
+ Constructs a new SignalEvent object with the given \a sender, \a
signalIndex and \a arguments.
*/
-QSignalEvent::QSignalEvent(QObject *sender, int signalIndex,
- const QList<QVariant> &arguments)
+QStateMachine::SignalEvent::SignalEvent(QObject *sender, int signalIndex,
+ const QList<QVariant> &arguments)
: QEvent(QEvent::Signal), m_sender(sender),
m_signalIndex(signalIndex), m_arguments(arguments)
{
}
/*!
- Destroys this QSignalEvent.
+ Destroys this SignalEvent.
*/
-QSignalEvent::~QSignalEvent()
+QStateMachine::SignalEvent::~SignalEvent()
{
}
/*!
- \fn QSignalEvent::sender() const
+ \fn QStateMachine::SignalEvent::sender() const
Returns the object that emitted the signal.
@@ -2123,7 +2143,7 @@ QSignalEvent::~QSignalEvent()
*/
/*!
- \fn QSignalEvent::signalIndex() const
+ \fn QStateMachine::SignalEvent::signalIndex() const
Returns the index of the signal.
@@ -2131,23 +2151,24 @@ QSignalEvent::~QSignalEvent()
*/
/*!
- \fn QSignalEvent::arguments() const
+ \fn QStateMachine::SignalEvent::arguments() const
Returns the arguments of the signal.
*/
/*!
- \class QWrappedEvent
+ \class QStateMachine::WrappedEvent
- \brief The QWrappedEvent class holds a clone of an event associated with a QObject.
+ \brief The WrappedEvent class holds a clone of an event associated with a QObject.
\since 4.6
\ingroup statemachine
A wrapped event is generated by a QStateMachine in response to a Qt
event. The QEventTransition class provides a transition associated with a
- such an event. QWrappedEvent is part of \l{The State Machine Framework}.
+ such an event. QStateMachine::WrappedEvent is part of \l{The State Machine
+ Framework}.
The object() function returns the object that generated the event. The
event() function returns a clone of the original event.
@@ -2158,32 +2179,32 @@ QSignalEvent::~QSignalEvent()
/*!
\internal
- Constructs a new QWrappedEvent object with the given \a object
+ Constructs a new WrappedEvent object with the given \a object
and \a event.
- The QWrappedEvent object takes ownership of \a event.
+ The WrappedEvent object takes ownership of \a event.
*/
-QWrappedEvent::QWrappedEvent(QObject *object, QEvent *event)
+QStateMachine::WrappedEvent::WrappedEvent(QObject *object, QEvent *event)
: QEvent(QEvent::Wrapped), m_object(object), m_event(event)
{
}
/*!
- Destroys this QWrappedEvent.
+ Destroys this WrappedEvent.
*/
-QWrappedEvent::~QWrappedEvent()
+QStateMachine::WrappedEvent::~WrappedEvent()
{
delete m_event;
}
/*!
- \fn QWrappedEvent::object() const
+ \fn QStateMachine::WrappedEvent::object() const
Returns the object that the event is associated with.
*/
/*!
- \fn QWrappedEvent::event() const
+ \fn QStateMachine::WrappedEvent::event() const
Returns a clone of the original event.
*/
diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h
index dd524dd..a0b2b14 100644
--- a/src/corelib/statemachine/qstatemachine.h
+++ b/src/corelib/statemachine/qstatemachine.h
@@ -44,6 +44,7 @@
#include <QtCore/qstate.h>
+#include <QtCore/qcoreevent.h>
#include <QtCore/qlist.h>
#include <QtCore/qobject.h>
#include <QtCore/qset.h>
@@ -56,8 +57,6 @@ QT_MODULE(Core)
#ifndef QT_NO_STATEMACHINE
-class QEvent;
-
class QStateMachinePrivate;
class QAbstractAnimation;
class Q_CORE_EXPORT QStateMachine : public QState
@@ -70,6 +69,39 @@ class Q_CORE_EXPORT QStateMachine : public QState
Q_PROPERTY(bool animationsEnabled READ animationsEnabled WRITE setAnimationsEnabled)
#endif
public:
+ class SignalEvent : public QEvent
+ {
+ public:
+ SignalEvent(QObject *sender, int signalIndex,
+ const QList<QVariant> &arguments);
+ ~SignalEvent();
+
+ inline QObject *sender() const { return m_sender; }
+ inline int signalIndex() const { return m_signalIndex; }
+ inline QList<QVariant> arguments() const { return m_arguments; }
+
+ private:
+ QObject *m_sender;
+ int m_signalIndex;
+ QList<QVariant> m_arguments;
+
+ friend class QSignalTransitionPrivate;
+ };
+
+ class WrappedEvent : public QEvent
+ {
+ public:
+ WrappedEvent(QObject *object, QEvent *event);
+ ~WrappedEvent();
+
+ inline QObject *object() const { return m_object; }
+ inline QEvent *event() const { return m_event; }
+
+ private:
+ QObject *m_object;
+ QEvent *m_event;
+ };
+
enum RestorePolicy {
DoNotRestoreProperties,
RestoreProperties
diff --git a/src/corelib/statemachine/qstatemachine_p.h b/src/corelib/statemachine/qstatemachine_p.h
index a1b6de2..141bc5c 100644
--- a/src/corelib/statemachine/qstatemachine_p.h
+++ b/src/corelib/statemachine/qstatemachine_p.h
@@ -88,6 +88,10 @@ public:
Starting,
Running
};
+ enum EventProcessingMode {
+ DirectProcessing,
+ QueuedProcessing
+ };
enum StopProcessingReason {
EventQueueEmpty,
Finished,
@@ -149,12 +153,13 @@ public:
#ifndef QT_NO_STATEMACHINE_EVENTFILTER
void registerEventTransition(QEventTransition *transition);
void unregisterEventTransition(QEventTransition *transition);
+ void handleFilteredEvent(QObject *watched, QEvent *event);
#endif
void unregisterTransition(QAbstractTransition *transition);
void unregisterAllTransitions();
void handleTransitionSignal(QObject *sender, int signalIndex,
void **args);
- void scheduleProcess();
+ void processEvents(EventProcessingMode processingMode);
#ifndef QT_NO_PROPERTIES
typedef QPair<QObject *, QByteArray> RestorableId;
diff --git a/src/corelib/statemachine/qwrappedevent.h b/src/corelib/statemachine/qwrappedevent.h
deleted file mode 100644
index e0a131b..0000000
--- a/src/corelib/statemachine/qwrappedevent.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QWRAPPEDEVENT_H
-#define QWRAPPEDEVENT_H
-
-#include <QtCore/qcoreevent.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Core)
-
-#ifndef QT_NO_STATEMACHINE
-
-class QObject;
-
-class Q_CORE_EXPORT QWrappedEvent : public QEvent
-{
-public:
- QWrappedEvent(QObject *object, QEvent *event);
- ~QWrappedEvent();
-
- inline QObject *object() const { return m_object; }
- inline QEvent *event() const { return m_event; }
-
-private:
- QObject *m_object;
- QEvent *m_event;
-
-private:
- Q_DISABLE_COPY(QWrappedEvent)
-};
-
-#endif //QT_NO_STATEMACHINE
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/src/corelib/statemachine/statemachine.pri b/src/corelib/statemachine/statemachine.pri
index 5b19bc1..910cf5e 100644
--- a/src/corelib/statemachine/statemachine.pri
+++ b/src/corelib/statemachine/statemachine.pri
@@ -10,7 +10,6 @@ HEADERS += $$PWD/qstatemachine.h \
$$PWD/qhistorystate_p.h \
$$PWD/qabstracttransition.h \
$$PWD/qabstracttransition_p.h \
- $$PWD/qsignalevent.h \
$$PWD/qsignaltransition.h \
$$PWD/qsignaltransition_p.h
@@ -23,8 +22,7 @@ SOURCES += $$PWD/qstatemachine.cpp \
$$PWD/qsignaltransition.cpp
!contains(DEFINES, QT_NO_STATEMACHINE_EVENTFILTER) {
-HEADERS += $$PWD/qwrappedevent.h \
- $$PWD/qeventtransition.h \
+HEADERS += $$PWD/qeventtransition.h \
$$PWD/qeventtransition_p.h
SOURCES += $$PWD/qeventtransition.cpp
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 136bafa..4a66b92 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -637,7 +637,8 @@ static QString winSystemPMText()
}
/*!
- Returns the fallback locale obtained from the system.
+ \since 4.6
+ Returns the fallback locale obtained from the system.
*/
QLocale QSystemLocale::fallbackLocale() const
{
@@ -1156,7 +1157,7 @@ static void getMacPreferredLanguageAndCountry(QString *language, QString *countr
kCFPreferencesAnyApplication,
kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
- if (CFArrayGetCount(languages) > 0) {
+ if (languages && CFArrayGetCount(languages) > 0) {
QCFType<CFLocaleRef> locale = CFLocaleCreate(kCFAllocatorDefault,
CFStringRef(CFArrayGetValueAtIndex(languages, 0)));
if (language)
@@ -1283,6 +1284,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant /* in */) const
#elif !defined(Q_OS_SYMBIAN)
/*!
+ \since 4.6
+
Returns a fallback locale, that will get used for everything that
is not explicitly overridden by the system locale.
*/
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 4f05eda..2acbf17 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -478,7 +478,7 @@ public:
{ BaseClass::internalSet(other.d, other.value); return *this; }
inline void swap(QSharedPointer &other)
- { internalSwap(other); }
+ { QSharedPointer<T>::internalSwap(other); }
template <class X>
QSharedPointer<X> staticCast() const
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 222524e..840b9d6 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -47,21 +47,31 @@
QT_BEGIN_NAMESPACE
+// Current GL and VG contexts. These are used to determine if
+// we can avoid an eglMakeCurrent() after a call to lazyDoneCurrent().
+// If a background thread modifies the value, the worst that will
+// happen is a redundant eglMakeCurrent() in the foreground thread.
+static QEglContext * volatile currentGLContext = 0;
+static QEglContext * volatile currentVGContext = 0;
+
QEglContext::QEglContext()
: apiType(QEgl::OpenGL)
, dpy(EGL_NO_DISPLAY)
, ctx(EGL_NO_CONTEXT)
- , surf(EGL_NO_SURFACE)
, cfg(0)
- , share(false)
+ , currentSurface(EGL_NO_SURFACE)
, current(false)
- , reserved(0)
{
}
QEglContext::~QEglContext()
{
destroy();
+
+ if (currentGLContext == this)
+ currentGLContext = 0;
+ if (currentVGContext == this)
+ currentVGContext = 0;
}
bool QEglContext::isValid() const
@@ -69,11 +79,6 @@ bool QEglContext::isValid() const
return (ctx != EGL_NO_CONTEXT);
}
-bool QEglContext::isSharing() const
-{
- return share;
-}
-
bool QEglContext::isCurrent() const
{
return current;
@@ -148,7 +153,7 @@ bool QEglContext::chooseConfig
}
// Create the EGLContext.
-bool QEglContext::createContext(QEglContext *shareContext)
+bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties *properties)
{
// We need to select the correct API before calling eglCreateContext().
#ifdef EGL_OPENGL_ES_API
@@ -162,6 +167,8 @@ bool QEglContext::createContext(QEglContext *shareContext)
// Create a new context for the configuration.
QEglProperties contextProps;
+ if (properties)
+ contextProps = *properties;
#if defined(QT_OPENGL_ES_2)
if (apiType == QEgl::OpenGL)
contextProps.setValue(EGL_CONTEXT_CLIENT_VERSION, 2);
@@ -182,31 +189,17 @@ bool QEglContext::createContext(QEglContext *shareContext)
return false;
}
}
- share = (shareContext != 0);
return true;
}
-// Recreate the surface for a paint device because the native id has changed.
-bool QEglContext::recreateSurface(QPaintDevice *device)
-{
- // Bail out if the surface has not been created for the first time yet.
- if (surf == EGL_NO_SURFACE)
- return true;
-
- // Destroy the old surface.
- eglDestroySurface(dpy, surf);
- surf = EGL_NO_SURFACE;
-
- // Create a new one.
- return createSurface(device);
-}
-
-// Destroy the EGL surface object.
-void QEglContext::destroySurface()
+// Destroy an EGL surface object. If it was current on this context
+// then call doneCurrent() for it first.
+void QEglContext::destroySurface(EGLSurface surface)
{
- if (surf != EGL_NO_SURFACE) {
- eglDestroySurface(dpy, surf);
- surf = EGL_NO_SURFACE;
+ if (surface != EGL_NO_SURFACE) {
+ if (surface == currentSurface)
+ doneCurrent();
+ eglDestroySurface(dpy, surface);
}
}
@@ -217,21 +210,28 @@ void QEglContext::destroy()
eglDestroyContext(dpy, ctx);
dpy = EGL_NO_DISPLAY;
ctx = EGL_NO_CONTEXT;
- surf = EGL_NO_SURFACE;
cfg = 0;
- share = false;
}
-bool QEglContext::makeCurrent()
+bool QEglContext::makeCurrent(EGLSurface surface)
{
if (ctx == EGL_NO_CONTEXT) {
qWarning() << "QEglContext::makeCurrent(): Cannot make invalid context current";
return false;
}
+ // If lazyDoneCurrent() was called on the surface, then we may be able
+ // to assume that it is still current within the thread.
+ if (surface == currentSurface && currentContext(apiType) == this) {
+ current = true;
+ return true;
+ }
+
current = true;
+ currentSurface = surface;
+ setCurrentContext(apiType, this);
- bool ok = eglMakeCurrent(dpy, surf, surf, ctx);
+ bool ok = eglMakeCurrent(dpy, surface, surface, ctx);
if (!ok)
qWarning() << "QEglContext::makeCurrent():" << errorString(eglGetError());
return ok;
@@ -245,6 +245,8 @@ bool QEglContext::doneCurrent()
return false;
current = false;
+ currentSurface = EGL_NO_SURFACE;
+ setCurrentContext(apiType, 0);
// We need to select the correct API before calling eglMakeCurrent()
// with EGL_NO_CONTEXT because threads can have both OpenGL and OpenVG
@@ -264,12 +266,23 @@ bool QEglContext::doneCurrent()
return ok;
}
-bool QEglContext::swapBuffers()
+// Act as though doneCurrent() was called, but keep the context
+// and the surface active for the moment. This allows makeCurrent()
+// to skip a call to eglMakeCurrent() if we are using the same
+// surface as the last set of painting operations. We leave the
+// currentContext() pointer as-is for now.
+bool QEglContext::lazyDoneCurrent()
+{
+ current = false;
+ return true;
+}
+
+bool QEglContext::swapBuffers(EGLSurface surface)
{
if(ctx == EGL_NO_CONTEXT)
return false;
- bool ok = eglSwapBuffers(dpy, surf);
+ bool ok = eglSwapBuffers(dpy, surface);
if (!ok)
qWarning() << "QEglContext::swapBuffers():" << errorString(eglGetError());
return ok;
@@ -305,15 +318,6 @@ void QEglContext::waitClient()
#endif
}
-// Query the actual size of the EGL surface.
-QSize QEglContext::surfaceSize() const
-{
- int w, h;
- eglQuerySurface(dpy, surf, EGL_WIDTH, &w);
- eglQuerySurface(dpy, surf, EGL_HEIGHT, &h);
- return QSize(w, h);
-}
-
// Query the value of a configuration attribute.
bool QEglContext::configAttrib(int name, EGLint *value) const
{
@@ -411,4 +415,20 @@ bool QEglContext::hasExtension(const char* extensionName)
return extensions().contains(QLatin1String(extensionName));
}
+QEglContext *QEglContext::currentContext(QEgl::API api)
+{
+ if (api == QEgl::OpenGL)
+ return currentGLContext;
+ else
+ return currentVGContext;
+}
+
+void QEglContext::setCurrentContext(QEgl::API api, QEglContext *context)
+{
+ if (api == QEgl::OpenGL)
+ currentGLContext = context;
+ else
+ currentVGContext = context;
+}
+
QT_END_NAMESPACE
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h
index 366bd9e..dc399da 100644
--- a/src/gui/egl/qegl_p.h
+++ b/src/gui/egl/qegl_p.h
@@ -80,7 +80,6 @@ public:
~QEglContext();
bool isValid() const;
- bool isSharing() const;
bool isCurrent() const;
QEgl::API api() const { return apiType; }
@@ -88,22 +87,20 @@ public:
bool openDisplay(QPaintDevice *device);
bool chooseConfig(const QEglProperties& properties, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat);
- bool createContext(QEglContext *shareContext = 0);
- bool createSurface(QPaintDevice *device, const QEglProperties *properties = 0);
- bool recreateSurface(QPaintDevice *device);
- void destroySurface();
+ bool createContext(QEglContext *shareContext = 0, const QEglProperties *properties = 0);
+ EGLSurface createSurface(QPaintDevice *device, const QEglProperties *properties = 0);
+ void destroySurface(EGLSurface surface);
void destroy();
- bool makeCurrent();
+ bool makeCurrent(EGLSurface surface);
bool doneCurrent();
- bool swapBuffers();
+ bool lazyDoneCurrent();
+ bool swapBuffers(EGLSurface surface);
void waitNative();
void waitClient();
- QSize surfaceSize() const;
-
bool configAttrib(int name, EGLint *value) const;
static void clearError() { eglGetError(); }
@@ -111,10 +108,12 @@ public:
static QString errorString(EGLint code);
EGLDisplay display() const { return dpy; }
+
EGLContext context() const { return ctx; }
- EGLSurface surface() const { return surf; }
- void setSurface(EGLSurface surface) { surf = surface; }
+ void setContext(EGLContext context) { ctx = context; }
+
EGLConfig config() const { return cfg; }
+ void setConfig(EGLConfig config) { cfg = config; }
QEglProperties configProperties(EGLConfig cfg = 0) const;
@@ -129,13 +128,14 @@ private:
QEgl::API apiType;
EGLDisplay dpy;
EGLContext ctx;
- EGLSurface surf;
EGLConfig cfg;
- bool share;
+ EGLSurface currentSurface;
bool current;
- void *reserved; // For extension data in future versions.
static EGLDisplay getDisplay(QPaintDevice *device);
+
+ static QEglContext *currentContext(QEgl::API api);
+ static void setCurrentContext(QEgl::API api, QEglContext *context);
};
QT_END_NAMESPACE
diff --git a/src/gui/egl/qegl_qws.cpp b/src/gui/egl/qegl_qws.cpp
index 2754589..590b666 100644
--- a/src/gui/egl/qegl_qws.cpp
+++ b/src/gui/egl/qegl_qws.cpp
@@ -57,11 +57,11 @@ QT_BEGIN_NAMESPACE
// We don't have QGLScreen to create EGL surfaces for us,
// so surface creation needs to be done in QtOpenGL or
// QtOpenVG for Qt/Embedded.
-bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
{
Q_UNUSED(device);
Q_UNUSED(properties);
- return false;
+ return EGL_NO_SURFACE;
}
EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp
index fa0b5cb..2101f0b 100644
--- a/src/gui/egl/qegl_symbian.cpp
+++ b/src/gui/egl/qegl_symbian.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
{
// Create the native drawable for the paint device.
int devType = device->devType();
@@ -67,7 +67,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
}
if (!ok) {
qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return false;
+ return EGL_NO_SURFACE;
}
// Create the EGL surface to draw into, based on the native drawable.
@@ -76,15 +76,14 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
props = properties->properties();
else
props = 0;
+ EGLSurface surf;
if (devType == QInternal::Widget)
surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, 0);
else
surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, 0);
- if (surf == EGL_NO_SURFACE) {
+ if (surf == EGL_NO_SURFACE)
qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
- return false;
- }
- return true;
+ return surf;
}
EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
diff --git a/src/gui/egl/qegl_wince.cpp b/src/gui/egl/qegl_wince.cpp
index e07d748..bf07f85 100644
--- a/src/gui/egl/qegl_wince.cpp
+++ b/src/gui/egl/qegl_wince.cpp
@@ -49,7 +49,7 @@
QT_BEGIN_NAMESPACE
-bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
{
// Create the native drawable for the paint device.
int devType = device->devType();
@@ -67,7 +67,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
}
if (!ok) {
qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return false;
+ return EGL_NO_SURFACE;
}
// Create the EGL surface to draw into, based on the native drawable.
@@ -76,15 +76,15 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
props = properties->properties();
else
props = 0;
+ EGLSurface surf;
if (devType == QInternal::Widget)
surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
else
surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props);
if (surf == EGL_NO_SURFACE) {
qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
- return false;
}
- return true;
+ return surf;
}
EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 5f34f8e..9d556a8 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -54,7 +54,7 @@
QT_BEGIN_NAMESPACE
-bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
+EGLSurface QEglContext::createSurface(QPaintDevice *device, const QEglProperties *properties)
{
// Create the native drawable for the paint device.
int devType = device->devType();
@@ -72,7 +72,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
}
if (!ok) {
qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return false;
+ return EGL_NO_SURFACE;
}
// Create the EGL surface to draw into, based on the native drawable.
@@ -81,6 +81,7 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
props = properties->properties();
else
props = 0;
+ EGLSurface surf;
if (devType == QInternal::Widget)
surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props);
else
@@ -88,9 +89,8 @@ bool QEglContext::createSurface(QPaintDevice *device, const QEglProperties *prop
if (surf == EGL_NO_SURFACE) {
qWarning() << "QEglContext::createSurface(): Unable to create EGL surface:"
<< errorString(eglGetError());
- return false;
}
- return true;
+ return surf;
}
EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 78b6b53..b3ebb2b 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -171,23 +171,23 @@ QGraphicsAnchorLayout::~QGraphicsAnchorLayout()
}
/*!
- * Creates an anchor between the edge \a firstEdge of item \a firstItem and the edge \a secondEdge
- * of item \a secondItem. The magnitude of the anchor is picked up from the style. Anchors
- * between a layout edge and an item edge will have a size of 0.
- * If there is already an anchor between the edges, the the new anchor will replace the old one.
- *
- * \a firstItem and \a secondItem are automatically added to the layout if they are not part
- * of the layout. This means that count() can increase with up to 2.
- *
- * The spacing an anchor will get depends on the type of anchor. For instance, anchors from the
- * Right edge of one item to the Left edge of another (or vice versa) will use the default
- * horizontal spacing. The same behaviour applies to Bottom to Top anchors, (but they will use
- * the default vertical spacing). For all other anchor combinations, the spacing will be 0.
- * All anchoring functions will follow this rule.
- *
- * The spacing can also be set manually by using QGraphicsAnchor::setSpacing() method.
- *
- * \sa addCornerAnchors(), addAnchors()
+ Creates an anchor between the edge \a firstEdge of item \a firstItem and the edge \a secondEdge
+ of item \a secondItem. The magnitude of the anchor is picked up from the style. Anchors
+ between a layout edge and an item edge will have a size of 0.
+ If there is already an anchor between the edges, the the new anchor will replace the old one.
+
+ \a firstItem and \a secondItem are automatically added to the layout if they are not part
+ of the layout. This means that count() can increase with up to 2.
+
+ The spacing an anchor will get depends on the type of anchor. For instance, anchors from the
+ Right edge of one item to the Left edge of another (or vice versa) will use the default
+ horizontal spacing. The same behaviour applies to Bottom to Top anchors, (but they will use
+ the default vertical spacing). For all other anchor combinations, the spacing will be 0.
+ All anchoring functions will follow this rule.
+
+ The spacing can also be set manually by using QGraphicsAnchor::setSpacing() method.
+
+ \sa addCornerAnchors(), addAnchors()
*/
QGraphicsAnchor *
QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge,
@@ -200,8 +200,8 @@ QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint
}
/*!
- Returns the anchor between the anchor points defined by \a firstItem and \a firstEdge and
- \a secondItem and \a secondEdge. If there is no such anchor, the function will return 0.
+ Returns the anchor between the anchor points defined by \a firstItem and \a firstEdge and
+ \a secondItem and \a secondEdge. If there is no such anchor, the function will return 0.
*/
QGraphicsAnchor *
QGraphicsAnchorLayout::anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge,
@@ -212,30 +212,30 @@ QGraphicsAnchorLayout::anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint fi
}
/*!
- * Creates two anchors between \a firstItem and \a secondItem, where one is for the horizontal
- * edge and another one for the vertical edge that the corners \a firstCorner and \a
- * secondCorner specifies.
- * The magnitude of the anchors is picked up from the style.
- *
- * This is a convenience function, since anchoring corners can be expressed as anchoring two edges.
- * For instance,
- * \code
- * layout->addAnchor(layout, Qt::AnchorTop, b, Qt::AnchorTop);
- * layout->addAnchor(layout, Qt::AnchorLeft, b, Qt::AnchorLeft);
- * \endcode
- *
- * has the same effect as
- *
- * \code
- * layout->addCornerAnchors(layout, Qt::TopLeft, b, Qt::TopLeft);
- * \endcode
- *
- * If there is already an anchor between the edge pairs, it will be replaced by the anchors that
- * this function specifies.
- *
- * \a firstItem and \a secondItem are automatically added to the layout if they are not part
- * of the layout. This means that count() can increase with up to 2.
- */
+ Creates two anchors between \a firstItem and \a secondItem, where one is for the horizontal
+ edge and another one for the vertical edge that the corners \a firstCorner and \a
+ secondCorner specifies.
+ The magnitude of the anchors is picked up from the style.
+
+ This is a convenience function, since anchoring corners can be expressed as anchoring two edges.
+ For instance,
+ \code
+ layout->addAnchor(layout, Qt::AnchorTop, b, Qt::AnchorTop);
+ layout->addAnchor(layout, Qt::AnchorLeft, b, Qt::AnchorLeft);
+ \endcode
+
+ has the same effect as
+
+ \code
+ layout->addCornerAnchors(layout, Qt::TopLeft, b, Qt::TopLeft);
+ \endcode
+
+ If there is already an anchor between the edge pairs, it will be replaced by the anchors that
+ this function specifies.
+
+ \a firstItem and \a secondItem are automatically added to the layout if they are not part of the
+ layout. This means that count() can increase with up to 2.
+*/
void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem,
Qt::Corner firstCorner,
QGraphicsLayoutItem *secondItem,
@@ -360,7 +360,7 @@ qreal QGraphicsAnchorLayout::verticalSpacing() const
}
/*!
- \reimp
+ \reimp
*/
void QGraphicsAnchorLayout::setGeometry(const QRectF &geom)
{
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 7041d58..49aabf5 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -542,7 +542,7 @@ static bool simplifySequentialChunk(Graph<AnchorVertex, AnchorData> *graph,
void QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation)
{
static bool noSimplification = !qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty();
- if (noSimplification)
+ if (noSimplification || items.isEmpty())
return;
if (graphSimplified[orientation])
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 3249bb1..c3934c7 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1479,6 +1479,7 @@ QList<QGraphicsItem *> QGraphicsItem::children() const
*/
QList<QGraphicsItem *> QGraphicsItem::childItems() const
{
+ const_cast<QGraphicsItem *>(this)->d_ptr->ensureSortedChildren();
return d_ptr->children;
}
@@ -4048,6 +4049,82 @@ void QGraphicsItem::setZValue(qreal z)
}
/*!
+ \internal
+
+ Ensures that the list of children is sorted by insertion order, and that
+ the siblingIndexes are packed (no gaps), and start at 0.
+
+ ### This function is almost identical to
+ QGraphicsScenePrivate::ensureSequentialTopLevelSiblingIndexes().
+*/
+void QGraphicsItemPrivate::ensureSequentialSiblingIndex()
+{
+ if (!sequentialOrdering) {
+ qSort(children.begin(), children.end(), insertionOrder);
+ sequentialOrdering = 1;
+ needSortChildren = 1;
+ }
+ if (holesInSiblingIndex) {
+ holesInSiblingIndex = 0;
+ for (int i = 0; i < children.size(); ++i)
+ children[i]->d_ptr->siblingIndex = i;
+ }
+}
+
+/*!
+ \since 4.6
+
+ Stacks this item before \a sibling, which must be a sibling item (i.e., the
+ two items must share the same parent item, or must both be toplevel items).
+ The \a sibling must have the same Z value as this item, otherwise calling
+ this function will have no effect.
+
+ By default, all items are stacked by insertion order (i.e., the first item
+ you add is drawn before the next item you add). If two items' Z values are
+ different, then the item with the highest Z value is drawn on top. When the
+ Z values are the same, the insertion order will decide the stacking order.
+
+ \sa setZValue(), ItemStacksBehindParent
+*/
+void QGraphicsItem::stackBefore(const QGraphicsItem *sibling)
+{
+ if (sibling == this)
+ return;
+ if (!sibling || d_ptr->parent != sibling->parentItem()) {
+ qWarning("QGraphicsItem::stackUnder: cannot stack under %p, which must be a sibling", sibling);
+ return;
+ }
+ QList<QGraphicsItem *> *siblings = d_ptr->parent
+ ? &d_ptr->parent->d_ptr->children
+ : (d_ptr->scene ? &d_ptr->scene->d_func()->topLevelItems : 0);
+ if (!siblings) {
+ qWarning("QGraphicsItem::stackUnder: cannot stack under %p, which must be a sibling", sibling);
+ return;
+ }
+
+ // First, make sure that the sibling indexes have no holes. This also
+ // marks the children list for sorting.
+ if (d_ptr->parent)
+ d_ptr->parent->d_ptr->ensureSequentialSiblingIndex();
+ else
+ d_ptr->scene->d_func()->ensureSequentialTopLevelSiblingIndexes();
+
+ // Only move items with the same Z value, and that need moving.
+ int siblingIndex = sibling->d_ptr->siblingIndex;
+ int myIndex = d_ptr->siblingIndex;
+ if (myIndex >= siblingIndex && d_ptr->z == sibling->d_ptr->z) {
+ siblings->move(myIndex, siblingIndex);
+ // Fixup the insertion ordering.
+ for (int i = 0; i < siblings->size(); ++i) {
+ int &index = siblings->at(i)->d_ptr->siblingIndex;
+ if (i != siblingIndex && index >= siblingIndex && index <= myIndex)
+ ++index;
+ }
+ d_ptr->siblingIndex = siblingIndex;
+ }
+}
+
+/*!
Returns the bounding rect of this item's descendants (i.e., its
children, their children, etc.) in local coordinates. The
rectangle will contain all descendants after they have been mapped
@@ -4753,20 +4830,36 @@ void QGraphicsItemPrivate::resolveDepth()
/*!
\internal
+
+ ### This function is almost identical to
+ QGraphicsScenePrivate::registerTopLevelItem().
*/
void QGraphicsItemPrivate::addChild(QGraphicsItem *child)
{
- needSortChildren = 1;
+ // Remove all holes from the sibling index list. Now the max index
+ // number is equal to the size of the children list.
+ ensureSequentialSiblingIndex();
+ needSortChildren = 1; // ### maybe 0
child->d_ptr->siblingIndex = children.size();
children.append(child);
}
/*!
\internal
+
+ ### This function is almost identical to
+ QGraphicsScenePrivate::unregisterTopLevelItem().
*/
void QGraphicsItemPrivate::removeChild(QGraphicsItem *child)
{
- children.removeOne(child);
+ // When removing elements in the middle of the children list,
+ // there will be a "gap" in the list of sibling indexes (0,1,3,4).
+ if (!holesInSiblingIndex)
+ holesInSiblingIndex = child->d_ptr->siblingIndex != children.size() - 1;
+ if (sequentialOrdering && !holesInSiblingIndex)
+ children.removeAt(child->d_ptr->siblingIndex);
+ else
+ children.removeOne(child);
// NB! Do not use children.removeAt(child->d_ptr->siblingIndex) because
// the child is not guaranteed to be at the index after the list is sorted.
// (see ensureSortedChildren()).
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index 089d6fe..99d2e12 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -302,6 +302,7 @@ public:
// Stacking order
qreal zValue() const;
void setZValue(qreal z);
+ void stackBefore(const QGraphicsItem *sibling);
// Hit test
virtual QRectF boundingRect() const = 0;
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index fd2ff34..3feccdc 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -153,7 +153,7 @@ public:
dirtyClipPath(1),
emptyClipPath(0),
inSetPosHelper(0),
- needSortChildren(1),
+ needSortChildren(1), // ### can be 0 by default?
allChildrenDirty(0),
fullUpdatePending(0),
flags(0),
@@ -174,6 +174,8 @@ public:
mouseSetsFocus(1),
explicitActivate(0),
wantsActive(0),
+ holesInSiblingIndex(0),
+ sequentialOrdering(1),
globalStackingOrder(-1),
q_ptr(0)
{
@@ -421,6 +423,8 @@ public:
inline QTransform transformToParent() const;
inline void ensureSortedChildren();
+ static inline bool insertionOrder(QGraphicsItem *a, QGraphicsItem *b);
+ void ensureSequentialSiblingIndex();
QPainterPath cachedClipPath;
QRectF childrenBoundingRect;
@@ -493,6 +497,8 @@ public:
// New 32 bits
quint32 explicitActivate : 1;
quint32 wantsActive : 1;
+ quint32 holesInSiblingIndex : 1;
+ quint32 sequentialOrdering : 1;
// Optional stacking order
int globalStackingOrder;
@@ -646,14 +652,32 @@ inline QTransform QGraphicsItemPrivate::transformToParent() const
return matrix;
}
+/*!
+ \internal
+*/
inline void QGraphicsItemPrivate::ensureSortedChildren()
{
if (needSortChildren) {
qSort(children.begin(), children.end(), qt_notclosestLeaf);
needSortChildren = 0;
+ sequentialOrdering = 1;
+ for (int i = 0; i < children.size(); ++i) {
+ if (children[i]->d_ptr->siblingIndex != i) {
+ sequentialOrdering = 0;
+ break;
+ }
+ }
}
}
+/*!
+ \internal
+*/
+inline bool QGraphicsItemPrivate::insertionOrder(QGraphicsItem *a, QGraphicsItem *b)
+{
+ return a->d_ptr->siblingIndex < b->d_ptr->siblingIndex;
+}
+
QT_END_NAMESPACE
#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp
index f9800bc..2e9a30c 100644
--- a/src/gui/graphicsview/qgraphicslayout.cpp
+++ b/src/gui/graphicsview/qgraphicslayout.cpp
@@ -420,6 +420,8 @@ void QGraphicsLayout::widgetEvent(QEvent *e)
*/
/*!
+ \since 4.6
+
This function is a convenience function provided for custom layouts, and will go through
all items in the layout and reparent their graphics items to the closest QGraphicsWidget
ancestor of the layout.
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 0655ecc..4b74b67 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -283,6 +283,8 @@ QGraphicsScenePrivate::QGraphicsScenePrivate()
processDirtyItemsEmitted(false),
selectionChanging(0),
needSortTopLevelItems(true),
+ holesInTopLevelSiblingIndex(false),
+ topLevelSequentialOrdering(true),
stickyFocus(false),
hasFocus(false),
focusItem(0),
@@ -379,24 +381,36 @@ void QGraphicsScenePrivate::_q_emitUpdated()
/*!
\internal
+
+ ### This function is almost identical to QGraphicsItemPrivate::addChild().
*/
void QGraphicsScenePrivate::registerTopLevelItem(QGraphicsItem *item)
{
- needSortTopLevelItems = true;
+ item->d_ptr->ensureSequentialSiblingIndex();
+ needSortTopLevelItems = true; // ### maybe false
item->d_ptr->siblingIndex = topLevelItems.size();
topLevelItems.append(item);
}
/*!
\internal
+
+ ### This function is almost identical to QGraphicsItemPrivate::removeChild().
*/
void QGraphicsScenePrivate::unregisterTopLevelItem(QGraphicsItem *item)
{
- topLevelItems.removeOne(item);
+ if (!holesInTopLevelSiblingIndex)
+ holesInTopLevelSiblingIndex = item->d_ptr->siblingIndex != topLevelItems.size() - 1;
+ if (topLevelSequentialOrdering && !holesInTopLevelSiblingIndex)
+ topLevelItems.removeAt(item->d_ptr->siblingIndex);
+ else
+ topLevelItems.removeOne(item);
// NB! Do not use topLevelItems.removeAt(item->d_ptr->siblingIndex) because
// the item is not guaranteed to be at the index after the list is sorted
// (see ensureSortedTopLevelItems()).
item->d_ptr->siblingIndex = -1;
+ if (topLevelSequentialOrdering)
+ topLevelSequentialOrdering = !holesInTopLevelSiblingIndex;
}
/*!
@@ -1239,6 +1253,29 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
/*!
\internal
+ Ensures that the list of toplevels is sorted by insertion order, and that
+ the siblingIndexes are packed (no gaps), and start at 0.
+
+ ### This function is almost identical to
+ QGraphicsItemPrivate::ensureSequentialSiblingIndex().
+*/
+void QGraphicsScenePrivate::ensureSequentialTopLevelSiblingIndexes()
+{
+ if (!topLevelSequentialOrdering) {
+ qSort(topLevelItems.begin(), topLevelItems.end(), QGraphicsItemPrivate::insertionOrder);
+ topLevelSequentialOrdering = true;
+ needSortTopLevelItems = 1;
+ }
+ if (holesInTopLevelSiblingIndex) {
+ holesInTopLevelSiblingIndex = 0;
+ for (int i = 0; i < topLevelItems.size(); ++i)
+ topLevelItems[i]->d_ptr->siblingIndex = i;
+ }
+}
+
+/*!
+ \internal
+
Set the font and propagate the changes if the font is different from the
current font.
*/
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 3b03624..46917ce 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -111,6 +111,9 @@ public:
QList<QGraphicsItem *> unpolishedItems;
QList<QGraphicsItem *> topLevelItems;
bool needSortTopLevelItems;
+ bool holesInTopLevelSiblingIndex;
+ bool topLevelSequentialOrdering;
+
QMap<QGraphicsItem *, QPointF> movingItemsInitialPositions;
void registerTopLevelItem(QGraphicsItem *item);
void unregisterTopLevelItem(QGraphicsItem *item);
@@ -255,6 +258,8 @@ public:
}
}
+ void ensureSequentialTopLevelSiblingIndexes();
+
QStyle *style;
QFont font;
void setFont_helper(const QFont &font);
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp
index 3ea957f..f0404fd 100644
--- a/src/gui/graphicsview/qgraphicssceneindex.cpp
+++ b/src/gui/graphicsview/qgraphicssceneindex.cpp
@@ -265,12 +265,13 @@ bool QGraphicsSceneIndexPrivate::itemCollidesWithPath(const QGraphicsItem *item,
/*!
\internal
+ This function returns the items in ascending order.
*/
void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,
QGraphicsSceneIndexIntersector *intersector,
QList<QGraphicsItem *> *items,
const QTransform &viewTransform,
- Qt::ItemSelectionMode mode, Qt::SortOrder order,
+ Qt::ItemSelectionMode mode,
qreal parentOpacity) const
{
Q_ASSERT(item);
@@ -326,7 +327,7 @@ void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRe
if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
continue;
recursive_items_helper(child, exposeRect, intersector, items, viewTransform,
- mode, order, opacity);
+ mode, opacity);
}
}
@@ -343,7 +344,7 @@ void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRe
if (itemIsFullyTransparent && !(child->d_ptr->flags & QGraphicsItem::ItemIgnoresParentOpacity))
continue;
recursive_items_helper(child, exposeRect, intersector, items, viewTransform,
- mode, order, opacity);
+ mode, opacity);
}
}
}
diff --git a/src/gui/graphicsview/qgraphicssceneindex_p.h b/src/gui/graphicsview/qgraphicssceneindex_p.h
index 768c724..adebfde 100644
--- a/src/gui/graphicsview/qgraphicssceneindex_p.h
+++ b/src/gui/graphicsview/qgraphicssceneindex_p.h
@@ -138,7 +138,7 @@ public:
void recursive_items_helper(QGraphicsItem *item, QRectF exposeRect,
QGraphicsSceneIndexIntersector *intersector, QList<QGraphicsItem *> *items,
const QTransform &viewTransform,
- Qt::ItemSelectionMode mode, Qt::SortOrder order, qreal parentOpacity = 1.0) const;
+ Qt::ItemSelectionMode mode, qreal parentOpacity = 1.0) const;
inline void items_helper(const QRectF &rect, QGraphicsSceneIndexIntersector *intersector,
QList<QGraphicsItem *> *items, const QTransform &viewTransform,
Qt::ItemSelectionMode mode, Qt::SortOrder order) const;
@@ -156,7 +156,7 @@ inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphi
Q_Q(const QGraphicsSceneIndex);
const QList<QGraphicsItem *> tli = q->estimateTopLevelItems(rect, Qt::AscendingOrder);
for (int i = 0; i < tli.size(); ++i)
- recursive_items_helper(tli.at(i), rect, intersector, items, viewTransform, mode, order);
+ recursive_items_helper(tli.at(i), rect, intersector, items, viewTransform, mode);
if (order == Qt::DescendingOrder) {
const int n = items->size();
for (int i = 0; i < n / 2; ++i)
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp
index e3a991e..1ece8b1 100644
--- a/src/gui/graphicsview/qsimplex_p.cpp
+++ b/src/gui/graphicsview/qsimplex_p.cpp
@@ -48,6 +48,33 @@
QT_BEGIN_NAMESPACE
+/*!
+ \internal
+ \class QSimplex
+
+ The QSimplex class is a Linear Programming problem solver based on the two-phase
+ simplex method.
+
+ It takes a set of QSimplexConstraints as its restrictive constraints and an
+ additional QSimplexConstraint as its objective function. Then methods to maximize
+ and minimize the problem solution are provided.
+
+ The two-phase simplex method is based on the following steps:
+ First phase:
+ 1.a) Modify the original, complex, and possibly not feasible problem, into a new,
+ easy to solve problem.
+ 1.b) Set as the objective of the new problem, a feasible solution for the original
+ complex problem.
+ 1.c) Run simplex to optimize the modified problem and check whether a solution for
+ the original problem exists.
+
+ Second phase:
+ 2.a) Go back to the original problem with the feasibl (but not optimal) solution
+ found in the first phase.
+ 2.b) Set the original objective.
+ 3.c) Run simplex to optimize the original problem towards its optimal solution.
+*/
+
QSimplex::QSimplex() : objective(0), rows(0), columns(0), firstArtificial(0), matrix(0)
{
}
@@ -84,15 +111,32 @@ void QSimplex::clearDataStructures()
objective = 0;
}
+/*!
+ \internal
+ Sets the new constraints in the simplex solver and returns whether the problem
+ is feasible.
+
+ This method sets the new constraints, normalizes them, creates the simplex matrix
+ and runs the first simplex phase.
+*/
bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
{
+ ////////////////////////////
+ // Reset to initial state //
+ ////////////////////////////
clearDataStructures();
if (newConstraints.isEmpty())
return true; // we are ok with no constraints
constraints = newConstraints;
- // Set Variables direct mapping
+ ///////////////////////////////////////
+ // Prepare variables and constraints //
+ ///////////////////////////////////////
+
+ // Set Variables direct mapping.
+ // "variables" is a list that provides a stable, indexed list of all variables
+ // used in this problem.
QSet<QSimplexVariable *> variablesSet;
for (int i = 0; i < constraints.size(); ++i)
variablesSet += \
@@ -100,12 +144,25 @@ bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
variables = variablesSet.toList();
// Set Variables reverse mapping
+ // We also need to be able to find the index for a given variable, to do that
+ // we store in each variable its index.
for (int i = 0; i < variables.size(); ++i) {
// The variable "0" goes at the column "1", etc...
variables[i]->index = i + 1;
}
// Normalize Constraints
+ // In this step, we prepare the constraints in two ways:
+ // Firstly, we modify all constraints of type "LessOrEqual" or "MoreOrEqual"
+ // by the adding slack or surplus variables and making them "Equal" constraints.
+ // Secondly, we need every single constraint to have a direct, easy feasible
+ // solution. Constraints that have slack variables are already easy to solve,
+ // to all the others we add artificial variables.
+ //
+ // At the end we modify the constraints as follows:
+ // - LessOrEqual: SLACK variable is added.
+ // - Equal: ARTIFICIAL variable is added.
+ // - More or Equal: ARTIFICIAL and SURPLUS variables are added.
int variableIndex = variables.size();
QList <QSimplexVariable *> artificialList;
@@ -138,12 +195,18 @@ bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
}
}
+ // All original, slack and surplus have already had its index set
+ // at this point. We now set the index of the artificial variables
+ // as to ensure they are at the end of the variable list and therefore
+ // can be easily removed at the end of this method.
firstArtificial = variableIndex + 1;
for (int i = 0; i < artificialList.size(); ++i)
artificialList[i]->index = ++variableIndex;
artificialList.clear();
- // Matrix
+ /////////////////////////////
+ // Fill the Simplex matrix //
+ /////////////////////////////
// One for each variable plus the Basic and BFS columns (first and last)
columns = variableIndex + 2;
@@ -188,24 +251,61 @@ bool QSimplex::setConstraints(const QList<QSimplexConstraint *> newConstraints)
setValueAt(i, columns - 1, c->constant);
}
- // Set temporary objective: -1 * sum_of_artificial_vars
+ // Set objective for the first-phase Simplex.
+ // Z = -1 * sum_of_artificial_vars
for (int j = firstArtificial; j < columns - 1; ++j)
setValueAt(0, j, 1.0);
// Maximize our objective (artificial vars go to zero)
solveMaxHelper();
+ // If there is a solution where the sum of all artificial
+ // variables is zero, then all of them can be removed and yet
+ // we will have a feasible (but not optimal) solution for the
+ // original problem.
+ // Otherwise, we clean up our structures and report there is
+ // no feasible solution.
if (valueAt(0, columns - 1) != 0.0) {
qWarning() << "QSimplex: No feasible solution!";
clearDataStructures();
return false;
}
- // Remove artificial variables
+ // Remove artificial variables. We already have a feasible
+ // solution for the first problem, thus we don't need them
+ // anymore.
clearColumns(firstArtificial, columns - 2);
+
+ #ifdef QT_DEBUG
+ // Ensure that at the end of the simplex each row should either:
+ // - Have a positive value on the column associated to its variable, or
+ // - Have zero values in all columns.
+ //
+ // This avoids a regression where restrictions would be lost
+ // due to randomness in the pivotRowForColumn method.
+ for (int i = 1; i < rows; ++i) {
+ int variableIndex = valueAt(i, 0);
+ if (valueAt(i, variableIndex) > 0)
+ continue;
+
+ for (int j = 1; j < columns; ++j) {
+ Q_ASSERT(valueAt(i, j) == 0);
+ }
+ }
+ #endif
+
return true;
}
+/*!
+ \internal
+
+ Run simplex on the current matrix with the current objective.
+
+ This is the iterative method. The matrix lines are combined
+ as to modify the variable values towards the best solution possible.
+ The method returns when the matrix is in the optimal state.
+*/
void QSimplex::solveMaxHelper()
{
reducedRowEchelon();
@@ -235,23 +335,21 @@ void QSimplex::clearColumns(int first, int last)
void QSimplex::dumpMatrix()
{
- printf("---- Simplex Matrix ----\n");
+ qDebug("---- Simplex Matrix ----\n");
- printf(" ");
+ QString str(QLatin1String(" "));
for (int j = 0; j < columns; ++j)
- printf(" <% 2d >", j);
- printf("\n");
-
+ str += QString::fromAscii(" <%1 >").arg(j, 2);
+ qDebug("%s", qPrintable(str));
for (int i = 0; i < rows; ++i) {
- printf("Row %2d:", i);
+ str = QString::fromAscii("Row %1:").arg(i, 2);
qreal *row = matrix + i * columns;
- for (int j = 0; j < columns; ++j) {
- printf(" % 2.2f", row[j]);
- }
- printf("\n");
+ for (int j = 0; j < columns; ++j)
+ str += QString::fromAscii("%1").arg(row[j], 7, 'f', 2);
+ qDebug("%s", qPrintable(str));
}
- printf("------------------------\n\n");
+ qDebug("------------------------\n");
}
void QSimplex::combineRows(int toIndex, int fromIndex, qreal factor)
@@ -292,6 +390,23 @@ int QSimplex::findPivotColumn()
return minIndex;
}
+/*!
+ \internal
+
+ For a given pivot column, find the pivot row. That is, the row with the
+ minimum associated "quotient" where:
+
+ - quotient is the division of the value in the last column by the value
+ in the pivot column.
+ - rows with value less or equal to zero are ignored
+ - if two rows have the same quotient, lines are chosen based on the
+ highest variable index (value in the first column)
+
+ The last condition avoids a bug where artificial variables would be
+ left behind for the second-phase simplex, and with 'good'
+ constraints would be removed before it, what would lead to incorrect
+ results.
+*/
int QSimplex::pivotRowForColumn(int column)
{
qreal min = qreal(999999999999.0); // ###
@@ -306,6 +421,8 @@ int QSimplex::pivotRowForColumn(int column)
if (quotient < min) {
min = quotient;
minIndex = i;
+ } else if ((quotient == min) && (valueAt(i, 0) > valueAt(minIndex, 0))) {
+ minIndex = i;
}
}
@@ -320,6 +437,12 @@ void QSimplex::reducedRowEchelon()
}
}
+/*!
+ \internal
+
+ Does one iteration towards a better solution for the problem.
+ See 'solveMaxHelper'.
+*/
bool QSimplex::iterate()
{
// Find Pivot column
@@ -351,7 +474,7 @@ bool QSimplex::iterate()
setValueAt(pivotRow, 0, pivotColumn);
// dumpMatrix();
- // printf("------------ end of iteration --------------\n");
+ // qDebug("------------ end of iteration --------------\n");
return true;
}
@@ -361,7 +484,13 @@ bool QSimplex::iterate()
Both solveMin and solveMax are interfaces to this method.
The enum solverFactor admits 2 values: Minimum (-1) and Maximum (+1).
- */
+
+ This method sets the original objective and runs the second phase
+ Simplex to obtain the optimal solution for the problem. As the internal
+ simplex solver is only able to _maximize_ objectives, we handle the
+ minimization case by inverting the original objective and then
+ maximizing it.
+*/
qreal QSimplex::solver(solverFactor factor)
{
// Remove old objective
@@ -381,16 +510,30 @@ qreal QSimplex::solver(solverFactor factor)
return factor * valueAt(0, columns - 1);
}
+/*!
+ \internal
+ Minimize the original objective.
+*/
qreal QSimplex::solveMin()
{
return solver(Minimum);
}
+/*!
+ \internal
+ Maximize the original objective.
+*/
qreal QSimplex::solveMax()
{
return solver(Maximum);
}
+/*!
+ \internal
+
+ Reads results from the simplified matrix and saves them in the
+ "result" member of each QSimplexVariable.
+*/
void QSimplex::collectResults()
{
// All variables are zero unless overridden below.
diff --git a/src/gui/image/qimage.h b/src/gui/image/qimage.h
index 89d7de5..1ac56a7 100644
--- a/src/gui/image/qimage.h
+++ b/src/gui/image/qimage.h
@@ -314,7 +314,7 @@ private:
QImageData *d;
friend class QRasterPixmapData;
- friend class QDetachedPixmap;
+ friend class QPixmapCacheEntry;
friend Q_GUI_EXPORT qint64 qt_image_id(const QImage &image);
friend const QVector<QRgb> *qt_image_colortable(const QImage &image);
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index aff186b..074f3eb 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -696,14 +696,17 @@ bool QImageReader::autoDetectImageFormat() const
/*!
- Specifies that the image reader should decide which plugin to use
- solely based on the contents in the datastream.
+ If \a ignored is set to true, then the image reader will ignore
+ specified formats or file extensions and decide which plugin to
+ use only based on the contents in the datastream.
Setting this flag means that all image plugins gets loaded. Each
plugin will read the first bytes in the image data and decide if
- the plugin is compatible or not. The flag is set to \a ignored.
+ the plugin is compatible or not.
- This also disables auto detecting image format.
+ This also disables auto detecting the image format.
+
+ \sa decideFormatFromContent()
*/
void QImageReader::setDecideFormatFromContent(bool ignored)
@@ -713,8 +716,11 @@ void QImageReader::setDecideFormatFromContent(bool ignored)
/*!
- Returns wether the image reader should decide which plugin to use
- sloley based on the contents of the datastream
+ Returns whether the image reader should decide which plugin to use
+ only based on the contents of the datastream rather than on the file
+ extension.
+
+ \sa setDecideFormatFromContent()
*/
bool QImageReader::decideFormatFromContent() const
diff --git a/src/gui/image/qmovie.cpp b/src/gui/image/qmovie.cpp
index 48aee1c..42b8dea 100644
--- a/src/gui/image/qmovie.cpp
+++ b/src/gui/image/qmovie.cpp
@@ -47,6 +47,10 @@
\ingroup painting
+ This class is used to show simple animations without sound. If you want
+ to display video and media content, use the \l{Phonon Module}{Phonon}
+ multimedia framework instead.
+
First, create a QMovie object by passing either the name of a file or a
pointer to a QIODevice containing an animated image format to QMovie's
constructor. You can call isValid() to check if the image data is valid,
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index a891637..d11bd03 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -270,7 +270,7 @@ private:
friend class QWidgetPrivate;
friend class QRasterPaintEngine;
friend class QRasterBuffer;
- friend class QDetachedPixmap;
+ friend class QPixmapCacheEntry;
#if !defined(QT_NO_DATASTREAM)
friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPixmap &);
#endif
diff --git a/src/gui/image/qpixmap_raster_p.h b/src/gui/image/qpixmap_raster_p.h
index 2af2399..da0405e 100644
--- a/src/gui/image/qpixmap_raster_p.h
+++ b/src/gui/image/qpixmap_raster_p.h
@@ -88,7 +88,7 @@ protected:
private:
friend class QPixmap;
friend class QBitmap;
- friend class QDetachedPixmap;
+ friend class QPixmapCacheEntry;
friend class QRasterPaintEngine;
};
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index cab6116..dccc691 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -64,13 +64,14 @@ const uchar qt_pixmap_bit_mask[] = { 0x01, 0x02, 0x04, 0x08,
0x10, 0x20, 0x40, 0x80 };
-
/*!
+ \class QSymbianFbsClient
\since 4.6
+ \internal
- Symbian Font And Bitmap server client that is
- used to lock the global bitmap heap. Only used in
- S60 v3.1 and S60 v3.2.
+ Symbian Font And Bitmap server client that is
+ used to lock the global bitmap heap. Only used in
+ S60 v3.1 and S60 v3.2.
*/
class QSymbianFbsClient
{
@@ -145,7 +146,9 @@ void QSymbianFbsHeapLock::relock()
}
/*!
+ \class QSymbianBitmapDataAccess
\since 4.6
+ \internal
Data access class that is used to locks/unlocks pixel data
when drawing or modifying CFbsBitmap pixel data.
@@ -297,7 +300,7 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h)
}
/*!
- \fn CFbsBitmap *QPixmap::toSymbianCFbsBitmap()
+ \fn CFbsBitmap *QPixmap::toSymbianCFbsBitmap() const
\since 4.6
Creates a \c CFbsBitmap that is equivalent to the QPixmap. Internally this
@@ -724,7 +727,7 @@ void QS60PixmapData::endDataAccess(bool readOnly) const
/*!
\since 4.6
- Returns a QPixmap that wraps given \c RSgImage \a graphics resource.
+ Returns a QPixmap that wraps given \a sgImage graphics resource.
The data should be valid even when original RSgImage handle has been
closed.
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 8029977..f12d397 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -167,7 +167,7 @@ QPixmapCache::Key &QPixmapCache::Key::operator =(const Key &other)
return *this;
}
-class QPMCache : public QObject, public QCache<QPixmapCache::Key, QDetachedPixmap>
+class QPMCache : public QObject, public QCache<QPixmapCache::Key, QPixmapCacheEntry>
{
Q_OBJECT
public:
@@ -215,7 +215,7 @@ uint qHash(const QPixmapCache::Key &k)
QPMCache::QPMCache()
: QObject(0),
- QCache<QPixmapCache::Key, QDetachedPixmap>(cache_limit * 1024),
+ QCache<QPixmapCache::Key, QPixmapCacheEntry>(cache_limit * 1024),
keyArray(0), theid(0), ps(0), keyArraySize(0), freeKey(0), t(false)
{
}
@@ -238,7 +238,6 @@ void QPMCache::timerEvent(QTimerEvent *)
{
int mc = maxCost();
bool nt = totalCost() == ps;
- QList<QPixmapCache::Key> keys = QCache<QPixmapCache::Key, QDetachedPixmap>::keys();
setMaxCost(nt ? totalCost() * 3 / 4 : totalCost() -1);
setMaxCost(mc);
ps = totalCost();
@@ -252,10 +251,6 @@ void QPMCache::timerEvent(QTimerEvent *)
++it;
}
}
- for (int i = 0; i < keys.size(); ++i) {
- if (!contains(keys.at(i)))
- releaseKey(keys.at(i));
- }
if (!size()) {
killTimer(theid);
@@ -274,11 +269,10 @@ QPixmap *QPMCache::object(const QString &key) const
const_cast<QPMCache *>(this)->cacheKeys.remove(key);
return 0;
}
- QPixmap *ptr = QCache<QPixmapCache::Key, QDetachedPixmap>::object(cacheKey);
+ QPixmap *ptr = QCache<QPixmapCache::Key, QPixmapCacheEntry>::object(cacheKey);
//We didn't find the pixmap in the cache, the key is not valid anymore
if (!ptr) {
const_cast<QPMCache *>(this)->cacheKeys.remove(key);
- const_cast<QPMCache *>(this)->releaseKey(cacheKey);
}
return ptr;
}
@@ -286,7 +280,7 @@ QPixmap *QPMCache::object(const QString &key) const
QPixmap *QPMCache::object(const QPixmapCache::Key &key) const
{
Q_ASSERT(key.d->isValid);
- QPixmap *ptr = QCache<QPixmapCache::Key, QDetachedPixmap>::object(key);
+ QPixmap *ptr = QCache<QPixmapCache::Key, QPixmapCacheEntry>::object(key);
//We didn't find the pixmap in the cache, the key is not valid anymore
if (!ptr)
const_cast<QPMCache *>(this)->releaseKey(key);
@@ -299,13 +293,14 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost)
QPixmapCache::Key oldCacheKey = cacheKeys.value(key);
//If for the same key we add already a pixmap we should delete it
if (oldCacheKey.d) {
- QCache<QPixmapCache::Key, QDetachedPixmap>::remove(oldCacheKey);
- cacheKey = oldCacheKey;
- } else {
- cacheKey = createKey();
- }
+ QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(oldCacheKey);
+ cacheKeys.remove(key);
+ }
+
+ //we create a new key the old one has been removed
+ cacheKey = createKey();
- bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost);
+ bool success = QCache<QPixmapCache::Key, QPixmapCacheEntry>::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost);
if (success) {
cacheKeys.insert(key, cacheKey);
if (!theid) {
@@ -322,7 +317,7 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost)
QPixmapCache::Key QPMCache::insert(const QPixmap &pixmap, int cost)
{
QPixmapCache::Key cacheKey = createKey();
- bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost);
+ bool success = QCache<QPixmapCache::Key, QPixmapCacheEntry>::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost);
if (success) {
if (!theid) {
theid = startTimer(30000);
@@ -338,13 +333,21 @@ QPixmapCache::Key QPMCache::insert(const QPixmap &pixmap, int cost)
bool QPMCache::replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int cost)
{
Q_ASSERT(key.d->isValid);
- //If for the same key we add already a pixmap we should delete it
- QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
+ //If for the same key we had already an entry so we should delete the pixmap and use the new one
+ QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(key);
+
+ QPixmapCache::Key cacheKey = createKey();
- bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(key, new QDetachedPixmap(pixmap), cost);
- if (success && !theid) {
- theid = startTimer(30000);
- t = false;
+ bool success = QCache<QPixmapCache::Key, QPixmapCacheEntry>::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost);
+ if (success) {
+ if(!theid) {
+ theid = startTimer(30000);
+ t = false;
+ }
+ const_cast<QPixmapCache::Key&>(key) = cacheKey;
+ } else {
+ //Insertion failed we released the key
+ releaseKey(cacheKey);
}
return success;
}
@@ -356,16 +359,12 @@ bool QPMCache::remove(const QString &key)
if (!cacheKey.d)
return false;
cacheKeys.remove(key);
- releaseKey(cacheKey);
- return QCache<QPixmapCache::Key, QDetachedPixmap>::remove(cacheKey);
+ return QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(cacheKey);
}
bool QPMCache::remove(const QPixmapCache::Key &key)
{
- bool result = QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
- //We release the key after we removed it from the cache
- releaseKey(key);
- return result;
+ return QCache<QPixmapCache::Key, QPixmapCacheEntry>::remove(key);
}
void QPMCache::resizeKeyArray(int size)
@@ -409,10 +408,10 @@ void QPMCache::clear()
freeKey = 0;
keyArraySize = 0;
//Mark all keys as invalid
- QList<QPixmapCache::Key> keys = QCache<QPixmapCache::Key, QDetachedPixmap>::keys();
+ QList<QPixmapCache::Key> keys = QCache<QPixmapCache::Key, QPixmapCacheEntry>::keys();
for (int i = 0; i < keys.size(); ++i)
keys.at(i).d->isValid = false;
- QCache<QPixmapCache::Key, QDetachedPixmap>::clear();
+ QCache<QPixmapCache::Key, QPixmapCacheEntry>::clear();
}
QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
@@ -424,6 +423,11 @@ QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
Q_GLOBAL_STATIC(QPMCache, pm_cache)
+QPixmapCacheEntry::~QPixmapCacheEntry()
+{
+ pm_cache()->releaseKey(key);
+}
+
/*!
\obsolete
\overload
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
index 33f93bc..84e4a03 100644
--- a/src/gui/image/qpixmapcache_p.h
+++ b/src/gui/image/qpixmapcache_p.h
@@ -76,10 +76,10 @@ public:
};
// XXX: hw: is this a general concept we need to abstract?
-class QDetachedPixmap : public QPixmap
+class QPixmapCacheEntry : public QPixmap
{
public:
- QDetachedPixmap(const QPixmap &pix) : QPixmap(pix)
+ QPixmapCacheEntry(const QPixmapCache::Key &key, const QPixmap &pix) : QPixmap(pix), key(key)
{
if (data && data->classId() == QPixmapData::RasterClass) {
QRasterPixmapData *d = static_cast<QRasterPixmapData*>(data.data());
@@ -91,6 +91,8 @@ public:
}
}
}
+ ~QPixmapCacheEntry();
+ QPixmapCache::Key key;
};
QT_END_NAMESPACE
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 620880a..8ee417f 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -295,7 +295,7 @@ void QInputContext::sendEvent(const QInputMethodEvent &event)
The \a event parameter is the event that was sent to the editor
widget. The event type is QEvent::MouseButtonPress,
QEvent::MouseButtonRelease, QEvent::MouseButtonDblClick or
- QEvent::MouseButtonMove. The event's button and state indicate
+ QEvent::MouseMove. The event's button and state indicate
the kind of operation that was performed.
*/
void QInputContext::mouseHandler(int /*x*/, QMouseEvent *event)
@@ -469,6 +469,8 @@ bool QInputContext::x11FilterEvent(QWidget * /*keywidget*/, XEvent * /*event*/)
#ifdef Q_WS_S60
/*!
+ \since 4.6
+
This function may be overridden only if input method is depending
on Symbian and you need raw TWsEvent. Otherwise, this function must not.
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 774ec23..df5097b 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -68,6 +68,9 @@
#include "private/qstylesheetstyle_p.h"
#include "private/qstyle_p.h"
#include "qmessagebox.h"
+#include "qlineedit.h"
+#include "qlistview.h"
+#include "qtextedit.h"
#include <QtGui/qgraphicsproxywidget.h>
#include "qinputcontext.h"
@@ -94,6 +97,10 @@
#include "qapplication.h"
+#ifndef QT_NO_LIBRARY
+#include "qlibrary.h"
+#endif
+
#ifdef Q_WS_WINCE
#include "qdatetime.h"
#include "qguifunctions_wince.h"
@@ -454,6 +461,7 @@ bool QApplicationPrivate::animate_tooltip = false;
bool QApplicationPrivate::fade_tooltip = false;
bool QApplicationPrivate::animate_toolbox = false;
bool QApplicationPrivate::widgetCount = false;
+bool QApplicationPrivate::load_testability = false;
#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE)
bool QApplicationPrivate::inSizeMove = false;
#endif
@@ -560,6 +568,8 @@ void QApplicationPrivate::process_cmdline()
QApplication::setLayoutDirection(Qt::RightToLeft);
} else if (qstrcmp(arg, "-widgetcount") == 0) {
widgetCount = true;
+ } else if (qstrcmp(arg, "-testability") == 0) {
+ load_testability = true;
} else if (arg == "-graphicssystem" && i < argc-1) {
graphics_system_name = QString::fromLocal8Bit(argv[++i]);
} else {
@@ -762,6 +772,23 @@ void QApplicationPrivate::construct(
extern void qt_gui_eval_init(uint);
qt_gui_eval_init(application_type);
#endif
+
+#ifndef QT_NO_LIBRARY
+ if(load_testability) {
+ QLibrary testLib(QLatin1String("qttestability"));
+ if (testLib.load()) {
+ typedef void (*TasInitialize)(void);
+ TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
+ if (initFunction) {
+ initFunction();
+ } else {
+ qCritical("Library qttestability resolve failed!");
+ }
+ } else {
+ qCritical("Library qttestability load failed!");
+ }
+ }
+#endif
}
#if defined(Q_WS_X11)
@@ -2487,8 +2514,6 @@ void QApplication::setActiveWindow(QWidget* act)
*/
QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool next)
{
- uint focus_flag = qt_tab_all_widgets ? Qt::TabFocus : Qt::StrongFocus;
-
QWidget *f = toplevel->focusWidget();
if (!f)
f = toplevel;
@@ -2496,11 +2521,22 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool
QWidget *w = f;
QWidget *test = f->d_func()->focus_next;
while (test && test != f) {
- if ((test->focusPolicy() & focus_flag) == focus_flag
+ if ((test->focusPolicy() & Qt::TabFocus)
&& !(test->d_func()->extra && test->d_func()->extra->focus_proxy)
&& test->isVisibleTo(toplevel) && test->isEnabled()
&& !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test))
- && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))) {
+ && (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))
+ && (qt_tab_all_widgets
+#ifndef QT_NO_LINEEDIT
+ || qobject_cast<QLineEdit*>(test)
+#endif
+#ifndef QT_NO_TEXTEDIT
+ || qobject_cast<QTextEdit*>(test)
+#endif
+#ifndef QT_NO_ITEMVIEWS
+ || qobject_cast<QListView*>(test)
+#endif
+ )) {
w = test;
if (next)
break;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index 7e8d96f..c294e62 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -960,7 +960,18 @@ struct QMacAppleEventTypeSpec {
{ kCoreEventClass, kAEQuitApplication },
{ kCoreEventClass, kAEOpenDocuments }
};
+
#ifndef QT_MAC_USE_COCOA
+
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5)
+enum
+{
+ kEventMouseScroll = 11,
+ kEventParamMouseWheelSmoothVerticalDelta = 'saxy',
+ kEventParamMouseWheelSmoothHorizontalDelta = 'saxx',
+};
+#endif
+
/* watched events */
static EventTypeSpec app_events[] = {
{ kEventClassQt, kEventQtRequestWindowChange },
@@ -972,6 +983,7 @@ static EventTypeSpec app_events[] = {
{ kEventClassWindow, kEventWindowActivated },
{ kEventClassWindow, kEventWindowDeactivated },
+ { kEventClassMouse, kEventMouseScroll },
{ kEventClassMouse, kEventMouseWheelMoved },
{ kEventClassMouse, kEventMouseDown },
{ kEventClassMouse, kEventMouseUp },
@@ -1639,6 +1651,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
case kEventMouseDown: edesc = "MouseButtonPress"; break;
case kEventMouseUp: edesc = "MouseButtonRelease"; break;
case kEventMouseDragged: case kEventMouseMoved: edesc = "MouseMove"; break;
+ case kEventMouseScroll: edesc = "MouseWheelScroll"; break;
case kEventMouseWheelMoved: edesc = "MouseWheelMove"; break;
}
if(ekind == kEventMouseDown || ekind == kEventMouseUp)
@@ -1659,12 +1672,43 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
sizeof(mac_buttons), 0, &mac_buttons);
buttons = qt_mac_get_buttons(mac_buttons);
}
- int wheel_delta=0;
- if(ekind == kEventMouseWheelMoved) {
- int mdelt = 0;
- GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0,
+
+ int wheel_deltaX = 0;
+ int wheel_deltaY = 0;
+ static EventRef compatibilityEvent = 0;
+
+ if (ekind == kEventMouseScroll) {
+ // kEventMouseScroll is the new way of dealing with mouse wheel
+ // events (kEventMouseWheelMoved was the old). kEventMouseScroll results
+ // in much smoother scrolling when using Mighty Mouse or TrackPad. For
+ // compatibility with older applications, carbon will also send us
+ // kEventMouseWheelMoved events if we dont eat this event
+ // (actually two events; one for horizontal and one for vertical).
+ // As a results of this, and to make sure we dont't receive duplicate events,
+ // we try to detect when this happend by checking the 'compatibilityEvent'.
+ SInt32 mdelt = 0;
+ GetEventParameter(event, kEventParamMouseWheelSmoothHorizontalDelta, typeSInt32, 0,
+ sizeof(mdelt), 0, &mdelt);
+ wheel_deltaX = mdelt;
+ GetEventParameter(event, kEventParamMouseWheelSmoothVerticalDelta, typeSInt32, 0,
sizeof(mdelt), 0, &mdelt);
- wheel_delta = mdelt * 120;
+ wheel_deltaY = mdelt;
+ GetEventParameter(event, kEventParamEventRef, typeEventRef, 0,
+ sizeof(compatibilityEvent), 0, &compatibilityEvent);
+ } else if (ekind == kEventMouseWheelMoved) {
+ if (event != compatibilityEvent) {
+ compatibilityEvent = 0;
+ int mdelt = 0;
+ GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0,
+ sizeof(mdelt), 0, &mdelt);
+ EventMouseWheelAxis axis;
+ GetEventParameter(event, kEventParamMouseWheelAxis, typeMouseWheelAxis, 0,
+ sizeof(axis), 0, &axis);
+ if (axis == kEventMouseWheelAxisX)
+ wheel_deltaX = mdelt * 120;
+ else
+ wheel_deltaY = mdelt * 120;
+ }
}
Qt::MouseButton button = Qt::NoButton;
@@ -2054,20 +2098,29 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
qt_mac_dblclick.last_button = button;
qt_mac_dblclick.last_time = GetEventTime(event);
}
- if(wheel_delta) {
- EventMouseWheelAxis axis;
- GetEventParameter(event, kEventParamMouseWheelAxis, typeMouseWheelAxis, 0,
- sizeof(axis), 0, &axis);
- QWheelEvent qwe(plocal, p, wheel_delta, buttons, modifiers,
- axis == kEventMouseWheelAxisX ? Qt::Horizontal : Qt::Vertical);
- QApplication::sendSpontaneousEvent(widget, &qwe);
- if(!qwe.isAccepted() && QApplicationPrivate::focus_widget && QApplicationPrivate::focus_widget != widget) {
- QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(p), p,
- wheel_delta, buttons, modifiers,
- axis == kEventMouseWheelAxisX ? Qt::Horizontal : Qt::Vertical);
- QApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2);
- if(!qwe2.isAccepted())
- handled_event = false;
+
+ if (wheel_deltaX || wheel_deltaY) {
+ if (wheel_deltaX) {
+ QWheelEvent qwe(plocal, p, wheel_deltaX, buttons, modifiers, Qt::Horizontal);
+ QApplication::sendSpontaneousEvent(widget, &qwe);
+ if (!qwe.isAccepted() && QApplicationPrivate::focus_widget && QApplicationPrivate::focus_widget != widget) {
+ QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(p), p,
+ wheel_deltaX, buttons, modifiers, Qt::Horizontal);
+ QApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2);
+ if (!qwe2.isAccepted())
+ handled_event = false;
+ }
+ }
+ if (wheel_deltaY) {
+ QWheelEvent qwe(plocal, p, wheel_deltaY, buttons, modifiers, Qt::Vertical);
+ QApplication::sendSpontaneousEvent(widget, &qwe);
+ if (!qwe.isAccepted() && QApplicationPrivate::focus_widget && QApplicationPrivate::focus_widget != widget) {
+ QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(p), p,
+ wheel_deltaY, buttons, modifiers, Qt::Vertical);
+ QApplication::sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2);
+ if (!qwe2.isAccepted())
+ handled_event = false;
+ }
}
} else {
#ifdef QMAC_SPEAK_TO_ME
@@ -2130,7 +2183,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
plocal.x(), plocal.y(), event_desc, (QWidget*)widget,
widget ? widget->objectName().toLocal8Bit().constData() : "*Unknown*",
widget ? widget->metaObject()->className() : "*Unknown*",
- button, (int)buttons, (int)modifiers, wheel_delta);
+ button, (int)buttons, (int)modifiers, wheel_deltaX);
#endif
} else {
handled_event = false;
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index aec21fd..6036196 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -452,6 +452,7 @@ public:
static bool fade_tooltip;
static bool animate_toolbox;
static bool widgetCount; // Coupled with -widgetcount switch
+ static bool load_testability; // Coupled with -testability switch
#ifdef Q_WS_MAC
static bool native_modal_dialog_active;
#endif
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 2996bf3..71d0cd1 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -493,7 +493,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent)
alienWidget = qwidget;
S60->mousePressTarget = alienWidget;
}
-
+
alienWidget = S60->mousePressTarget;
if (alienWidget != S60->lastPointerEventTarget)
@@ -613,7 +613,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
if (keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down || keyCode == Qt::Key_Select) {
/*Explanation about virtualMouseAccel:
Tapping an arrow key allows precise pixel positioning
- Holding an arrow key down, acceleration is applied to allow cursor
+ Holding an arrow key down, acceleration is applied to allow cursor
to be quickly moved to another part of the screen by key repeats.
*/
if (S60->virtualMouseLastKey == keyCode) {
@@ -681,7 +681,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
}
}
#endif
-
+
Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
@@ -1008,13 +1008,13 @@ void qt_init(QApplicationPrivate * /* priv */, int)
S60->hasTouchscreen = true;
S60->virtualMouseRequired = false;
}
-
+
if (touch) {
QApplicationPrivate::navigationMode = Qt::NavigationModeNone;
} else {
QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
}
-
+
#ifndef QT_NO_CURSOR
//Check if window server pointer cursors are supported or not
#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS
@@ -1078,7 +1078,7 @@ void qt_cleanup()
// it dies.
delete QApplicationPrivate::inputContext;
QApplicationPrivate::inputContext = 0;
-
+
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
@@ -1320,6 +1320,7 @@ void QApplication::beep()
/*!
\warning This function is only available on Symbian.
+ \since 4.6
This function processes an individual Symbian window server
\a event. It returns 1 if the event was handled, 0 if
@@ -1398,7 +1399,8 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
} else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
&& !w->d_func()->maybeBackingStore()) {
w->d_func()->topData()->backingStore = new QWidgetBackingStore(w);
- w->update();
+ w->d_func()->invalidateBuffer(w->rect());
+ w->repaint();
}
return 1;
}
@@ -1441,6 +1443,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
/*!
\warning This virtual function is only available on Symbian.
+ \since 4.6
If you create an application that inherits QApplication and reimplement
this function, you get direct access to events that the are received
@@ -1458,6 +1461,7 @@ bool QApplication::s60EventFilter(TWsEvent * /* aEvent */)
/*!
\warning This function is only available on Symbian.
+ \since 4.6
Handles \a{command}s which are typically handled by
CAknAppUi::HandleCommandL(). Qts Ui integration into Symbian is
@@ -1469,11 +1473,17 @@ bool QApplication::s60EventFilter(TWsEvent * /* aEvent */)
void QApplication::symbianHandleCommand(int command)
{
switch (command) {
- case EEikCmdExit:
#ifdef Q_WS_S60
- case EAknSoftkeyExit:
+ case EAknSoftkeyExit: {
+ QCloseEvent ev;
+ QApplication::sendSpontaneousEvent(this, &ev);
+ if (ev.isAccepted())
+ quit();
+ break;
+ }
#endif
- exit();
+ case EEikCmdExit:
+ quit();
break;
default:
bool handled = QSoftKeyManager::handleCommand(command);
@@ -1489,6 +1499,7 @@ void QApplication::symbianHandleCommand(int command)
/*!
\warning This function is only available on Symbian.
+ \since 4.6
Handles the resource change specified by \a type.
@@ -1614,7 +1625,7 @@ void QApplicationPrivate::setNavigationMode(Qt::NavigationMode mode)
const bool isCursorOn = (mode == Qt::NavigationModeCursorAuto
&& !S60->hasTouchscreen)
|| mode == Qt::NavigationModeCursorForceVisible;
-
+
if (!wasCursorOn && isCursorOn) {
//Show the cursor, when changing from another mode to cursor mode
qt_symbian_set_cursor_visible(true);
@@ -1644,7 +1655,7 @@ void QApplication::restoreOverrideCursor()
if (qApp->d_func()->cursor_list.isEmpty())
return;
qApp->d_func()->cursor_list.removeFirst();
-
+
if (!qApp->d_func()->cursor_list.isEmpty()) {
qt_symbian_setGlobalCursor(qApp->d_func()->cursor_list.first());
}
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 7693ca7..f482d1c 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -63,6 +63,11 @@
#include <qdebug.h>
+@interface NSEvent (DeviceDelta)
+ - (CGFloat)deviceDeltaX;
+ - (CGFloat)deviceDeltaY;
+ - (CGFloat)deviceDeltaZ;
+@end
QT_BEGIN_NAMESPACE
@@ -776,17 +781,27 @@ extern "C" {
Qt::MouseButton buttons = cocoaButton2QtButton([theEvent buttonNumber]);
bool wheelOK = false;
Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]);
-
QWidget *widgetToGetMouse = qwidget;
-
- // Mouse wheel deltas seem to tick in at increments of 0.1. Qt widgets
- // expect the delta to be a multiple of 120.
- const int ScrollFactor = 10 * 120;
- // The qMax(...) factor reduces the
- // acceleration for large wheel deltas.
- int deltaX = [theEvent deltaX] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaX]));
- int deltaY = [theEvent deltaY] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaY]));
- int deltaZ = [theEvent deltaZ] * ScrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaZ]));
+ int deltaX = 0;
+ int deltaY = 0;
+ int deltaZ = 0;
+
+ const EventRef carbonEvent = (EventRef)[theEvent eventRef];
+ const UInt32 carbonEventKind = carbonEvent ? ::GetEventKind(carbonEvent) : 0;
+ if (carbonEventKind == kEventMouseScroll) {
+ // The mouse device containts pixel scroll
+ // wheel support (Mighty Mouse, Trackpad)
+ deltaX = (int)[theEvent deviceDeltaX] * 120;
+ deltaY = (int)[theEvent deviceDeltaY] * 120;
+ deltaZ = (int)[theEvent deviceDeltaZ] * 120;
+ } else { // carbonEventKind == kEventMouseWheelMoved
+ // Mouse wheel deltas seem to tick in at increments of 0.1.
+ // Qt widgets expect the delta to be a multiple of 120.
+ const int scrollFactor = 10 * 120;
+ deltaX = [theEvent deltaX] * scrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaX]));
+ deltaY = [theEvent deltaY] * scrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaY]));
+ deltaZ = [theEvent deltaZ] * scrollFactor * qMax(0.6, 1.1 - qAbs([theEvent deltaZ]));
+ }
if (deltaX != 0) {
QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal);
diff --git a/src/gui/kernel/qeventdispatcher_x11.cpp b/src/gui/kernel/qeventdispatcher_x11.cpp
index ce1a11f..59977ec 100644
--- a/src/gui/kernel/qeventdispatcher_x11.cpp
+++ b/src/gui/kernel/qeventdispatcher_x11.cpp
@@ -105,7 +105,7 @@ bool QEventDispatcherX11::processEvents(QEventLoop::ProcessEventsFlags flags)
// _qt_scrolldone protocols, queue all other
// client messages
if (event.xclient.format == 32) {
- if (event.xclient.message_type == ATOM(WM_PROTOCOLS) ||
+ if (event.xclient.message_type == ATOM(WM_PROTOCOLS) &&
(Atom) event.xclient.data.l[0] == ATOM(WM_TAKE_FOCUS)) {
break;
} else if (event.xclient.message_type == ATOM(_QT_SCROLL_DONE)) {
diff --git a/src/gui/kernel/qguieventdispatcher_glib.cpp b/src/gui/kernel/qguieventdispatcher_glib.cpp
index 6e98428..f8a638c 100644
--- a/src/gui/kernel/qguieventdispatcher_glib.cpp
+++ b/src/gui/kernel/qguieventdispatcher_glib.cpp
@@ -120,7 +120,7 @@ static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointe
// _qt_scrolldone protocols, queue all other
// client messages
if (event.xclient.format == 32) {
- if (event.xclient.message_type == ATOM(WM_PROTOCOLS) ||
+ if (event.xclient.message_type == ATOM(WM_PROTOCOLS) &&
(Atom) event.xclient.data.l[0] == ATOM(WM_TAKE_FOCUS)) {
break;
} else if (event.xclient.message_type == ATOM(_QT_SCROLL_DONE)) {
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 45ecb5a..91f4163 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -125,6 +125,7 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act
break;
}
action->setSoftKeyRole(softKeyRole);
+ action->setEnabled(actionWidget->isEnabled());
return action;
}
@@ -247,9 +248,17 @@ bool QSoftKeyManager::handleCommand(int command)
if (command >= s60CommandStart && QSoftKeyManagerPrivate::softKeySource) {
int index = command - s60CommandStart;
const QList<QAction*>& softKeys = QSoftKeyManagerPrivate::softKeySource->actions();
- if (index < softKeys.count()) {
- softKeys.at(index)->activate(QAction::Trigger);
- return true;
+ for (int i = 0, j = 0; i < softKeys.count(); ++i) {
+ QAction *action = softKeys.at(i);
+ if (action->softKeyRole() != QAction::NoSoftKey) {
+ if (j == index) {
+ if (action->isEnabled()) {
+ action->activate(QAction::Trigger);
+ return true;
+ }
+ }
+ j++;
+ }
}
}
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 53ef682..08fe5b9 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -900,28 +900,30 @@ void QWidget::setAutoFillBackground(bool enabled)
\sa QEvent, QPainter, QGridLayout, QBoxLayout
- \section1 SoftKeys
+ \section1 Softkeys
\since 4.6
- \preliminary
- Softkeys API is a platform independent way of mapping actions to (hardware)keys
- and toolbars provided by the underlying platform.
+ Softkeys are usually physical keys on a device that have a corresponding label or
+ other visual representation on the screen that is generally located next to its
+ physical counterpart. They are most often found on mobile phone platforms. In
+ modern touch based user interfaces it is also possible to have softkeys that do
+ not correspond to any physical keys. Softkeys differ from other onscreen labels
+ in that they are contextual.
- There are three major use cases supported. First one is a mobile device
- with keypad navigation and no touch ui. Second use case is a mobile
- device with touch ui. Third use case is desktop. For now the softkey API is
- only implemented for Series60.
+ In Qt, contextual softkeys are added to a widget by calling addAction() and
+ passing a \c QAction with a softkey role set on it. When the widget
+ containing the softkey actions has focus, its softkeys should appear in
+ the user interface. Softkeys are discovered by traversing the widget
+ heirarchy so it is possible to define a single set of softkeys that are
+ present at all times by calling addAction() for a given top level widget.
- QActions are set to widget(s) via softkey API. Actions in focused widget are
- mapped to native toolbar or hardware keys. Even though the API allows to set
- any amount of widgets there might be physical restrictions to amount of
- softkeys that can be used by the device.
+ On some platforms, this concept overlaps with \c QMenuBar such that if no
+ other softkeys are found and the top level widget is a QMainWindow containing
+ a QMenuBar, the menubar actions may appear on one of the softkeys.
- \e Series60: For series60 menu button is automatically mapped to left
- soft key if there is QMainWindow with QMenuBar in widgets parent hierarchy.
+ Note: Currently softkeys are only supported on the Symbian Platform.
- \sa softKeys()
- \sa setSoftKey()
+ \sa addAction, QAction, QMenuBar
*/
@@ -10145,7 +10147,8 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
"QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute");
#ifdef Q_WS_WIN
- if (attribute == Qt::WA_PaintOnScreen && on) {
+ // ### Don't use PaintOnScreen+paintEngine() to do native painting in 5.0
+ if (attribute == Qt::WA_PaintOnScreen && on && !inherits("QGLWidget")) {
// see qwidget_win.cpp, ::paintEngine for details
paintEngine();
if (d->noPaintOnScreen)
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 5659aef..62e08f3 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -691,6 +691,8 @@ void QColor::setHsv(int h, int s, int v, int a)
}
/*!
+ \since 4.6
+
Sets the contents pointed to by \a h, \a s, \a l, and \a a, to the hue,
saturation, lightness, and alpha-channel (transparency) components of the
color's HSL value.
@@ -719,6 +721,8 @@ void QColor::getHslF(qreal *h, qreal *s, qreal *l, qreal *a) const
}
/*!
+ \since 4.6
+
Sets the contents pointed to by \a h, \a s, \a l, and \a a, to the hue,
saturation, lightness, and alpha-channel (transparency) components of the
color's HSL value.
@@ -747,6 +751,8 @@ void QColor::getHsl(int *h, int *s, int *l, int *a) const
}
/*!
+ \since 4.6
+
Sets a HSL color lightness; \a h is the hue, \a s is the saturation, \a l is
the lightness and \a a is the alpha component of the HSL color.
@@ -773,6 +779,8 @@ void QColor::setHslF(qreal h, qreal s, qreal l, qreal a)
}
/*!
+ \since 4.6
+
Sets a HSL color value; \a h is the hue, \a s is the saturation, \a l is
the lightness and \a a is the alpha component of the HSL color.
@@ -1332,6 +1340,8 @@ qreal QColor::valueF() const
}
/*!
+ \since 4.6
+
Returns the hue color component of this color.
\sa getHslF(), getHsl()
@@ -1344,6 +1354,8 @@ int QColor::hslHue() const
}
/*!
+ \since 4.6
+
Returns the saturation color component of this color.
\sa saturationF(), getHsv(), {QColor#The HSV Color Model}{The HSV Color
@@ -1357,6 +1369,8 @@ int QColor::hslSaturation() const
}
/*!
+ \since 4.6
+
Returns the lightness color component of this color.
\sa lightnessF(), getHsl()
@@ -1369,6 +1383,8 @@ int QColor::lightness() const
}
/*!
+ \since 4.6
+
Returns the hue color component of this color.
\sa hue(), getHslF()
@@ -1381,6 +1397,8 @@ qreal QColor::hslHueF() const
}
/*!
+ \since 4.6
+
Returns the saturation color component of this color.
\sa saturationF() getHslF()
@@ -1393,6 +1411,8 @@ qreal QColor::hslSaturationF() const
}
/*!
+ \since 4.6
+
Returns the lightness color component of this color.
\sa value() getHslF()
@@ -1979,6 +1999,8 @@ QColor QColor::fromHsvF(qreal h, qreal s, qreal v, qreal a)
}
/*!
+ \since 4.6
+
Static convenience function that returns a QColor constructed from the HSV
color values, \a h (hue), \a s (saturation), \a l (lightness), and \a a
(alpha-channel, i.e. transparency).
@@ -2010,6 +2032,7 @@ QColor QColor::fromHsl(int h, int s, int l, int a)
/*!
\overload
+ \since 4.6
Static convenience function that returns a QColor constructed from the HSV
color values, \a h (hue), \a s (saturation), \a l (lightness), and \a a
diff --git a/src/gui/painting/qdrawhelper_mmx.cpp b/src/gui/painting/qdrawhelper_mmx.cpp
index 0dcc3dd..d81e2a9 100644
--- a/src/gui/painting/qdrawhelper_mmx.cpp
+++ b/src/gui/painting/qdrawhelper_mmx.cpp
@@ -128,7 +128,7 @@ void qt_blend_rgb32_on_rgb32_mmx(uchar *destPixels, int dbpl,
}
}
+QT_END_NAMESPACE
#endif // QT_HAVE_MMX
-QT_END_NAMESPACE
diff --git a/src/gui/painting/qdrawhelper_mmx3dnow.cpp b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
index 0db89f0..2d40ae3 100644
--- a/src/gui/painting/qdrawhelper_mmx3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
@@ -101,6 +101,7 @@ void qt_blend_color_argb_mmx3dnow(int count, const QSpan *spans, void *userData)
(CompositionFunctionSolid*)qt_functionForModeSolid_MMX3DNOW);
}
+QT_END_NAMESPACE
+
#endif // QT_HAVE_3DNOW
-QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index 1038f74..6b9d77c 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -44,11 +44,14 @@
//#include <private/qtextengine_p.h>
#include <private/qfontengine_p.h>
#include <private/qemulationpaintengine_p.h>
+#include <private/qimage_p.h>
#include <QDebug>
//#define QPAINTBUFFER_DEBUG_DRAW
+QT_BEGIN_NAMESPACE
+
extern int qt_defaultDpiX();
extern int qt_defaultDpiY();
extern void qt_format_text(const QFont &font,
@@ -890,6 +893,12 @@ void QPaintBufferEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
buffer->updateBoundingRect(QRectF(pos, pm.size()));
}
+static inline QImage qpaintbuffer_storable_image(const QImage &src)
+{
+ QImageData *d = const_cast<QImage &>(src).data_ptr();
+ return d->own_data ? src : src.copy();
+}
+
void QPaintBufferEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr,
Qt::ImageConversionFlags /*flags */)
{
@@ -897,7 +906,8 @@ void QPaintBufferEngine::drawImage(const QRectF &r, const QImage &image, const Q
qDebug() << "QPaintBufferEngine: drawImage: src/dest rects " << r << sr;
#endif
QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawPixmapRect, QVariant(image));
+ buffer->addCommand(QPaintBufferPrivate::Cmd_DrawImageRect,
+ QVariant(qpaintbuffer_storable_image(image)));
cmd->extra = buffer->addData((qreal *) &r, 4);
buffer->addData((qreal *) &sr, 4);
// ### flags...
@@ -911,7 +921,8 @@ void QPaintBufferEngine::drawImage(const QPointF &pos, const QImage &image)
qDebug() << "QPaintBufferEngine: drawImage: pos:" << pos;
#endif
QPaintBufferCommand *cmd =
- buffer->addCommand(QPaintBufferPrivate::Cmd_DrawImagePos, QVariant(image));
+ buffer->addCommand(QPaintBufferPrivate::Cmd_DrawImagePos,
+ QVariant(qpaintbuffer_storable_image(image)));
cmd->extra = buffer->addData((qreal *) &pos, 2);
if (buffer->calculateBoundingRect)
buffer->updateBoundingRect(QRectF(pos, image.size()));
@@ -1740,7 +1751,9 @@ struct QPaintBufferCacheEntry
QVariant::Type type;
quint64 cacheKey;
};
+QT_END_NAMESPACE
Q_DECLARE_METATYPE(QPaintBufferCacheEntry)
+QT_BEGIN_NAMESPACE
QDataStream &operator<<(QDataStream &stream, const QPaintBufferCacheEntry &entry)
{
@@ -1832,3 +1845,4 @@ QDataStream &operator>>(QDataStream &stream, QPaintBuffer &buffer)
return stream;
}
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h
index a80fa8d..6a7ac73 100644
--- a/src/gui/painting/qpaintbuffer_p.h
+++ b/src/gui/painting/qpaintbuffer_p.h
@@ -59,6 +59,8 @@
#include <private/qtextengine_p.h>
#include <QDebug>
+QT_BEGIN_NAMESPACE
+
class QPaintBufferPrivate;
class QPaintBufferPlayback;
@@ -440,4 +442,6 @@ private:
FreeFunc free;
};
+QT_END_NAMESPACE
+
#endif // QPAINTBUFFER_P_H
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index ed1b5d1..f271af9 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1895,6 +1895,8 @@ QPaintEngine *QPainter::paintEngine() const
}
/*!
+ \since 4.6
+
Flushes the painting pipeline and prepares for the user issuing
commands directly to the underlying graphics context. Must be
followed by a call to endNativePainting().
@@ -1919,6 +1921,8 @@ void QPainter::beginNativePainting()
}
/*!
+ \since 4.6
+
Restores the painter after manually issuing native painting commands.
Lets the painter restore any native state that it relies on before
calling any other painter commands.
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp
index eb9b11b..5ff0b96 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -1275,7 +1275,7 @@ QPrinter::ColorMode QPrinter::colorMode() const
buffering up the copies and in those cases the application must make an
explicit call to the print code for each copy.
- \sa setNumCopies()
+ \sa setNumCopies(), actualNumCopies()
*/
int QPrinter::numCopies() const
@@ -1286,13 +1286,15 @@ int QPrinter::numCopies() const
/*!
+ \since 4.6
+
Returns the number of copies that will be printed. The default
value is 1.
This function always returns the actual value specified in the print
dialog or using setNumCopies().
- \sa setNumCopies(), numCopies();
+ \sa setNumCopies(), numCopies()
*/
int QPrinter::actualNumCopies() const
{
diff --git a/src/gui/statemachine/qkeyeventtransition.cpp b/src/gui/statemachine/qkeyeventtransition.cpp
index 825b2ec..dee3168 100644
--- a/src/gui/statemachine/qkeyeventtransition.cpp
+++ b/src/gui/statemachine/qkeyeventtransition.cpp
@@ -44,7 +44,7 @@
#ifndef QT_NO_STATEMACHINE
#include "qbasickeyeventtransition_p.h"
-#include <QtCore/qwrappedevent.h>
+#include <QtCore/qstatemachine.h>
#include <private/qeventtransition_p.h>
QT_BEGIN_NAMESPACE
@@ -160,7 +160,7 @@ bool QKeyEventTransition::eventTest(QEvent *event)
Q_D(const QKeyEventTransition);
if (!QEventTransition::eventTest(event))
return false;
- QWrappedEvent *we = static_cast<QWrappedEvent*>(event);
+ QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event);
d->transition->setEventType(we->event()->type());
return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
}
diff --git a/src/gui/statemachine/qmouseeventtransition.cpp b/src/gui/statemachine/qmouseeventtransition.cpp
index 564c8d2..86cacf7 100644
--- a/src/gui/statemachine/qmouseeventtransition.cpp
+++ b/src/gui/statemachine/qmouseeventtransition.cpp
@@ -44,7 +44,7 @@
#ifndef QT_NO_STATEMACHINE
#include "qbasicmouseeventtransition_p.h"
-#include <QtCore/qwrappedevent.h>
+#include <QtCore/qstatemachine.h>
#include <QtGui/qpainterpath.h>
#include <private/qeventtransition_p.h>
@@ -188,7 +188,7 @@ bool QMouseEventTransition::eventTest(QEvent *event)
Q_D(const QMouseEventTransition);
if (!QEventTransition::eventTest(event))
return false;
- QWrappedEvent *we = static_cast<QWrappedEvent*>(event);
+ QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(event);
d->transition->setEventType(we->event()->type());
return QAbstractTransitionPrivate::get(d->transition)->callEventTest(we->event());
}
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index b6ff39f..d9438fd 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1370,7 +1370,7 @@ int QTextBlock::firstLineNumber() const
Sets the line count to \a count.
-/sa lineCount()
+\sa lineCount()
*/
void QTextBlock::setLineCount(int count)
{
diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp
index b78e51b..fd06cf3 100644
--- a/src/gui/util/qdesktopservices_s60.cpp
+++ b/src/gui/util/qdesktopservices_s60.cpp
@@ -70,7 +70,6 @@ QT_BEGIN_NAMESPACE
_LIT(KCacheSubDir, "Cache\\");
_LIT(KSysBin, "\\Sys\\Bin\\");
-_LIT(KTempDir, "\\System\\Temp\\");
_LIT(KBrowserPrefix, "4 " );
_LIT(KFontsDir, "z:\\resource\\Fonts\\");
const TUid KUidBrowser = { 0x10008D39 };
@@ -381,9 +380,7 @@ QString QDesktopServices::storageLocation(StandardLocation type)
#endif
break;
case TempLocation:
- path.Append(writableExeDrive().Name());
- path.Append(KTempDir);
- //return QDir::tempPath(); break;
+ return QDir::tempPath();
break;
case HomeLocation:
path.Append(writableDataRoot());
diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp
index 71588c4..08ed7f6 100644
--- a/src/gui/widgets/qcalendarwidget.cpp
+++ b/src/gui/widgets/qcalendarwidget.cpp
@@ -3022,11 +3022,21 @@ bool QCalendarWidget::event(QEvent *event)
bool QCalendarWidget::eventFilter(QObject *watched, QEvent *event)
{
Q_D(QCalendarWidget);
- if (event->type() == QEvent::MouseButtonPress && d->yearEdit->hasFocus() && !QRect(d->yearEdit->mapToGlobal(QPoint(0, 0)), d->yearEdit->size()).contains(static_cast<QMouseEvent *>(event)->globalPos())) {
- event->accept();
- d->_q_yearEditingFinished();
- setFocus();
- return true;
+ if (event->type() == QEvent::MouseButtonPress && d->yearEdit->hasFocus()) {
+ QWidget *tlw = window();
+ QWidget *widget = static_cast<QWidget*>(watched);
+ //as we have a event filter on the whole application we first make sure that the top level widget
+ //of both this and the watched widget are the same to decide if we should finish the year edition.
+ if (widget->window() == tlw) {
+ QPoint mousePos = widget->mapTo(tlw, static_cast<QMouseEvent *>(event)->pos());
+ QRect geom = QRect(d->yearEdit->mapTo(tlw, QPoint(0, 0)), d->yearEdit->size());
+ if (!geom.contains(mousePos)) {
+ event->accept();
+ d->_q_yearEditingFinished();
+ setFocus();
+ return true;
+ }
+ }
}
return QWidget::eventFilter(watched, event);
}
diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp
index 39566ef..6cc720d 100644
--- a/src/gui/widgets/qdialogbuttonbox.cpp
+++ b/src/gui/widgets/qdialogbuttonbox.cpp
@@ -593,6 +593,7 @@ QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialog
}
QObject::connect(action, SIGNAL(triggered()), button, SIGNAL(clicked()));
action->setSoftKeyRole(softkeyRole);
+ action->setEnabled(button->isEnabled());
return action;
}
#endif
diff --git a/src/gui/widgets/qspinbox.cpp b/src/gui/widgets/qspinbox.cpp
index e682364..9eb07ac 100644
--- a/src/gui/widgets/qspinbox.cpp
+++ b/src/gui/widgets/qspinbox.cpp
@@ -61,8 +61,6 @@ QT_BEGIN_NAMESPACE
# define QSBDEBUG if (false) qDebug
#endif
-static bool isIntermediateValueHelper(qint64 num, qint64 minimum, qint64 maximum, qint64 *match = 0);
-
class QSpinBoxPrivate : public QAbstractSpinBoxPrivate
{
Q_DECLARE_PUBLIC(QSpinBox)
@@ -74,7 +72,6 @@ public:
virtual QString textFromValue(const QVariant &n) const;
QVariant validateAndInterpret(QString &input, int &pos,
QValidator::State &state) const;
- bool isIntermediateValue(const QString &str) const;
QChar thousand;
inline void init() {
@@ -90,7 +87,6 @@ class QDoubleSpinBoxPrivate : public QAbstractSpinBoxPrivate
public:
QDoubleSpinBoxPrivate(QWidget *parent = 0);
void emitSignals(EmitPolicy ep, const QVariant &);
- bool isIntermediateValue(const QString &str) const;
virtual QVariant valueFromText(const QString &n) const;
virtual QString textFromValue(const QVariant &n) const;
@@ -991,51 +987,6 @@ QVariant QSpinBoxPrivate::valueFromText(const QString &text) const
/*!
- \internal
-
- Return true if str can become a number which is between minimum and
- maximum or false if this is not possible.
-*/
-
-bool QSpinBoxPrivate::isIntermediateValue(const QString &str) const
-{
- const int num = locale.toInt(str, 0, 10);
- const int min = minimum.toInt();
- const int max = maximum.toInt();
-
- int numDigits = 0;
- int digits[10];
- int tmp = num;
- if (tmp == 0) {
- numDigits = 1;
- digits[0] = 0;
- } else {
- tmp = num;
- for (int i=0; tmp != 0; ++i) {
- digits[numDigits++] = qAbs(tmp % 10);
- tmp /= 10;
- }
- }
-
- int failures = 0;
- for (int number=min; /*number<=max*/; ++number) {
- tmp = number;
- for (int i=0; tmp != 0;) {
- if (digits[i] == qAbs(tmp % 10)) {
- if (++i == numDigits)
- return true;
- }
- tmp /= 10;
- }
- if (failures++ == 500000) //upper bound
- return true;
- if (number == max) // needed for INT_MAX
- break;
- }
- return false;
-}
-
-/*!
\internal Multi purpose function that parses input, sets state to
the appropriate state and returns the value it will be interpreted
as.
@@ -1089,9 +1040,8 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
state = QValidator::Invalid;
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
} else {
- state = isIntermediateValue(copy) ? QValidator::Intermediate : QValidator::Invalid;
- QSBDEBUG() << __FILE__ << __LINE__<< "state is set to "
- << (state == QValidator::Intermediate ? "Intermediate" : "Acceptable");
+ state = QValidator::Intermediate;
+ QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Intermediate";
}
}
}
@@ -1151,105 +1101,6 @@ void QDoubleSpinBoxPrivate::emitSignals(EmitPolicy ep, const QVariant &old)
}
-bool QDoubleSpinBoxPrivate::isIntermediateValue(const QString &str) const
-{
- QSBDEBUG() << "input is" << str << minimum << maximum;
- qint64 dec = 1;
- for (int i=0; i<decimals; ++i)
- dec *= 10;
-
- const QLatin1Char dot('.');
-
- // I know QString::number() uses CLocale so I use dot
- const QString minstr = QString::number(minimum.toDouble(), 'f', decimals);
- bool ok;
- qint64 min_left = minstr.left(minstr.indexOf(dot)).toLongLong(&ok);
- if (!ok)
- return false;
- qint64 min_right = minstr.mid(minstr.indexOf(dot) + 1).toLongLong();
-
- const QString maxstr = QString::number(maximum.toDouble(), 'f', decimals);
- qint64 max_left = maxstr.left(maxstr.indexOf(dot)).toLongLong(&ok);
- if (!ok)
- return true;
- qint64 max_right = maxstr.mid(maxstr.indexOf(dot) + 1).toLongLong();
-
- const int dotindex = str.indexOf(delimiter);
- const bool negative = maximum.toDouble() < 0;
- qint64 left = 0, right = 0;
- bool doleft = true;
- bool doright = true;
- if (dotindex == -1) {
- left = str.toLongLong();
- doright = false;
- } else if (dotindex == 0 || (dotindex == 1 && str.at(0) == QLatin1Char('+'))) {
- if (negative) {
- QSBDEBUG() << __FILE__ << __LINE__ << "returns false";
- return false;
- }
- doleft = false;
- right = str.mid(dotindex + 1).toLongLong();
- } else if (dotindex == 1 && str.at(0) == QLatin1Char('-')) {
- if (!negative) {
- QSBDEBUG() << __FILE__ << __LINE__ << "returns false";
- return false;
- }
- doleft = false;
- right = str.mid(dotindex + 1).toLongLong();
- } else {
- left = str.left(dotindex).toLongLong();
- if (dotindex == str.size() - 1) {
- doright = false;
- } else {
- right = str.mid(dotindex + 1).toLongLong();
- }
- }
- if ((left >= 0 && max_left < 0 && !str.startsWith(QLatin1Char('-'))) || (left < 0 && min_left >= 0)) {
- QSBDEBUG("returns false 0");
- return false;
- }
-
- qint64 match = min_left;
- if (doleft && !isIntermediateValueHelper(left, min_left, max_left, &match)) {
- QSBDEBUG() << __FILE__ << __LINE__ << "returns false";
- return false;
- }
- if (doright) {
- QSBDEBUG() << "match" << match << "min_left" << min_left << "max_left" << max_left;
- if (!doleft) {
- if (min_left == max_left) {
- const bool ret = isIntermediateValueHelper(qAbs(left),
- negative ? max_right : min_right,
- negative ? min_right : max_right);
- QSBDEBUG() << __FILE__ << __LINE__ << "returns" << ret;
- return ret;
- } else if (qAbs(max_left - min_left) == 1) {
- const bool ret = isIntermediateValueHelper(qAbs(left), min_right, negative ? 0 : dec)
- || isIntermediateValueHelper(qAbs(left), negative ? dec : 0, max_right);
- QSBDEBUG() << __FILE__ << __LINE__ << "returns" << ret;
- return ret;
- } else {
- const bool ret = isIntermediateValueHelper(qAbs(left), 0, dec);
- QSBDEBUG() << __FILE__ << __LINE__ << "returns" << ret;
- return ret;
- }
- }
- if (match != min_left) {
- min_right = negative ? dec : 0;
- }
- if (match != max_left) {
- max_right = negative ? 0 : dec;
- }
- qint64 tmpl = negative ? max_right : min_right;
- qint64 tmpr = negative ? min_right : max_right;
- const bool ret = isIntermediateValueHelper(right, tmpl, tmpr);
- QSBDEBUG() << __FILE__ << __LINE__ << "returns" << ret;
- return ret;
- }
- QSBDEBUG() << __FILE__ << __LINE__ << "returns true";
- return true;
-}
-
/*!
\internal
\reimp
@@ -1415,9 +1266,8 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
state = QValidator::Invalid;
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
} else {
- state = isIntermediateValue(copy) ? QValidator::Intermediate : QValidator::Invalid;
- QSBDEBUG() << __FILE__ << __LINE__<< "state is set to "
- << (state == QValidator::Intermediate ? "Intermediate" : "Acceptable");
+ state = QValidator::Intermediate;
+ QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Intermediate";
}
}
}
@@ -1475,62 +1325,6 @@ QString QDoubleSpinBoxPrivate::textFromValue(const QVariant &f) const
Use minimum() instead.
*/
-/*!
- \internal Returns whether \a str is a string which value cannot be
- parsed but still might turn into something valid.
-*/
-
-static bool isIntermediateValueHelper(qint64 num, qint64 min, qint64 max, qint64 *match)
-{
- QSBDEBUG() << num << min << max;
-
- if (num >= min && num <= max) {
- if (match)
- *match = num;
- QSBDEBUG("returns true 0");
- return true;
- }
- qint64 tmp = num;
-
- int numDigits = 0;
- int digits[10];
- if (tmp == 0) {
- numDigits = 1;
- digits[0] = 0;
- } else {
- tmp = qAbs(num);
- for (int i=0; tmp > 0; ++i) {
- digits[numDigits++] = tmp % 10;
- tmp /= 10;
- }
- }
-
- int failures = 0;
- qint64 number;
- for (number=max; number>=min; --number) {
- tmp = qAbs(number);
- for (int i=0; tmp > 0;) {
- if (digits[i] == (tmp % 10)) {
- if (++i == numDigits) {
- if (match)
- *match = number;
- QSBDEBUG("returns true 1");
- return true;
- }
- }
- tmp /= 10;
- }
- if (failures++ == 500000) { //upper bound
- if (match)
- *match = num;
- QSBDEBUG("returns true 2");
- return true;
- }
- }
- QSBDEBUG("returns false");
- return false;
-}
-
/*! \reimp */
bool QSpinBox::event(QEvent *event)
{
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 92e4eb4..6c9761c 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1100,7 +1100,7 @@ QVariant QTabBar::tabData(int index) const
}
/*!
- Returns the visual rectangle of the of the tab at position \a
+ Returns the visual rectangle of the tab at position \a
index, or a null rectangle if \a index is out of range.
*/
QRect QTabBar::tabRect(int index) const
diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp
index d4a61e3..f440961 100644
--- a/src/gui/widgets/qwidgetanimator.cpp
+++ b/src/gui/widgets/qwidgetanimator.cpp
@@ -60,7 +60,9 @@ void QWidgetAnimator::abort(QWidget *w)
QPropertyAnimation *anim = *it;
m_animation_map.erase(it);
anim->stop();
+#ifndef QT_NO_MAINWINDOW
m_mainWindowLayout->animationFinished(w);
+#endif
#else
Q_UNUSED(w); //there is no animation to abort
#endif //QT_NO_ANIMATION
diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp
index 858846f..7a3be23 100644
--- a/src/multimedia/audio/qaudioinput.cpp
+++ b/src/multimedia/audio/qaudioinput.cpp
@@ -184,7 +184,7 @@ QAudioInput::~QAudioInput()
Passing a QIODevice allows the data to be transfered without any extra code.
All that is required is to open the QIODevice.
- /sa QIODevice
+ \sa QIODevice
*/
QIODevice* QAudioInput::start(QIODevice* device)
diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp
index 3d3f5f5..81b9496 100644
--- a/src/multimedia/audio/qaudiooutput.cpp
+++ b/src/multimedia/audio/qaudiooutput.cpp
@@ -195,7 +195,7 @@ QAudioFormat QAudioOutput::format() const
Passing a QIODevice allows the data to be transfered without any extra code.
All that is required is to open the QIODevice.
- /sa QIODevice
+ \sa QIODevice
*/
QIODevice* QAudioOutput::start(QIODevice* device)
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h
index 68f418e..5c08bf4 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.h
+++ b/src/multimedia/audio/qaudiooutput_win32_p.h
@@ -104,10 +104,6 @@ private slots:
void feedback();
bool deviceReady();
-signals:
- void stateChanged(QAudio::State);
- void notify();
-
private:
QByteArray m_device;
bool resuming;
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index c068f55..bfcc299 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -951,11 +951,14 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (hop_by_hop)
continue;
- // Do not copy over the Date header because it will be
- // different for every request and therefore cause a re-write to
- // the disk when a 304 is received inside replyHeaderChanged()
- if (header == "date")
- continue;
+ // for 4.6.0, we were planning to not store the date header in the
+ // cached resource; through that we planned to reduce the number
+ // of writes to disk when using a QNetworkDiskCache (i.e. don't
+ // write to disk when only the date changes).
+ // However, without the date we cannot calculate the age of the page
+ // anymore. Consider a proper fix of that problem for 4.6.1.
+ //if (header == "date")
+ //continue;
// Don't store Warning 1xx headers
if (header == "warning") {
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 5d94dc9..0e5cd1e 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -432,6 +432,9 @@ void QNetmaskAddress::setPrefixLength(QAbstractSocket::NetworkLayerProtocol prot
using isIPv4Address() or isIPv6Address(), and retrieved with
toIPv4Address(), toIPv6Address(), or toString().
+ \note Please note that QHostAddress does not do DNS lookups.
+ QHostInfo is needed for that.
+
The class also supports common predefined addresses: \l Null, \l
LocalHost, \l LocalHostIPv6, \l Broadcast, and \l Any.
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 9db1de8..7e45fd9 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -85,6 +85,8 @@
QT_BEGIN_NAMESPACE
+//#define QT_GL_NO_SCISSOR_TEST
+
static const GLuint QT_BRUSH_TEXTURE_UNIT = 0;
static const GLuint QT_IMAGE_TEXTURE_UNIT = 0; //Can be the same as brush texture unit
static const GLuint QT_MASK_TEXTURE_UNIT = 1;
@@ -127,7 +129,7 @@ public Q_SLOTS:
// since the context holding the texture is shared, and
// about to be destroyed, we have to transfer ownership
// of the texture to one of the share contexts
- ctx = const_cast<QGLContext *>(shares.at(0));
+ ctx = const_cast<QGLContext *>((ctx == shares.at(0)) ? shares.at(1) : shares.at(0));
}
}
}
@@ -756,6 +758,8 @@ void QGL2PaintEngineEx::beginNativePainting()
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(&mv_matrix[0][0]);
+#else
+ Q_UNUSED(ctx);
#endif
d->lastTexture = GLuint(-1);
@@ -1205,7 +1209,9 @@ void QGL2PaintEngineEx::drawTexture(const QRectF &dest, GLuint textureId, const
ensureActive();
d->transferMode(ImageDrawingMode);
+#ifndef QT_OPENGL_ES_2
QGLContext *ctx = d->ctx;
+#endif
glActiveTexture(GL_TEXTURE0 + QT_IMAGE_TEXTURE_UNIT);
glBindTexture(GL_TEXTURE_2D, textureId);
@@ -1533,6 +1539,7 @@ void QGL2PaintEngineExPrivate::updateDepthScissorTest()
else
glDisable(GL_DEPTH_TEST);
+#ifndef QT_GL_NO_SCISSOR_TEST
QRect bounds = q->state()->rectangleClip;
if (!q->state()->clipEnabled) {
if (use_system_clip)
@@ -1554,6 +1561,7 @@ void QGL2PaintEngineExPrivate::updateDepthScissorTest()
glEnable(GL_SCISSOR_TEST);
setScissor(bounds);
}
+#endif
}
void QGL2PaintEngineExPrivate::setScissor(const QRect &rect)
@@ -1650,6 +1658,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
}
}
+#ifndef QT_GL_NO_SCISSOR_TEST
if (!path.isEmpty() && op == Qt::IntersectClip && (path.shape() == QVectorPath::RectangleHint)) {
const QPointF* const points = reinterpret_cast<const QPointF*>(path.points());
QRectF rect(points[0], points[2]);
@@ -1660,6 +1669,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
return;
}
}
+#endif
const QRect pathRect = state()->matrix.mapRect(path.controlPointRect()).toAlignedRect();
@@ -1684,6 +1694,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
state()->depthTestEnabled = true;
break;
case Qt::UniteClip: {
+#ifndef QT_GL_NO_SCISSOR_TEST
if (state()->rectangleClip.isValid()) {
++state()->maxDepth;
@@ -1709,7 +1720,8 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
// first clear the depth buffer in the extended region
d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(extendPath)), 0);
}
-
+#endif
+ glDepthFunc(GL_ALWAYS);
// now write the clip path
d->writeClip(path, state()->maxDepth);
state()->canRestoreClip = false;
@@ -1760,29 +1772,33 @@ void QGL2PaintEngineExPrivate::systemStateChanged()
updateDepthScissorTest();
if (use_system_clip) {
+#ifndef QT_GL_NO_SCISSOR_TEST
if (systemClip.numRects() == 1) {
if (q->state()->rectangleClip == QRect(0, 0, width, height)) {
use_system_clip = false;
- return;
+ } else {
+ simpleShaderDepthUniformDirty = true;
+ depthUniformDirty = true;
}
- } else {
- q->state()->needsDepthBufferClear = false;
+ return;
+ }
+#endif
+ q->state()->needsDepthBufferClear = false;
- glDepthMask(true);
+ glDepthMask(true);
- glClearDepth(0);
- glClear(GL_DEPTH_BUFFER_BIT);
+ glClearDepth(0);
+ glClear(GL_DEPTH_BUFFER_BIT);
- QPainterPath path;
- path.addRegion(systemClip);
+ QPainterPath path;
+ path.addRegion(systemClip);
- glDepthFunc(GL_ALWAYS);
- writeClip(qtVectorPathForPath(q->state()->matrix.inverted().map(path)), 2);
- glDepthFunc(GL_LESS);
+ glDepthFunc(GL_ALWAYS);
+ writeClip(qtVectorPathForPath(q->state()->matrix.inverted().map(path)), 2);
+ glDepthFunc(GL_LESS);
- glEnable(GL_DEPTH_TEST);
- q->state()->depthTestEnabled = true;
- }
+ glEnable(GL_DEPTH_TEST);
+ q->state()->depthTestEnabled = true;
simpleShaderDepthUniformDirty = true;
depthUniformDirty = true;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index fe676ea..0ad6772 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1245,11 +1245,11 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
if (cachedDefault) {
return defaultVersionFlags;
} else {
- cachedDefault = true;
if (!hasOpenGL())
return defaultVersionFlags;
dummy = new QGLWidget;
dummy->makeCurrent(); // glGetString() needs a current context
+ cachedDefault = true;
}
}
@@ -1430,6 +1430,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
#endif
#if defined(QT_OPENGL_ES)
eglContext = 0;
+ eglSurface = EGL_NO_SURFACE;
#endif
fbo = 0;
crWin = false;
@@ -2513,6 +2514,8 @@ void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexT
array[7] = f2vt(y2);
}
+#if !defined(QT_OPENGL_ES_2)
+
static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint textureHeight, GLenum textureTarget)
{
q_vertexType tx = f2vt(1);
@@ -2541,7 +2544,6 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex
q_vertexType vertexArray[4*2];
qt_add_rect_to_array(target, vertexArray);
-#if !defined(QT_OPENGL_ES_2)
glVertexPointer(2, q_vertexTypeEnum, 0, vertexArray);
glTexCoordPointer(2, q_vertexTypeEnum, 0, texCoordArray);
@@ -2551,18 +2553,22 @@ static void qDrawTextureRect(const QRectF &target, GLint textureWidth, GLint tex
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-#endif
}
+#endif // !QT_OPENGL_ES_2
+
/*!
\since 4.4
Draws the given texture, \a textureId, to the given target rectangle,
\a target, in OpenGL model space. The \a textureTarget should be a 2D
texture target.
+
+ \note This function is not supported under OpenGL/ES 2.0.
*/
void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
+#ifndef QT_OPENGL_ES_2
#ifdef QT_OPENGL_ES
if (textureTarget != GL_TEXTURE_2D) {
qWarning("QGLContext::drawTexture(): texture target must be GL_TEXTURE_2D on OpenGL ES");
@@ -2586,6 +2592,12 @@ void QGLContext::drawTexture(const QRectF &target, GLuint textureId, GLenum text
glDisable(textureTarget);
glBindTexture(textureTarget, oldTexture);
#endif
+#else
+ Q_UNUSED(target);
+ Q_UNUSED(textureId);
+ Q_UNUSED(textureTarget);
+ qWarning("drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget) not supported with OpenGL ES/2.0");
+#endif
}
#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
@@ -2601,6 +2613,8 @@ void QGLContext::drawTexture(const QRectF &target, QMacCompatGLuint textureId, Q
Draws the given texture at the given \a point in OpenGL model
space. The \a textureTarget should be a 2D texture target.
+
+ \note This function is not supported under OpenGL/ES.
*/
void QGLContext::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 60155b6..5ce1a45 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QtOpenGL/qgl.h>
+#include "qgl_p.h"
#include "qgl_egl_p.h"
QT_BEGIN_NAMESPACE
@@ -128,4 +129,92 @@ void qt_egl_update_format(const QEglContext& context, QGLFormat& format)
context.clearError();
}
+bool QGLFormat::hasOpenGL()
+{
+ return true;
+}
+
+void QGLContext::reset()
+{
+ Q_D(QGLContext);
+ if (!d->valid)
+ return;
+ d->cleanup();
+ doneCurrent();
+ if (d->eglContext) {
+ delete d->eglContext;
+ d->eglContext = 0;
+ }
+ d->eglSurface = EGL_NO_SURFACE; // XXX - probably need to destroy surface
+ d->crWin = false;
+ d->sharing = false;
+ d->valid = false;
+ d->transpColor = QColor();
+ d->initDone = false;
+ qgl_share_reg()->removeShare(this);
+}
+
+void QGLContext::makeCurrent()
+{
+ Q_D(QGLContext);
+ if (!d->valid || !d->eglContext || d->eglSurface == EGL_NO_SURFACE) {
+ qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
+ return;
+ }
+
+ if (d->eglContext->makeCurrent(d->eglSurface))
+ QGLContextPrivate::setCurrentContext(this);
+}
+
+void QGLContext::doneCurrent()
+{
+ Q_D(QGLContext);
+ if (d->eglContext)
+ d->eglContext->doneCurrent();
+
+ QGLContextPrivate::setCurrentContext(0);
+}
+
+
+void QGLContext::swapBuffers() const
+{
+ Q_D(const QGLContext);
+ if (!d->valid || !d->eglContext)
+ return;
+
+ d->eglContext->swapBuffers(d->eglSurface);
+}
+
+void QGLWidget::setMouseTracking(bool enable)
+{
+ QWidget::setMouseTracking(enable);
+}
+
+QColor QGLContext::overlayTransparentColor() const
+{
+ return d_func()->transpColor;
+}
+
+uint QGLContext::colorIndex(const QColor &c) const
+{
+ Q_UNUSED(c);
+ return 0;
+}
+
+void QGLContext::generateFontDisplayLists(const QFont & fnt, int listBase)
+{
+ Q_UNUSED(fnt);
+ Q_UNUSED(listBase);
+}
+
+void *QGLContext::getProcAddress(const QString &proc) const
+{
+ return (void*)eglGetProcAddress(reinterpret_cast<const char *>(proc.toLatin1().data()));
+}
+
+bool QGLWidgetPrivate::renderCxPm(QPixmap*)
+{
+ return false;
+}
+
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 7269195..2e8ac88 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -295,6 +295,7 @@ public:
#endif
#if defined(QT_OPENGL_ES)
QEglContext *eglContext;
+ EGLSurface eglSurface;
#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
void* cx;
#endif
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index 7197776..bb23ace 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -87,12 +87,6 @@ static QGLScreen *glScreenForDevice(QPaintDevice *device)
*****************************************************************************/
//#define DEBUG_OPENGL_REGION_UPDATE
-bool QGLFormat::hasOpenGL()
-{
- return true;
-}
-
-
bool QGLFormat::hasOpenGLOverlays()
{
QGLScreen *glScreen = glScreenForDevice(0);
@@ -117,17 +111,17 @@ void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
props.setPixelFormat(glScreen->pixelFormat());
}
-static bool qt_egl_create_surface
+static EGLSurface qt_egl_create_surface
(QEglContext *context, QPaintDevice *device,
const QEglProperties *properties = 0)
{
// Get the screen surface functions, which are used to create native ids.
QGLScreen *glScreen = glScreenForDevice(device);
if (!glScreen)
- return false;
+ return EGL_NO_SURFACE;
QGLScreenSurfaceFunctions *funcs = glScreen->surfaceFunctions();
if (!funcs)
- return false;
+ return EGL_NO_SURFACE;
// Create the native drawable for the paint device.
int devType = device->devType();
@@ -143,7 +137,7 @@ static bool qt_egl_create_surface
}
if (!ok) {
qWarning("QEglContext::createSurface(): Cannot create the native EGL drawable");
- return false;
+ return EGL_NO_SURFACE;
}
// Create the EGL surface to draw into, based on the native drawable.
@@ -160,12 +154,9 @@ static bool qt_egl_create_surface
surf = eglCreatePixmapSurface
(context->display(), context->config(), pixmapDrawable, props);
}
- if (surf == EGL_NO_SURFACE) {
+ if (surf == EGL_NO_SURFACE)
qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
- return false;
- }
- context->setSurface(surf);
- return true;
+ return surf;
}
bool QGLContext::chooseContext(const QGLContext* shareContext)
@@ -223,7 +214,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
// Create the EGL surface to draw into. We cannot use
// QEglContext::createSurface() because it does not have
// access to the QGLScreen.
- if (!qt_egl_create_surface(d->eglContext, device())) {
+ d->eglSurface = qt_egl_create_surface(d->eglContext, device());
+ if (d->eglSurface == EGL_NO_SURFACE) {
delete d->eglContext;
d->eglContext = 0;
return false;
@@ -233,89 +225,11 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
}
-void QGLContext::reset()
-{
- Q_D(QGLContext);
- if (!d->valid)
- return;
- d->cleanup();
- doneCurrent();
- if (d->eglContext) {
- delete d->eglContext;
- d->eglContext = 0;
- }
- d->crWin = false;
- d->sharing = false;
- d->valid = false;
- d->transpColor = QColor();
- d->initDone = false;
- qgl_share_reg()->removeShare(this);
-}
-
-void QGLContext::makeCurrent()
-{
- Q_D(QGLContext);
- if(!d->valid || !d->eglContext) {
- qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
- return;
- }
-
- if (d->eglContext->makeCurrent())
- QGLContextPrivate::setCurrentContext(this);
-}
-
-void QGLContext::doneCurrent()
-{
- Q_D(QGLContext);
- if (d->eglContext)
- d->eglContext->doneCurrent();
-
- QGLContextPrivate::setCurrentContext(0);
-}
-
-
-void QGLContext::swapBuffers() const
-{
- Q_D(const QGLContext);
- if(!d->valid || !d->eglContext)
- return;
-
- d->eglContext->swapBuffers();
-}
-
-QColor QGLContext::overlayTransparentColor() const
-{
- return QColor(0, 0, 0); // Invalid color
-}
-
-uint QGLContext::colorIndex(const QColor &c) const
-{
- //### color index doesn't work on egl
- Q_UNUSED(c);
- return 0;
-}
-
-void QGLContext::generateFontDisplayLists(const QFont & fnt, int listBase)
-{
- Q_UNUSED(fnt);
- Q_UNUSED(listBase);
-}
-
-void *QGLContext::getProcAddress(const QString &proc) const
-{
- return (void*)eglGetProcAddress(reinterpret_cast<const char *>(proc.toLatin1().data()));
-}
-
bool QGLWidget::event(QEvent *e)
{
return QWidget::event(e);
}
-void QGLWidget::setMouseTracking(bool enable)
-{
- QWidget::setMouseTracking(enable);
-}
-
void QGLWidget::resizeEvent(QResizeEvent *)
{
@@ -380,11 +294,6 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget)
}
}
-bool QGLWidgetPrivate::renderCxPm(QPixmap*)
-{
- return false;
-}
-
void QGLWidgetPrivate::cleanupColormaps()
{
}
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index 2f9e225..5b5820a 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -660,6 +660,8 @@ public:
int dmy_pf = ChoosePixelFormat(dmy_pdc, &dmy_pfd);
SetPixelFormat(dmy_pdc, dmy_pf, &dmy_pfd);
dmy_rc = wglCreateContext(dmy_pdc);
+ old_dc = wglGetCurrentDC();
+ old_context = wglGetCurrentContext();
wglMakeCurrent(dmy_pdc, dmy_rc);
}
@@ -668,10 +670,14 @@ public:
wglDeleteContext(dmy_rc);
ReleaseDC(dmy_id, dmy_pdc);
DestroyWindow(dmy_id);
+ if (old_dc && old_context)
+ wglMakeCurrent(old_dc, old_context);
}
HDC dmy_pdc;
HGLRC dmy_rc;
+ HDC old_dc;
+ HGLRC old_context;
WId dmy_id;
};
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index 4e655f1..53b9e27 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -112,11 +112,6 @@ void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device)
}
-bool QGLFormat::hasOpenGL()
-{
- return true;
-}
-
static bool opengl32dll = false;
bool QGLFormat::hasOpenGLOverlays()
@@ -178,7 +173,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
#endif
// Create the EGL surface to draw into.
- if (!d->eglContext->createSurface(device())) {
+ d->eglSurface = d->eglContext->createSurface(device());
+ if (d->eglSurface == EGL_NO_SURFACE) {
delete d->eglContext;
d->eglContext = 0;
return false;
@@ -415,83 +411,6 @@ const QRgb* QGLCmap::colors() const
}
-void QGLContext::reset()
-{
- Q_D(QGLContext);
- if (!d->valid)
- return;
- d->cleanup();
- doneCurrent();
- if (d->eglContext) {
- delete d->eglContext;
- d->eglContext = 0;
- }
- d->crWin = false;
- d->sharing = false;
- d->valid = false;
- d->transpColor = QColor();
- d->initDone = false;
- qgl_share_reg()->removeShare(this);
-}
-
-
-//
-// NOTE: In a multi-threaded environment, each thread has a current
-// context. If we want to make this code thread-safe, we probably
-// have to use TLS (thread local storage) for keeping current contexts.
-//
-
-void QGLContext::makeCurrent()
-{
-
- Q_D(QGLContext);
- if(!d->valid || !d->eglContext) {
- qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
- return;
- }
-
- if (d->eglContext->makeCurrent())
- QGLContextPrivate::setCurrentContext(this);
-}
-
-
-void QGLContext::doneCurrent()
-{
-
- Q_D(QGLContext);
- if (d->eglContext)
- d->eglContext->doneCurrent();
-
- QGLContextPrivate::setCurrentContext(0);
-}
-
-void QGLContext::swapBuffers() const
-{
- Q_D(const QGLContext);
- if(!d->valid || !d->eglContext)
- return;
-
- d->eglContext->swapBuffers();
-}
-
-
-QColor QGLContext::overlayTransparentColor() const
-{
- return d_func()->transpColor;
-}
-
-
-void QGLContext::generateFontDisplayLists(const QFont & fnt, int listBase)
-{
- Q_UNUSED(fnt);
- Q_UNUSED(listBase);
-}
-
-void *QGLContext::getProcAddress(const QString &proc) const
-{
- return (void*)eglGetProcAddress(reinterpret_cast<const char *>(proc.toLatin1().data()));
-}
-
/*****************************************************************************
QGLWidget Win32/WGL-specific code
*****************************************************************************/
@@ -570,12 +489,6 @@ bool QGLWidget::event(QEvent *e)
}
-void QGLWidget::setMouseTracking(bool enable)
-{
- QWidget::setMouseTracking(enable);
-}
-
-
void QGLWidget::resizeEvent(QResizeEvent *)
{
Q_D(QGLWidget);
@@ -675,11 +588,6 @@ void QGLWidget::setContext(QGLContext *context,
}
-bool QGLWidgetPrivate::renderCxPm(QPixmap*)
-{
- return false;
-}
-
void QGLWidgetPrivate::cleanupColormaps()
{
Q_Q(QGLWidget);
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index da7972d..86e593d 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -331,6 +331,62 @@ static void find_trans_colors()
QGLFormat UNIX/GLX-specific code
*****************************************************************************/
+void* qglx_getProcAddress(const char* procName)
+{
+ // On systems where the GL driver is pluggable (like Mesa), we have to use
+ // the glXGetProcAddressARB extension to resolve other function pointers as
+ // the symbols wont be in the GL library, but rather in a plugin loaded by
+ // the GL library.
+ typedef void* (*qt_glXGetProcAddressARB)(const char *);
+ static qt_glXGetProcAddressARB glXGetProcAddressARB = 0;
+ static bool triedResolvingGlxGetProcAddress = false;
+ if (!triedResolvingGlxGetProcAddress) {
+ triedResolvingGlxGetProcAddress = true;
+ QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS));
+ if (glxExt.contains(QLatin1String("GLX_ARB_get_proc_address"))) {
+#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
+ void *handle = dlopen(NULL, RTLD_LAZY);
+ if (handle) {
+ glXGetProcAddressARB = (qt_glXGetProcAddressARB) dlsym(handle, "glXGetProcAddressARB");
+ dlclose(handle);
+ }
+ if (!glXGetProcAddressARB)
+#endif
+ {
+#if !defined(QT_NO_LIBRARY)
+ extern const QString qt_gl_library_name();
+ QLibrary lib(qt_gl_library_name());
+ glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
+#endif
+ }
+ }
+ }
+
+ void *procAddress = 0;
+ if (glXGetProcAddressARB)
+ procAddress = glXGetProcAddressARB(procName);
+
+ // If glXGetProcAddress didn't work, try looking the symbol up in the GL library
+#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
+ if (!procAddress) {
+ void *handle = dlopen(NULL, RTLD_LAZY);
+ if (handle) {
+ procAddress = dlsym(handle, procName);
+ dlclose(handle);
+ }
+ }
+#endif
+#if !defined(QT_NO_LIBRARY)
+ if (!procAddress) {
+ extern const QString qt_gl_library_name();
+ QLibrary lib(qt_gl_library_name());
+ procAddress = lib.resolve(procName);
+ }
+#endif
+
+ return procAddress;
+}
+
bool QGLFormat::hasOpenGL()
{
return glXQueryExtension(X11->display, 0, 0) != 0;
@@ -819,23 +875,8 @@ void QGLContext::swapBuffers() const
if (!resolved) {
QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS));
if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) {
-#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
- void *handle = dlopen(NULL, RTLD_LAZY);
- if (handle) {
- glXGetVideoSyncSGI = (qt_glXGetVideoSyncSGI) dlsym(handle, "glXGetVideoSyncSGI");
- glXWaitVideoSyncSGI = (qt_glXWaitVideoSyncSGI) dlsym(handle, "glXWaitVideoSyncSGI");
- dlclose(handle);
- }
- if (!glXGetVideoSyncSGI)
-#endif
- {
-#if !defined(QT_NO_LIBRARY)
- extern const QString qt_gl_library_name();
- QLibrary lib(qt_gl_library_name());
- glXGetVideoSyncSGI = (qt_glXGetVideoSyncSGI) lib.resolve("glXGetVideoSyncSGI");
- glXWaitVideoSyncSGI = (qt_glXWaitVideoSyncSGI) lib.resolve("glXWaitVideoSyncSGI");
-#endif
- }
+ glXGetVideoSyncSGI = (qt_glXGetVideoSyncSGI)qglx_getProcAddress("glXGetVideoSyncSGI");
+ glXWaitVideoSyncSGI = (qt_glXWaitVideoSyncSGI)qglx_getProcAddress("glXWaitVideoSyncSGI");
}
resolved = true;
}
@@ -1568,21 +1609,8 @@ bool qt_resolveTextureFromPixmap()
QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS));
if (glxExt.contains(QLatin1String("GLX_EXT_texture_from_pixmap"))) {
-#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
- void *handle = dlopen(NULL, RTLD_LAZY);
- if (handle) {
- glXBindTexImageEXT = (qt_glXBindTexImageEXT) dlsym(handle, "glXBindTexImageEXT");
- glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) dlsym(handle, "glXReleaseTexImageEXT");
- dlclose(handle);
- }
- if (!glXBindTexImageEXT)
-#endif
- {
- extern const QString qt_gl_library_name();
- QLibrary lib(qt_gl_library_name());
- glXBindTexImageEXT = (qt_glXBindTexImageEXT) lib.resolve("glXBindTexImageEXT");
- glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) lib.resolve("glXReleaseTexImageEXT");
- }
+ glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT");
+ glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT");
}
}
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 32d8cc2..67f391b 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -51,11 +51,6 @@
QT_BEGIN_NAMESPACE
-bool QGLFormat::hasOpenGL()
-{
- return true;
-}
-
bool QGLFormat::hasOpenGLOverlays()
{
return false;
@@ -118,86 +113,6 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
return true;
}
-
-void QGLContext::reset()
-{
- Q_D(QGLContext);
- if (!d->valid)
- return;
- d->cleanup();
- doneCurrent();
- if (d->eglContext) {
- delete d->eglContext;
- d->eglContext = 0;
- }
- d->crWin = false;
- d->sharing = false;
- d->valid = false;
- d->transpColor = QColor();
- d->initDone = false;
- qgl_share_reg()->removeShare(this);
-}
-
-void QGLContext::makeCurrent()
-{
- Q_D(QGLContext);
- if(!d->valid || !d->eglContext) {
- qWarning("QGLContext::makeCurrent(): Cannot make invalid context current");
- return;
- }
-
- if (d->eglContext->makeCurrent())
- QGLContextPrivate::setCurrentContext(this);
-}
-
-void QGLContext::doneCurrent()
-{
- Q_D(QGLContext);
- if (d->eglContext)
- d->eglContext->doneCurrent();
-
- QGLContextPrivate::setCurrentContext(0);
-}
-
-
-void QGLContext::swapBuffers() const
-{
- Q_D(const QGLContext);
- if(!d->valid || !d->eglContext)
- return;
-
- d->eglContext->swapBuffers();
-}
-
-QColor QGLContext::overlayTransparentColor() const
-{
- return QColor(0, 0, 0); // Invalid color
-}
-
-uint QGLContext::colorIndex(const QColor &c) const
-{
- //### color index doesn't work on egl
- Q_UNUSED(c);
- return 0;
-}
-
-void QGLContext::generateFontDisplayLists(const QFont & fnt, int listBase)
-{
- Q_UNUSED(fnt);
- Q_UNUSED(listBase);
-}
-
-void *QGLContext::getProcAddress(const QString &proc) const
-{
- return (void*)eglGetProcAddress(reinterpret_cast<const char *>(proc.toLatin1().data()));
-}
-
-void QGLWidget::setMouseTracking(bool enable)
-{
- QWidget::setMouseTracking(enable);
-}
-
-
void QGLWidget::resizeEvent(QResizeEvent *)
{
Q_D(QGLWidget);
@@ -412,9 +327,11 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext,
// Create the EGL surface to draw into.
- if (!d->glcx->d_func()->eglContext->createSurface(this)) {
- delete d->glcx->d_func()->eglContext;
- d->glcx->d_func()->eglContext = 0;
+ QGLContextPrivate *ctxpriv = d->glcx->d_func();
+ ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(this);
+ if (ctxpriv->eglSurface == EGL_NO_SURFACE) {
+ delete ctxpriv->eglContext;
+ ctxpriv->eglContext = 0;
return;
}
@@ -439,11 +356,6 @@ void QGLWidgetPrivate::init(QGLContext *context, const QGLWidget* shareWidget)
}
}
-bool QGLWidgetPrivate::renderCxPm(QPixmap*)
-{
- return false;
-}
-
void QGLWidgetPrivate::cleanupColormaps()
{
}
@@ -483,8 +395,14 @@ void QGLWidgetPrivate::recreateEglSurface(bool force)
if ( force || (currentId != eglSurfaceWindowId) ) {
// The window id has changed so we need to re-create the EGL surface
- if (!glcx->d_func()->eglContext->recreateSurface(q))
+ QEglContext *ctx = glcx->d_func()->eglContext;
+ EGLSurface surface = glcx->d_func()->eglSurface;
+ if (surface != EGL_NO_SURFACE)
+ ctx->destroySurface(surface); // Will force doneCurrent() if nec.
+ surface = ctx->createSurface(q);
+ if (surface == EGL_NO_SURFACE)
qWarning("Error creating EGL window surface: 0x%x", eglGetError());
+ glcx->d_func()->eglSurface = surface;
eglSurfaceWindowId = currentId;
}
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index e4cef5f..c728902 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -1185,6 +1185,8 @@ bool QGLFramebufferObject::isBound() const
Returns true if the OpenGL \c{GL_EXT_framebuffer_blit} extension
is present on this system; otherwise returns false.
+
+ \sa blitFramebuffer()
*/
bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
{
@@ -1202,14 +1204,15 @@ bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
instead of a framebuffer object as source or target respectively.
The \a buffers parameter should be a mask consisting of any combination of
- COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. Any buffer type
- that is not present both in the source and target buffers is ignored.
+ \c GL_COLOR_BUFFER_BIT, \c GL_DEPTH_BUFFER_BIT, and
+ \c GL_STENCIL_BUFFER_BIT. Any buffer type that is not present both
+ in the source and target buffers is ignored.
The \a sourceRect and \a targetRect rectangles may have different sizes;
- in this case \a buffers should not contain DEPTH_BUFFER_BIT or
- STENCIL_BUFFER_BIT. The \a filter parameter should be set to GL_LINEAR or
- GL_NEAREST, and specifies whether linear or nearest interpolation should
- be used when scaling is performed.
+ in this case \a buffers should not contain \c GL_DEPTH_BUFFER_BIT or
+ \c GL_STENCIL_BUFFER_BIT. The \a filter parameter should be set to
+ \c GL_LINEAR or \c GL_NEAREST, and specifies whether linear or nearest
+ interpolation should be used when scaling is performed.
If \a source equals \a target a copy is performed within the same buffer.
Results are undefined if the source and target rectangles overlap and
@@ -1220,6 +1223,8 @@ bool QGLFramebufferObject::hasOpenGLFramebufferBlit()
This function will have no effect unless hasOpenGLFramebufferBlit() returns
true.
+
+ \sa hasOpenGLFramebufferBlit()
*/
void QGLFramebufferObject::blitFramebuffer(QGLFramebufferObject *target, const QRect &targetRect,
QGLFramebufferObject *source, const QRect &sourceRect,
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 07bc711..7c97ebb 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -146,6 +146,7 @@ void QGLPixelBufferPrivate::common_init(const QSize &size, const QGLFormat &form
qctx->d_func()->vi = 0;
#elif defined(QT_OPENGL_ES)
qctx->d_func()->eglContext = ctx;
+ qctx->d_func()->eglSurface = pbuf;
#endif
}
}
diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp
index e331de5..4cba1bb 100644
--- a/src/opengl/qglpixelbuffer_egl.cpp
+++ b/src/opengl/qglpixelbuffer_egl.cpp
@@ -135,7 +135,6 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
qWarning() << "QGLPixelBufferPrivate::init(): Unable to create EGL pbuffer surface:" << QEglContext::errorString(eglGetError());
return false;
}
- ctx->setSurface(pbuf);
// Create a new context for the configuration.
QEglContext *shareContext = 0;
@@ -163,7 +162,7 @@ bool QGLPixelBuffer::bindToDynamicTexture(GLuint texture_id)
if (d->invalid || d->textureFormat == EGL_NONE || !d->ctx)
return false;
glBindTexture(GL_TEXTURE_2D, texture_id);
- return eglBindTexImage(d->ctx->display(), d->ctx->surface(), EGL_BACK_BUFFER);
+ return eglBindTexImage(d->ctx->display(), d->pbuf, EGL_BACK_BUFFER);
#else
Q_UNUSED(texture_id);
return false;
@@ -176,7 +175,7 @@ void QGLPixelBuffer::releaseFromDynamicTexture()
Q_D(QGLPixelBuffer);
if (d->invalid || d->textureFormat == EGL_NONE || !d->ctx)
return;
- eglReleaseTexImage(d->ctx->display(), d->ctx->surface(), EGL_BACK_BUFFER);
+ eglReleaseTexImage(d->ctx->display(), d->pbuf, EGL_BACK_BUFFER);
#endif
}
diff --git a/src/opengl/qglpixelbuffer_x11.cpp b/src/opengl/qglpixelbuffer_x11.cpp
index 793471d..6971133 100644
--- a/src/opengl/qglpixelbuffer_x11.cpp
+++ b/src/opengl/qglpixelbuffer_x11.cpp
@@ -93,6 +93,8 @@ static _glXMakeContextCurrent qt_glXMakeContextCurrent = 0;
#define glXGetFBConfigAttrib qt_glXGetFBConfigAttrib
#define glXMakeContextCurrent qt_glXMakeContextCurrent
+extern void* qglx_getProcAddress(const char* procName); // in qgl_x11.cpp
+
static bool qt_resolve_pbuffer_extensions()
{
static int resolved = false;
@@ -101,31 +103,12 @@ static bool qt_resolve_pbuffer_extensions()
else if (resolved)
return false;
-#if defined(Q_OS_LINUX) || defined(Q_OS_BSD4)
- void *handle = dlopen(NULL, RTLD_LAZY);
- if (handle) {
- qt_glXChooseFBConfig = (_glXChooseFBConfig) dlsym(handle, "glXChooseFBConfig");
- qt_glXCreateNewContext = (_glXCreateNewContext) dlsym(handle, "glXCreateNewContext");
- qt_glXCreatePbuffer = (_glXCreatePbuffer) dlsym(handle, "glXCreatePbuffer");
- qt_glXDestroyPbuffer = (_glXDestroyPbuffer) dlsym(handle, "glXDestroyPbuffer");
- qt_glXGetFBConfigAttrib = (_glXGetFBConfigAttrib) dlsym(handle, "glXGetFBConfigAttrib");
- qt_glXMakeContextCurrent = (_glXMakeContextCurrent) dlsym(handle, "glXMakeContextCurrent");
- dlclose(handle);
- }
- if (!qt_glXChooseFBConfig)
-#endif
- {
-#if !defined(QT_NO_LIBRARY)
- extern const QString qt_gl_library_name();
- QLibrary gl(qt_gl_library_name());
- qt_glXChooseFBConfig = (_glXChooseFBConfig) gl.resolve("glXChooseFBConfig");
- qt_glXCreateNewContext = (_glXCreateNewContext) gl.resolve("glXCreateNewContext");
- qt_glXCreatePbuffer = (_glXCreatePbuffer) gl.resolve("glXCreatePbuffer");
- qt_glXDestroyPbuffer = (_glXDestroyPbuffer) gl.resolve("glXDestroyPbuffer");
- qt_glXGetFBConfigAttrib = (_glXGetFBConfigAttrib) gl.resolve("glXGetFBConfigAttrib");
- qt_glXMakeContextCurrent = (_glXMakeContextCurrent) gl.resolve("glXMakeContextCurrent");
-#endif
- }
+ qt_glXChooseFBConfig = (_glXChooseFBConfig) qglx_getProcAddress("glXChooseFBConfig");
+ qt_glXCreateNewContext = (_glXCreateNewContext) qglx_getProcAddress("glXCreateNewContext");
+ qt_glXCreatePbuffer = (_glXCreatePbuffer) qglx_getProcAddress("glXCreatePbuffer");
+ qt_glXDestroyPbuffer = (_glXDestroyPbuffer) qglx_getProcAddress("glXDestroyPbuffer");
+ qt_glXGetFBConfigAttrib = (_glXGetFBConfigAttrib) qglx_getProcAddress("glXGetFBConfigAttrib");
+ qt_glXMakeContextCurrent = (_glXMakeContextCurrent) qglx_getProcAddress("glXMakeContextCurrent");
resolved = qt_glXMakeContextCurrent ? true : false;
return resolved;
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index bb0306c..bb3cb5d 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -79,6 +79,8 @@ protected:
bool processGL(QPainter *painter, const QPointF &pos, const QPixmap &pixmap, const QRectF &srcRect) const;
};
+#ifndef QT_OPENGL_ES_2
+
class QGLPixmapConvolutionFilter: public QGLPixmapFilter<QPixmapConvolutionFilter>
{
public:
@@ -99,6 +101,8 @@ private:
mutable int m_kernelHeight;
};
+#endif
+
class QGLPixmapBlurFilter : public QGLCustomShaderStage, public QGLPixmapFilter<QPixmapBlurFilter>
{
public:
@@ -143,22 +147,25 @@ QPixmapFilter *QGL2PaintEngineEx::pixmapFilter(int type, const QPixmapFilter *pr
return d->blurFilter.data();
}
+#ifndef QT_OPENGL_ES_2
case QPixmapFilter::ConvolutionFilter:
if (!d->convolutionFilter)
d->convolutionFilter.reset(new QGLPixmapConvolutionFilter);
return d->convolutionFilter.data();
+#endif
default: break;
}
return QPaintEngineEx::pixmapFilter(type, prototype);
}
+#ifndef QT_OPENGL_ES_2 // XXX: needs to be ported
+
extern void qt_add_rect_to_array(const QRectF &r, q_vertexType *array);
extern void qt_add_texcoords_to_array(qreal x1, qreal y1, qreal x2, qreal y2, q_vertexType *array);
static void qgl_drawTexture(const QRectF &rect, int tx_width, int tx_height, const QRectF & src)
{
-#ifndef QT_OPENGL_ES_2 // XXX: needs to be ported
#ifndef QT_OPENGL_ES
glPushAttrib(GL_CURRENT_BIT);
#endif
@@ -187,9 +194,10 @@ static void qgl_drawTexture(const QRectF &rect, int tx_width, int tx_height, con
#ifndef QT_OPENGL_ES
glPopAttrib();
#endif
-#endif
}
+#endif // !QT_OPENGL_ES_2
+
static const char *qt_gl_colorize_filter =
"uniform lowp vec4 colorizeColor;"
"uniform lowp float colorizeStrength;"
@@ -223,6 +231,8 @@ void QGLPixmapColorizeFilter::setUniforms(QGLShaderProgram *program)
program->setUniformValue("colorizeStrength", float(strength()));
}
+#ifndef QT_OPENGL_ES_2
+
// generates convolution filter code for arbitrary sized kernel
QByteArray QGLPixmapConvolutionFilter::generateConvolutionShader() const {
QByteArray code;
@@ -315,6 +325,8 @@ bool QGLPixmapConvolutionFilter::processGL(QPainter *, const QPointF &pos, const
return true;
}
+#endif // !QT_OPENGL_ES_2
+
static const char *qt_gl_blur_filter_fast =
"const int samples = 9;"
"uniform mediump vec2 delta;"
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 8cb6c8d..2331c6d 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -384,8 +384,20 @@ void QGLPixmapData::fill(const QColor &color)
m_hasFillColor = true;
m_fillColor = color;
} else {
- QImage image = fillImage(color);
- fromImage(image, 0);
+
+ if (m_source.isNull()) {
+ m_fillColor = color;
+ m_hasFillColor = true;
+
+ } else if (m_source.depth() == 32) {
+ m_source.fill(PREMUL(color.rgba()));
+
+ } else if (m_source.depth() == 1) {
+ if (color == Qt::color1)
+ m_source.fill(1);
+ else
+ m_source.fill(0);
+ }
}
}
@@ -399,15 +411,11 @@ QImage QGLPixmapData::fillImage(const QColor &color) const
QImage img;
if (pixelType() == BitmapType) {
img = QImage(w, h, QImage::Format_MonoLSB);
- img.setNumColors(2);
- img.setColor(0, QColor(Qt::color0).rgba());
- img.setColor(1, QColor(Qt::color1).rgba());
- int gray = qGray(color.rgba());
- if (qAbs(255 - gray) < gray)
- img.fill(0);
- else
+ if (color == Qt::color1)
img.fill(1);
+ else
+ img.fill(0);
} else {
img = QImage(w, h,
m_hasAlpha
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index cddc53f..3a348bc 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -86,6 +86,10 @@
#include "qgl_cl_p.h"
#endif
+#ifdef QT_OPENGL_ES
+#include <private/qegl_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
//
@@ -326,6 +330,10 @@ QGLWindowSurface::~QGLWindowSurface()
void QGLWindowSurface::deleted(QObject *object)
{
+ // Make sure that the fbo is destroyed before destroying its context.
+ delete d_ptr->fbo;
+ d_ptr->fbo = 0;
+
QWidget *widget = qobject_cast<QWidget *>(object);
if (widget) {
QWidgetPrivate *widgetPrivate = widget->d_func();
@@ -352,6 +360,17 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
QGLContext *ctx = new QGLContext(surfaceFormat, widget);
ctx->create(qt_gl_share_widget()->context());
+#if defined(Q_WS_X11) && defined(QT_OPENGL_ES)
+ // Create the EGL surface to draw into. QGLContext::chooseContext()
+ // does not do this for X11/EGL, but does do it for other platforms.
+ // This probably belongs in qgl_x11egl.cpp.
+ QGLContextPrivate *ctxpriv = ctx->d_func();
+ ctxpriv->eglSurface = ctxpriv->eglContext->createSurface(widget);
+ if (ctxpriv->eglSurface == EGL_NO_SURFACE) {
+ qWarning() << "hijackWindow() could not create EGL surface";
+ }
+#endif
+
widgetPrivate->extraData()->glContext = ctx;
union { QGLContext **ctxPtr; void **voidPtr; };
@@ -584,6 +603,44 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
if (d_ptr->fbo)
d_ptr->fbo->bind();
}
+#else
+ // OpenGL/ES 2.0 version of the fbo blit.
+ else if (d_ptr->fbo) {
+ Q_UNUSED(target);
+
+ GLuint texture = d_ptr->fbo->texture();
+
+ glDisable(GL_DEPTH_TEST);
+
+ if (d_ptr->fbo->isBound())
+ d_ptr->fbo->release();
+
+ glViewport(0, 0, size.width(), size.height());
+
+ QGLShaderProgram *blitProgram =
+ QGLEngineSharedShaders::shadersForContext(ctx)->blitProgram();
+ blitProgram->enable();
+ blitProgram->setUniformValue("imageTexture", 0 /*QT_IMAGE_TEXTURE_UNIT*/);
+
+ // The shader manager's blit program does not multiply the
+ // vertices by the pmv matrix, so we need to do the effect
+ // of the orthographic projection here ourselves.
+ QRectF r;
+ qreal w = size.width() ? size.width() : 1.0f;
+ qreal h = size.height() ? size.height() : 1.0f;
+ r.setLeft((rect.left() / w) * 2.0f - 1.0f);
+ if (rect.right() == (size.width() - 1))
+ r.setRight(1.0f);
+ else
+ r.setRight((rect.right() / w) * 2.0f - 1.0f);
+ r.setBottom((rect.top() / h) * 2.0f - 1.0f);
+ if (rect.bottom() == (size.height() - 1))
+ r.setTop(1.0f);
+ else
+ r.setTop((rect.bottom() / w) * 2.0f - 1.0f);
+
+ drawTexture(r, texture, window()->size(), br);
+ }
#endif
if (ctx->format().doubleBuffer())
@@ -635,9 +692,6 @@ void QGLWindowSurface::updateGeometry() {
if (d_ptr->destructive_swap_buffers
&& (QGLExtensions::glExtensions & QGLExtensions::FramebufferObject)
-#ifdef QT_OPENGL_ES_2
- && (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit)
-#endif
&& (d_ptr->fbo || !d_ptr->tried_fbo)
&& qt_gl_preferGL2Engine())
{
@@ -805,10 +859,23 @@ static void drawTexture(const QRectF &rect, GLuint tex_id, const QSize &texSize,
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-#endif
glDisable(target);
glBindTexture(target, 0);
+#else
+ glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, vertexArray);
+ glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, texCoordArray);
+
+ glBindTexture(target, tex_id);
+
+ glEnableVertexAttribArray(QT_VERTEX_COORDS_ATTR);
+ glEnableVertexAttribArray(QT_TEXTURE_COORDS_ATTR);
+ glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
+ glDisableVertexAttribArray(QT_VERTEX_COORDS_ATTR);
+ glDisableVertexAttribArray(QT_TEXTURE_COORDS_ATTR);
+
+ glBindTexture(target, 0);
+#endif
}
QImage *QGLWindowSurface::buffer(const QWidget *widget)
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 38a89e6..2003f3b 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -82,12 +82,11 @@ QVGPixmapData::~QVGPixmapData()
// We don't currently have a widget surface active, but we
// need a surface to make the context current. So use the
// shared pbuffer surface instead.
- qt_vg_make_current(context, qt_vg_shared_surface());
+ context->makeCurrent(qt_vg_shared_surface());
vgDestroyImage(vgImage);
if (vgImageOpacity != VG_INVALID_HANDLE)
vgDestroyImage(vgImageOpacity);
- qt_vg_done_current(context);
- context->setSurface(EGL_NO_SURFACE);
+ context->lazyDoneCurrent();
}
#else
vgDestroyImage(vgImage);
diff --git a/src/openvg/qvg_p.h b/src/openvg/qvg_p.h
index 764e98f..04e2bab 100644
--- a/src/openvg/qvg_p.h
+++ b/src/openvg/qvg_p.h
@@ -81,15 +81,6 @@ Q_OPENVG_EXPORT void qt_vg_destroy_context(QEglContext *context);
// destroy VGImage objects when there is no other surface available.
Q_OPENVG_EXPORT EGLSurface qt_vg_shared_surface(void);
-// Make a context current with a specific surface.
-Q_OPENVG_EXPORT void qt_vg_make_current(QEglContext *context, EGLSurface surface);
-
-// Make a context uncurrent.
-Q_OPENVG_EXPORT void qt_vg_done_current(QEglContext *context, bool force = false);
-
-// Destroy a surface that was previously associated with a context.
-Q_OPENVG_EXPORT void qt_vg_destroy_surface(QEglContext *context, EGLSurface surface);
-
// Convert the configuration format in a context to a VG or QImage format.
Q_OPENVG_EXPORT VGImageFormat qt_vg_config_to_vg_format(QEglContext *context);
Q_OPENVG_EXPORT QImage::Format qt_vg_config_to_image_format(QEglContext *context);
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 06759d4..3ae911f 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -125,7 +125,6 @@ public:
int refCount;
QVGPaintEngine *engine;
EGLSurface surface;
- EGLSurface lastSurface;
};
QVGSharedContext::QVGSharedContext()
@@ -133,7 +132,6 @@ QVGSharedContext::QVGSharedContext()
, refCount(0)
, engine(0)
, surface(EGL_NO_SURFACE)
- , lastSurface(EGL_NO_SURFACE)
{
}
@@ -144,12 +142,12 @@ QVGSharedContext::~QVGSharedContext()
++refCount;
if (context)
- qt_vg_make_current(context, qt_vg_shared_surface());
+ context->makeCurrent(qt_vg_shared_surface());
delete engine;
if (context)
- qt_vg_done_current(context, true);
- if (surface != EGL_NO_SURFACE)
- qt_vg_destroy_surface(context, surface);
+ context->doneCurrent();
+ if (context && surface != EGL_NO_SURFACE)
+ context->destroySurface(surface);
delete context;
}
@@ -265,12 +263,12 @@ void qt_vg_destroy_context(QEglContext *context)
// This is not the shared context. Shouldn't happen!
delete context;
} else if (--(shared->refCount) <= 0) {
- qt_vg_make_current(shared->context, qt_vg_shared_surface());
+ shared->context->makeCurrent(qt_vg_shared_surface());
delete shared->engine;
shared->engine = 0;
- qt_vg_done_current(shared->context, true);
+ shared->context->doneCurrent();
if (shared->surface != EGL_NO_SURFACE) {
- qt_vg_destroy_surface(shared->context, shared->surface);
+ eglDestroySurface(shared->context->display(), shared->surface);
shared->surface = EGL_NO_SURFACE;
}
delete shared->context;
@@ -303,50 +301,6 @@ EGLSurface qt_vg_shared_surface(void)
return shared->surface;
}
-void qt_vg_make_current(QEglContext *context, EGLSurface surface)
-{
- // Bail out if the context and surface are already current.
- if (context->isCurrent() && context->surface() == surface)
- return;
-
- // Are we setting the surface to the same as the last elided doneCurrent()?
- QVGSharedContext *shared = sharedContext();
- if (context->isCurrent() && shared->lastSurface == surface) {
- shared->lastSurface = EGL_NO_SURFACE;
- context->setSurface(surface);
- return;
- }
-
- // Switch to the new context and surface.
- shared->lastSurface = EGL_NO_SURFACE;
- context->setSurface(surface);
- context->makeCurrent();
-}
-
-void qt_vg_done_current(QEglContext *context, bool force)
-{
- QVGSharedContext *shared = sharedContext();
- if (force) {
- context->doneCurrent();
- shared->lastSurface = EGL_NO_SURFACE;
- } else {
- // Keep the context current for now just in case we immediately
- // reuse the same surface for the next frame.
- shared->lastSurface = context->surface();
- }
-}
-
-void qt_vg_destroy_surface(QEglContext *context, EGLSurface surface)
-{
- QVGSharedContext *shared = sharedContext();
- if (shared->lastSurface == surface) {
- shared->lastSurface = EGL_NO_SURFACE;
- context->doneCurrent();
- }
- context->setSurface(surface);
- context->destroySurface();
-}
-
#else
QEglContext *qt_vg_create_context(QPaintDevice *device)
@@ -364,24 +318,6 @@ EGLSurface qt_vg_shared_surface(void)
return EGL_NO_SURFACE;
}
-void qt_vg_make_current(QEglContext *context, EGLSurface surface)
-{
- context->setSurface(surface);
- context->makeCurrent();
-}
-
-void qt_vg_done_current(QEglContext *context, bool force)
-{
- Q_UNUSED(force);
- context->doneCurrent();
-}
-
-void qt_vg_destroy_surface(QEglContext *context, EGLSurface surface)
-{
- context->setSurface(surface);
- context->destroySurface();
-}
-
#endif
QVGEGLWindowSurfacePrivate::QVGEGLWindowSurfacePrivate(QWindowSurface *win)
@@ -470,13 +406,13 @@ QVGEGLWindowSurfaceVGImage::~QVGEGLWindowSurfaceVGImage()
// We need a current context to be able to destroy the image.
// We use the shared surface because the native window handle
// associated with "windowSurface" may have been destroyed already.
- qt_vg_make_current(context, qt_vg_shared_surface());
- qt_vg_destroy_surface(context, backBufferSurface);
+ context->makeCurrent(qt_vg_shared_surface());
+ context->destroySurface(backBufferSurface);
vgDestroyImage(backBuffer);
- qt_vg_done_current(context, true);
+ context->doneCurrent();
}
if (windowSurface != EGL_NO_SURFACE)
- qt_vg_destroy_surface(context, windowSurface);
+ context->destroySurface(windowSurface);
qt_vg_destroy_context(context);
}
}
@@ -489,7 +425,7 @@ QEglContext *QVGEGLWindowSurfaceVGImage::ensureContext(QWidget *widget)
// the back buffer. Keep the same context and paint engine.
size = newSize;
if (isPaintingActive)
- qt_vg_done_current(context, true);
+ context->doneCurrent();
isPaintingActive = false;
recreateBackBuffer = true;
}
@@ -512,7 +448,7 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget)
// Create a VGImage object to act as the back buffer
// for this window. We have to create the VGImage with a
// current context, so activate the main surface for the window.
- qt_vg_make_current(context, mainSurface());
+ context->makeCurrent(mainSurface());
recreateBackBuffer = false;
if (backBufferSurface != EGL_NO_SURFACE) {
eglDestroySurface(context->display(), backBufferSurface);
@@ -538,9 +474,9 @@ void QVGEGLWindowSurfaceVGImage::beginPaint(QWidget *widget)
}
}
if (backBufferSurface != EGL_NO_SURFACE)
- qt_vg_make_current(context, backBufferSurface);
+ context->makeCurrent(backBufferSurface);
else
- qt_vg_make_current(context, mainSurface());
+ context->makeCurrent(mainSurface());
isPaintingActive = true;
}
}
@@ -555,9 +491,8 @@ void QVGEGLWindowSurfaceVGImage::endPaint
if (backBufferSurface != EGL_NO_SURFACE) {
if (isPaintingActive)
vgFlush();
- qt_vg_done_current(context);
+ context->lazyDoneCurrent();
}
- context->setSurface(EGL_NO_SURFACE);
isPaintingActive = false;
}
}
@@ -592,7 +527,7 @@ void QVGEGLWindowSurfaceQImage::endPaint
if (backBufferSurface != EGL_NO_SURFACE) {
if (isPaintingActive)
vgFlush();
- qt_vg_make_current(context, mainSurface());
+ context->makeCurrent(mainSurface());
QRegion rgn = region.intersected
(QRect(0, 0, image->width(), image->height()));
if (rgn.numRects() == 1) {
@@ -602,9 +537,8 @@ void QVGEGLWindowSurfaceQImage::endPaint
for (int index = 0; index < rects.size(); ++index)
copySubImage(image, backBuffer, rects[index]);
}
- qt_vg_done_current(context);
+ context->lazyDoneCurrent();
}
- context->setSurface(EGL_NO_SURFACE);
isPaintingActive = false;
}
}
@@ -625,7 +559,7 @@ QVGEGLWindowSurfaceDirect::~QVGEGLWindowSurfaceDirect()
destroyPaintEngine();
if (context) {
if (windowSurface != EGL_NO_SURFACE)
- qt_vg_destroy_surface(context, windowSurface);
+ context->destroySurface(windowSurface);
qt_vg_destroy_context(context);
}
}
@@ -642,9 +576,8 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
// We can keep the same context and paint engine.
size = newSize;
if (isPaintingActive)
- qt_vg_done_current(context, true);
- context->setSurface(windowSurface);
- context->destroySurface();
+ context->doneCurrent();
+ context->destroySurface(windowSurface);
#if defined(EGL_VG_ALPHA_FORMAT_PRE_BIT)
if (isPremultipliedContext(context)) {
surfaceProps.setValue
@@ -653,9 +586,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
surfaceProps.removeValue(EGL_VG_ALPHA_FORMAT);
}
#endif
- context->createSurface(widget, &surfaceProps);
- windowSurface = context->surface();
- context->setSurface(EGL_NO_SURFACE);
+ windowSurface = context->createSurface(widget, &surfaceProps);
isPaintingActive = false;
}
#else
@@ -667,8 +598,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
// in the new context.
qt_vg_destroy_paint_engine(engine);
engine = 0;
- context->setSurface(windowSurface);
- context->destroySurface();
+ context->destroySurface(windowSurface);
qt_vg_destroy_context(context);
context = 0;
windowSurface = EGL_NO_SURFACE;
@@ -693,7 +623,8 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
surfaceProps.removeValue(EGL_VG_ALPHA_FORMAT);
}
#endif
- if (!context->createSurface(widget, &surfaceProps)) {
+ EGLSurface surface = context->createSurface(widget, &surfaceProps);
+ if (surface == EGL_NO_SURFACE) {
qt_vg_destroy_context(context);
context = 0;
return 0;
@@ -712,15 +643,14 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
// Try to force the surface back buffer to preserve its contents.
if (needToSwap) {
eglGetError(); // Clear error state first.
- eglSurfaceAttrib(context->display(), context->surface(),
+ eglSurfaceAttrib(context->display(), surface,
EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
if (eglGetError() != EGL_SUCCESS) {
qWarning("QVG: could not enable preserved swap");
}
}
#endif
- windowSurface = context->surface();
- context->setSurface(EGL_NO_SURFACE);
+ windowSurface = surface;
isPaintingActive = false;
}
return context;
@@ -730,7 +660,7 @@ void QVGEGLWindowSurfaceDirect::beginPaint(QWidget *widget)
{
QEglContext *context = ensureContext(widget);
if (context) {
- qt_vg_make_current(context, windowSurface);
+ context->makeCurrent(windowSurface);
isPaintingActive = true;
}
}
@@ -744,14 +674,13 @@ void QVGEGLWindowSurfaceDirect::endPaint
if (context) {
if (needToSwap) {
if (!isPaintingActive)
- qt_vg_make_current(context, windowSurface);
- context->swapBuffers();
- qt_vg_done_current(context);
+ context->makeCurrent(windowSurface);
+ context->swapBuffers(windowSurface);
+ context->lazyDoneCurrent();
} else if (isPaintingActive) {
vgFlush();
- qt_vg_done_current(context);
+ context->lazyDoneCurrent();
}
- context->setSurface(EGL_NO_SURFACE);
isPaintingActive = false;
}
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index ce9a55c..b15888b 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -288,7 +288,7 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
void QDirectFBPixmapData::fromImage(const QImage &img,
Qt::ImageConversionFlags flags)
{
- if (img.depth() == 1) {
+ if (img.depth() == 1 || img.format() == QImage::Format_RGB32) {
fromImage(img.convertToFormat(screen->alphaPixmapFormat()), flags);
return;
}
@@ -308,6 +308,8 @@ void QDirectFBPixmapData::fromImage(const QImage &img,
if (flags != Qt::AutoColor) {
image = img.convertToFormat(imageFormat, flags);
flags = Qt::AutoColor;
+ } else if (img.format() == QImage::Format_RGB32) {
+ image = img.convertToFormat(imageFormat, flags);
} else {
image = img;
}
@@ -332,6 +334,7 @@ void QDirectFBPixmapData::fromImage(const QImage &img,
} else {
dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
}
+
dfbSurface->Blit(dfbSurface, imageSurface, 0, 0, 0);
imageSurface->Release(imageSurface);
diff --git a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
index f28e160..f44fe0d 100644
--- a/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
+++ b/src/plugins/gfxdrivers/vnc/qscreenvnc_qws.cpp
@@ -198,7 +198,7 @@ QVNCScreenPrivate::QVNCScreenPrivate(QVNCScreen *parent)
vncServer(0), q_ptr(parent), noDisablePainting(false)
{
#ifdef QT_BUILD_INTERNAL
- noDisablePainting = (qgetenv("QT_VNC_NO_DISABLEPAINTING").toInt() <=0);
+ noDisablePainting = (qgetenv("QT_VNC_NO_DISABLEPAINTING").toInt() > 0);
#endif
#ifndef QT_NO_QWS_SIGNALHANDLER
QWSSignalHandler::instance()->addObject(this);
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index dc41f85..d795a62 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3299,7 +3299,7 @@ EXPORTS
_ZN15QPauseAnimation11qt_metacastEPKc @ 3298 NONAME
_ZN15QPauseAnimation11setDurationEi @ 3299 NONAME
_ZN15QPauseAnimation16staticMetaObjectE @ 3300 NONAME DATA 16
- _ZN15QPauseAnimation17updateCurrentTimeEi @ 3301 NONAME
+ _ZN15QPauseAnimation17updateCurrentTimeEi @ 3301 NONAME ABSENT
_ZN15QPauseAnimation5eventEP6QEvent @ 3302 NONAME
_ZN15QPauseAnimationC1EP7QObject @ 3303 NONAME
_ZN15QPauseAnimationC1EiP7QObject @ 3304 NONAME
@@ -3361,7 +3361,7 @@ EXPORTS
_ZN17QVariantAnimation13setStartValueERK8QVariant @ 3360 NONAME
_ZN17QVariantAnimation14setEasingCurveERK12QEasingCurve @ 3361 NONAME
_ZN17QVariantAnimation16staticMetaObjectE @ 3362 NONAME DATA 16
- _ZN17QVariantAnimation17updateCurrentTimeEi @ 3363 NONAME
+ _ZN17QVariantAnimation17updateCurrentTimeEi @ 3363 NONAME ABSENT
_ZN17QVariantAnimation20registerInterpolatorEPF8QVariantPKvS2_fEi @ 3364 NONAME
_ZN17QVariantAnimation5eventEP6QEvent @ 3365 NONAME
_ZN17QVariantAnimationC2EP7QObject @ 3366 NONAME
@@ -3470,7 +3470,7 @@ EXPORTS
_ZN23QParallelAnimationGroup11updateStateEN18QAbstractAnimation5StateES1_ @ 3469 NONAME
_ZN23QParallelAnimationGroup15updateDirectionEN18QAbstractAnimation9DirectionE @ 3470 NONAME
_ZN23QParallelAnimationGroup16staticMetaObjectE @ 3471 NONAME DATA 16
- _ZN23QParallelAnimationGroup17updateCurrentTimeEi @ 3472 NONAME
+ _ZN23QParallelAnimationGroup17updateCurrentTimeEi @ 3472 NONAME ABSENT
_ZN23QParallelAnimationGroup5eventEP6QEvent @ 3473 NONAME
_ZN23QParallelAnimationGroupC1EP7QObject @ 3474 NONAME
_ZN23QParallelAnimationGroupC1ER30QParallelAnimationGroupPrivateP7QObject @ 3475 NONAME
@@ -3498,7 +3498,7 @@ EXPORTS
_ZN25QSequentialAnimationGroup13insertPauseAtEii @ 3497 NONAME
_ZN25QSequentialAnimationGroup15updateDirectionEN18QAbstractAnimation9DirectionE @ 3498 NONAME
_ZN25QSequentialAnimationGroup16staticMetaObjectE @ 3499 NONAME DATA 16
- _ZN25QSequentialAnimationGroup17updateCurrentTimeEi @ 3500 NONAME
+ _ZN25QSequentialAnimationGroup17updateCurrentTimeEi @ 3500 NONAME ABSENT
_ZN25QSequentialAnimationGroup23currentAnimationChangedEP18QAbstractAnimation @ 3501 NONAME
_ZN25QSequentialAnimationGroup5eventEP6QEvent @ 3502 NONAME
_ZN25QSequentialAnimationGroup8addPauseEi @ 3503 NONAME
@@ -3789,35 +3789,39 @@ EXPORTS
_ZN9QMimeData19getStaticMetaObjectEv @ 3788 NONAME
_ZN9QSettings19getStaticMetaObjectEv @ 3789 NONAME
_ZN9QTimeLine19getStaticMetaObjectEv @ 3790 NONAME
- _ZTI13QUnifiedTimer @ 3791 NONAME ; #<TI>#
- _ZTI14QProcessActive @ 3792 NONAME ; #<TI>#
- _ZTI18QNotifyChangeEvent @ 3793 NONAME ; #<TI>#
- _ZTI20QEasingCurveFunction @ 3794 NONAME ; #<TI>#
- _ZTI21QFactoryLoaderPrivate @ 3795 NONAME ; #<TI>#
- _ZTI21QSignalEventGenerator @ 3796 NONAME ; #<TI>#
- _ZTI22QAnimationGroupPrivate @ 3797 NONAME ; #<TI>#
- _ZTI23QProcessManagerMediator @ 3798 NONAME ; #<TI>#
- _ZTI24QSignalTransitionPrivate @ 3799 NONAME ; #<TI>#
- _ZTI27QByteDeviceWrappingIoDevice @ 3800 NONAME ; #<TI>#
- _ZTI32QSequentialAnimationGroupPrivate @ 3801 NONAME ; #<TI>#
- _ZTI34QNonContiguousByteDeviceBufferImpl @ 3802 NONAME ; #<TI>#
- _ZTI36QNonContiguousByteDeviceIoDeviceImpl @ 3803 NONAME ; #<TI>#
- _ZTI37QNonContiguousByteDeviceByteArrayImpl @ 3804 NONAME ; #<TI>#
- _ZTI38QNonContiguousByteDeviceRingBufferImpl @ 3805 NONAME ; #<TI>#
- _ZTV13QUnifiedTimer @ 3806 NONAME ; #<VT>#
- _ZTV14QProcessActive @ 3807 NONAME ; #<VT>#
- _ZTV18QNotifyChangeEvent @ 3808 NONAME ; #<VT>#
- _ZTV20QEasingCurveFunction @ 3809 NONAME ; #<VT>#
- _ZTV21QFactoryLoaderPrivate @ 3810 NONAME ; #<VT>#
- _ZTV21QSignalEventGenerator @ 3811 NONAME ; #<VT>#
- _ZTV22QAnimationGroupPrivate @ 3812 NONAME ; #<VT>#
- _ZTV23QProcessManagerMediator @ 3813 NONAME ; #<VT>#
- _ZTV24QSignalTransitionPrivate @ 3814 NONAME ; #<VT>#
- _ZTV27QByteDeviceWrappingIoDevice @ 3815 NONAME ; #<VT>#
- _ZTV32QSequentialAnimationGroupPrivate @ 3816 NONAME ; #<VT>#
- _ZTV34QNonContiguousByteDeviceBufferImpl @ 3817 NONAME ; #<VT>#
- _ZTV36QNonContiguousByteDeviceIoDeviceImpl @ 3818 NONAME ; #<VT>#
- _ZTV37QNonContiguousByteDeviceByteArrayImpl @ 3819 NONAME ; #<VT>#
- _ZTV38QNonContiguousByteDeviceRingBufferImpl @ 3820 NONAME ; #<VT>#
+ _ZTI13QUnifiedTimer @ 3791 NONAME ABSENT ; #<TI>#
+ _ZTI14QProcessActive @ 3792 NONAME ABSENT ; #<TI>#
+ _ZTI18QNotifyChangeEvent @ 3793 NONAME ABSENT ; #<TI>#
+ _ZTI20QEasingCurveFunction @ 3794 NONAME ABSENT ; #<TI>#
+ _ZTI21QFactoryLoaderPrivate @ 3795 NONAME ABSENT ; #<TI>#
+ _ZTI21QSignalEventGenerator @ 3796 NONAME ABSENT ; #<TI>#
+ _ZTI22QAnimationGroupPrivate @ 3797 NONAME ABSENT ; #<TI>#
+ _ZTI23QProcessManagerMediator @ 3798 NONAME ABSENT ; #<TI>#
+ _ZTI24QSignalTransitionPrivate @ 3799 NONAME ABSENT ; #<TI>#
+ _ZTI27QByteDeviceWrappingIoDevice @ 3800 NONAME ABSENT ; #<TI>#
+ _ZTI32QSequentialAnimationGroupPrivate @ 3801 NONAME ABSENT ; #<TI>#
+ _ZTI34QNonContiguousByteDeviceBufferImpl @ 3802 NONAME ABSENT ; #<TI>#
+ _ZTI36QNonContiguousByteDeviceIoDeviceImpl @ 3803 NONAME ABSENT ; #<TI>#
+ _ZTI37QNonContiguousByteDeviceByteArrayImpl @ 3804 NONAME ABSENT ; #<TI>#
+ _ZTI38QNonContiguousByteDeviceRingBufferImpl @ 3805 NONAME ABSENT ; #<TI>#
+ _ZTV13QUnifiedTimer @ 3806 NONAME ABSENT ; #<VT>#
+ _ZTV14QProcessActive @ 3807 NONAME ABSENT ; #<VT>#
+ _ZTV18QNotifyChangeEvent @ 3808 NONAME ABSENT ; #<VT>#
+ _ZTV20QEasingCurveFunction @ 3809 NONAME ABSENT ; #<VT>#
+ _ZTV21QFactoryLoaderPrivate @ 3810 NONAME ABSENT ; #<VT>#
+ _ZTV21QSignalEventGenerator @ 3811 NONAME ABSENT ; #<VT>#
+ _ZTV22QAnimationGroupPrivate @ 3812 NONAME ABSENT ; #<VT>#
+ _ZTV23QProcessManagerMediator @ 3813 NONAME ABSENT ; #<VT>#
+ _ZTV24QSignalTransitionPrivate @ 3814 NONAME ABSENT ; #<VT>#
+ _ZTV27QByteDeviceWrappingIoDevice @ 3815 NONAME ABSENT ; #<VT>#
+ _ZTV32QSequentialAnimationGroupPrivate @ 3816 NONAME ABSENT ; #<VT>#
+ _ZTV34QNonContiguousByteDeviceBufferImpl @ 3817 NONAME ABSENT ; #<VT>#
+ _ZTV36QNonContiguousByteDeviceIoDeviceImpl @ 3818 NONAME ABSENT ; #<VT>#
+ _ZTV37QNonContiguousByteDeviceByteArrayImpl @ 3819 NONAME ABSENT ; #<VT>#
+ _ZTV38QNonContiguousByteDeviceRingBufferImpl @ 3820 NONAME ABSENT ; #<VT>#
_Zls6QDebugRK8QMargins @ 3821 NONAME
+ _ZN15QPauseAnimation17updateCurrentTimeEv @ 3822 NONAME
+ _ZN17QVariantAnimation17updateCurrentTimeEv @ 3823 NONAME
+ _ZN23QParallelAnimationGroup17updateCurrentTimeEv @ 3824 NONAME
+ _ZN25QSequentialAnimationGroup17updateCurrentTimeEv @ 3825 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index a605f6f..aad8b68 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -35,9 +35,9 @@ EXPORTS
_Z20qt_scaleForTransformRK10QTransformPf @ 34 NONAME
_Z21qt_qsliderStyleOptionP7QSlider @ 35 NONAME
_Z22qt_find_ellipse_coordsRK6QRectFffP7QPointFS3_ @ 36 NONAME
- _Z23qt_symbian_show_submenuP12CEikMenuPanei @ 37 NONAME
+ _Z23qt_symbian_show_submenuP12CEikMenuPanei @ 37 NONAME ABSENT
_Z24qt_qscrollbarStyleOptionP10QScrollBar @ 38 NONAME
- _Z24qt_symbian_show_toplevelP12CEikMenuPane @ 39 NONAME
+ _Z24qt_symbian_show_toplevelP12CEikMenuPane @ 39 NONAME ABSENT
_Z25qt_keymapper_possibleKeysP9QKeyEvent @ 40 NONAME ABSENT
_Z29qt_set_sequence_auto_mnemonicb @ 41 NONAME
_Z9qGeomCalcR7QVectorI13QLayoutStructEiiiii @ 42 NONAME
@@ -2884,7 +2884,7 @@ EXPORTS
_ZN14QWidgetPrivate15keyboardGrabberE @ 2883 NONAME DATA 4
_ZN14QWidgetPrivate15prepareToRenderERK7QRegion6QFlagsIN7QWidget10RenderFlagEE @ 2884 NONAME
_ZN14QWidgetPrivate15setGeometry_sysEiiiib @ 2885 NONAME
- _ZN14QWidgetPrivate15setSoftKeys_sysERK5QListIP7QActionE @ 2886 NONAME
+ _ZN14QWidgetPrivate15setSoftKeys_sysERK5QListIP7QActionE @ 2886 NONAME ABSENT
_ZN14QWidgetPrivate15setStyle_helperEP6QStylebb @ 2887 NONAME
_ZN14QWidgetPrivate16createTLSysExtraEv @ 2888 NONAME
_ZN14QWidgetPrivate16deleteTLSysExtraEv @ 2889 NONAME
@@ -6034,7 +6034,7 @@ EXPORTS
_ZN7QWidget10paintEventEP11QPaintEvent @ 6033 NONAME
_ZN7QWidget10setEnabledEb @ 6034 NONAME
_ZN7QWidget10setPaletteERK8QPalette @ 6035 NONAME
- _ZN7QWidget10setSoftKeyEP7QAction @ 6036 NONAME
+ _ZN7QWidget10setSoftKeyEP7QAction @ 6036 NONAME ABSENT
_ZN7QWidget10setToolTipERK7QString @ 6037 NONAME
_ZN7QWidget10setVisibleEb @ 6038 NONAME
_ZN7QWidget10showNormalEv @ 6039 NONAME
@@ -6050,7 +6050,7 @@ EXPORTS
_ZN7QWidget11setBaseSizeEii @ 6049 NONAME
_ZN7QWidget11setDisabledEb @ 6050 NONAME
_ZN7QWidget11setGeometryERK5QRect @ 6051 NONAME
- _ZN7QWidget11setSoftKeysERK5QListIP7QActionE @ 6052 NONAME
+ _ZN7QWidget11setSoftKeysERK5QListIP7QActionE @ 6052 NONAME ABSENT
_ZN7QWidget11setTabOrderEPS_S0_ @ 6053 NONAME
_ZN7QWidget11styleChangeER6QStyle @ 6054 NONAME
_ZN7QWidget11tabletEventEP12QTabletEvent @ 6055 NONAME
@@ -9982,7 +9982,7 @@ EXPORTS
_ZNK7QWidget8baseSizeEv @ 9981 NONAME
_ZNK7QWidget8hasFocusEv @ 9982 NONAME
_ZNK7QWidget8sizeHintEv @ 9983 NONAME
- _ZNK7QWidget8softKeysEv @ 9984 NONAME
+ _ZNK7QWidget8softKeysEv @ 9984 NONAME ABSENT
_ZNK7QWidget9frameSizeEv @ 9985 NONAME
_ZNK7QWidget9statusTipEv @ 9986 NONAME
_ZNK7QWidget9whatsThisEv @ 9987 NONAME
@@ -12338,7 +12338,7 @@ EXPORTS
_ZN15QGraphicsEffectD1Ev @ 12337 NONAME
_ZN15QGraphicsEffectD2Ev @ 12338 NONAME
_ZN17QGraphicsRotation9setOriginERK9QVector3D @ 12339 NONAME
- _ZN17QPixmapBlurFilter10setQualityEN2Qt18TransformationModeE @ 12340 NONAME
+ _ZN17QPixmapBlurFilter10setQualityEN2Qt18TransformationModeE @ 12340 NONAME ABSENT
_ZN17QPixmapBlurFilter11qt_metacallEN11QMetaObject4CallEiPPv @ 12341 NONAME
_ZN17QPixmapBlurFilter11qt_metacastEPKc @ 12342 NONAME
_ZN17QPixmapBlurFilter16staticMetaObjectE @ 12343 NONAME DATA 16
@@ -12454,7 +12454,7 @@ EXPORTS
_ZNK17QPixmapBlurFilter15boundingRectForERK6QRectF @ 12453 NONAME
_ZNK17QPixmapBlurFilter4drawEP8QPainterRK7QPointFRK7QPixmapRK6QRectF @ 12454 NONAME
_ZNK17QPixmapBlurFilter6radiusEv @ 12455 NONAME
- _ZNK17QPixmapBlurFilter7qualityEv @ 12456 NONAME
+ _ZNK17QPixmapBlurFilter7qualityEv @ 12456 NONAME ABSENT
_ZNK19QGraphicsBlurEffect10blurRadiusEv @ 12457 NONAME
_ZNK19QGraphicsBlurEffect10metaObjectEv @ 12458 NONAME
_ZNK19QGraphicsBlurEffect15boundingRectForERK6QRectF @ 12459 NONAME
@@ -12872,72 +12872,141 @@ EXPORTS
_ZNK7QCursorcv8QVariantEv @ 12871 NONAME
_ZNK7QWidget15contentsMarginsEv @ 12872 NONAME
_ZNK7QWidget6cursorEv @ 12873 NONAME
- _ZTI10AnchorData @ 12874 NONAME ; #<TI>#
- _ZTI11PixmapEntry @ 12875 NONAME ; #<TI>#
+ _ZTI10AnchorData @ 12874 NONAME ABSENT ; #<TI>#
+ _ZTI11PixmapEntry @ 12875 NONAME ABSENT ; #<TI>#
_ZTI12QPaintBuffer @ 12876 NONAME ; #<TI>#
_ZTI13QS60MainAppUi @ 12877 NONAME ; #<TI>#
_ZTI13QSwipeGesture @ 12878 NONAME ; #<TI>#
- _ZTI13ScalableEntry @ 12879 NONAME ; #<TI>#
- _ZTI15QGesturePrivate @ 12880 NONAME ; #<TI>#
+ _ZTI13ScalableEntry @ 12879 NONAME ABSENT ; #<TI>#
+ _ZTI15QGesturePrivate @ 12880 NONAME ABSENT ; #<TI>#
_ZTI15QGraphicsAnchor @ 12881 NONAME ; #<TI>#
_ZTI16QPainterReplayer @ 12882 NONAME ; #<TI>#
_ZTI16QS60MainDocument @ 12883 NONAME ; #<TI>#
- _ZTI16QTreeViewPrivate @ 12884 NONAME ; #<TI>#
- _ZTI17QIconLoaderEngine @ 12885 NONAME ; #<TI>#
- _ZTI17QIconModeViewBase @ 12886 NONAME ; #<TI>#
- _ZTI17QListModeViewBase @ 12887 NONAME ; #<TI>#
- _ZTI18ParallelAnchorData @ 12888 NONAME ; #<TI>#
- _ZTI18QHeaderViewPrivate @ 12889 NONAME ; #<TI>#
- _ZTI18QPaintBufferEngine @ 12890 NONAME ; #<TI>#
- _ZTI18QPanGesturePrivate @ 12891 NONAME ; #<TI>#
- _ZTI19QCommonListViewBase @ 12892 NONAME ; #<TI>#
+ _ZTI16QTreeViewPrivate @ 12884 NONAME ABSENT ; #<TI>#
+ _ZTI17QIconLoaderEngine @ 12885 NONAME ABSENT ; #<TI>#
+ _ZTI17QIconModeViewBase @ 12886 NONAME ABSENT ; #<TI>#
+ _ZTI17QListModeViewBase @ 12887 NONAME ABSENT ; #<TI>#
+ _ZTI18ParallelAnchorData @ 12888 NONAME ABSENT ; #<TI>#
+ _ZTI18QHeaderViewPrivate @ 12889 NONAME ABSENT ; #<TI>#
+ _ZTI18QPaintBufferEngine @ 12890 NONAME ABSENT ; #<TI>#
+ _ZTI18QPanGesturePrivate @ 12891 NONAME ABSENT ; #<TI>#
+ _ZTI19QCommonListViewBase @ 12892 NONAME ABSENT ; #<TI>#
_ZTI19QS60MainApplication @ 12893 NONAME ; #<TI>#
_ZTI20QPaintBufferResource @ 12894 NONAME ; #<TI>#
- _ZTI20QPinchGesturePrivate @ 12895 NONAME ; #<TI>#
- _ZTI20QSwipeGesturePrivate @ 12896 NONAME ; #<TI>#
- _ZTI20SequentialAnchorData @ 12897 NONAME ; #<TI>#
- _ZTI22QGraphicsAnchorPrivate @ 12898 NONAME ; #<TI>#
+ _ZTI20QPinchGesturePrivate @ 12895 NONAME ABSENT ; #<TI>#
+ _ZTI20QSwipeGesturePrivate @ 12896 NONAME ABSENT ; #<TI>#
+ _ZTI20SequentialAnchorData @ 12897 NONAME ABSENT ; #<TI>#
+ _ZTI22QGraphicsAnchorPrivate @ 12898 NONAME ABSENT ; #<TI>#
_ZTI22QGraphicsOpacityEffect @ 12899 NONAME ; #<TI>#
_ZTI22QPaintEngineExReplayer @ 12900 NONAME ; #<TI>#
_ZTI23QPaintBufferSignalProxy @ 12901 NONAME ; #<TI>#
- _ZTI26QGraphicsSceneIndexPrivate @ 12902 NONAME ; #<TI>#
- _ZTI26QWidgetEffectSourcePrivate @ 12903 NONAME ; #<TI>#
- _ZTI32QGraphicsItemEffectSourcePrivate @ 12904 NONAME ; #<TI>#
- _ZTI8QSimplex @ 12905 NONAME ; #<TI>#
- _ZTV10AnchorData @ 12906 NONAME ; #<VT>#
- _ZTV11PixmapEntry @ 12907 NONAME ; #<VT>#
+ _ZTI26QGraphicsSceneIndexPrivate @ 12902 NONAME ABSENT ; #<TI>#
+ _ZTI26QWidgetEffectSourcePrivate @ 12903 NONAME ABSENT ; #<TI>#
+ _ZTI32QGraphicsItemEffectSourcePrivate @ 12904 NONAME ABSENT ; #<TI>#
+ _ZTI8QSimplex @ 12905 NONAME ABSENT ; #<TI>#
+ _ZTV10AnchorData @ 12906 NONAME ABSENT ; #<VT>#
+ _ZTV11PixmapEntry @ 12907 NONAME ABSENT ; #<VT>#
_ZTV12QPaintBuffer @ 12908 NONAME ; #<VT>#
_ZTV13QS60MainAppUi @ 12909 NONAME ; #<VT>#
_ZTV13QSwipeGesture @ 12910 NONAME ; #<VT>#
- _ZTV13ScalableEntry @ 12911 NONAME ; #<VT>#
- _ZTV15QGesturePrivate @ 12912 NONAME ; #<VT>#
+ _ZTV13ScalableEntry @ 12911 NONAME ABSENT ; #<VT>#
+ _ZTV15QGesturePrivate @ 12912 NONAME ABSENT ; #<VT>#
_ZTV15QGraphicsAnchor @ 12913 NONAME ; #<VT>#
_ZTV16QPainterReplayer @ 12914 NONAME ; #<VT>#
_ZTV16QS60MainDocument @ 12915 NONAME ; #<VT>#
- _ZTV16QTreeViewPrivate @ 12916 NONAME ; #<VT>#
- _ZTV17QIconLoaderEngine @ 12917 NONAME ; #<VT>#
- _ZTV17QIconModeViewBase @ 12918 NONAME ; #<VT>#
- _ZTV17QListModeViewBase @ 12919 NONAME ; #<VT>#
- _ZTV18ParallelAnchorData @ 12920 NONAME ; #<VT>#
- _ZTV18QHeaderViewPrivate @ 12921 NONAME ; #<VT>#
- _ZTV18QPaintBufferEngine @ 12922 NONAME ; #<VT>#
- _ZTV18QPanGesturePrivate @ 12923 NONAME ; #<VT>#
- _ZTV19QCommonListViewBase @ 12924 NONAME ; #<VT>#
+ _ZTV16QTreeViewPrivate @ 12916 NONAME ABSENT ; #<VT>#
+ _ZTV17QIconLoaderEngine @ 12917 NONAME ABSENT ; #<VT>#
+ _ZTV17QIconModeViewBase @ 12918 NONAME ABSENT ; #<VT>#
+ _ZTV17QListModeViewBase @ 12919 NONAME ABSENT ; #<VT>#
+ _ZTV18ParallelAnchorData @ 12920 NONAME ABSENT ; #<VT>#
+ _ZTV18QHeaderViewPrivate @ 12921 NONAME ABSENT ; #<VT>#
+ _ZTV18QPaintBufferEngine @ 12922 NONAME ABSENT ; #<VT>#
+ _ZTV18QPanGesturePrivate @ 12923 NONAME ABSENT ; #<VT>#
+ _ZTV19QCommonListViewBase @ 12924 NONAME ABSENT ; #<VT>#
_ZTV19QS60MainApplication @ 12925 NONAME ; #<VT>#
_ZTV20QPaintBufferResource @ 12926 NONAME ; #<VT>#
- _ZTV20QPinchGesturePrivate @ 12927 NONAME ; #<VT>#
- _ZTV20QSwipeGesturePrivate @ 12928 NONAME ; #<VT>#
- _ZTV20SequentialAnchorData @ 12929 NONAME ; #<VT>#
- _ZTV22QGraphicsAnchorPrivate @ 12930 NONAME ; #<VT>#
+ _ZTV20QPinchGesturePrivate @ 12927 NONAME ABSENT ; #<VT>#
+ _ZTV20QSwipeGesturePrivate @ 12928 NONAME ABSENT ; #<VT>#
+ _ZTV20SequentialAnchorData @ 12929 NONAME ABSENT ; #<VT>#
+ _ZTV22QGraphicsAnchorPrivate @ 12930 NONAME ABSENT ; #<VT>#
_ZTV22QGraphicsOpacityEffect @ 12931 NONAME ; #<VT>#
_ZTV22QPaintEngineExReplayer @ 12932 NONAME ; #<VT>#
_ZTV23QPaintBufferSignalProxy @ 12933 NONAME ; #<VT>#
- _ZTV26QGraphicsSceneIndexPrivate @ 12934 NONAME ; #<VT>#
- _ZTV26QWidgetEffectSourcePrivate @ 12935 NONAME ; #<VT>#
- _ZTV32QGraphicsItemEffectSourcePrivate @ 12936 NONAME ; #<VT>#
- _ZTV8QSimplex @ 12937 NONAME ; #<VT>#
+ _ZTV26QGraphicsSceneIndexPrivate @ 12934 NONAME ABSENT ; #<VT>#
+ _ZTV26QWidgetEffectSourcePrivate @ 12935 NONAME ABSENT ; #<VT>#
+ _ZTV32QGraphicsItemEffectSourcePrivate @ 12936 NONAME ABSENT ; #<VT>#
+ _ZTV8QSimplex @ 12937 NONAME ABSENT ; #<VT>#
_ZlsR11QDataStreamRK12QPaintBuffer @ 12938 NONAME
_ZlsR11QDataStreamRK7QCursor @ 12939 NONAME
_ZrsR11QDataStreamR12QPaintBuffer @ 12940 NONAME
_ZrsR11QDataStreamR7QCursor @ 12941 NONAME
+ _ZN11QPixmapData12toNativeTypeENS_10NativeTypeE @ 12942 NONAME
+ _ZN11QPixmapData14fromNativeTypeEPvNS_10NativeTypeE @ 12943 NONAME
+ _ZN12QApplicationC1EPFP15CApaApplicationvERiPPc @ 12944 NONAME
+ _ZN12QApplicationC1EPFP15CApaApplicationvERiPPci @ 12945 NONAME
+ _ZN12QApplicationC2EPFP15CApaApplicationvERiPPc @ 12946 NONAME
+ _ZN12QApplicationC2EPFP15CApaApplicationvERiPPci @ 12947 NONAME
+ _ZN13QS60MainAppUi10ConstructLEv @ 12948 NONAME
+ _ZN13QS60MainAppUi12RestoreMenuLEP11CCoeControliN16MEikMenuObserver9TMenuTypeE @ 12949 NONAME
+ _ZN13QS60MainAppUi14HandleCommandLEi @ 12950 NONAME
+ _ZN13QS60MainAppUi14HandleWsEventLERK8TWsEventP11CCoeControl @ 12951 NONAME
+ _ZN13QS60MainAppUi15DynInitMenuBarLEiP11CEikMenuBar @ 12952 NONAME
+ _ZN13QS60MainAppUi16DynInitMenuPaneLEiP12CEikMenuPane @ 12953 NONAME
+ _ZN13QS60MainAppUi21HandleResourceChangeLEi @ 12954 NONAME
+ _ZN13QS60MainAppUi26HandleStatusPaneSizeChangeEv @ 12955 NONAME
+ _ZN13QS60MainAppUiC1Ev @ 12956 NONAME
+ _ZN13QS60MainAppUiC2Ev @ 12957 NONAME
+ _ZN13QS60MainAppUiD0Ev @ 12958 NONAME
+ _ZN13QS60MainAppUiD1Ev @ 12959 NONAME
+ _ZN13QS60MainAppUiD2Ev @ 12960 NONAME
+ _ZN14QPaintEngineEx15drawRoundedRectERK6QRectFffN2Qt8SizeModeE @ 12961 NONAME
+ _ZN14QWidgetPrivate19navigateToDirectionENS_9DirectionE @ 12962 NONAME
+ _ZN14QWidgetPrivate19registerTouchWindowEv @ 12963 NONAME
+ _ZN14QWidgetPrivate27widgetInNavigationDirectionENS_9DirectionE @ 12964 NONAME
+ _ZN15QGraphicsLayout18addChildLayoutItemEP19QGraphicsLayoutItem @ 12965 NONAME
+ _ZN15QSoftKeyManager11qt_metacallEN11QMetaObject4CallEiPPv @ 12966 NONAME
+ _ZN15QSoftKeyManager11qt_metacastEPKc @ 12967 NONAME
+ _ZN15QSoftKeyManager12createActionENS_15StandardSoftKeyEP7QWidget @ 12968 NONAME
+ _ZN15QSoftKeyManager12sendKeyEventEv @ 12969 NONAME
+ _ZN15QSoftKeyManager13handleCommandEi @ 12970 NONAME
+ _ZN15QSoftKeyManager14updateSoftKeysEv @ 12971 NONAME
+ _ZN15QSoftKeyManager16staticMetaObjectE @ 12972 NONAME DATA 16
+ _ZN15QSoftKeyManager17createKeyedActionENS_15StandardSoftKeyEN2Qt3KeyEP7QWidget @ 12973 NONAME
+ _ZN15QSoftKeyManager19getStaticMetaObjectEv @ 12974 NONAME
+ _ZN15QSoftKeyManager19standardSoftKeyTextENS_15StandardSoftKeyE @ 12975 NONAME
+ _ZN15QSoftKeyManager5eventEP6QEvent @ 12976 NONAME
+ _ZN15QSoftKeyManager8instanceEv @ 12977 NONAME
+ _ZN15QSoftKeyManagerC1Ev @ 12978 NONAME
+ _ZN15QSoftKeyManagerC2Ev @ 12979 NONAME
+ _ZN16QS60MainDocument12CreateAppUiLEv @ 12980 NONAME
+ _ZN16QS60MainDocumentC1ER15CEikApplication @ 12981 NONAME
+ _ZN16QS60MainDocumentC2ER15CEikApplication @ 12982 NONAME
+ _ZN16QS60MainDocumentD0Ev @ 12983 NONAME
+ _ZN16QS60MainDocumentD1Ev @ 12984 NONAME
+ _ZN16QS60MainDocumentD2Ev @ 12985 NONAME
+ _ZN17QPixmapBlurFilter11setBlurHintENS_8BlurHintE @ 12986 NONAME
+ _ZN19QGraphicsBlurEffect11setBlurHintENS_8BlurHintE @ 12987 NONAME
+ _ZN19QGraphicsBlurEffect15blurHintChangedENS_8BlurHintE @ 12988 NONAME
+ _ZN19QS60MainApplication15CreateDocumentLEv @ 12989 NONAME
+ _ZN19QS60MainApplicationC1Ev @ 12990 NONAME
+ _ZN19QS60MainApplicationC2Ev @ 12991 NONAME
+ _ZN19QS60MainApplicationD0Ev @ 12992 NONAME
+ _ZN19QS60MainApplicationD1Ev @ 12993 NONAME
+ _ZN19QS60MainApplicationD2Ev @ 12994 NONAME
+ _ZN7QDialog19s60AdjustedPositionEv @ 12995 NONAME
+ _ZN7QDialog5eventEP6QEvent @ 12996 NONAME
+ _ZN7QPixmap19fromSymbianRSgImageEP8RSgImage @ 12997 NONAME
+ _ZNK15QSoftKeyManager10metaObjectEv @ 12998 NONAME
+ _ZNK17QPixmapBlurFilter8blurHintEv @ 12999 NONAME
+ _ZNK19QGraphicsBlurEffect8blurHintEv @ 13000 NONAME
+ _ZNK19QS60MainApplication16ResourceFileNameEv @ 13001 NONAME
+ _ZNK19QS60MainApplication9AppDllUidEv @ 13002 NONAME
+ _ZNK21QGraphicsAnchorLayout12hasConflictsEv @ 13003 NONAME
+ _ZNK7QPixmap17toSymbianRSgImageEv @ 13004 NONAME
+ _ZTI15QSoftKeyManager @ 13005 NONAME
+ _ZTV15QSoftKeyManager @ 13006 NONAME
+ _ZThn24_N13QS60MainAppUi12RestoreMenuLEP11CCoeControliN16MEikMenuObserver9TMenuTypeE @ 13007 NONAME
+ _ZThn24_N13QS60MainAppUi15DynInitMenuBarLEiP11CEikMenuBar @ 13008 NONAME
+ _ZThn24_N13QS60MainAppUi16DynInitMenuPaneLEiP12CEikMenuPane @ 13009 NONAME
+ _ZThn88_N13QS60MainAppUi26HandleStatusPaneSizeChangeEv @ 13010 NONAME
diff --git a/src/s60installs/eabi/QtMultimediau.def b/src/s60installs/eabi/QtMultimediau.def
index 6e5e8ba..fb89c0b 100644
--- a/src/s60installs/eabi/QtMultimediau.def
+++ b/src/s60installs/eabi/QtMultimediau.def
@@ -12,9 +12,9 @@ EXPORTS
_ZN11QAudioInput6resumeEv @ 11 NONAME
_ZN11QAudioInput7suspendEv @ 12 NONAME
_ZN11QAudioInputC1ERK12QAudioFormatP7QObject @ 13 NONAME
- _ZN11QAudioInputC1ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 14 NONAME
+ _ZN11QAudioInputC1ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 14 NONAME ABSENT
_ZN11QAudioInputC2ERK12QAudioFormatP7QObject @ 15 NONAME
- _ZN11QAudioInputC2ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 16 NONAME
+ _ZN11QAudioInputC2ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 16 NONAME ABSENT
_ZN11QAudioInputD0Ev @ 17 NONAME
_ZN11QAudioInputD1Ev @ 18 NONAME
_ZN11QAudioInputD2Ev @ 19 NONAME
@@ -23,7 +23,7 @@ EXPORTS
_ZN12QAudioFormat12setFrequencyEi @ 22 NONAME
_ZN12QAudioFormat13setSampleSizeEi @ 23 NONAME
_ZN12QAudioFormat13setSampleTypeENS_10SampleTypeE @ 24 NONAME
- _ZN12QAudioFormat8setCodecE7QString @ 25 NONAME
+ _ZN12QAudioFormat8setCodecE7QString @ 25 NONAME ABSENT
_ZN12QAudioFormatC1ERKS_ @ 26 NONAME
_ZN12QAudioFormatC1Ev @ 27 NONAME
_ZN12QAudioFormatC2ERKS_ @ 28 NONAME
@@ -44,30 +44,30 @@ EXPORTS
_ZN12QAudioOutput6resumeEv @ 43 NONAME
_ZN12QAudioOutput7suspendEv @ 44 NONAME
_ZN12QAudioOutputC1ERK12QAudioFormatP7QObject @ 45 NONAME
- _ZN12QAudioOutputC1ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 46 NONAME
+ _ZN12QAudioOutputC1ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 46 NONAME ABSENT
_ZN12QAudioOutputC2ERK12QAudioFormatP7QObject @ 47 NONAME
- _ZN12QAudioOutputC2ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 48 NONAME
+ _ZN12QAudioOutputC2ERK14QAudioDeviceIdRK12QAudioFormatP7QObject @ 48 NONAME ABSENT
_ZN12QAudioOutputD0Ev @ 49 NONAME
_ZN12QAudioOutputD1Ev @ 50 NONAME
_ZN12QAudioOutputD2Ev @ 51 NONAME
- _ZN14QAudioDeviceIdC1EP21QAudioDeviceIdPrivate @ 52 NONAME
- _ZN14QAudioDeviceIdC1ERKS_ @ 53 NONAME
- _ZN14QAudioDeviceIdC1Ev @ 54 NONAME
- _ZN14QAudioDeviceIdC2EP21QAudioDeviceIdPrivate @ 55 NONAME
- _ZN14QAudioDeviceIdC2ERKS_ @ 56 NONAME
- _ZN14QAudioDeviceIdC2Ev @ 57 NONAME
- _ZN14QAudioDeviceIdD1Ev @ 58 NONAME
- _ZN14QAudioDeviceIdD2Ev @ 59 NONAME
- _ZN14QAudioDeviceIdaSERKS_ @ 60 NONAME
+ _ZN14QAudioDeviceIdC1EP21QAudioDeviceIdPrivate @ 52 NONAME ABSENT
+ _ZN14QAudioDeviceIdC1ERKS_ @ 53 NONAME ABSENT
+ _ZN14QAudioDeviceIdC1Ev @ 54 NONAME ABSENT
+ _ZN14QAudioDeviceIdC2EP21QAudioDeviceIdPrivate @ 55 NONAME ABSENT
+ _ZN14QAudioDeviceIdC2ERKS_ @ 56 NONAME ABSENT
+ _ZN14QAudioDeviceIdC2Ev @ 57 NONAME ABSENT
+ _ZN14QAudioDeviceIdD1Ev @ 58 NONAME ABSENT
+ _ZN14QAudioDeviceIdD2Ev @ 59 NONAME ABSENT
+ _ZN14QAudioDeviceIdaSERKS_ @ 60 NONAME ABSENT
_ZN16QAudioDeviceInfo10deviceListEN6QAudio4ModeE @ 61 NONAME
- _ZN16QAudioDeviceInfo11qt_metacallEN11QMetaObject4CallEiPPv @ 62 NONAME
- _ZN16QAudioDeviceInfo11qt_metacastEPKc @ 63 NONAME
- _ZN16QAudioDeviceInfo16staticMetaObjectE @ 64 NONAME DATA 16
+ _ZN16QAudioDeviceInfo11qt_metacallEN11QMetaObject4CallEiPPv @ 62 NONAME ABSENT
+ _ZN16QAudioDeviceInfo11qt_metacastEPKc @ 63 NONAME ABSENT
+ _ZN16QAudioDeviceInfo16staticMetaObjectE @ 64 NONAME DATA 16 ABSENT
_ZN16QAudioDeviceInfo18defaultInputDeviceEv @ 65 NONAME
_ZN16QAudioDeviceInfo19defaultOutputDeviceEv @ 66 NONAME
- _ZN16QAudioDeviceInfoC1ERK14QAudioDeviceIdP7QObject @ 67 NONAME
- _ZN16QAudioDeviceInfoC2ERK14QAudioDeviceIdP7QObject @ 68 NONAME
- _ZN16QAudioDeviceInfoD0Ev @ 69 NONAME
+ _ZN16QAudioDeviceInfoC1ERK14QAudioDeviceIdP7QObject @ 67 NONAME ABSENT
+ _ZN16QAudioDeviceInfoC2ERK14QAudioDeviceIdP7QObject @ 68 NONAME ABSENT
+ _ZN16QAudioDeviceInfoD0Ev @ 69 NONAME ABSENT
_ZN16QAudioDeviceInfoD1Ev @ 70 NONAME
_ZN16QAudioDeviceInfoD2Ev @ 71 NONAME
_ZN18QAudioEnginePlugin11qt_metacallEN11QMetaObject4CallEiPPv @ 72 NONAME
@@ -119,11 +119,11 @@ EXPORTS
_ZNK12QAudioOutput6formatEv @ 118 NONAME
_ZNK12QAudioOutput9bytesFreeEv @ 119 NONAME
_ZNK12QAudioOutput9totalTimeEv @ 120 NONAME
- _ZNK14QAudioDeviceId6isNullEv @ 121 NONAME
- _ZNK14QAudioDeviceIdeqERKS_ @ 122 NONAME
- _ZNK14QAudioDeviceIdneERKS_ @ 123 NONAME
+ _ZNK14QAudioDeviceId6isNullEv @ 121 NONAME ABSENT
+ _ZNK14QAudioDeviceIdeqERKS_ @ 122 NONAME ABSENT
+ _ZNK14QAudioDeviceIdneERKS_ @ 123 NONAME ABSENT
_ZNK16QAudioDeviceInfo10deviceNameEv @ 124 NONAME
- _ZNK16QAudioDeviceInfo10metaObjectEv @ 125 NONAME
+ _ZNK16QAudioDeviceInfo10metaObjectEv @ 125 NONAME ABSENT
_ZNK16QAudioDeviceInfo13nearestFormatERK12QAudioFormat @ 126 NONAME
_ZNK16QAudioDeviceInfo15preferredFormatEv @ 127 NONAME
_ZNK16QAudioDeviceInfo15supportedCodecsEv @ 128 NONAME
@@ -139,7 +139,7 @@ EXPORTS
_ZNK24QAbstractAudioDeviceInfo10metaObjectEv @ 138 NONAME
_ZTI11QAudioInput @ 139 NONAME
_ZTI12QAudioOutput @ 140 NONAME
- _ZTI16QAudioDeviceInfo @ 141 NONAME
+ _ZTI16QAudioDeviceInfo @ 141 NONAME ABSENT
_ZTI18QAudioEnginePlugin @ 142 NONAME
_ZTI19QAbstractAudioInput @ 143 NONAME
_ZTI20QAbstractAudioOutput @ 144 NONAME
@@ -147,15 +147,15 @@ EXPORTS
_ZTI28QAudioEngineFactoryInterface @ 146 NONAME
_ZTV11QAudioInput @ 147 NONAME
_ZTV12QAudioOutput @ 148 NONAME
- _ZTV16QAudioDeviceInfo @ 149 NONAME
+ _ZTV16QAudioDeviceInfo @ 149 NONAME ABSENT
_ZTV18QAudioEnginePlugin @ 150 NONAME
_ZTV19QAbstractAudioInput @ 151 NONAME
_ZTV20QAbstractAudioOutput @ 152 NONAME
_ZTV24QAbstractAudioDeviceInfo @ 153 NONAME
_ZThn8_N18QAudioEnginePluginD0Ev @ 154 NONAME
_ZThn8_N18QAudioEnginePluginD1Ev @ 155 NONAME
- _ZlsR11QDataStreamRK14QAudioDeviceId @ 156 NONAME
- _ZrsR11QDataStreamR14QAudioDeviceId @ 157 NONAME
+ _ZlsR11QDataStreamRK14QAudioDeviceId @ 156 NONAME ABSENT
+ _ZrsR11QDataStreamR14QAudioDeviceId @ 157 NONAME ABSENT
_ZN11QAudioInput19getStaticMetaObjectEv @ 158 NONAME
_ZN11QVideoFrame10setEndTimeEx @ 159 NONAME
_ZN11QVideoFrame12setFieldTypeENS_9FieldTypeE @ 160 NONAME
@@ -179,7 +179,7 @@ EXPORTS
_ZN11QVideoFrameD2Ev @ 178 NONAME
_ZN11QVideoFrameaSERKS_ @ 179 NONAME
_ZN12QAudioOutput19getStaticMetaObjectEv @ 180 NONAME
- _ZN16QAudioDeviceInfo19getStaticMetaObjectEv @ 181 NONAME
+ _ZN16QAudioDeviceInfo19getStaticMetaObjectEv @ 181 NONAME ABSENT
_ZN17QImageVideoBuffer3mapEN20QAbstractVideoBuffer7MapModeEPiS2_ @ 182 NONAME
_ZN17QImageVideoBuffer5unmapEv @ 183 NONAME
_ZN17QImageVideoBufferC1ERK6QImage @ 184 NONAME
@@ -288,4 +288,20 @@ EXPORTS
_ZTV20QAbstractVideoBuffer @ 287 NONAME ; #<VT>#
_ZTV21QAbstractVideoSurface @ 288 NONAME ; #<VT>#
_Zls6QDebugRK19QVideoSurfaceFormat @ 289 NONAME
+ _ZN11QAudioInputC1ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject @ 290 NONAME
+ _ZN11QAudioInputC2ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject @ 291 NONAME
+ _ZN12QAudioFormat8setCodecERK7QString @ 292 NONAME
+ _ZN12QAudioOutputC1ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject @ 293 NONAME
+ _ZN12QAudioOutputC2ERK16QAudioDeviceInfoRK12QAudioFormatP7QObject @ 294 NONAME
+ _ZN16QAudioDeviceInfoC1ERK7QStringRK10QByteArrayN6QAudio4ModeE @ 295 NONAME
+ _ZN16QAudioDeviceInfoC1ERKS_ @ 296 NONAME
+ _ZN16QAudioDeviceInfoC1Ev @ 297 NONAME
+ _ZN16QAudioDeviceInfoC2ERK7QStringRK10QByteArrayN6QAudio4ModeE @ 298 NONAME
+ _ZN16QAudioDeviceInfoC2ERKS_ @ 299 NONAME
+ _ZN16QAudioDeviceInfoC2Ev @ 300 NONAME
+ _ZN16QAudioDeviceInfoaSERKS_ @ 301 NONAME
+ _ZNK16QAudioDeviceInfo4modeEv @ 302 NONAME
+ _ZNK16QAudioDeviceInfo5realmEv @ 303 NONAME
+ _ZNK16QAudioDeviceInfo6handleEv @ 304 NONAME
+ _ZNK16QAudioDeviceInfo6isNullEv @ 305 NONAME
diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def
index bd026e0..5188872 100644
--- a/src/s60installs/eabi/QtNetworku.def
+++ b/src/s60installs/eabi/QtNetworku.def
@@ -255,11 +255,11 @@ EXPORTS
_ZN14QNetworkCookie9setDomainERK7QString @ 254 NONAME
_ZN14QNetworkCookie9setSecureEb @ 255 NONAME
_ZN14QNetworkCookieC1ERK10QByteArray @ 256 NONAME ABSENT
- _ZN14QNetworkCookieC1ERK10QByteArrayS2_ @ 257 NONAME ABSENT
+ _ZN14QNetworkCookieC1ERK10QByteArrayS2_ @ 257 NONAME
_ZN14QNetworkCookieC1ERKS_ @ 258 NONAME
_ZN14QNetworkCookieC1Ev @ 259 NONAME ABSENT
_ZN14QNetworkCookieC2ERK10QByteArray @ 260 NONAME ABSENT
- _ZN14QNetworkCookieC2ERK10QByteArrayS2_ @ 261 NONAME ABSENT
+ _ZN14QNetworkCookieC2ERK10QByteArrayS2_ @ 261 NONAME
_ZN14QNetworkCookieC2ERKS_ @ 262 NONAME
_ZN14QNetworkCookieC2Ev @ 263 NONAME ABSENT
_ZN14QNetworkCookieD1Ev @ 264 NONAME
@@ -1390,8 +1390,8 @@ EXPORTS
_ZN5QHttp19getStaticMetaObjectEv @ 1389 NONAME
_ZNK17QHttpNetworkReply16isPipeliningUsedEv @ 1390 NONAME
_ZNK19QHttpNetworkRequest19isPipeliningAllowedEv @ 1391 NONAME
- _ZTI24QNetworkReplyImplPrivate @ 1392 NONAME ; #<TI>#
- _ZTI29QHttpNetworkConnectionChannel @ 1393 NONAME ; #<TI>#
- _ZTV24QNetworkReplyImplPrivate @ 1394 NONAME ; #<VT>#
- _ZTV29QHttpNetworkConnectionChannel @ 1395 NONAME ; #<VT>#
+ _ZTI24QNetworkReplyImplPrivate @ 1392 NONAME ABSENT; #<TI>#
+ _ZTI29QHttpNetworkConnectionChannel @ 1393 NONAME ABSENT; #<TI>#
+ _ZTV24QNetworkReplyImplPrivate @ 1394 NONAME ABSENT; #<VT>#
+ _ZTV29QHttpNetworkConnectionChannel @ 1395 NONAME ABSENT; #<VT>#
diff --git a/src/s60installs/eabi/QtSqlu.def b/src/s60installs/eabi/QtSqlu.def
index 0dbfc55..99f0d00 100644
--- a/src/s60installs/eabi/QtSqlu.def
+++ b/src/s60installs/eabi/QtSqlu.def
@@ -232,7 +232,7 @@ EXPORTS
_ZN9QSqlField8setValueERK8QVariant @ 231 NONAME
_ZN9QSqlField9setLengthEi @ 232 NONAME
_ZN9QSqlFieldC1ERK7QString @ 233 NONAME ABSENT
- _ZN9QSqlFieldC1ERK7QStringN8QVariant4TypeE @ 234 NONAME ABSENT
+ _ZN9QSqlFieldC1ERK7QStringN8QVariant4TypeE @ 234 NONAME
_ZN9QSqlFieldC1ERKS_ @ 235 NONAME
_ZN9QSqlFieldC1Ev @ 236 NONAME ABSENT
_ZN9QSqlFieldC2ERK7QString @ 237 NONAME ABSENT
diff --git a/src/s60installs/eabi/QtSvgu.def b/src/s60installs/eabi/QtSvgu.def
index 4dd3da5..838b68c 100644
--- a/src/s60installs/eabi/QtSvgu.def
+++ b/src/s60installs/eabi/QtSvgu.def
@@ -209,6 +209,6 @@ EXPORTS
_ZN16QSvgTinyDocument13addNamedStyleERK7QStringP21QSvgFillStyleProperty @ 208 NONAME
_ZNK16QSvgTinyDocument10namedStyleERK7QString @ 209 NONAME
_ZNK16QSvgTinyDocument9namedNodeERK7QString @ 210 NONAME
- _ZTI21QSvgFillStyleProperty @ 211 NONAME ; #<TI>#
- _ZTV21QSvgFillStyleProperty @ 212 NONAME ; #<VT>#
+ _ZTI21QSvgFillStyleProperty @ 211 NONAME ABSENT; #<TI>#
+ _ZTV21QSvgFillStyleProperty @ 212 NONAME ABSENT; #<VT>#
diff --git a/src/s60installs/eabi/QtTestu.def b/src/s60installs/eabi/QtTestu.def
index ea1b3e1..56f84ec 100644
--- a/src/s60installs/eabi/QtTestu.def
+++ b/src/s60installs/eabi/QtTestu.def
@@ -81,24 +81,24 @@ EXPORTS
_ZN5QTest29QBenchmarkIterationControllerC1ENS0_7RunModeE @ 80 NONAME
_ZN5QTest29QBenchmarkIterationControllerC2ENS0_7RunModeE @ 81 NONAME
_ZN14QTestEventLoop19getStaticMetaObjectEv @ 82 NONAME
- _ZTI11QTestLogger @ 83 NONAME ; #<TI>#
- _ZTI12QTestElement @ 84 NONAME ; #<TI>#
- _ZTI13QTestCoreListI12QTestElementE @ 85 NONAME ; #<TI>#
- _ZTI13QTestCoreListI21QTestElementAttributeE @ 86 NONAME ; #<TI>#
- _ZTI16QTestCoreElementI12QTestElementE @ 87 NONAME ; #<TI>#
- _ZTI16QTestXmlStreamer @ 88 NONAME ; #<TI>#
- _ZTI18QTestBasicStreamer @ 89 NONAME ; #<TI>#
- _ZTI18QTestXunitStreamer @ 90 NONAME ; #<TI>#
- _ZTI21QTestElementAttribute @ 91 NONAME ; #<TI>#
- _ZTI21QTestLightXmlStreamer @ 92 NONAME ; #<TI>#
- _ZTV11QTestLogger @ 93 NONAME ; #<VT>#
- _ZTV12QTestElement @ 94 NONAME ; #<VT>#
- _ZTV13QTestCoreListI12QTestElementE @ 95 NONAME ; #<VT>#
- _ZTV13QTestCoreListI21QTestElementAttributeE @ 96 NONAME ; #<VT>#
- _ZTV16QTestCoreElementI12QTestElementE @ 97 NONAME ; #<VT>#
- _ZTV16QTestXmlStreamer @ 98 NONAME ; #<VT>#
- _ZTV18QTestBasicStreamer @ 99 NONAME ; #<VT>#
- _ZTV18QTestXunitStreamer @ 100 NONAME ; #<VT>#
- _ZTV21QTestElementAttribute @ 101 NONAME ; #<VT>#
- _ZTV21QTestLightXmlStreamer @ 102 NONAME ; #<VT>#
+ _ZTI11QTestLogger @ 83 NONAME ABSENT ; #<TI>#
+ _ZTI12QTestElement @ 84 NONAME ABSENT; #<TI>#
+ _ZTI13QTestCoreListI12QTestElementE @ 85 NONAME ABSENT; #<TI>#
+ _ZTI13QTestCoreListI21QTestElementAttributeE @ 86 NONAME ABSENT; #<TI>#
+ _ZTI16QTestCoreElementI12QTestElementE @ 87 NONAME ABSENT; #<TI>#
+ _ZTI16QTestXmlStreamer @ 88 NONAME ABSENT; #<TI>#
+ _ZTI18QTestBasicStreamer @ 89 NONAME ABSENT; #<TI>#
+ _ZTI18QTestXunitStreamer @ 90 NONAME ABSENT; #<TI>#
+ _ZTI21QTestElementAttribute @ 91 NONAME ABSENT; #<TI>#
+ _ZTI21QTestLightXmlStreamer @ 92 NONAME ABSENT; #<TI>#
+ _ZTV11QTestLogger @ 93 NONAME ABSENT; #<VT>#
+ _ZTV12QTestElement @ 94 NONAME ABSENT; #<VT>#
+ _ZTV13QTestCoreListI12QTestElementE @ 95 NONAME ABSENT; #<VT>#
+ _ZTV13QTestCoreListI21QTestElementAttributeE @ 96 NONAME ABSENT; #<VT>#
+ _ZTV16QTestCoreElementI12QTestElementE @ 97 NONAME ABSENT; #<VT>#
+ _ZTV16QTestXmlStreamer @ 98 NONAME ABSENT; #<VT>#
+ _ZTV18QTestBasicStreamer @ 99 NONAME ABSENT; #<VT>#
+ _ZTV18QTestXunitStreamer @ 100 NONAME ABSENT; #<VT>#
+ _ZTV21QTestElementAttribute @ 101 NONAME ABSENT; #<VT>#
+ _ZTV21QTestLightXmlStreamer @ 102 NONAME ABSENT; #<VT>#
diff --git a/selfsigned.cer b/src/s60installs/selfsigned.cer
index af72449..af72449 100644
--- a/selfsigned.cer
+++ b/src/s60installs/selfsigned.cer
diff --git a/selfsigned.key b/src/s60installs/selfsigned.key
index 47c51a0..47c51a0 100644
--- a/selfsigned.key
+++ b/src/s60installs/selfsigned.key
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 78bbf5f..ee25239 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -2353,7 +2353,7 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
//build a frame
JSC::CallFrame *newCallFrame = exec;
if (callee == 0 //called from public QScriptEngine::pushContext
- || exec->returnPC() == 0 || (contextFlags(exec) & NativeContext) //called from native-native call
+ || exec->returnPC() == 0 || (contextFlags(exec) & NativeContext) //called from native-native call
|| (exec->codeBlock() && exec->callee() != callee)) { //the interpreter did not build a frame for us.
//We need to check if the Interpreter might have already created a frame for function called from JS.
JSC::Interpreter *interp = exec->interpreter();
@@ -2369,7 +2369,7 @@ JSC::CallFrame *QScriptEnginePrivate::pushContext(JSC::CallFrame *exec, JSC::JSV
for (it = args.begin(); it != args.end(); ++it)
newCallFrame[++dst] = *it;
newCallFrame += argc + JSC::RegisterFile::CallFrameHeaderSize;
- newCallFrame->init(0, /*vPC=*/0, exec->scopeChain(), exec, flags, argc, callee);
+ newCallFrame->init(0, /*vPC=*/0, exec->scopeChain(), exec, flags | ShouldRestoreCallFrame, argc, callee);
} else {
setContextFlags(newCallFrame, flags);
#if ENABLE(JIT)
@@ -2411,18 +2411,19 @@ void QScriptEngine::popContext()
*/
void QScriptEnginePrivate::popContext()
{
- bool hasScope = contextFlags(currentFrame) & HasScopeContext;
- if (currentFrame->returnPC() == 0) { //normal case
+ uint flags = contextFlags(currentFrame);
+ bool hasScope = flags & HasScopeContext;
+ if (flags & ShouldRestoreCallFrame) { //normal case
JSC::RegisterFile &registerFile = currentFrame->interpreter()->registerFile();
JSC::Register *const newEnd = currentFrame->registers() - JSC::RegisterFile::CallFrameHeaderSize - currentFrame->argumentCount();
if (hasScope)
currentFrame->scopeChain()->pop()->deref();
- currentFrame = currentFrame->callerFrame();
registerFile.shrink(newEnd);
} else if(hasScope) { //the stack frame was created by the Interpreter, we don't need to rewind it.
currentFrame->setScopeChain(currentFrame->scopeChain()->pop());
currentFrame->scopeChain()->deref();
}
+ currentFrame = currentFrame->callerFrame();
}
/*!
diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
index c43ca61..b8b805e 100644
--- a/src/script/api/qscriptengine_p.h
+++ b/src/script/api/qscriptengine_p.h
@@ -170,7 +170,8 @@ public:
enum ContextFlags {
NativeContext = 1,
CalledAsConstructorContext = 2,
- HasScopeContext = 4
+ HasScopeContext = 4, // Specifies that the is a QScriptActivationObject
+ ShouldRestoreCallFrame = 8
};
static uint contextFlags(JSC::ExecState *);
static void setContextFlags(JSC::ExecState *, uint);
diff --git a/src/script/bridge/qscriptactivationobject.cpp b/src/script/bridge/qscriptactivationobject.cpp
index 7982982..edccb3e 100644
--- a/src/script/bridge/qscriptactivationobject.cpp
+++ b/src/script/bridge/qscriptactivationobject.cpp
@@ -46,7 +46,7 @@
namespace JSC
{
- ASSERT_CLASS_FITS_IN_CELL(QScript::QScriptActivationObject);
+ ASSERT_CLASS_FITS_IN_CELL(QT_PREPEND_NAMESPACE(QScript::QScriptActivationObject));
}
QT_BEGIN_NAMESPACE
diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp
index 5f419ff..d3767bf 100644
--- a/src/script/bridge/qscriptfunction.cpp
+++ b/src/script/bridge/qscriptfunction.cpp
@@ -55,8 +55,8 @@
namespace JSC
{
-ASSERT_CLASS_FITS_IN_CELL(QScript::FunctionWrapper);
-ASSERT_CLASS_FITS_IN_CELL(QScript::FunctionWithArgWrapper);
+ASSERT_CLASS_FITS_IN_CELL(QT_PREPEND_NAMESPACE(QScript::FunctionWrapper));
+ASSERT_CLASS_FITS_IN_CELL(QT_PREPEND_NAMESPACE(QScript::FunctionWithArgWrapper));
}
QT_BEGIN_NAMESPACE
diff --git a/src/script/bridge/qscriptobject.cpp b/src/script/bridge/qscriptobject.cpp
index 0d899f8..55644fe 100644
--- a/src/script/bridge/qscriptobject.cpp
+++ b/src/script/bridge/qscriptobject.cpp
@@ -46,8 +46,8 @@
namespace JSC
{
//QT_USE_NAMESPACE
-ASSERT_CLASS_FITS_IN_CELL(QScriptObject);
-ASSERT_CLASS_FITS_IN_CELL(QScriptObjectPrototype);
+ASSERT_CLASS_FITS_IN_CELL(QT_PREPEND_NAMESPACE(QScriptObject));
+ASSERT_CLASS_FITS_IN_CELL(QT_PREPEND_NAMESPACE(QScriptObjectPrototype));
}
QT_BEGIN_NAMESPACE
diff --git a/src/scripttools/debugging/qscriptbreakpointswidget.cpp b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
index 55479a3..356c6d5 100644
--- a/src/scripttools/debugging/qscriptbreakpointswidget.cpp
+++ b/src/scripttools/debugging/qscriptbreakpointswidget.cpp
@@ -306,13 +306,17 @@ QScriptBreakpointsWidget::QScriptBreakpointsWidget(QWidget *parent)
QObject::connect(d->deleteBreakpointAction, SIGNAL(triggered()),
this, SLOT(_q_deleteBreakpoint()));
+#ifndef QT_NO_TOOLBAR
QToolBar *toolBar = new QToolBar();
toolBar->addAction(newBreakpointAction);
toolBar->addAction(d->deleteBreakpointAction);
+#endif
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(0);
+#ifndef QT_NO_TOOLBAR
vbox->addWidget(toolBar);
+#endif
vbox->addWidget(d->newBreakpointWidget);
vbox->addWidget(d->view);
}
diff --git a/src/scripttools/debugging/qscriptdebugger.cpp b/src/scripttools/debugging/qscriptdebugger.cpp
index 6a23bd1..c09e494 100644
--- a/src/scripttools/debugging/qscriptdebugger.cpp
+++ b/src/scripttools/debugging/qscriptdebugger.cpp
@@ -1927,6 +1927,7 @@ QMenu *QScriptDebugger::createStandardMenu(QWidget *widgetParent, QObject *actio
return menu;
}
+#ifndef QT_NO_TOOLBAR
QToolBar *QScriptDebugger::createStandardToolBar(QWidget *widgetParent, QObject *actionParent)
{
QToolBar *tb = new QToolBar(widgetParent);
@@ -1942,6 +1943,7 @@ QToolBar *QScriptDebugger::createStandardToolBar(QWidget *widgetParent, QObject
tb->addAction(action(FindInScriptAction, actionParent));
return tb;
}
+#endif
bool QScriptDebugger::isInteractive() const
{
diff --git a/src/scripttools/debugging/qscriptdebugger_p.h b/src/scripttools/debugging/qscriptdebugger_p.h
index 57758de..08e9a99 100644
--- a/src/scripttools/debugging/qscriptdebugger_p.h
+++ b/src/scripttools/debugging/qscriptdebugger_p.h
@@ -71,7 +71,9 @@ class QScriptDebuggerWidgetFactoryInterface;
class QAction;
class QEvent;
class QMenu;
+#ifndef QT_NO_TOOLBAR
class QToolBar;
+#endif
class QScriptDebuggerPrivate;
class Q_AUTOTEST_EXPORT QScriptDebugger : public QObject
@@ -168,8 +170,9 @@ public:
QAction *clearErrorLogAction(QObject *parent) const;
QMenu *createStandardMenu(QWidget *widgetParent, QObject *actionParent);
+#ifndef QT_NO_TOOLBAR
QToolBar *createStandardToolBar(QWidget *widgetParent, QObject *actionParent);
-
+#endif
bool eventFilter(QObject *, QEvent *e);
bool isInteractive() const;
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index 8615232..7456da0 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -251,7 +251,9 @@ public:
QScriptDebugger *debugger;
QScriptEngineDebuggerFrontend *frontend;
+#ifndef QT_NO_MAINWINDOW
QMainWindow *standardWindow;
+#endif
bool autoShow;
static QtScriptDebuggerResourceInitializer resourceInitializer;
@@ -294,7 +296,9 @@ QScriptEngineDebuggerPrivate::QScriptEngineDebuggerPrivate()
{
debugger = 0;
frontend = 0;
+#ifndef QT_NO_MAINWINDOW
standardWindow = 0;
+#endif
autoShow = true;
}
@@ -302,6 +306,7 @@ QScriptEngineDebuggerPrivate::~QScriptEngineDebuggerPrivate()
{
delete debugger;
delete frontend;
+#ifndef QT_NO_MAINWINDOW
if (standardWindow) {
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
QByteArray geometry = standardWindow->saveGeometry();
@@ -311,14 +316,17 @@ QScriptEngineDebuggerPrivate::~QScriptEngineDebuggerPrivate()
if (standardWindow->parent() == 0)
delete standardWindow;
}
+#endif
}
+#ifndef QT_NO_MAINWINDOW
void QScriptEngineDebuggerPrivate::_q_showStandardWindow()
{
Q_Q(QScriptEngineDebugger);
(void)q->standardWindow(); // ensure it's created
standardWindow->show();
}
+#endif
void QScriptEngineDebuggerPrivate::createDebugger()
{
@@ -499,6 +507,7 @@ void QScriptEngineDebugger::setAutoShowStandardWindow(bool autoShow)
\sa createStandardMenu(), createStandardToolBar()
*/
+#ifndef QT_NO_MAINWINDOW
QMainWindow *QScriptEngineDebugger::standardWindow() const
{
Q_D(const QScriptEngineDebugger);
@@ -602,6 +611,7 @@ QMainWindow *QScriptEngineDebugger::standardWindow() const
const_cast<QScriptEngineDebuggerPrivate*>(d)->standardWindow = win;
return win;
}
+#endif // QT_NO_MAINWINDOW
/*!
Creates a standard debugger menu with the given \a parent.
@@ -622,12 +632,14 @@ QMenu *QScriptEngineDebugger::createStandardMenu(QWidget *parent)
\sa createStandardMenu()
*/
+#ifndef QT_NO_TOOLBAR
QToolBar *QScriptEngineDebugger::createStandardToolBar(QWidget *parent)
{
Q_D(QScriptEngineDebugger);
d->createDebugger();
return d->debugger->createStandardToolBar(parent, this);
}
+#endif
/*!
\fn QScriptEngineDebugger::evaluationSuspended()
diff --git a/src/scripttools/debugging/qscriptenginedebugger.h b/src/scripttools/debugging/qscriptenginedebugger.h
index 44d77bd..1caba4a 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.h
+++ b/src/scripttools/debugging/qscriptenginedebugger.h
@@ -53,7 +53,9 @@ QT_MODULE(ScriptTools)
class QAction;
class QScriptEngine;
class QWidget;
+#ifndef QT_NO_MAINWINDOW
class QMainWindow;
+#endif
class QMenu;
class QToolBar;
@@ -106,7 +108,9 @@ public:
bool autoShowStandardWindow() const;
void setAutoShowStandardWindow(bool autoShow);
+#ifndef QT_NO_MAINWINDOW
QMainWindow *standardWindow() const;
+#endif
QToolBar *createStandardToolBar(QWidget *parent = 0);
QMenu *createStandardMenu(QWidget *parent = 0);
diff --git a/src/src.pro b/src/src.pro
index 240e1f7..238f534 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -129,6 +129,7 @@ src_webkit.target = sub-webkit
src_plugins.depends += src_dbus
src_phonon.depends += src_dbus
}
+ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): src_plugins.depends += src_opengl
}
!symbian {
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 3392ed7..eb4dee1 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -734,9 +734,10 @@ QT_BEGIN_NAMESPACE
\sa QTest::qSleep()
*/
-/*! \fn void QTest::qWaitForWindowManager(QWidget *window)
+/*! \fn void QTest::qWaitForWindowShown(QWidget *window)
+ \since 4.6
- Waits until the window is shown in the screen. This is mainly useful for
+ Waits until the \a window is shown in the screen. This is mainly useful for
asynchronous systems like X11, where a window will be mapped to screen some
time after being asked to show itself on the screen.
@@ -1517,10 +1518,14 @@ FatalSignalHandler::FatalSignalHandler()
for (int i = 0; fatalSignals[i]; ++i) {
sigaction(fatalSignals[i], &act, &oldact);
+#ifndef Q_WS_QWS
// Don't overwrite any non-default handlers
+ // however, we need to replace the default QWS handlers
if (oldact.sa_flags & SA_SIGINFO || oldact.sa_handler != SIG_DFL) {
sigaction(fatalSignals[i], &oldact, 0);
- } else {
+ } else
+#endif
+ {
sigaddset(&handledSignals, fatalSignals[i]);
}
}
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index a2e1407..9321e19 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -11,14 +11,7 @@ TEMPLATE = subdirs
moc \
uic \
uic3
-
-SUBDIRS += \
- collections \
- exceptionsafety \
- mediaobject \
-# mediaobject_wince_ds9 \ This is Windows CE only (we test the second phonon backend ds9 here)
- modeltest \
- networkselftest \
+Q3SUBDIRS += \
q3accel \
q3action \
q3actiongroup \
@@ -38,6 +31,7 @@ SUBDIRS += \
q3hbox \
q3header \
q3iconview \
+ q3listbox \
q3listview \
q3listviewitemiterator \
q3mainwindow \
@@ -64,7 +58,15 @@ SUBDIRS += \
q3toolbar \
q3urloperator \
q3valuelist \
- q3valuevector \
+ q3valuevector
+
+SUBDIRS += \
+ collections \
+ exceptionsafety \
+ mediaobject \
+# mediaobject_wince_ds9 \ This is Windows CE only (we test the second phonon backend ds9 here)
+ modeltest \
+ networkselftest \
qabstractbutton \
qabstractitemmodel \
qabstractitemview \
@@ -195,7 +197,6 @@ SUBDIRS += \
qline \
qlineedit \
qlist \
- q3listbox \
qlistview \
qlistwidget \
qlocale \
@@ -397,6 +398,8 @@ SUBDIRS += \
symbols \
qrand \
utf8
+
+!wince*:SUBDIRS += $$Q3SUBDIRS
contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter
mac: {
@@ -404,7 +407,8 @@ mac: {
macplist \
qaccessibility_mac
}
-embedded: {
+
+embedded:!wince* {
SUBDIRS += qcopchannel \
qdirectpainter \
qmultiscreen
diff --git a/tests/auto/networkselftest/networkselftest.pro b/tests/auto/networkselftest/networkselftest.pro
index ac610de..b0d537a 100644
--- a/tests/auto/networkselftest/networkselftest.pro
+++ b/tests/auto/networkselftest/networkselftest.pro
@@ -3,3 +3,18 @@ load(qttest_p4)
SOURCES += tst_networkselftest.cpp
QT = core network
+wince*: {
+ addFiles.sources = rfc3252.txt
+ addFiles.path = .
+ DEPLOYMENT = addFiles
+ DEFINES += SRCDIR=\\\"\\\"
+} else:symbian* {
+ addFiles.sources = rfc3252.txt
+ addFiles.path = .
+ DEPLOYMENT = addFiles
+} else:vxworks*: {
+ DEFINES += SRCDIR=\\\"\\\"
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
+}
+
diff --git a/tests/auto/networkselftest/rfc3252.txt b/tests/auto/networkselftest/rfc3252.txt
new file mode 100644
index 0000000..b80c61b
--- /dev/null
+++ b/tests/auto/networkselftest/rfc3252.txt
@@ -0,0 +1,899 @@
+
+
+
+
+
+
+Network Working Group H. Kennedy
+Request for Comments: 3252 Mimezine
+Category: Informational 1 April 2002
+
+
+ Binary Lexical Octet Ad-hoc Transport
+
+Status of this Memo
+
+ This memo provides information for the Internet community. It does
+ not specify an Internet standard of any kind. Distribution of this
+ memo is unlimited.
+
+Copyright Notice
+
+ Copyright (C) The Internet Society (2002). All Rights Reserved.
+
+Abstract
+
+ This document defines a reformulation of IP and two transport layer
+ protocols (TCP and UDP) as XML applications.
+
+1. Introduction
+
+1.1. Overview
+
+ This document describes the Binary Lexical Octet Ad-hoc Transport
+ (BLOAT): a reformulation of a widely-deployed network-layer protocol
+ (IP [RFC791]), and two associated transport layer protocols (TCP
+ [RFC793] and UDP [RFC768]) as XML [XML] applications. It also
+ describes methods for transporting BLOAT over Ethernet and IEEE 802
+ networks as well as encapsulating BLOAT in IP for gatewaying BLOAT
+ across the public Internet.
+
+1.2. Motivation
+
+ The wild popularity of XML as a basis for application-level protocols
+ such as the Blocks Extensible Exchange Protocol [RFC3080], the Simple
+ Object Access Protocol [SOAP], and Jabber [JABBER] prompted
+ investigation into the possibility of extending the use of XML in the
+ protocol stack. Using XML at both the transport and network layer in
+ addition to the application layer would provide for an amazing amount
+ of power and flexibility while removing dependencies on proprietary
+ and hard-to-understand binary protocols. This protocol unification
+ would also allow applications to use a single XML parser for all
+ aspects of their operation, eliminating developer time spent figuring
+ out the intricacies of each new protocol, and moving the hard work of
+
+
+
+
+Kennedy Informational [Page 1]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ parsing to the XML toolset. The use of XML also mitigates concerns
+ over "network vs. host" byte ordering which is at the root of many
+ network application bugs.
+
+1.3. Relation to Existing Protocols
+
+ The reformulations specified in this RFC follow as closely as
+ possible the spirit of the RFCs on which they are based, and so MAY
+ contain elements or attributes that would not be needed in a pure
+ reworking (e.g. length attributes, which are implicit in XML.)
+
+ The layering of network and transport protocols are maintained in
+ this RFC despite the optimizations that could be made if the line
+ were somewhat blurred (i.e. merging TCP and IP into a single, larger
+ element in the DTD) in order to foster future use of this protocol as
+ a basis for reformulating other protocols (such as ICMP.)
+
+ Other than the encoding, the behavioral aspects of each of the
+ existing protocols remain unchanged. Routing, address spaces, TCP
+ congestion control, etc. behave as specified in the extant standards.
+ Adapting to new standards and experimental algorithm heuristics for
+ improving performance will become much easier once the move to BLOAT
+ has been completed.
+
+1.4. Requirement Levels
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+ "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in BCP 14, RFC 2119
+ [RFC2119].
+
+2. IPoXML
+
+ This protocol MUST be implemented to be compliant with this RFC.
+ IPoXML is the root protocol REQUIRED for effective use of TCPoXML
+ (section 3.) and higher-level application protocols.
+
+ The DTD for this document type can be found in section 7.1.
+
+ The routing of IPoXML can be easily implemented on hosts with an XML
+ parser, as the regular structure lends itself handily to parsing and
+ validation of the document/datagram and then processing the
+ destination address, TTL, and checksum before sending it on to its
+ next-hop.
+
+ The reformulation of IPv4 was chosen over IPv6 [RFC2460] due to the
+ wider deployment of IPv4 and the fact that implementing IPv6 as XML
+ would have exceeded the 1500 byte Ethernet MTU.
+
+
+
+Kennedy Informational [Page 2]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ All BLOAT implementations MUST use - and specify - the UTF-8 encoding
+ of RFC 2279 [RFC2279]. All BLOAT document/datagrams MUST be well-
+ formed and include the XMLDecl.
+
+2.1. IP Description
+
+ A number of items have changed (for the better) from the original IP
+ specification. Bit-masks, where present have been converted into
+ human-readable values. IP addresses are listed in their dotted-
+ decimal notation [RFC1123]. Length and checksum values are present
+ as decimal integers.
+
+ To calculate the length and checksum fields of the IP element, a
+ canonicalized form of the element MUST be used. The canonical form
+ SHALL have no whitespace (including newline characters) between
+ elements and only one space character between attributes. There
+ SHALL NOT be a space following the last attribute in an element.
+
+ An iterative method SHOULD be used to calculate checksums, as the
+ length field will vary based on the size of the checksum.
+
+ The payload element bears special attention. Due to the character
+ set restrictions of XML, the payload of IP datagrams (which MAY
+ contain arbitrary data) MUST be encoded for transport. This RFC
+ REQUIRES the contents of the payload to be encoded in the base-64
+ encoding of RFC 2045 [RFC2045], but removes the requirement that the
+ encoded output MUST be wrapped on 76-character lines.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kennedy Informational [Page 3]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+2.2. Example Datagram
+
+ The following is an example IPoXML datagram with an empty payload:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
+ <ip>
+ <header length="474">
+ <version value="4"/>
+ <tos precedence="Routine" delay="Normal" throughput="Normal"
+ relibility="Normal" reserved="0"/>
+ <total.length value="461"/>
+ <id value="1"/>
+ <flags reserved="0" df="dont" mf="last"/>
+ <offset value="0"/>
+ <ttl value="255"/>
+ <protocol value="6"/>
+ <checksum value="8707"/>
+ <source address="10.0.0.22"/>
+ <destination address="10.0.0.1"/>
+ <options>
+ <end copied="0" class="0" number="0"/>
+ </options>
+ <padding pad="0"/>
+ </header>
+ <payload>
+ </payload>
+ </ip>
+
+3. TCPoXML
+
+ This protocol MUST be implemented to be compliant with this RFC. The
+ DTD for this document type can be found in section 7.2.
+
+3.1. TCP Description
+
+ A number of items have changed from the original TCP specification.
+ Bit-masks, where present have been converted into human-readable
+ values. Length and checksum and port values are present as decimal
+ integers.
+
+ To calculate the length and checksum fields of the TCP element, a
+ canonicalized form of the element MUST be used as in section 2.1.
+
+ An iterative method SHOULD be used to calculate checksums as in
+ section 2.1.
+
+ The payload element MUST be encoded as in section 2.1.
+
+
+
+Kennedy Informational [Page 4]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ The TCP offset element was expanded to a maximum of 255 from 16 to
+ allow for the increased size of the header in XML.
+
+ TCPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
+ as well as the <!DOCTYPE> declaration.
+
+3.2. Example Datagram
+
+ The following is an example TCPoXML datagram with an empty payload:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
+ <tcp>
+ <tcp.header>
+ <src port="31415"/>
+ <dest port="42424"/>
+ <sequence number="322622954"/>
+ <acknowledgement number="689715995"/>
+ <offset number=""/>
+ <reserved value="0"/>
+ <control syn="1" ack="1"/>
+ <window size="1"/>
+ <urgent pointer="0"/>
+ <checksum value="2988"/>
+ <tcp.options>
+ <tcp.end kind="0"/>
+ </tcp.options>
+ <padding pad="0"/>
+ </tcp.header>
+ <payload>
+ </payload>
+ </tcp>
+
+4. UDPoXML
+
+ This protocol MUST be implemented to be compliant with this RFC. The
+ DTD for this document type can be found in section 7.3.
+
+4.1. UDP Description
+
+ A number of items have changed from the original UDP specification.
+ Bit-masks, where present have been converted into human-readable
+ values. Length and checksum and port values are present as decimal
+ integers.
+
+
+
+
+
+
+
+Kennedy Informational [Page 5]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ To calculate the length and checksum fields of the UDP element, a
+ canonicalized form of the element MUST be used as in section 2.1. An
+ iterative method SHOULD be used to calculate checksums as in section
+ 2.1.
+
+ The payload element MUST be encoded as in section 2.1.
+
+ UDPoXML datagrams encapsulated by IPoXML MAY omit the <?xml?> header
+ as well as the <!DOCTYPE> declaration.
+
+4.2. Example Datagram
+
+ The following is an example UDPoXML datagram with an empty payload:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
+ <udp>
+ <udp.header>
+ <src port="31415"/>
+ <dest port="42424"/>
+ <udp.length value="143"/>
+ <checksum value="2988"/>
+ </udp.header>
+ <payload>
+ </payload>
+ </udp>
+
+5. Network Transport
+
+ This document provides for the transmission of BLOAT datagrams over
+ two common families of physical layer transport. Future RFCs will
+ address additional transports as routing vendors catch up to the
+ specification, and we begin to see BLOAT routed across the Internet
+ backbone.
+
+5.1. Ethernet
+
+ BLOAT is encapsulated in Ethernet datagrams as in [RFC894] with the
+ exception that the type field of the Ethernet frame MUST contain the
+ value 0xBEEF. The first 5 octets of the Ethernet frame payload will
+ be 0x3c 3f 78 6d 6c ("<?xml".)
+
+5.2. IEEE 802
+
+ BLOAT is encapsulated in IEEE 802 Networks as in [RFC1042] except
+ that the protocol type code for IPoXML is 0xBEEF.
+
+
+
+
+
+Kennedy Informational [Page 6]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+6. Gatewaying over IP
+
+ In order to facilitate the gradual introduction of BLOAT into the
+ public Internet, BLOAT MAY be encapsulated in IP as in [RFC2003] to
+ gateway between networks that run BLOAT natively on their LANs.
+
+7. DTDs
+
+ The Transport DTDs (7.2. and 7.3.) build on the definitions in the
+ Network DTD (7.1.)
+
+ The DTDs are referenced by their PubidLiteral and SystemLiteral (from
+ [XML]) although it is understood that most IPoXML implementations
+ will not need to pull down the DTD, as it will normally be embedded
+ in the implementation, and presents something of a catch-22 if you
+ need to load part of your network protocol over the network.
+
+7.1. IPoXML DTD
+
+ <!--
+ DTD for IP over XML.
+ Refer to this DTD as:
+
+ <!DOCTYPE ip PUBLIC "-//IETF//DTD BLOAT 1.0 IP//EN" "bloat.dtd">
+ -->
+ <!--
+ DTD data types:
+
+ Digits [0..9]+
+
+ Precedence "NetworkControl | InternetworkControl |
+ CRITIC | FlashOverride | Flash | Immediate |
+ Priority | Routine"
+
+ IP4Addr "dotted-decimal" notation of [RFC1123]
+
+ Class [0..3]
+
+ Sec "Unclassified | Confidential | EFTO | MMMM | PROG |
+ Restricted | Secret | Top Secret | Reserved"
+
+ Compartments [0..65535]
+
+ Handling [0..65535]
+
+ TCC [0..16777216]
+
+ -->
+
+
+
+Kennedy Informational [Page 7]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ <!ENTITY % Digits "CDATA">
+ <!ENTITY % Precedence "CDATA">
+ <!ENTITY % IP4Addr "CDATA">
+ <!ENTITY % Class "CDATA">
+ <!ENTITY % Sec "CDATA">
+ <!ENTITY % Compartments "CDATA">
+ <!ENTITY % Handling "CDATA">
+ <!ENTITY % TCC "CDATA">
+
+ <!ELEMENT ip (header, payload)>
+
+ <!ELEMENT header (version, tos, total.length, id, flags, offset, ttl,
+ protocol, checksum, source, destination, options,
+ padding)>
+ <!-- length of header in 32-bit words -->
+ <!ATTLIST header
+ length %Digits; #REQUIRED>
+
+ <!ELEMENT version EMPTY>
+ <!-- ip version. SHOULD be "4" -->
+ <!ATTLIST version
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT tos EMPTY>
+ <!ATTLIST tos
+ precedence %Precedence; #REQUIRED
+ delay (normal | low) #REQUIRED
+ throughput (normal | high) #REQUIRED
+ relibility (normal | high) #REQUIRED
+ reserved CDATA #FIXED "0">
+
+ <!ELEMENT total.length EMPTY>
+ <!--
+ total length of datagram (header and payload) in octets, MUST be
+ less than 65,535 (and SHOULD be less than 1024 for IPoXML on local
+ ethernets).
+ -->
+ <!ATTLIST total.length
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT id EMPTY>
+ <!-- 0 <= id <= 65,535 -->
+ <!ATTLIST id
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT flags EMPTY>
+ <!-- df = don't fragment, mf = more fragments -->
+ <!ATTLIST flags
+
+
+
+Kennedy Informational [Page 8]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ reserved CDATA #FIXED "0"
+ df (may|dont) #REQUIRED
+ mf (last|more) #REQUIRED>
+
+ <!ELEMENT offset EMPTY>
+ <!-- 0 <= offset <= 8192 measured in 8 octet (64-bit) chunks -->
+ <!ATTLIST offset
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT ttl EMPTY>
+ <!-- 0 <= ttl <= 255 -->
+ <!ATTLIST ttl
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT protocol EMPTY>
+ <!-- 0 <= protocol <= 255 (per IANA) -->
+ <!ATTLIST protocol
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT checksum EMPTY>
+ <!-- 0 <= checksum <= 65535 (over header only) -->
+ <!ATTLIST checksum
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT source EMPTY>
+ <!ATTLIST source
+ address %IP4Addr; #REQUIRED>
+
+ <!ELEMENT destination EMPTY>
+ <!ATTLIST destination
+ address %IP4Addr; #REQUIRED>
+
+ <!ELEMENT options ( end | noop | security | loose | strict | record
+ | stream | timestamp )*>
+
+ <!ELEMENT end EMPTY>
+ <!ATTLIST end
+ copied (0|1) #REQUIRED
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "0">
+
+ <!ELEMENT noop EMPTY>
+ <!ATTLIST noop
+ copied (0|1) #REQUIRED
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "1">
+
+ <!ELEMENT security EMPTY>
+
+
+
+Kennedy Informational [Page 9]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ <!ATTLIST security
+ copied CDATA #FIXED "1"
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "2"
+ length CDATA #FIXED "11"
+ security %Sec; #REQUIRED
+ compartments %Compartments; #REQUIRED
+ handling %Handling; #REQUIRED
+ tcc %TCC; #REQUIRED>
+ <!ELEMENT loose (hop)+>
+ <!ATTLIST loose
+ copied CDATA #FIXED "1"
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "3"
+ length %Digits; #REQUIRED
+ pointer %Digits; #REQUIRED>
+
+ <!ELEMENT hop EMPTY>
+ <!ATTLIST hop
+ address %IP4Addr; #REQUIRED>
+
+ <!ELEMENT strict (hop)+>
+ <!ATTLIST strict
+ copied CDATA #FIXED "1"
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "9"
+ length %Digits; #REQUIRED
+ pointer %Digits; #REQUIRED>
+
+ <!ELEMENT record (hop)+>
+ <!ATTLIST record
+ copied CDATA #FIXED "0"
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "7"
+ length %Digits; #REQUIRED
+ pointer %Digits; #REQUIRED>
+
+ <!ELEMENT stream EMPTY>
+ <!-- 0 <= id <= 65,535 -->
+ <!ATTLIST stream
+ copied CDATA #FIXED "1"
+ class CDATA #FIXED "0"
+ number CDATA #FIXED "8"
+ length CDATA #FIXED "4"
+ id %Digits; #REQUIRED>
+
+ <!ELEMENT timestamp (tstamp)+>
+ <!-- 0 <= oflw <=15 -->
+
+
+
+Kennedy Informational [Page 10]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ <!ATTLIST timestamp
+ copied CDATA #FIXED "0"
+ class CDATA #FIXED "2"
+ number CDATA #FIXED "4"
+ length %Digits; #REQUIRED
+ pointer %Digits; #REQUIRED
+ oflw %Digits; #REQUIRED
+ flag (0 | 1 | 3) #REQUIRED>
+
+ <!ELEMENT tstamp EMPTY>
+ <!ATTLIST tstamp
+ time %Digits; #REQUIRED
+ address %IP4Addr; #IMPLIED>
+ <!--
+ padding to bring header to 32-bit boundary.
+ pad MUST be "0"*
+ -->
+ <!ELEMENT padding EMPTY>
+ <!ATTLIST padding
+ pad CDATA #REQUIRED>
+
+ <!-- payload MUST be encoded as base-64 [RFC2045], as modified
+ by section 2.1 of this RFC -->
+ <!ELEMENT payload (CDATA)>
+
+7.2. TCPoXML DTD
+
+ <!--
+ DTD for TCP over XML.
+ Refer to this DTD as:
+
+ <!DOCTYPE tcp PUBLIC "-//IETF//DTD BLOAT 1.0 TCP//EN" "bloat.dtd">
+ -->
+
+ <!-- the pseudoheader is only included for checksum calculations -->
+ <!ELEMENT tcp (tcp.pseudoheader?, tcp.header, payload)>
+
+ <!ELEMENT tcp.header (src, dest, sequence, acknowledgement, offset,
+ reserved, control, window, checksum, urgent,
+ tcp.options, padding)>
+
+ <!ELEMENT src EMPTY>
+ <!-- 0 <= port <= 65,535 -->
+ <!ATTLIST src
+ port %Digits; #REQUIRED>
+
+ <!ELEMENT dest EMPTY>
+ <!-- 0 <= port <= 65,535 -->
+
+
+
+Kennedy Informational [Page 11]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ <!ATTLIST dest
+ port %Digits; #REQUIRED>
+
+ <!ELEMENT sequence EMPTY>
+ <!-- 0 <= number <= 4294967295 -->
+ <!ATTLIST sequence
+ number %Digits; #REQUIRED>
+
+ <!ELEMENT acknowledgement EMPTY>
+ <!-- 0 <= number <= 4294967295 -->
+ <!ATTLIST acknowledgement
+ number %Digits; #REQUIRED>
+
+ <!ELEMENT offset EMPTY>
+ <!-- 0 <= number <= 255 -->
+ <!ATTLIST offset
+ number %Digits; #REQUIRED>
+
+ <!ELEMENT reserved EMPTY>
+ <!ATTLIST reserved
+ value CDATA #FIXED "0">
+
+ <!ELEMENT control EMPTY>
+ <!ATTLIST control
+ urg (0|1) #IMPLIED
+ ack (0|1) #IMPLIED
+ psh (0|1) #IMPLIED
+ rst (0|1) #IMPLIED
+ syn (0|1) #IMPLIED
+ fin (0|1) #IMPLIED>
+
+ <!ELEMENT window EMPTY>
+ <!-- 0 <= size <= 65,535 -->
+ <!ATTLIST window
+ size %Digits; #REQUIRED>
+
+ <!--
+ checksum as in ip, but with
+ the following pseudo-header added into the tcp element:
+ -->
+ <!ELEMENT tcp.pseudoheader (source, destination, protocol,
+ tcp.length)>
+
+ <!--
+ tcp header + data length in octets. does not include the size of
+
+ the pseudoheader.
+ -->
+
+
+
+Kennedy Informational [Page 12]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ <!ELEMENT tcp.length EMPTY>
+ <!ATTLIST tcp.length
+ value %Digits; #REQUIRED>
+
+ <!ELEMENT urgent EMPTY>
+ <!-- 0 <= pointer <= 65,535 -->
+ <!ATTLIST urgent
+ pointer %Digits; #REQUIRED>
+
+ <!ELEMENT tcp.options (tcp.end | tcp.noop | tcp.mss)+>
+
+ <!ELEMENT tcp.end EMPTY>
+ <!ATTLIST tcp.end
+ kind CDATA #FIXED "0">
+
+ <!ELEMENT tcp.noop EMPTY>
+ <!ATTLIST tcp.noop
+ kind CDATA #FIXED "1">
+
+ <!ELEMENT tcp.mss EMPTY>
+ <!ATTLIST tcp.mss
+ kind CDATA #FIXED "2"
+ length CDATA #FIXED "4"
+ size %Digits; #REQUIRED>
+
+7.3. UDPoXML DTD
+
+ <!--
+ DTD for UDP over XML.
+ Refer to this DTD as:
+
+ <!DOCTYPE udp PUBLIC "-//IETF//DTD BLOAT 1.0 UDP//EN" "bloat.dtd">
+ -->
+
+ <!ELEMENT udp (udp.pseudoheader?, udp.header, payload)>
+
+ <!ELEMENT udp.header (src, dest, udp.length, checksum)>
+
+ <!ELEMENT udp.pseudoheader (source, destination, protocol,
+ udp.length)>
+
+ <!--
+ udp header + data length in octets. does not include the size of
+ the pseudoheader.
+ -->
+ <!ELEMENT udp.length EMPTY>
+ <!ATTLIST udp.length
+ value %Digits; #REQUIRED>
+
+
+
+Kennedy Informational [Page 13]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+8. Security Considerations
+
+ XML, as a subset of SGML, has the same security considerations as
+ specified in SGML Media Types [RFC1874]. Security considerations
+ that apply to IP, TCP and UDP also likely apply to BLOAT as it does
+ not attempt to correct for issues not related to message format.
+
+9. References
+
+ [JABBER] Miller, J., "Jabber", draft-miller-jabber-00.txt,
+ February 2002. (Work in Progress)
+
+ [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
+ August 1980.
+
+ [RFC791] Postel, J., "Internet Protocol", STD 5, RFC 791,
+ September 1981.
+
+ [RFC793] Postel, J., "Transmission Control Protocol", STD 7, RFC
+ 793, September 1981.
+
+ [RFC894] Hornig, C., "Standard for the Transmission of IP
+ Datagrams over Ethernet Networks.", RFC 894, April 1984.
+
+ [RFC1042] Postel, J. and J. Reynolds, "Standard for the
+ Transmission of IP Datagrams Over IEEE 802 Networks", STD
+ 43, RFC 1042, February 1988.
+
+ [RFC1123] Braden, R., "Requirements for Internet Hosts -
+ Application and Support", RFC 1123, October 1989.
+
+ [RFC1874] Levinson, E., "SGML Media Types", RFC 1874, December
+ 1995.
+
+ [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003,
+ October 1996.
+
+ [RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
+ Extensions (MIME) Part One: Format of Internet Message
+ Bodies", RFC 2045, November 1996.
+
+ [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
+ Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+ [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
+ 10646", RFC 2279, January 1998.
+
+
+
+
+
+Kennedy Informational [Page 14]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+ [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
+ (IPv6) Specification", RFC 2460, December 1998.
+
+ [RFC3080] Rose, M., "The Blocks Extensible Exchange Protocol Core",
+ RFC 3080, March 2001.
+
+ [SOAP] Box, D., Ehnebuske, D., Kakivaya, G., Layman, A.,
+ Mendelsohn, N., Nielsen, H. F., Thatte, S. Winer, D.,
+ "Simple Object Access Protocol (SOAP) 1.1" World Wide Web
+ Consortium Note, May 2000 http://www.w3.org/TR/SOAP/
+
+ [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. M., "Extensible
+ Markup Language (XML)" World Wide Web Consortium
+ Recommendation REC- xml-19980210.
+ http://www.w3.org/TR/1998/REC-xml-19980210
+
+10. Author's Address
+
+ Hugh Kennedy
+ Mimezine
+ 1060 West Addison
+ Chicago, IL 60613
+ USA
+
+ EMail: kennedyh@engin.umich.edu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kennedy Informational [Page 15]
+
+RFC 3252 Binary Lexical Octet Ad-hoc Transport 1 April 2002
+
+
+11. Full Copyright Statement
+
+ Copyright (C) The Internet Society (2002). All Rights Reserved.
+
+ This document and translations of it may be copied and furnished to
+ others, and derivative works that comment on or otherwise explain it
+ or assist in its implementation may be prepared, copied, published
+ and distributed, in whole or in part, without restriction of any
+ kind, provided that the above copyright notice and this paragraph are
+ included on all such copies and derivative works. However, this
+ document itself may not be modified in any way, such as by removing
+ the copyright notice or references to the Internet Society or other
+ Internet organizations, except as needed for the purpose of
+ developing Internet standards in which case the procedures for
+ copyrights defined in the Internet Standards process must be
+ followed, or as required to translate it into languages other than
+ English.
+
+ The limited permissions granted above are perpetual and will not be
+ revoked by the Internet Society or its successors or assigns.
+
+ This document and the information contained herein is provided on an
+ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+Acknowledgement
+
+ Funding for the RFC Editor function is currently provided by the
+ Internet Society.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Kennedy Informational [Page 16]
+
diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp
index 00ccadb..4e60101 100644
--- a/tests/auto/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/networkselftest/tst_networkselftest.cpp
@@ -41,6 +41,14 @@
#include <QtTest/QtTest>
#include <QtNetwork/QtNetwork>
+
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Current path (C:\private\<UID>) contains only ascii chars
+//#define SRCDIR QDir::currentPath()
+#define SRCDIR "."
+#endif
+
#include "../network-settings.h"
class tst_NetworkSelfTest: public QObject
@@ -57,6 +65,7 @@ private slots:
void serverReachability();
void remotePortsOpen_data();
void remotePortsOpen();
+ void fileLineEndingTest();
// specific protocol tests
void ftpServer();
@@ -392,6 +401,31 @@ void tst_NetworkSelfTest::remotePortsOpen()
QVERIFY(socket.state() == QAbstractSocket::ConnectedState);
}
+
+void tst_NetworkSelfTest::fileLineEndingTest()
+{
+ QString referenceName = SRCDIR "/rfc3252.txt";
+ long long expectedReferenceSize = 25962;
+
+ QString lineEndingType("LF");
+
+ QFile reference(referenceName);
+ QVERIFY(reference.open(QIODevice::ReadOnly));
+ QByteArray byteLine = reference.readLine();
+ if(byteLine.endsWith("\r\n"))
+ lineEndingType = "CRLF";
+ else if(byteLine.endsWith("\r"))
+ lineEndingType = "CR";
+
+ QString referenceAsTextData;
+ QFile referenceAsText(referenceName);
+ QVERIFY(referenceAsText.open(QIODevice::ReadOnly));
+ referenceAsTextData = referenceAsText.readAll();
+
+ QVERIFY2(expectedReferenceSize == referenceAsTextData.length(), QString("Reference file %1 has %2 as line ending and file size not matching - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
+ QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
+}
+
static QList<Chat> ftpChat()
{
return QList<Chat>() << Chat::expect("220")
diff --git a/tests/auto/q3popupmenu/tst_q3popupmenu.cpp b/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
index 5585c3a..df8573d 100644
--- a/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
+++ b/tests/auto/q3popupmenu/tst_q3popupmenu.cpp
@@ -135,11 +135,11 @@ void tst_Q3PopupMenu::task177490_highlighted()
QTest::mouseMove(&menu1, QPoint(x, y1));
QTest::mouseMove(&menu1, QPoint(x, y1 + 1));
- QTest::qWait(100);
+ QTest::qWait(1000);
QTest::mouseMove(&menu1, QPoint(x, y2));
QTest::mouseMove(&menu1, QPoint(x, y2 + 1));
- QTest::qWait(100);
+ QTest::qWait(1000);
QCOMPARE(spy.count(), 2); // one per menu item
}
diff --git a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
index cbbab41..6b580df 100644
--- a/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
+++ b/tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp
@@ -646,7 +646,7 @@ void tst_Q3SqlCursor::select()
}
#ifdef QT_DEBUG
- // for people too stupid to read docs we had to insert this debugging message.
+ // Ignore debugging message advising users of a potential pitfall.
QTest::ignoreMessage(QtDebugMsg, "Q3SqlCursor::setValue(): This will not affect actual database values. Use primeInsert(), primeUpdate() or primeDelete().");
#endif
cur4.setValue( "id", 1 );
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 7331072..69b507d 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -56,6 +56,7 @@ public:
private slots:
void initTestCase();
void settings();
+ void buffers();
void notifyInterval();
void pullFile();
@@ -90,6 +91,7 @@ void tst_QAudioInput::initTestCase()
void tst_QAudioInput::settings()
{
if(available) {
+ // Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
QVERIFY(format.channels() == f.channels());
@@ -101,6 +103,18 @@ void tst_QAudioInput::settings()
}
}
+void tst_QAudioInput::buffers()
+{
+ if(available) {
+ // Should always have a buffer size greater than zero.
+ int store = audio->bufferSize();
+ audio->setBufferSize(4096);
+ QVERIFY(audio->bufferSize() > 0);
+ audio->setBufferSize(store);
+ QVERIFY(audio->bufferSize() == store);
+ }
+}
+
void tst_QAudioInput::notifyInterval()
{
if(available) {
@@ -120,14 +134,32 @@ void tst_QAudioInput::pullFile()
filename.open( QIODevice::WriteOnly | QIODevice::Truncate );
QSignalSpy readSignal(audio, SIGNAL(notify()));
- audio->start(&filename);
+ QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State)));
+
+ // Always have default states, before start
+ QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->error() == QAudio::NoError);
+ audio->start(&filename);
+ QTest::qWait(20);
+ // Check state and periodSize() are valid non-zero values.
+ QVERIFY(audio->state() == QAudio::ActiveState);
+ QVERIFY(audio->error() == QAudio::NoError);
+ QVERIFY(audio->periodSize() > 0);
+ QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
+
+ // Wait until finished...
QTest::qWait(5000);
QVERIFY(readSignal.count() > 0);
QVERIFY(audio->totalTime() > 0);
audio->stop();
+ QTest::qWait(20);
+ QVERIFY(audio->state() == QAudio::StopState);
+ // Can only check to make sure we got at least 1 more signal, but can be more.
+ QVERIFY(stateSignal.count() > 1);
+
filename.close();
}
}
diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
index b45a57e..f1c75dc 100644
--- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
+++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp
@@ -58,6 +58,7 @@ public:
private slots:
void initTestCase();
void settings();
+ void buffers();
void notifyInterval();
void pullFile();
void pushFile();
@@ -91,6 +92,7 @@ void tst_QAudioOutput::initTestCase()
void tst_QAudioOutput::settings()
{
if(available) {
+ // Confirm the setting we added in the init function.
QAudioFormat f = audio->format();
QVERIFY(format.channels() == f.channels());
@@ -102,6 +104,18 @@ void tst_QAudioOutput::settings()
}
}
+void tst_QAudioOutput::buffers()
+{
+ if(available) {
+ // Should always have a buffer size greater than zero.
+ int store = audio->bufferSize();
+ audio->setBufferSize(4096);
+ QVERIFY(audio->bufferSize() > 0);
+ audio->setBufferSize(store);
+ QVERIFY(audio->bufferSize() == store);
+ }
+}
+
void tst_QAudioOutput::notifyInterval()
{
if(available) {
@@ -122,15 +136,33 @@ void tst_QAudioOutput::pullFile()
file.open(QIODevice::ReadOnly);
QSignalSpy readSignal(audio, SIGNAL(notify()));
+ QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State)));
audio->setNotifyInterval(100);
- audio->start(&file);
+ // Always have default states, before start
+ QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->error() == QAudio::NoError);
+
+ audio->start(&file);
+ QTest::qWait(20); // wait 20ms
+ // Check state, bytesFree() and periodSize() are valid non-zero values.
+ QVERIFY(audio->state() == QAudio::ActiveState);
+ QVERIFY(audio->error() == QAudio::NoError);
+ QVERIFY(audio->periodSize() > 0);
+ QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
+
+ // Wait until finished...
QTestEventLoop::instance().enterLoop(1);
QCOMPARE(audio->totalTime(), qint64(692250));
// 4.wav is a little less than 700ms, so notify should fire 6 times!
QVERIFY(readSignal.count() >= 6);
audio->stop();
+ QTest::qWait(20); // wait 20ms
+ QVERIFY(audio->state() == QAudio::StopState);
+ // Can only check to make sure we got at least 1 more signal, but can be more.
+ QVERIFY(stateSignal.count() > 1);
+
file.close();
}
}
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index 8dfe836..6984a88 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -2118,20 +2118,24 @@ void tst_QComboBox::task248169_popupWithMinimalSize()
QComboBox comboBox;
comboBox.addItems(initialContent);
- comboBox.view()->setMinimumWidth(500);
QDesktopWidget desktop;
- comboBox.setGeometry(desktop.availableGeometry().width() - 200, 100, 200, 100);
+ QRect desktopSize = desktop.availableGeometry();
+ comboBox.view()->setMinimumWidth(desktopSize.width() / 2);
+
+ comboBox.setGeometry(desktopSize.width() - (desktopSize.width() / 4), (desktopSize.width() / 4), (desktopSize.width() / 2), (desktopSize.width() / 4));
comboBox.show();
+ QTest::qWaitForWindowShown(&comboBox);
QTRY_VERIFY(comboBox.isVisible());
comboBox.showPopup();
QTRY_VERIFY(comboBox.view());
+ QTest::qWaitForWindowShown(comboBox.view());
QTRY_VERIFY(comboBox.view()->isVisible());
#ifdef QT_BUILD_INTERNAL
QFrame *container = qFindChild<QComboBoxPrivateContainer *>(&comboBox);
QVERIFY(container);
- QVERIFY(desktop.screenGeometry(container).contains(container->geometry()));
+ QTRY_VERIFY(desktop.screenGeometry(container).contains(container->geometry()));
#endif
}
diff --git a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
index e8fc1f3..936ebf7 100644
--- a/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
+++ b/tests/auto/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
@@ -43,6 +43,7 @@
#include <QtGui/QStyle>
#include <QtGui/QLayout>
#include <QtGui/QDialog>
+#include <QtGui/QAction>
#include <qdialogbuttonbox.h>
#include <limits.h>
@@ -721,15 +722,28 @@ void tst_QDialogButtonBox::testS60SoftKeys()
QDialogButtonBox buttonBox(&dialog);
buttonBox.setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
dialog.show();
- QList<QAction*> softKeys = dialog.softKeys();
- QCOMPARE( softKeys.count(), 2);
+
+ int softkeyCount = 0;
+ QList<QAction *> actions = dialog.actions();
+ foreach (QAction *action, actions) {
+ if (action->softKeyRole() != QAction::NoSoftKey)
+ softkeyCount++;
+ }
+ QCOMPARE( softkeyCount, 2);
QDialog dialog2(0);
QDialogButtonBox buttonBox2(&dialog2);
buttonBox2.setStandardButtons(QDialogButtonBox::Cancel);
dialog2.show();
- softKeys = dialog2.softKeys();
- QCOMPARE( softKeys.count(), 1);
+
+ int softkeyCount2 = 0;
+ QList<QAction *> actions2 = dialog2.actions();
+ foreach (QAction *action, actions2) {
+ if (action->softKeyRole() != QAction::NoSoftKey)
+ softkeyCount2++;
+ }
+ QCOMPARE( softkeyCount2, 1);
+
#else
QSKIP("S60-specific test", SkipAll );
#endif
diff --git a/tests/auto/qdom/tst_qdom.cpp b/tests/auto/qdom/tst_qdom.cpp
index 79c0cef..6637202 100644
--- a/tests/auto/qdom/tst_qdom.cpp
+++ b/tests/auto/qdom/tst_qdom.cpp
@@ -130,6 +130,8 @@ private slots:
void setContentWhitespace() const;
void setContentWhitespace_data() const;
+ void taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const;
+
void cleanupTestCase() const;
private:
@@ -1897,5 +1899,18 @@ void tst_QDom::setContentWhitespace_data() const
QTest::newRow("") << QString::fromLatin1("\t\t\t\t<?xml version='1.0' ?><e/>") << false;
}
+void tst_QDom::taskQTBUG4595_dontAssertWhenDocumentSpecifiesUnknownEncoding() const
+{
+ QString xmlWithUnknownEncoding("<?xml version='1.0' encoding='unknown-encoding'?>"
+ "<foo>"
+ " <bar>How will this sentence be handled?</bar>"
+ "</foo>");
+ QDomDocument d;
+ QVERIFY(d.setContent(xmlWithUnknownEncoding));
+
+ QString dontAssert = d.toString(); // this should not assert
+ QVERIFY(true);
+}
+
QTEST_MAIN(tst_QDom)
#include "tst_qdom.moc"
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
index 502e983..f4ea985 100644
--- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -145,6 +145,7 @@ private slots:
void task224497_fltMax();
void task221221();
+ void task255471_decimalsValidation();
public slots:
void valueChangedHelper(const QString &);
@@ -668,7 +669,7 @@ void tst_QDoubleSpinBox::valueFromTextAndValidate_data()
QTest::addColumn<int>("language");
QTest::addColumn<QString>("expectedText"); // if empty we don't check
- QTest::newRow("data0") << QString("2.2") << Invalid << 3.0 << 5.0 << (int)QLocale::C << QString();
+ QTest::newRow("data0") << QString("2.2") << Intermediate << 3.0 << 5.0 << (int)QLocale::C << QString();
QTest::newRow("data1") << QString() << Intermediate << 0.0 << 100.0 << (int)QLocale::C << QString();
QTest::newRow("data2") << QString("asd") << Invalid << 0.0 << 100.0 << (int)QLocale::C << QString();
QTest::newRow("data3") << QString("2.2") << Acceptable << 0.0 << 100.0 << (int)QLocale::C << QString();
@@ -685,20 +686,20 @@ void tst_QDoubleSpinBox::valueFromTextAndValidate_data()
QTest::newRow("data14") << QString("1, ") << Acceptable << 0.0 << 100.0 << (int)QLocale::Norwegian << QString("1,");
QTest::newRow("data15") << QString("1, ") << Invalid << 0.0 << 100.0 << (int)QLocale::C << QString();
QTest::newRow("data16") << QString("2") << Intermediate << 100.0 << 102.0 << (int)QLocale::C << QString();
- QTest::newRow("data17") << QString("22.0") << Invalid << 100.0 << 102.0 << (int)QLocale::C << QString();
+ QTest::newRow("data17") << QString("22.0") << Intermediate << 100.0 << 102.0 << (int)QLocale::C << QString();
QTest::newRow("data18") << QString("12.0") << Intermediate << 100.0 << 102.0 << (int)QLocale::C << QString();
- QTest::newRow("data19") << QString("12.2") << Invalid << 100. << 102.0 << (int)QLocale::C << QString();
- QTest::newRow("data20") << QString("21.") << Invalid << 100.0 << 102.0 << (int)QLocale::C << QString();
- QTest::newRow("data21") << QString("-21.") << Invalid << -102.0 << -100.0 << (int)QLocale::C << QString();
+ QTest::newRow("data19") << QString("12.2") << Intermediate << 100. << 102.0 << (int)QLocale::C << QString();
+ QTest::newRow("data20") << QString("21.") << Intermediate << 100.0 << 102.0 << (int)QLocale::C << QString();
+ QTest::newRow("data21") << QString("-21.") << Intermediate << -102.0 << -100.0 << (int)QLocale::C << QString();
QTest::newRow("data22") << QString("-12.") << Intermediate << -102.0 << -100.0 << (int)QLocale::C << QString();
- QTest::newRow("data23") << QString("-11.11") << Invalid << -102.0 << -101.2 << (int)QLocale::C << QString();
+ QTest::newRow("data23") << QString("-11.11") << Intermediate << -102.0 << -101.2 << (int)QLocale::C << QString();
QTest::newRow("data24") << QString("-11.4") << Intermediate << -102.0 << -101.3 << (int)QLocale::C << QString();
QTest::newRow("data25") << QString("11.400") << Invalid << 0.0 << 100.0 << (int)QLocale::C << QString();
QTest::newRow("data26") << QString(".4") << Intermediate << 0.45 << 0.5 << (int)QLocale::C << QString();
QTest::newRow("data27") << QString("+.4") << Intermediate << 0.45 << 0.5 << (int)QLocale::C << QString();
QTest::newRow("data28") << QString("-.4") << Intermediate << -0.5 << -0.45 << (int)QLocale::C << QString();
QTest::newRow("data29") << QString(".4") << Intermediate << 1.0 << 2.4 << (int)QLocale::C << QString();
- QTest::newRow("data30") << QString("-.4") << Invalid << -2.3 << -1.9 << (int)QLocale::C << QString();
+ QTest::newRow("data30") << QString("-.4") << Intermediate << -2.3 << -1.9 << (int)QLocale::C << QString();
QTest::newRow("data31") << QString("-42") << Invalid << -2.43 << -1.0 << (int)QLocale::C << QString();
QTest::newRow("data32") << QString("-4") << Invalid << -1.4 << -1.0 << (int)QLocale::C << QString();
QTest::newRow("data33") << QString("-42") << Invalid << -1.4 << -1.0 << (int)QLocale::C << QString();
@@ -712,7 +713,7 @@ void tst_QDoubleSpinBox::valueFromTextAndValidate_data()
QTest::newRow("data41") << QString("103.") << Invalid << -102.0 << 11.0 << (int)QLocale::C << QString();
QTest::newRow("data42") << QString("122") << Invalid << 10.0 << 12.2 << (int)QLocale::C << QString();
QTest::newRow("data43") << QString("-2.2") << Intermediate << -12.2 << -3.2 << (int)QLocale::C << QString();
- QTest::newRow("data44") << QString("-2.20") << Invalid << -12.1 << -3.2 << (int)QLocale::C << QString();
+ QTest::newRow("data44") << QString("-2.20") << Intermediate << -12.1 << -3.2 << (int)QLocale::C << QString();
QTest::newRow("data45") << QString("200,2") << Invalid << 0.0 << 1000.0 << (int)QLocale::C << QString();
QTest::newRow("data46") << QString("200,2") << Acceptable << 0.0 << 1000.0 << (int)QLocale::German << QString();
QTest::newRow("data47") << QString("2.2") << Acceptable << 0.0 << 1000.0 << (int)QLocale::C << QString();
@@ -1008,6 +1009,31 @@ void tst_QDoubleSpinBox::task221221()
QCOMPARE(spin.text(), QLatin1String("1"));
}
+void tst_QDoubleSpinBox::task255471_decimalsValidation()
+{
+ // QDoubleSpinBox shouldn't crash with large numbers of decimals. Even if
+ // the results are useless ;-)
+ for (int i = 0; i < 32; ++i)
+ {
+ QDoubleSpinBox spinBox;
+ spinBox.setDecimals(i);
+ spinBox.setMinimum(0.3);
+ spinBox.setMaximum(12);
+
+ spinBox.show();
+ QTRY_VERIFY(spinBox.isVisible());
+ spinBox.setFocus();
+ QTRY_VERIFY(spinBox.hasFocus());
+
+ QTest::keyPress(&spinBox, Qt::Key_Right);
+ QTest::keyPress(&spinBox, Qt::Key_Right);
+ QTest::keyPress(&spinBox, Qt::Key_Delete);
+
+ // Don't crash!
+ QTest::keyPress(&spinBox, Qt::Key_2);
+ }
+}
+
QTEST_MAIN(tst_QDoubleSpinBox)
#include "tst_qdoublespinbox.moc"
diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
index 8d4a5ed..8cf686e 100644
--- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
@@ -417,8 +417,18 @@ void tst_QEasingCurve::valueForProgress()
// the least significant digit it is still subject to rounding errors
qreal error = easeConv - ex;
+ qreal errorbound = 0.00001;
+#if defined( Q_OS_WINCE ) || defined( Q_OS_SYMBIAN )
+ // exception values for WINCE(this test should be rewritten, as it only freezes the status quo of QEasingCurve
+ // The failing (2) values are explicitly excepted here:
+ // The source values for the comparison table should remain untruncated double and the
+ // error bound checking function dynamic. Also the source values should come from a "trusted" source and not
+ // from QEasingCurve itself.
+ if ((type == int(QEasingCurve::InOutBounce) && (i == 8 || i == 6) ) || (type == int(QEasingCurve::OutExpo) && i == 2))
+ errorbound = 0.0002;
+#endif
// accept the potential rounding error in the least significant digit
- QVERIFY(error <= 0.00001 );
+ QVERIFY(error <= errorbound );
}
#endif
}
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index d6225cd..1aa5ee1 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -70,6 +70,12 @@
//TESTED_CLASS=
//TESTED_FILES=
+#if defined(Q_OS_SYMBIAN)
+# define STRINGIFY(x) #x
+# define TOSTRING(x) STRINGIFY(x)
+# define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
+#endif
+
class QNonNativeFileDialog : public QFileDialog
{
Q_OBJECT
@@ -1042,7 +1048,7 @@ void tst_QFiledialog::focus()
QApplication::setActiveWindow(&fd);
QTest::qWaitForWindowShown(&fd);
QTRY_COMPARE(fd.isVisible(), true);
- QTRY_COMPARE(QApplication::activeWindow(), &fd);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
qApp->processEvents();
// make sure the tests work with focus follows mouse
diff --git a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
index eac16ee..070eb6a 100644
--- a/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
+++ b/tests/auto/qfilesystemmodel/qfilesystemmodel.pro
@@ -12,4 +12,5 @@ symbian: {
dummyDeploy.sources = tst_qfilesystemmodel.cpp
dummyDeploy.path = .
DEPLOYMENT += dummyDeploy
+ LIBS += -lefsrv
}
diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 32cbed3..7735f30 100644
--- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -318,9 +318,6 @@ void tst_QFileSystemWatcher::watchDirectory()
#ifdef Q_OS_WINCE
QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
-#elif defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)
- // Since native watcher is always used in real devices, this poller issue is irrelevant
- QEXPECT_FAIL("poller", "Poller doesn't detect directory removal in RVCT builds", Abort);
#endif
QCOMPARE(changedSpy.count(), 2);
QCOMPARE(changedSpy.at(0).count(), 1);
@@ -490,11 +487,6 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
#ifdef Q_OS_WINCE
QEXPECT_FAIL("poller", "Directory does not get updated on file removal(See #137910)", Abort);
#endif
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)
- // Since native watcher is always used in real devices, this poller issue is irrelevant
- // Symbian file system does not change modification time on a directory when a file inside is changed
- QEXPECT_FAIL("poller", "Poller doesn't detect directory changes in RVCT builds", Abort);
-#endif
QCOMPARE(dirChangedSpy.count(), 1);
dirChangedSpy.clear();
@@ -515,7 +507,9 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
timer.start(3000);
eventLoop.exec();
QCOMPARE(fileChangedSpy.count(), 0);
- QCOMPARE(dirChangedSpy.count(), 1);
+ // polling watcher has generated separate events for content and time change
+ // on Symbian emulator, so allow possibility of 2 events
+ QVERIFY(dirChangedSpy.count() == 1 || dirChangedSpy.count() == 2);
QVERIFY(QDir().rmdir("testDir"));
}
diff --git a/tests/auto/qfocusevent/tst_qfocusevent.cpp b/tests/auto/qfocusevent/tst_qfocusevent.cpp
index 6c47530..121bd41 100644
--- a/tests/auto/qfocusevent/tst_qfocusevent.cpp
+++ b/tests/auto/qfocusevent/tst_qfocusevent.cpp
@@ -399,10 +399,10 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
QDialog* d = new QDialog( testFocusWidget );
d->show();
d->activateWindow(); // ### CDE
- // wait 1 secs to give some visible feedback
- QTest::qWait(1000);
+ QApplication::setActiveWindow(d);
+ QTest::qWaitForWindowShown(d);
- QVERIFY(childFocusWidgetOne->focusOutEventRecieved);
+ QTRY_VERIFY(childFocusWidgetOne->focusOutEventRecieved);
QVERIFY(childFocusWidgetOne->focusOutEventLostFocus);
QVERIFY( !childFocusWidgetOne->focusInEventRecieved );
@@ -411,12 +411,12 @@ void tst_QFocusEvent::checkReason_ActiveWindow()
QVERIFY( !childFocusWidgetOne->hasFocus() );
d->hide();
- QTest::qWait(1000);
+ QTest::qWait(100);
#if defined(Q_OS_IRIX)
QEXPECT_FAIL("", "IRIX requires explicit activateWindow(), so this test does not make any sense.", Abort);
#endif
- QVERIFY(childFocusWidgetOne->focusInEventRecieved);
+ QTRY_VERIFY(childFocusWidgetOne->focusInEventRecieved);
QVERIFY(childFocusWidgetOne->focusInEventGotFocus);
QVERIFY( childFocusWidgetOne->hasFocus() );
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 2c4a253..2fee98d 100644
--- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -154,6 +154,8 @@ void tst_QGraphicsAnchorLayout::simple()
QGraphicsWidget p;
p.setLayout(l);
+ QVERIFY(l->hasConflicts() == false);
+
QCOMPARE(l->count(), 2);
}
@@ -183,6 +185,8 @@ void tst_QGraphicsAnchorLayout::simple_center()
setAnchor(l, b, Qt::AnchorBottom, c, Qt::AnchorTop, 0);
setAnchor(l, c, Qt::AnchorBottom, l, Qt::AnchorBottom, 0);
+ QVERIFY(l->hasConflicts() == false);
+
QCOMPARE(l->count(), 3);
QGraphicsWidget *p = new QGraphicsWidget(0, Qt::Window);
@@ -193,6 +197,8 @@ void tst_QGraphicsAnchorLayout::simple_center()
QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
QCOMPARE(layoutMaximumSize, QSizeF(200, 20));
+
+ delete p;
}
void tst_QGraphicsAnchorLayout::simple_semifloat()
@@ -228,6 +234,8 @@ void tst_QGraphicsAnchorLayout::simple_semifloat()
setAnchor(l, a, Qt::AnchorBottom, l, Qt::AnchorBottom, 0);
setAnchor(l, b, Qt::AnchorBottom, l, Qt::AnchorBottom, 0);
+ QVERIFY(l->hasConflicts() == false);
+
QCOMPARE(l->count(), 4);
QGraphicsWidget *p = new QGraphicsWidget(0, Qt::Window);
@@ -240,6 +248,8 @@ void tst_QGraphicsAnchorLayout::simple_semifloat()
QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
QCOMPARE(layoutMaximumSize, QSizeF(200, 20));
+
+ delete p;
}
void tst_QGraphicsAnchorLayout::layoutDirection()
@@ -286,6 +296,10 @@ void tst_QGraphicsAnchorLayout::layoutDirection()
view->show();
QCOMPARE(checkReverseDirection(p), true);
+ QVERIFY(l->hasConflicts() == false);
+
+ delete p;
+ delete view;
}
void tst_QGraphicsAnchorLayout::diagonal()
@@ -326,6 +340,8 @@ void tst_QGraphicsAnchorLayout::diagonal()
l->addAnchor(e, Qt::AnchorRight, l, Qt::AnchorRight);
l->addAnchor(d, Qt::AnchorRight, e, Qt::AnchorLeft);
+ QVERIFY(l->hasConflicts() == false);
+
QCOMPARE(l->count(), 5);
QGraphicsWidget p;
@@ -373,6 +389,9 @@ void tst_QGraphicsAnchorLayout::diagonal()
QCOMPARE(p.size(), testA);
QCOMPARE(checkReverseDirection(&p), true);
+
+ c->setMinimumWidth(300);
+ QVERIFY(l->hasConflicts());
}
void tst_QGraphicsAnchorLayout::parallel()
@@ -465,6 +484,8 @@ void tst_QGraphicsAnchorLayout::parallel()
QCOMPARE(e->geometry(), QRectF(375, 400, 175, 100));
QCOMPARE(f->geometry(), QRectF(550, 500, 200, 100));
QCOMPARE(p.size(), layoutMaximumSize);
+
+ QVERIFY(l->hasConflicts() == false);
}
void tst_QGraphicsAnchorLayout::parallel2()
@@ -489,6 +510,7 @@ void tst_QGraphicsAnchorLayout::parallel2()
l->addAnchor(l, Qt::AnchorLeft, b, Qt::AnchorLeft);
l->addAnchor(b, Qt::AnchorRight, a, Qt::AnchorRight);
+ QVERIFY(l->hasConflicts() == false);
QCOMPARE(l->count(), 2);
QGraphicsWidget p;
@@ -570,6 +592,8 @@ void tst_QGraphicsAnchorLayout::snake()
QCOMPARE(b->geometry(), QRectF(90.0, 100.0, 10.0, 100.0));
QCOMPARE(c->geometry(), QRectF(90.0, 200.0, 100.0, 100.0));
QCOMPARE(p.size(), layoutMaximumSize);
+
+ QVERIFY(l->hasConflicts() == false);
}
void tst_QGraphicsAnchorLayout::snakeOppositeDirections()
@@ -603,6 +627,7 @@ void tst_QGraphicsAnchorLayout::snakeOppositeDirections()
l->addAnchor(c, Qt::AnchorRight, l, Qt::AnchorRight);
+ QVERIFY(l->hasConflicts() == false);
QCOMPARE(l->count(), 3);
QGraphicsWidget p;
@@ -706,6 +731,8 @@ void tst_QGraphicsAnchorLayout::fairDistribution()
QCOMPARE(c->geometry(), QRectF(200.0, 200.0, 100.0, 100.0));
QCOMPARE(d->geometry(), QRectF(0.0, 300.0, 300.0, 100.0));
QCOMPARE(p.size(), layoutMaximumSize);
+
+ QVERIFY(l->hasConflicts() == false);
}
void tst_QGraphicsAnchorLayout::fairDistributionOppositeDirections()
@@ -782,6 +809,8 @@ void tst_QGraphicsAnchorLayout::fairDistributionOppositeDirections()
QCOMPARE(a->size(), d->size());
QCOMPARE(e->size().width(), 4 * a->size().width());
QCOMPARE(p.size(), layoutMaximumSize);
+
+ QVERIFY(l->hasConflicts() == false);
}
void tst_QGraphicsAnchorLayout::proportionalPreferred()
@@ -844,6 +873,8 @@ void tst_QGraphicsAnchorLayout::proportionalPreferred()
QCOMPARE(a->size().width(), 10 * factor);
QCOMPARE(c->size().width(), 14 * factor);
QCOMPARE(p.size(), QSizeF(12, 400));
+
+ QVERIFY(l->hasConflicts() == false);
}
void tst_QGraphicsAnchorLayout::example()
@@ -897,6 +928,7 @@ void tst_QGraphicsAnchorLayout::example()
l->addAnchor(l, Qt::AnchorLeft, g, Qt::AnchorLeft);
l->addAnchor(f, Qt::AnchorRight, g, Qt::AnchorRight);
+ QVERIFY(l->hasConflicts() == false);
QCOMPARE(l->count(), 7);
QGraphicsWidget p;
@@ -985,6 +1017,10 @@ void tst_QGraphicsAnchorLayout::setSpacing()
QCOMPARE(b->geometry(), QRectF(24, 0, 20, 20));
QCOMPARE(c->geometry(), QRectF(0, 20, 44, 20));
+ QVERIFY(l->hasConflicts() == false);
+
+ delete p;
+ delete view;
}
/*!
@@ -1067,6 +1103,8 @@ void tst_QGraphicsAnchorLayout::hardComplexS60()
QSizeF layoutMaximumSize = l->effectiveSizeHint(Qt::MaximumSize);
QCOMPARE(layoutMaximumSize, QSizeF(240, 40));
+ QVERIFY(l->hasConflicts() == false);
+ delete p;
}
void tst_QGraphicsAnchorLayout::stability()
@@ -1128,6 +1166,7 @@ void tst_QGraphicsAnchorLayout::delete_anchor()
QGraphicsWidget *p = new QGraphicsWidget;
p->setLayout(l);
+ QVERIFY(l->hasConflicts() == false);
QCOMPARE(l->count(), 3);
scene.addItem(p);
@@ -1277,10 +1316,10 @@ void tst_QGraphicsAnchorLayout::conflicts()
a->setMinimumSize(QSizeF(29,10));
QCOMPARE(l->hasConflicts(), false);
- // It will currently fail if we uncomment this:
- //QEXPECT_FAIL("", "The constraints are just within their bounds in order to be feasible", Continue);
- //a->setMinimumSize(QSizeF(30,10));
- //QCOMPARE(l->hasConflicts(), false);
+ a->setMinimumSize(QSizeF(30,10));
+ QCOMPARE(l->hasConflicts(), false);
+
+ delete p;
}
QTEST_MAIN(tst_QGraphicsAnchorLayout)
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 8228ab9..a6746db 100644
--- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
+++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
@@ -58,10 +58,9 @@ public:
setSpacing( 0 );
}
- // ###: Remove me when isValid() is supported
bool isValid()
{
- return true;
+ return !hasConflicts();
}
void setAnchor(
@@ -463,9 +462,6 @@ void tst_QGraphicsAnchorLayout1::testAddAndRemoveAnchor()
void tst_QGraphicsAnchorLayout1::testIsValid()
{
- // ###: REMOVE ME
- return;
-
// Empty, valid
{
QGraphicsWidget *widget = new QGraphicsWidget;
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index b0e4b9d..956faa1 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -296,6 +296,7 @@ private slots:
void moveWhileDeleting();
void ensureDirtySceneTransform();
void focusScope();
+ void stackBefore();
// task specific tests below me
void task141694_textItemEnsureVisible();
@@ -8384,5 +8385,83 @@ void tst_QGraphicsItem::focusScope()
QCOMPARE(scopeB->focusItem(), (QGraphicsItem *)scopeB);
}
+void tst_QGraphicsItem::stackBefore()
+{
+ QGraphicsRectItem parent;
+ QGraphicsRectItem *child1 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
+ QGraphicsRectItem *child2 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
+ QGraphicsRectItem *child3 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
+ QGraphicsRectItem *child4 = new QGraphicsRectItem(QRectF(0, 0, 5, 5), &parent);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+ child1->setData(0, "child1");
+ child2->setData(0, "child2");
+ child3->setData(0, "child3");
+ child4->setData(0, "child4");
+
+ // Remove and append
+ child2->setParentItem(0);
+ child2->setParentItem(&parent);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child1 << child3 << child4 << child2));
+
+ // Move child2 before child1
+ child2->stackBefore(child1);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child2->stackBefore(child2);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child1->setZValue(1);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ child1->stackBefore(child2); // no effect
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ child1->setZValue(0);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child4->stackBefore(child1);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child4 << child1 << child3));
+ child4->setZValue(1);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child3->stackBefore(child1);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child3 << child1 << child4));
+ child4->setZValue(0);
+ QCOMPARE(parent.childItems(), (QList<QGraphicsItem *>() << child2 << child4 << child3 << child1));
+
+ // Make them all toplevels
+ child1->setParentItem(0);
+ child2->setParentItem(0);
+ child3->setParentItem(0);
+ child4->setParentItem(0);
+
+ QGraphicsScene scene;
+ scene.addItem(child1);
+ scene.addItem(child2);
+ scene.addItem(child3);
+ scene.addItem(child4);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder),
+ (QList<QGraphicsItem *>() << child1 << child2 << child3 << child4));
+
+ // Remove and append
+ scene.removeItem(child2);
+ scene.addItem(child2);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child1 << child3 << child4 << child2));
+
+ // Move child2 before child1
+ child2->stackBefore(child1);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child2->stackBefore(child2);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child1->setZValue(1);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ child1->stackBefore(child2); // no effect
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child3 << child4 << child1));
+ child1->setZValue(0);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child4->stackBefore(child1);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child4 << child1 << child3));
+ child4->setZValue(1);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child1 << child3 << child4));
+ child3->stackBefore(child1);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child3 << child1 << child4));
+ child4->setZValue(0);
+ QCOMPARE(scene.items(QPointF(2, 2), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder), (QList<QGraphicsItem *>() << child2 << child4 << child3 << child1));
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index a5d79de..4e46819 100644
--- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -145,7 +145,11 @@ void tst_QGraphicsLinearLayout::initTestCase()
{
// since the style will influence the results, we have to ensure
// that the tests are run using the same style on all platforms
+#ifdef Q_WS_S60
+ QApplication::setStyle(new QWindowsStyle);
+#else
QApplication::setStyle(new QPlastiqueStyle);
+#endif
}
// This will be called after the last test function is executed.
@@ -708,10 +712,10 @@ void tst_QGraphicsLinearLayout::itemAt_visualOrder()
QGraphicsWidget *w2 = new QGraphicsWidget;
l->insertItem(2, w2);
- QCOMPARE(l->itemAt(0), w0);
- QCOMPARE(l->itemAt(1), w1);
- QCOMPARE(l->itemAt(2), w2);
- QCOMPARE(l->itemAt(3), w3);
+ QCOMPARE(l->itemAt(0), static_cast<QGraphicsLayoutItem*>(w0));
+ QCOMPARE(l->itemAt(1), static_cast<QGraphicsLayoutItem*>(w1));
+ QCOMPARE(l->itemAt(2), static_cast<QGraphicsLayoutItem*>(w2));
+ QCOMPARE(l->itemAt(3), static_cast<QGraphicsLayoutItem*>(w3));
}
void tst_QGraphicsLinearLayout::orientation_data()
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 9d23096..95a038b 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -224,6 +224,8 @@ private slots:
void task253415_reconnectUpdateSceneOnSceneChanged();
void task255529_transformationAnchorMouseAndViewportMargins();
void task259503_scrollingArtifacts();
+ void QTBUG_4151_clipAndIgnore_data();
+ void QTBUG_4151_clipAndIgnore();
};
void tst_QGraphicsView::initTestCase()
@@ -311,15 +313,13 @@ void tst_QGraphicsView::renderHints()
view.show();
QTest::qWaitForWindowShown(&view);
view.repaint();
- QTest::qWait(125);
- QCOMPARE(item->hints, view.renderHints());
+ QTRY_COMPARE(item->hints, view.renderHints());
view.setRenderHints(QPainter::Antialiasing | QPainter::NonCosmeticDefaultPen);
QCOMPARE(view.renderHints(), QPainter::Antialiasing | QPainter::NonCosmeticDefaultPen);
view.repaint();
- QTest::qWait(125);
- QCOMPARE(item->hints, view.renderHints());
+ QTRY_COMPARE(item->hints, view.renderHints());
}
void tst_QGraphicsView::alignment()
@@ -384,7 +384,7 @@ void tst_QGraphicsView::interactive()
view.show();
QTest::qWaitForWindowShown(&view);
- QTestEventLoop::instance().enterLoop(1);
+ QApplication::processEvents();
QTRY_COMPARE(item->events.size(), 1); // activate
QPoint itemPoint = view.mapFromScene(item->scenePos());
@@ -935,11 +935,13 @@ void tst_QGraphicsView::foregroundBrush()
view.setSceneRect(-1000, -1000, 2000, 2000);
for (int i = -500; i < 500; i += 10) {
view.centerOn(i, 0);
- QTest::qWait(10);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
for (int i = -500; i < 500; i += 10) {
view.centerOn(0, i);
- QTest::qWait(10);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
}
@@ -965,7 +967,8 @@ void tst_QGraphicsView::matrix()
gradient2.setColorAt(1, Qt::transparent);
gradient2.setSpread(QGradient::RepeatSpread);
scene.setBackgroundBrush(gradient2);
- QTest::qWait(10);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
}
@@ -978,7 +981,8 @@ void tst_QGraphicsView::matrix()
view.show();
for (int i = 0; i < 160; ++i) {
view.rotate(18);
- QTest::qWait(5);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
/*
// These cause a crash
@@ -993,11 +997,13 @@ void tst_QGraphicsView::matrix()
*/
for (int i = 0; i < 20; ++i) {
view.scale(1.2, 1.2);
- QTest::qWait(20);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
for (int i = 0; i < 20; ++i) {
view.scale(0.6, 0.6);
- QTest::qWait(20);
+ QApplication::processEvents();
+ QApplication::processEvents();
}
}
}
@@ -1093,10 +1099,12 @@ void tst_QGraphicsView::centerOnItem()
QGraphicsView view(&scene);
view.setSceneRect(-1000, -1000, 2000, 2000);
view.show();
+ QTest::qWaitForWindowShown(&view);
int tolerance = 7;
for (int x = 0; x < 3; ++x) {
for (int i = 0; i < 4; ++i) {
+ QApplication::processEvents();
view.centerOn(items[i]);
QPoint viewCenter = view.mapToScene(view.viewport()->rect().center()).toPoint();
@@ -1111,7 +1119,7 @@ void tst_QGraphicsView::centerOnItem()
QFAIL(qPrintable(error));
}
- QTest::qWait(250);
+ QApplication::processEvents();
}
view.rotate(13);
@@ -1141,6 +1149,7 @@ void tst_QGraphicsView::ensureVisibleRect()
view.setSceneRect(-500, -500, 1000, 1000);
view.setFixedSize(250, 250);
view.show();
+ QTest::qWaitForWindowShown(&view);
for (int y = -100; y < 100; y += 25) {
for (int x = -100; x < 100; x += 13) {
@@ -1177,7 +1186,7 @@ void tst_QGraphicsView::ensureVisibleRect()
QVERIFY(qAbs(viewPoint.y() - viewRect.top()) >= margin -1);
QVERIFY(qAbs(viewPoint.y() - viewRect.bottom()) >= margin -1);
- QTest::qWait(10);
+ QApplication::processEvents();
}
}
view.rotate(5);
@@ -1381,10 +1390,8 @@ void tst_QGraphicsView::itemsInRect_cosmeticAdjust()
view.setFrameStyle(0);
view.resize(300, 300);
view.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&view);
-#endif
- QTest::qWait(125);
+ QTest::qWaitForWindowShown(&view) ;
+ QTRY_VERIFY(rect->numPaints > 0);
rect->numPaints = 0;
if (updateRect.isNull())
@@ -1521,8 +1528,8 @@ void tst_QGraphicsView::itemAt2()
view.setTransformationAnchor(QGraphicsView::NoAnchor);
view.setRenderHint(QPainter::Antialiasing);
view.show();
-
- QTestEventLoop::instance().enterLoop(1);
+ QTest::qWaitForWindowShown(&view);
+ QApplication::processEvents();
QPoint itemViewPoint = view.mapFromScene(item->scenePos());
@@ -2135,17 +2142,17 @@ void tst_QGraphicsView::resizeAnchor()
for (int size = 200; size <= 400; size += 25) {
view.resize(size, size);
if (i == 0) {
- QCOMPARE(view.mapToScene(50, 50), f);
- QVERIFY(view.mapToScene(view.viewport()->rect().center()) != center);
+ QTRY_COMPARE(view.mapToScene(50, 50), f);
+ QTRY_VERIFY(view.mapToScene(view.viewport()->rect().center()) != center);
} else {
- QVERIFY(view.mapToScene(50, 50) != f);
+ QTRY_VERIFY(view.mapToScene(50, 50) != f);
QPointF newCenter = view.mapToScene(view.viewport()->rect().center());
int slack = 3;
QVERIFY(qAbs(newCenter.x() - center.x()) < slack);
QVERIFY(qAbs(newCenter.y() - center.y()) < slack);
}
- QTest::qWait(250);
+ QTest::qWait(20);
}
}
}
@@ -2154,12 +2161,15 @@ class CustomView : public QGraphicsView
{
Q_OBJECT
public:
+ CustomView(QGraphicsScene *s = 0) : QGraphicsView(s) {}
QList<QRegion> lastUpdateRegions;
+ bool painted;
protected:
void paintEvent(QPaintEvent *event)
{
lastUpdateRegions << event->region();
+ painted = true;
QGraphicsView::paintEvent(event);
}
};
@@ -2247,6 +2257,7 @@ void tst_QGraphicsView::viewportUpdateMode2()
// Create a view with viewport rect equal to QRect(0, 0, 200, 200).
QGraphicsScene dummyScene;
CustomView view;
+ view.painted = false;
view.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
view.setScene(&dummyScene);
int left, top, right, bottom;
@@ -2255,6 +2266,7 @@ void tst_QGraphicsView::viewportUpdateMode2()
view.show();
QTest::qWaitForWindowShown(&view);
QTest::qWait(50);
+ QTRY_VERIFY(view.painted);
const QRect viewportRect = view.viewport()->rect();
QCOMPARE(viewportRect, QRect(0, 0, 200, 200));
@@ -2921,10 +2933,10 @@ void tst_QGraphicsView::task239729_noViewUpdate()
EventSpy spy(view->viewport(), QEvent::Paint);
QCOMPARE(spy.count(), 0);
- QTest::qWait(150);
+ QTest::qWait(100);
QCOMPARE(spy.count(), 0);
scene.update();
- QTest::qWait(150);
+ QApplication::processEvents();
QTRY_COMPARE(spy.count(), 1);
delete view;
@@ -3159,7 +3171,6 @@ void tst_QGraphicsView::moveItemWhileScrolling()
int a = adjustForAntialiasing ? 2 : 1;
expectedRegion += QRect(40, 50, 10, 10).adjusted(-a, -a, a, a);
expectedRegion += QRect(40, 60, 10, 10).adjusted(-a, -a, a, a);
-
QCOMPARE(view.lastPaintedRegion, expectedRegion);
}
@@ -3343,11 +3354,13 @@ void tst_QGraphicsView::render()
{
// ### This test can be much more thorough - see QGraphicsScene::render.
QGraphicsScene scene;
- QGraphicsView view(&scene);
+ CustomView view(&scene);
view.setFrameStyle(0);
view.resize(200, 200);
+ view.painted = false;
view.show();
QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(view.painted > 0);
RenderTester *r1 = new RenderTester(QRectF(0, 0, 50, 50));
RenderTester *r2 = new RenderTester(QRectF(50, 50, 50, 50));
@@ -3383,10 +3396,12 @@ void tst_QGraphicsView::exposeRegion()
QGraphicsScene scene;
scene.addItem(item);
+ item->paints = 0;
CustomView view;
view.setScene(&scene);
view.show();
QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(item->paints > 0);
item->paints = 0;
view.lastUpdateRegions.clear();
@@ -3449,7 +3464,7 @@ void tst_QGraphicsView::update()
QTest::qWaitForWindowShown(&view);
QApplication::setActiveWindow(&view);
- QTest::qWait(50);
+ QApplication::processEvents();
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&view));
const QRect viewportRect = view.viewport()->rect();
@@ -3465,15 +3480,15 @@ void tst_QGraphicsView::update()
viewPrivate->processPendingUpdates();
QVERIFY(viewPrivate->dirtyRegion.isEmpty());
QVERIFY(viewPrivate->dirtyBoundingRect.isEmpty());
- QTest::qWait(150);
+ QApplication::processEvents();
if (!intersects) {
- QVERIFY(view.lastUpdateRegions.isEmpty());
+ QTRY_VERIFY(view.lastUpdateRegions.isEmpty());
} else {
- QCOMPARE(view.lastUpdateRegions.size(), 1);
+ QTRY_COMPARE(view.lastUpdateRegions.size(), 1);
// Note that we adjust by 2 for antialiasing.
- QCOMPARE(view.lastUpdateRegions.at(0), QRegion(updateRect.adjusted(-2, -2, 2, 2) & viewportRect));
+ QTRY_COMPARE(view.lastUpdateRegions.at(0), QRegion(updateRect.adjusted(-2, -2, 2, 2) & viewportRect));
}
- QVERIFY(!viewPrivate->fullUpdatePending);
+ QTRY_VERIFY(!viewPrivate->fullUpdatePending);
#endif
}
@@ -3720,5 +3735,50 @@ void tst_QGraphicsView::task259503_scrollingArtifacts()
QTest::qWait(10);
}
+void tst_QGraphicsView::QTBUG_4151_clipAndIgnore_data()
+{
+ QTest::addColumn<bool>("clip");
+ QTest::addColumn<bool>("ignoreTransformations");
+ QTest::addColumn<int>("numItems");
+
+ QTest::newRow("none") << false << false << 3;
+ QTest::newRow("clip") << true << false << 3;
+ QTest::newRow("ignore") << false << true << 3;
+ QTest::newRow("clip+ignore") << true << true << 3;
+}
+
+void tst_QGraphicsView::QTBUG_4151_clipAndIgnore()
+{
+ QFETCH(bool, clip);
+ QFETCH(bool, ignoreTransformations);
+ QFETCH(int, numItems);
+
+ QGraphicsScene scene;
+
+ QGraphicsRectItem *parent = new QGraphicsRectItem(QRectF(0, 0, 50, 50), 0);
+ QGraphicsRectItem *child = new QGraphicsRectItem(QRectF(-10, -10, 40, 40), parent);
+ QGraphicsRectItem *ignore = new QGraphicsRectItem(QRectF(60, 60, 50, 50), 0);
+
+ if (clip)
+ parent->setFlags(QGraphicsItem::ItemClipsChildrenToShape);
+ if (ignoreTransformations)
+ ignore->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+
+ parent->setBrush(Qt::red);
+ child->setBrush(QColor(0, 0, 255, 128));
+ ignore->setBrush(Qt::green);
+
+ scene.addItem(parent);
+ scene.addItem(ignore);
+
+ QGraphicsView view(&scene);
+ view.setFrameStyle(0);
+ view.resize(75, 75);
+ view.show();
+ QTRY_COMPARE(QApplication::activeWindow(), (QWidget *)&view);
+
+ QCOMPARE(view.items(view.rect()).size(), numItems);
+}
+
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index c0d5051..05b506c 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -816,9 +816,7 @@ void tst_QImageReader::readFromDevice()
{
QFETCH(QString, fileName);
QFETCH(QByteArray, format);
- #ifdef Q_OS_SYMBIAN
- QSKIP("Symbian local sockets are not working", SkipAll);
- #endif
+
QImage expectedImage(prefix + fileName, format);
QFile file(prefix + fileName);
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index 8a5e344..dd03ef3 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -57,6 +57,8 @@
# define SRCDIR ""
#endif
+#include "../../shared/util.h"
+
class Widget : public QWidget
{
public:
@@ -102,11 +104,11 @@ private slots:
void eventPropagation_data();
void eventPropagation();
void focusPolicy();
-
+
void task190318_sizes();
void sizeHint();
-
+
void task226479_movieResize();
void emptyPixmap();
@@ -413,16 +415,17 @@ void tst_QLabel::task226479_movieResize()
paintedRegion += e->region();
QLabel::paintEvent(e);
}
-
+
public:
QRegion paintedRegion;
};
-
+
Label label;
label.resize(350,350);
label.show();
QMovie *movie = new QMovie( &label );
label.setMovie(movie);
+ QTest::qWaitForWindowShown(&label);
movie->setFileName(SRCDIR "red.png");
movie->start();
QTest::qWait(50);
@@ -431,8 +434,8 @@ void tst_QLabel::task226479_movieResize()
movie->setFileName(SRCDIR "green.png");
movie->start();
QTest::qWait(50);
-
- QCOMPARE(label.paintedRegion , QRegion(label.rect()) );
+
+ QTRY_COMPARE(label.paintedRegion , QRegion(label.rect()) );
}
void tst_QLabel::emptyPixmap()
diff --git a/tests/auto/qmdiarea/tst_qmdiarea.cpp b/tests/auto/qmdiarea/tst_qmdiarea.cpp
index 65f1937..b110114 100644
--- a/tests/auto/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/qmdiarea/tst_qmdiarea.cpp
@@ -639,9 +639,7 @@ void tst_QMdiArea::changeWindowTitle()
mw->setCentralWidget( ws );
mw->menuBar();
mw->show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(mw);
-#endif
+ QTest::qWaitForWindowShown(mw);
QWidget *widget = new QWidget( ws );
widget->setWindowTitle( wc );
@@ -655,22 +653,17 @@ void tst_QMdiArea::changeWindowTitle()
widget->setWindowState(Qt::WindowMaximized);
#endif
#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
#endif
mw->hide();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(mw);
-#endif
qApp->processEvents();
mw->show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(mw);
-#endif
qApp->processEvents();
+ QTest::qWaitForWindowShown(mw);
#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
#endif
#ifdef USE_SHOW
@@ -688,7 +681,7 @@ void tst_QMdiArea::changeWindowTitle()
#endif
qApp->processEvents();
#if !defined(Q_WS_MAC) && !defined(Q_OS_WINCE)
- QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
+ QTRY_COMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc) );
widget->setWindowTitle( wc2 );
QCOMPARE( mw->windowTitle(), QString::fromLatin1("%1 - [%2]").arg(mwc).arg(wc2) );
mw->setWindowTitle( mwc2 );
@@ -1697,11 +1690,8 @@ void tst_QMdiArea::tileSubWindows()
workspace.setActiveSubWindow(windows.at(5));
workspace.resize(workspace.size() - QSize(10, 10));
workspace.setActiveSubWindow(0);
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&workspace);
-#endif
QTest::qWait(250); // delayed re-arrange of minimized windows
- QCOMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect());
+ QTRY_COMPARE(workspace.viewport()->childrenRect(), workspace.viewport()->rect());
// Add another window and verify that the views are not tiled anymore.
workspace.addSubWindow(new QPushButton(QLatin1String("I'd like to mess up tiled views")))->show();
@@ -1732,9 +1722,6 @@ void tst_QMdiArea::tileSubWindows()
// Verify that we try to resize the area such that all sub-windows are visible.
// It's important that tiled windows are NOT overlapping.
workspace.resize(350, 150);
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&workspace);
-#endif
qApp->processEvents();
QTRY_COMPARE(workspace.size(), QSize(350, 150));
@@ -1761,13 +1748,10 @@ void tst_QMdiArea::tileSubWindows()
#ifdef Q_OS_WINCE
QSKIP("Not fixed yet! See task 197453", SkipAll);
#endif
- QCOMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
+ QTRY_COMPARE(workspace.viewport()->rect().size(), expectedViewportSize);
// Not enough space for all sub-windows to be visible -> provide scroll bars.
workspace.resize(150, 150);
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&workspace);
-#endif
qApp->processEvents();
QTRY_COMPARE(workspace.size(), QSize(150, 150));
diff --git a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
index d5d125a..b897d8f 100644
--- a/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
+++ b/tests/auto/qmdisubwindow/tst_qmdisubwindow.cpp
@@ -1648,9 +1648,9 @@ void tst_QMdiSubWindow::resizeTimer()
QMdiArea mdiArea;
QMdiSubWindow *subWindow = mdiArea.addSubWindow(new QWidget);
mdiArea.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&mdiArea);
-#endif
+ QTest::qWaitForWindowShown(&mdiArea);
+ QTest::qWait(250);
+
EventSpy timerEventSpy(subWindow, QEvent::Timer);
QCOMPARE(timerEventSpy.count(), 0);
diff --git a/tests/auto/qmessagebox/tst_qmessagebox.cpp b/tests/auto/qmessagebox/tst_qmessagebox.cpp
index 64e5a9c..5607fbd 100644
--- a/tests/auto/qmessagebox/tst_qmessagebox.cpp
+++ b/tests/auto/qmessagebox/tst_qmessagebox.cpp
@@ -130,7 +130,7 @@ private slots:
void testSymbols();
void incorrectDefaultButton();
void updateSize();
-
+
void setInformativeText();
void iconPixmap();
@@ -683,7 +683,13 @@ void tst_QMessageBox::incorrectDefaultButton()
void tst_QMessageBox::updateSize()
{
QMessageBox box;
+#ifdef Q_WS_S60
+ // In S60 messagebox is always occupies maximum width, i.e. screen width
+ // so we need to have long enough text to split over several line
+ box.setText("This is awesome long text");
+#else
box.setText("This is awesome");
+#endif
box.show();
QSize oldSize = box.size();
QString longText;
@@ -693,9 +699,12 @@ void tst_QMessageBox::updateSize()
QVERIFY(box.size() != oldSize); // should have grown
QVERIFY(box.width() > oldSize.width() || box.height() > oldSize.height());
oldSize = box.size();
+#ifndef Q_WS_S60
+ // In S60 dialogs buttons are in softkey area -> message box size does not change
box.setStandardButtons(QMessageBox::StandardButtons(0xFFFF));
QVERIFY(box.size() != oldSize); // should have grown
QVERIFY(box.width() > oldSize.width() || box.height() > oldSize.height());
+#endif
}
void tst_QMessageBox::setInformativeText()
diff --git a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
index a129f7f..acd23b0 100644
--- a/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
+++ b/tests/auto/qparallelanimationgroup/tst_qparallelanimationgroup.cpp
@@ -379,6 +379,10 @@ void tst_QParallelAnimationGroup::updateChildrenWithRunningGroup()
void tst_QParallelAnimationGroup::deleteChildrenWithRunningGroup()
{
+#if defined(Q_OS_SYMBIAN)
+ // give the Symbian app start event queue time to clear
+ QTest::qWait(1000);
+#endif
// test if children can be activated when their group is stopped
QParallelAnimationGroup group;
diff --git a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
index 6d262ba..b487d74 100644
--- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
@@ -171,7 +171,7 @@ void tst_QPixmapCache::setCacheLimit()
QPixmapCache::setCacheLimit(0);
QPixmapCache::setCacheLimit(1000);
QPixmapCache::Key key2 = QPixmapCache::insert(*p1);
- QCOMPARE(getPrivate(key2)->key, 2);
+ QCOMPARE(getPrivate(key2)->key, 1);
QVERIFY(QPixmapCache::find(key, &p2) == 0);
QVERIFY(QPixmapCache::find(key2, &p2) != 0);
QCOMPARE(p2, *p1);
@@ -200,7 +200,7 @@ void tst_QPixmapCache::find()
{
QPixmap p1(10, 10);
p1.fill(Qt::red);
- QPixmapCache::insert("P1", p1);
+ QVERIFY(QPixmapCache::insert("P1", p1));
QPixmap p2;
QVERIFY(QPixmapCache::find("P1", p2));
@@ -222,13 +222,13 @@ void tst_QPixmapCache::find()
QCOMPARE(p1, p2);
QPixmapCache::clear();
+ QPixmapCache::setCacheLimit(128);
key = QPixmapCache::insert(p1);
//The int part of the API
- // make sure it doesn't explode
QList<QPixmapCache::Key> keys;
- for (int i = 0; i < 40000; ++i)
+ for (int i = 0; i < 4000; ++i)
QPixmapCache::insert(p1);
//at that time the first key has been erase because no more place in the cache
@@ -293,8 +293,6 @@ void tst_QPixmapCache::insert()
estimatedNum = (1024 * QPixmapCache::cacheLimit())
/ ((p1.width() * p1.height() * p1.depth()) / 8);
QVERIFY(num <= estimatedNum);
- QPixmapCache::insert(p3);
-
}
void tst_QPixmapCache::replace()
@@ -307,13 +305,16 @@ void tst_QPixmapCache::replace()
p2.fill(Qt::yellow);
QPixmapCache::Key key = QPixmapCache::insert(p1);
+ QCOMPARE(getPrivate(key)->isValid, true);
QPixmap p3;
QVERIFY(QPixmapCache::find(key, &p3) == 1);
- QPixmapCache::replace(key,p2);
+ QPixmapCache::replace(key, p2);
QVERIFY(QPixmapCache::find(key, &p3) == 1);
+ QCOMPARE(getPrivate(key)->isValid, true);
+ QCOMPARE(getPrivate(key)->key, 1);
QCOMPARE(p3.width(), 10);
QCOMPARE(p3.height(), 10);
@@ -392,11 +393,8 @@ void tst_QPixmapCache::clear()
QPixmap p1(10, 10);
p1.fill(Qt::red);
-#ifdef Q_OS_WINCE
- const int numberOfKeys = 10000;
-#else
- const int numberOfKeys = 20000;
-#endif
+ const int numberOfKeys = 40000;
+
for (int i = 0; i < numberOfKeys; ++i)
QVERIFY(QPixmapCache::find("x" + QString::number(i)) == 0);
diff --git a/tests/auto/qprocess/qprocess.pro b/tests/auto/qprocess/qprocess.pro
index 047828a..77cfc82 100644
--- a/tests/auto/qprocess/qprocess.pro
+++ b/tests/auto/qprocess/qprocess.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
-SUBDIRS = testProcessCrash \
+SUBDIRS = \
+ testProcessCrash \
testProcessEcho \
testProcessEcho2 \
testProcessEcho3 \
diff --git a/tests/auto/qprocess/test/test.pro b/tests/auto/qprocess/test/test.pro
index 82f91f8..e1afd22 100644
--- a/tests/auto/qprocess/test/test.pro
+++ b/tests/auto/qprocess/test/test.pro
@@ -26,29 +26,85 @@ QT = core
embedded: QT += gui
wince*: {
- addFiles.sources = \
- ../fileWriterProcess \
- "../test Space In Name" \
- ../testBatFiles \
- ../testDetached \
- ../testExitCodes \
- ../testGuiProcess \
- ../testProcessCrash \
- ../testProcessDeadWhileReading \
- ../testProcessEcho \
- ../testProcessEcho2 \
- ../testProcessEcho3 \
- ../testProcessEchoGui \
- ../testProcessEOF \
- ../testProcessLoopback \
- ../testProcessNormal \
- ../testProcessOutput \
- ../testProcessSpacesArgs \
- ../testSoftExit \
- ../testSpaceInName
+
+ addFile_fileWriterProcess.sources = $$OUT_PWD/../fileWriterProcess/fileWriterProcess.exe
+ addFile_fileWriterProcess.path = fileWriterProcess
+
+ addFile_testBatFiles.sources = $$PWD/../testBatFiles/*
+ addFile_testBatFiles.path = testBatFiles
+
+ addFile_testDetached.sources = $$OUT_PWD/../testDetached/testDetached.exe
+ addFile_testDetached.path = testDetached
+
+ addFile_testExitCodes.sources = $$OUT_PWD/../testExitCodes/testExitCodes.exe
+ addFile_testExitCodes.path = testExitCodes
+
+ addFile_testGuiProcess.sources = $$OUT_PWD/../testGuiProcess/testGuiProcess.exe
+ addFile_testGuiProcess.path = testGuiProcess
- addFiles.path = \Program Files\tst_qprocess
- DEPLOYMENT += addFiles
+ addFile_testProcessCrash.sources = $$OUT_PWD/../testProcessCrash/testProcessCrash.exe
+ addFile_testProcessCrash.path = testProcessCrash
+
+ addFile_testProcessDeadWhileReading.sources = $$OUT_PWD/../testProcessDeadWhileReading/testProcessDeadWhileReading.exe
+ addFile_testProcessDeadWhileReading.path = testProcessDeadWhileReading
+
+ addFile_testProcessEcho.sources = $$OUT_PWD/../testProcessEcho/testProcessEcho.exe
+ addFile_testProcessEcho.path = testProcessEcho
+
+ addFile_testProcessEcho2.sources = $$OUT_PWD/../testProcessEcho2/testProcessEcho2.exe
+ addFile_testProcessEcho2.path = testProcessEcho2
+
+ addFile_testProcessEcho3.sources = $$OUT_PWD/../testProcessEcho3/testProcessEcho3.exe
+ addFile_testProcessEcho3.path = testProcessEcho3
+
+ addFile_testProcessEOF.sources = $$OUT_PWD/../testProcessEOF/testProcessEOF.exe
+ addFile_testProcessEOF.path = testProcessEOF
+
+ addFile_testProcessLoopback.sources = $$OUT_PWD/../testProcessLoopback/testProcessLoopback.exe
+ addFile_testProcessLoopback.path = testProcessLoopback
+
+ addFile_testProcessNormal.sources = $$OUT_PWD/../testProcessNormal/testProcessNormal.exe
+ addFile_testProcessNormal.path = testProcessNormal
+
+ addFile_testProcessOutput.sources = $$OUT_PWD/../testProcessOutput/testProcessOutput.exe
+ addFile_testProcessOutput.path = testProcessOutput
+
+ addFile_testProcessNoSpacesArgs.sources = $$OUT_PWD/../testProcessSpacesArgs/nospace.exe
+ addFile_testProcessNoSpacesArgs.path = testProcessSpacesArgs
+
+ addFile_testProcessOneSpacesArgs.sources = $$OUT_PWD/../testProcessSpacesArgs/"one space".exe
+ addFile_testProcessOneSpacesArgs.path = testProcessSpacesArgs
+
+ addFile_testProcessTwoSpacesArgs.sources = $$OUT_PWD/../testProcessSpacesArgs/"two space s".exe
+ addFile_testProcessTwoSpacesArgs.path = testProcessSpacesArgs
+
+ addFile_testSoftExit.sources = $$OUT_PWD/../testSoftExit/testSoftExit.exe
+ addFile_testSoftExit.path = testSoftExit
+
+ addFile_testSpaceInName.sources = $$OUT_PWD/../"test Space In Name"/testSpaceInName.exe
+ addFile_testSpaceInName.path = "test Space In Name"
+
+
+ DEPLOYMENT += addFile_fileWriterProcess \
+ addFile_testBatFiles \
+ addFile_testDetached \
+ addFile_testExitCodes \
+ addFile_testGuiProcess \
+ addFile_testProcessCrash \
+ addFile_testProcessDeadWhileReading \
+ addFile_testProcessEcho \
+ addFile_testProcessEcho2 \
+ addFile_testProcessEcho3 \
+ addFile_testProcessEchoGui \
+ addFile_testProcessEOF \
+ addFile_testProcessLoopback \
+ addFile_testProcessNormal \
+ addFile_testProcessOutput \
+ addFile_testProcessNoSpacesArgs \
+ addFile_testProcessOneSpacesArgs \
+ addFile_testProcessTwoSpacesArgs \
+ addFile_testSoftExit \
+ addFile_testSpaceInName
}
symbian: {
diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp
index cff6487..d5bc0bd 100644
--- a/tests/auto/qprocess/tst_qprocess.cpp
+++ b/tests/auto/qprocess/tst_qprocess.cpp
@@ -1318,15 +1318,6 @@ protected slots:
private:
int exitCode;
-#ifdef Q_OS_SYMBIAN
- enum
- {
- /**
- * The maximum stack size.
- */
- SymbianStackSize = 0x14000
- };
-#endif
};
//-----------------------------------------------------------------------------
@@ -1334,9 +1325,6 @@ void tst_QProcess::processInAThread()
{
for (int i = 0; i < 10; ++i) {
TestThread thread;
-#if defined(Q_OS_SYMBIAN)
- thread.setStackSize(SymbianStackSize);
-#endif
thread.start();
QVERIFY(thread.wait(10000));
QCOMPARE(thread.code(), 0);
@@ -1359,10 +1347,6 @@ void tst_QProcess::processesInMultipleThreads()
thread1.serial = serialCounter++;
thread2.serial = serialCounter++;
thread3.serial = serialCounter++;
-
- thread1.setStackSize(SymbianStackSize);
- thread2.setStackSize(SymbianStackSize);
- thread3.setStackSize(SymbianStackSize);
#endif
thread1.start();
thread2.start();
@@ -1874,7 +1858,6 @@ void tst_QProcess::setEnvironment()
QCOMPARE(process.readAll(), value.toLocal8Bit());
}
-#endif
}
//-----------------------------------------------------------------------------
@@ -1885,8 +1868,9 @@ void tst_QProcess::setProcessEnvironment_data()
void tst_QProcess::setProcessEnvironment()
{
-#if !defined (Q_OS_WINCE)
- // there is no concept of system variables on Windows CE as there is no console
+#if defined (Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
+ QSKIP("OS doesn't support environment variables", SkipAll);
+#endif
// make sure our environment variables are correct
QVERIFY(qgetenv("tst_QProcess").isEmpty());
@@ -2388,3 +2372,4 @@ void tst_QProcess::invalidProgramString()
QTEST_MAIN(tst_QProcess)
#include "tst_qprocess.moc"
#endif
+
diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
index f86e81d..51ef2da 100644
--- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
+++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp
@@ -55,10 +55,10 @@ public:
int duration() const { return -1; /* not time driven */ }
protected:
- void updateCurrentTime()
+ void updateCurrentTime(int currentTime)
{
- QPropertyAnimation::updateCurrentTime();
- if (currentTime() >= QPropertyAnimation::duration() || currentLoop() >= 1)
+ QPropertyAnimation::updateCurrentTime(currentTime);
+ if (currentTime >= QPropertyAnimation::duration() || currentLoop() >= 1)
stop();
}
};
diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
index dc7184c..b193d67 100644
--- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
+++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp
@@ -568,6 +568,19 @@ static QScriptValue custom_call(QScriptContext *ctx, QScriptEngine *)
return ctx->argumentsObject().property(0).call(QScriptValue(), QScriptValueList() << ctx->argumentsObject().property(1));
}
+static QScriptValue native_recurse(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue func = ctx->argumentsObject().property(0);
+ QScriptValue n = ctx->argumentsObject().property(1);
+
+ if(n.toUInt32() <= 1) {
+ return func.call(QScriptValue(), QScriptValueList());
+ } else {
+ return eng->evaluate("native_recurse").call(QScriptValue(),
+ QScriptValueList() << func << QScriptValue(n.toUInt32() - 1));
+ }
+}
+
void tst_QScriptContext::backtrace_data()
{
QTest::addColumn<QString>("code");
@@ -724,6 +737,83 @@ void tst_QScriptContext::backtrace_data()
QTest::newRow("call native") << source << expected;
}
+
+ {
+ QLatin1String func( "function f1() {\n"
+ " eval('var q = 4');\n"
+ " return custom_call(bt, 22);\n"
+ "}");
+
+ QString source = QString::fromLatin1("\n"
+ "function f2() {\n"
+ " func = %1\n"
+ " return custom_call(func, 12);\n"
+ "}\n"
+ "f2();\n").arg(func);
+
+ QStringList expected;
+ expected << "<native>(22) at -1"
+ << "<native>(function () {\n [native code]\n}, 22) at -1"
+ << "f1(12) at testfile:5"
+ << QString::fromLatin1("<native>(%1, 12) at -1").arg(func)
+ << "f2() at testfile:7"
+ << "<global>() at testfile:9";
+
+
+ QTest::newRow("calls with closures") << source << expected;
+ }
+
+ {
+ QLatin1String func( "function js_bt() {\n"
+ " return bt();\n"
+ "}");
+
+ QString source = QString::fromLatin1("\n"
+ "%1\n"
+ "function f() {\n"
+ " return native_recurse(js_bt, 12);\n"
+ "}\n"
+ "f();\n").arg(func);
+
+ QStringList expected;
+ expected << "<native>() at -1" << "js_bt() at testfile:3";
+ for(int n = 1; n <= 12; n++) {
+ expected << QString::fromLatin1("<native>(%1, %2) at -1")
+ .arg(func).arg(n);
+ }
+ expected << "f() at testfile:6";
+ expected << "<global>() at testfile:8";
+
+ QTest::newRow("native recursive") << source << expected;
+ }
+
+ {
+ QString source = QString::fromLatin1("\n"
+ "function finish() {\n"
+ " return bt();\n"
+ "}\n"
+ "function rec(n) {\n"
+ " if(n <= 1)\n"
+ " return finish();\n"
+ " else\n"
+ " return rec (n - 1);\n"
+ "}\n"
+ "function f() {\n"
+ " return rec(12);\n"
+ "}\n"
+ "f();\n");
+
+ QStringList expected;
+ expected << "<native>() at -1" << "finish() at testfile:3";
+ for(int n = 1; n <= 12; n++) {
+ expected << QString::fromLatin1("rec(n = %1) at testfile:%2")
+ .arg(n).arg((n==1) ? 7 : 9);
+ }
+ expected << "f() at testfile:12";
+ expected << "<global>() at testfile:14";
+
+ QTest::newRow("js recursive") << source << expected;
+ }
}
@@ -736,6 +826,7 @@ void tst_QScriptContext::backtrace()
eng.globalObject().setProperty("bt", eng.newFunction(getBacktrace));
eng.globalObject().setProperty("custom_eval", eng.newFunction(custom_eval));
eng.globalObject().setProperty("custom_call", eng.newFunction(custom_call));
+ eng.globalObject().setProperty("native_recurse", eng.newFunction(native_recurse));
QString fileName = "testfile";
QScriptValue ret = eng.evaluate(code, fileName);
@@ -944,6 +1035,16 @@ void tst_QScriptContext::inheritActivationAndThisObject()
QVERIFY(ret.isNumber());
QCOMPARE(ret.toInt32(), 123);
}
+
+ // QT-2219
+ {
+ eng.globalObject().setProperty("a", 123);
+ QScriptValue ret = eng.evaluate("(function() { myEval('var a = 456'); return a; })()");
+ QVERIFY(ret.isNumber());
+ QCOMPARE(ret.toInt32(), 456);
+ QEXPECT_FAIL("", "QT-2219: Wrong activation object is returned from native function's parent context", Continue);
+ QVERIFY(eng.globalObject().property("a").strictlyEquals(123));
+ }
}
static QScriptValue parentContextToString(QScriptContext *ctx, QScriptEngine *)
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 4d693af..183aa3f 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -95,6 +95,7 @@ private slots:
void evaluate();
void nestedEvaluate();
void uncaughtException();
+ void errorMessage_QT679();
void valueConversion();
void importExtension();
void infiniteRecursion();
@@ -1625,6 +1626,16 @@ void tst_QScriptEngine::uncaughtException()
}
}
+void tst_QScriptEngine::errorMessage_QT679()
+{
+ QScriptEngine engine;
+ engine.globalObject().setProperty("foo", 15);
+ QScriptValue error = engine.evaluate("'hello world';\nfoo.bar.blah");
+ QVERIFY(error.isError());
+ QEXPECT_FAIL("", "Task QT-679: the error message always contains the first line of the script, even if the error was on a different line", Continue);
+ QCOMPARE(error.toString(), QString::fromLatin1("TypeError: Result of expression 'foo.bar' [undefined] is not an object."));
+}
+
struct Foo {
public:
int x, y;
diff --git a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
index b14d6f8..aa6801a 100644
--- a/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
+++ b/tests/auto/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp
@@ -169,10 +169,10 @@ public:
int duration() const { return -1; /* not time driven */ }
protected:
- void updateCurrentTime()
+ void updateCurrentTime(int currentTime)
{
- QPropertyAnimation::updateCurrentTime();
- if (currentTime() >= QPropertyAnimation::duration())
+ QPropertyAnimation::updateCurrentTime(currentTime);
+ if (currentTime >= QPropertyAnimation::duration())
stop();
}
};
diff --git a/tests/auto/qsharedmemory/lackey/lackey.pro b/tests/auto/qsharedmemory/lackey/lackey.pro
index 9d2fcad..d25a50a 100644
--- a/tests/auto/qsharedmemory/lackey/lackey.pro
+++ b/tests/auto/qsharedmemory/lackey/lackey.pro
@@ -9,6 +9,8 @@ DESTDIR = ./
win32: CONFIG += console
mac:CONFIG -= app_bundle
+requires(contains(QT_CONFIG,script))
+
DEFINES += QSHAREDMEMORY_DEBUG
DEFINES += QSYSTEMSEMAPHORE_DEBUG
diff --git a/tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro b/tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro
index 042ab3f..e232443 100644
--- a/tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro
+++ b/tests/auto/qsharedmemory/qsystemlock/qsystemlock.pro
@@ -5,6 +5,12 @@ include(../src/src.pri)
win32: CONFIG += console
mac:CONFIG -= app_bundle
+wince* {
+ DEFINES += SRCDIR=\\\"\\\"
+} else:!symbian {
+ DEFINES += SRCDIR=\\\"$$PWD\\\"
+}
+
DESTDIR = ./
DEFINES += QSHAREDMEMORY_DEBUG
diff --git a/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp b/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp
index b6355fe..35f05d1 100644
--- a/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp
+++ b/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp
@@ -46,6 +46,13 @@
//TESTED_CLASS=
//TESTED_FILES=
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// And underlying Open C have application private dir in default search path
+#define SRCDIR ""
+#endif
+
+
#define EXISTING_SHARE "existing"
class tst_QSystemLock : public QObject
@@ -195,26 +202,35 @@ void tst_QSystemLock::processes()
QStringList scripts;
for (int i = 0; i < readOnly; ++i)
- scripts.append("../lackey/scripts/systemlock_read.js");
+ scripts.append(QFileInfo(SRCDIR "lackey/scripts/ systemlock_read.js").absoluteFilePath() );
for (int i = 0; i < readWrite; ++i)
- scripts.append("../lackey/scripts/systemlock_readwrite.js");
+ scripts.append(QFileInfo(SRCDIR "lackey/scripts/systemlock_readwrite.js").absoluteFilePath());
QList<QProcess*> consumers;
+ unsigned int failedProcesses = 0;
for (int i = 0; i < scripts.count(); ++i) {
+
QStringList arguments = QStringList() << scripts.at(i);
QProcess *p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
- consumers.append(p);
- p->start("../lackey/lackey", arguments);
+
+ p->start(QFileInfo(SRCDIR "lackey/lackey").absoluteFilePath(), arguments);
+ // test, if the process could be started.
+
+ if (p->waitForStarted(2000))
+ consumers.append(p);
+ else
+ ++failedProcesses;
}
while (!consumers.isEmpty()) {
consumers.first()->waitForFinished(3000);
- consumers.first()->kill();
+ consumers.first()->kill();
QCOMPARE(consumers.first()->exitStatus(), QProcess::NormalExit);
QCOMPARE(consumers.first()->exitCode(), 0);
delete consumers.takeFirst();
}
+ QCOMPARE(failedProcesses, (unsigned int)(0));
}
QTEST_MAIN(tst_QSystemLock)
diff --git a/tests/auto/qsharedmemory/src/qsystemlock_p.h b/tests/auto/qsharedmemory/src/qsystemlock_p.h
index 2ff1a79..2d44051 100644
--- a/tests/auto/qsharedmemory/src/qsystemlock_p.h
+++ b/tests/auto/qsharedmemory/src/qsystemlock_p.h
@@ -47,7 +47,9 @@
#include "qsystemlock.h"
#include "private/qsharedmemory_p.h"
+#ifndef Q_OS_WINCE
#include <sys/types.h>
+#endif
#define MAX_LOCKS 64
diff --git a/tests/auto/qsharedmemory/test/test.pro b/tests/auto/qsharedmemory/test/test.pro
index 779a942..c9f4fec 100644
--- a/tests/auto/qsharedmemory/test/test.pro
+++ b/tests/auto/qsharedmemory/test/test.pro
@@ -18,12 +18,14 @@ TARGET = ../tst_qsharedmemory
}
wince*:{
+requires(contains(QT_CONFIG,script))
QT += gui script
addFiles.sources = ../lackey/lackey.exe ../lackey/scripts
addFiles.path = lackey
DEPLOYMENT += addFiles
DEFINES += SRCDIR=\\\"\\\"
}else:symbian*{
+requires(contains(QT_CONFIG,script))
QT += gui script
addFiles.sources = ../lackey/scripts
addFiles.path = /data/qsharedmemorytemp/lackey
diff --git a/tests/auto/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
index c0a1c2b..c4ff76c 100644
--- a/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
+++ b/tests/auto/qsharedmemory/tst_qsharedmemory.cpp
@@ -737,11 +737,12 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
#endif
QProcess producer;
producer.setProcessChannelMode(QProcess::ForwardedChannels);
- producer.start("./lackey/lackey", arguments);
+ producer.start( QFileInfo("./lackey/lackey.exe").absoluteFilePath(), arguments);
producer.waitForStarted();
QVERIFY(producer.error() != QProcess::FailedToStart);
QList<QProcess*> consumers;
+ unsigned int failedProcesses = 0;
for (int i = 0; i < processes; ++i) {
#ifndef Q_OS_WINCE
QStringList arguments = QStringList() << SRCDIR "lackey/scripts/consumer.js";
@@ -750,8 +751,12 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
#endif
QProcess *p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
- consumers.append(p);
p->start("./lackey/lackey", arguments);
+
+ if (p->waitForStarted(2000))
+ consumers.append(p);
+ else
+ ++failedProcesses;
}
producer.waitForFinished(5000);
@@ -768,6 +773,7 @@ void tst_QSharedMemory::simpleProcessProducerConsumer()
delete consumers.takeFirst();
}
QCOMPARE(consumerFailed, false);
+ QCOMPARE(failedProcesses, unsigned int (0));
}
QTEST_MAIN(tst_QSharedMemory)
diff --git a/tests/auto/qsharedpointer/externaltests.pri b/tests/auto/qsharedpointer/externaltests.pri
index 627af87..c8a3676 100644
--- a/tests/auto/qsharedpointer/externaltests.pri
+++ b/tests/auto/qsharedpointer/externaltests.pri
@@ -4,5 +4,5 @@ cleanedQMAKESPEC = $$replace(QMAKESPEC, \\\\, /)
!symbian:DEFINES += DEFAULT_MAKESPEC=\\\"$$cleanedQMAKESPEC\\\"
embedded:DEFINES += QTEST_NO_RTTI QTEST_CROSS_COMPILED
-wince*:DEFINES += QTEST_CROSS_COMPILED
+wince*:DEFINES += QTEST_CROSS_COMPILED QTEST_NO_RTTI
symbian: DEFINES += QTEST_CROSS_COMPILED
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 0d6e24c..fa63c4b 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -1061,7 +1061,10 @@ void tst_QSharedPointer::constCorrectness()
ptr = cptr;
QSharedPointer<Data> other = qSharedPointerCast<Data>(cptr);
+
+#ifndef QT_NO_DYNAMIC_CAST
other = qSharedPointerDynamicCast<Data>(cptr);
+#endif
QCOMPARE(cptr.data(), aData);
QCOMPARE(cptr.operator->(), aData);
diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
index 81ef498..832605e 100644
--- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
+++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
@@ -42,6 +42,8 @@
#include <QtTest/QtTest>
#include "qevent.h"
+#include "qdialog.h"
+#include "qdialogbuttonbox.h"
#include "private/qsoftkeymanager_p.h"
class tst_QSoftKeyManager : public QObject
@@ -59,6 +61,8 @@ public slots:
void cleanup();
private slots:
void updateSoftKeysCompressed();
+ void handleCommand();
+ void checkSoftkeyEnableStates();
};
class EventListener : public QObject
@@ -133,6 +137,56 @@ void tst_QSoftKeyManager::updateSoftKeysCompressed()
QVERIFY(listener.numUpdateSoftKeys == 1);
}
+/*
+ This tests that when the S60 environment sends us a command
+ that it actually gets mapped to the correct action.
+*/
+void tst_QSoftKeyManager::handleCommand()
+{
+ QDialog w;
+ QDialogButtonBox *buttons = new QDialogButtonBox(
+ QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
+ Qt::Horizontal,
+ &w);
+
+ w.show();
+ QApplication::processEvents();
+
+ QCOMPARE(w.actions().count(), 2);
+
+ QSignalSpy spy0(w.actions()[0], SIGNAL(triggered()));
+ QSignalSpy spy1(w.actions()[1], SIGNAL(triggered()));
+
+ // These should work eventually, but do not yet
+// QTest::keyPress(&w, Qt::Key_Context1);
+// QTest::keyPress(&w, Qt::Key_Context2);
+
+ qApp->symbianHandleCommand(6000);
+ qApp->symbianHandleCommand(6001);
+
+ QApplication::processEvents();
+
+ QCOMPARE(spy0.count(), 1);
+ QCOMPARE(spy1.count(), 1);
+}
+
+/*
+ This tests that softkey enable state follows the state of widget that owns the action
+ to which the softkey is related to.
+*/
+void tst_QSoftKeyManager::checkSoftkeyEnableStates()
+{
+ QWidget w1, w2;
+ w1.setEnabled(false);
+ w2.setEnabled(true);
+
+ QAction *disabledAction = QSoftKeyManager::createAction(QSoftKeyManager::OkSoftKey, &w1);
+ QAction *enabledAction = QSoftKeyManager::createAction(QSoftKeyManager::OkSoftKey, &w2);
+
+ QVERIFY(disabledAction->isEnabled()==false);
+ QVERIFY(enabledAction->isEnabled()==true);
+}
+
QTEST_MAIN(tst_QSoftKeyManager)
#include "tst_qsoftkeymanager.moc"
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp
index 69347c4..4829b6b 100644
--- a/tests/auto/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/qspinbox/tst_qspinbox.cpp
@@ -653,21 +653,21 @@ void tst_QSpinBox::valueFromTextAndValidate_data()
QTest::addColumn<int>("maxi");
QTest::addColumn<QString>("expectedText"); // if empty we don't check
- QTest::newRow("data0") << QString("2") << Invalid << 3 << 5 << QString();
+ QTest::newRow("data0") << QString("2") << Intermediate << 3 << 5 << QString();
QTest::newRow("data1") << QString() << Intermediate << 0 << 100 << QString();
QTest::newRow("data2") << QString("asd") << Invalid << 0 << 100 << QString();
QTest::newRow("data3") << QString("2") << Acceptable << 0 << 100 << QString();
QTest::newRow("data4") << QString() << Intermediate << 0 << 1 << QString();
QTest::newRow("data5") << QString() << Invalid << 0 << 0 << QString();
QTest::newRow("data5") << QString("5") << Intermediate << 2004 << 2005 << QString();
- QTest::newRow("data6") << QString("50") << Invalid << 2004 << 2005 << QString();
+ QTest::newRow("data6") << QString("50") << Intermediate << 2004 << 2005 << QString();
QTest::newRow("data7") << QString("205") << Intermediate << 2004 << 2005 << QString();
QTest::newRow("data8") << QString("2005") << Acceptable << 2004 << 2005 << QString();
- QTest::newRow("data9") << QString("3") << Invalid << 2004 << 2005 << QString();
+ QTest::newRow("data9") << QString("3") << Intermediate << 2004 << 2005 << QString();
QTest::newRow("data10") << QString("-") << Intermediate << -20 << -10 << QString();
QTest::newRow("data11") << QString("-1") << Intermediate << -20 << -10 << QString();
QTest::newRow("data12") << QString("-5") << Intermediate << -20 << -10 << QString();
- QTest::newRow("data13") << QString("-5") << Invalid << -20 << -16 << QString();
+ QTest::newRow("data13") << QString("-5") << Intermediate << -20 << -16 << QString();
QTest::newRow("data14") << QString("-2") << Intermediate << -20 << -16 << QString();
QTest::newRow("data15") << QString("2") << Invalid << -20 << -16 << QString();
QTest::newRow("data16") << QString() << Intermediate << -20 << -16 << QString();
diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
index 4198bfc..4175bef 100644
--- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp
@@ -1705,8 +1705,6 @@ void tst_QSqlDatabase::precisionPolicy()
QEXPECT_FAIL("QOCI", "Oracle fails here, to retrieve next", Continue);
QVERIFY_SQL(q, exec(query));
QVERIFY_SQL(q, next());
- if(db.driverName().startsWith("QSQLITE"))
- QEXPECT_FAIL("", "SQLite returns this value as determined by contents of the field, not the declaration", Continue);
QCOMPARE(q.value(0).type(), QVariant::LongLong);
QSql::NumericalPrecisionPolicy oldPrecision= db.numericalPrecisionPolicy();
@@ -1715,8 +1713,6 @@ void tst_QSqlDatabase::precisionPolicy()
q2.exec(QString("SELECT num FROM %1 WHERE id = 2").arg(tableName));
QVERIFY_SQL(q2, exec(query));
QVERIFY_SQL(q2, next());
- if(db.driverName().startsWith("QSQLITE"))
- QEXPECT_FAIL("", "SQLite returns this value as determined by contents of the field, not the declaration", Continue);
QCOMPARE(q2.value(0).type(), QVariant::LongLong);
db.setNumericalPrecisionPolicy(oldPrecision);
}
@@ -2005,6 +2001,10 @@ void tst_QSqlDatabase::odbc_bindBoolean()
QSqlDatabase db = QSqlDatabase::database(dbName);
CHECK_DATABASE(db);
+ if (tst_Databases::isMySQL(db)) {
+ QSKIP("MySql has inconsistent behaviour of bit field type across versions.", SkipSingle);
+ return;
+ }
QSqlQuery q(db);
QVERIFY_SQL(q, exec("CREATE TABLE " + qTableName("qtestBindBool") + "(id int, boolvalue bit)"));
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index eb95d611c..5ed9cfa 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -2352,7 +2352,7 @@ void tst_QSqlQuery::sqlite_finish()
QString tableName = qTableName( "qtest_lockedtable" );
QSqlQuery q( db );
- tst_Databases::safeDropTable( db2, tableName );
+ tst_Databases::safeDropTable( db, tableName );
q.exec( "CREATE TABLE " + tableName + " (pk_id INTEGER PRIMARY KEY, whatever TEXT)" );
q.exec( "INSERT INTO " + tableName + " values(1, 'whatever')" );
q.exec( "INSERT INTO " + tableName + " values(2, 'whatever more')" );
@@ -2371,7 +2371,7 @@ void tst_QSqlQuery::sqlite_finish()
QVERIFY_SQL( q2, exec( "DELETE FROM " + tableName + " WHERE pk_id=2" ) );
QCOMPARE( q2.numRowsAffected(), 1 );
- tst_Databases::safeDropTable( db2, tableName );
+ tst_Databases::safeDropTable( db, tableName );
}
QSqlDatabase::removeDatabase( "sqlite_finish_sqlite" );
diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
index a3f2f54..37b34bf 100644
--- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
+++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
@@ -176,6 +176,7 @@ private slots:
void twoAnimatedTransitions();
void playAnimationTwice();
void nestedTargetStateForAnimation();
+ void polishedSignalTransitionsReuseAnimationGroup();
void animatedGlobalRestoreProperty();
void specificTargetValueOfAnimation();
@@ -1742,11 +1743,18 @@ class TestSignalTransition : public QSignalTransition
{
public:
TestSignalTransition(QState *sourceState = 0)
- : QSignalTransition(sourceState) {}
+ : QSignalTransition(sourceState), m_sender(0)
+ {}
TestSignalTransition(QObject *sender, const char *signal,
QAbstractState *target)
- : QSignalTransition(sender, signal)
+ : QSignalTransition(sender, signal), m_sender(0)
{ setTargetState(target); }
+ QObject *senderReceived() const {
+ return m_sender;
+ }
+ int signalIndexReceived() const {
+ return m_signalIndex;
+ }
QVariantList argumentsReceived() const {
return m_args;
}
@@ -1754,11 +1762,15 @@ protected:
bool eventTest(QEvent *e) {
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
- const_cast<TestSignalTransition*>(this)->m_args = se->arguments();
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
+ m_sender = se->sender();
+ m_signalIndex = se->signalIndex();
+ m_args = se->arguments();
return true;
}
private:
+ QObject *m_sender;
+ int m_signalIndex;
QVariantList m_args;
};
@@ -1870,6 +1882,8 @@ void tst_QStateMachine::signalTransitions()
emitter.emitSignalWithIntArg(123);
QTRY_COMPARE(finishedSpy.count(), 1);
+ QCOMPARE(trans->senderReceived(), (QObject*)&emitter);
+ QCOMPARE(trans->signalIndexReceived(), emitter.metaObject()->indexOfSignal("signalWithIntArg(int)"));
QCOMPARE(trans->argumentsReceived().size(), 1);
QCOMPARE(trans->argumentsReceived().at(0).toInt(), 123);
}
@@ -1890,6 +1904,8 @@ void tst_QStateMachine::signalTransitions()
emitter.emitSignalWithStringArg(testString);
QTRY_COMPARE(finishedSpy.count(), 1);
+ QCOMPARE(trans->senderReceived(), (QObject*)&emitter);
+ QCOMPARE(trans->signalIndexReceived(), emitter.metaObject()->indexOfSignal("signalWithStringArg(QString)"));
QCOMPARE(trans->argumentsReceived().size(), 1);
QCOMPARE(trans->argumentsReceived().at(0).toString(), testString);
}
@@ -2028,6 +2044,38 @@ void tst_QStateMachine::signalTransitions()
}
}
+class TestEventTransition : public QEventTransition
+{
+public:
+ TestEventTransition(QState *sourceState = 0)
+ : QEventTransition(sourceState),
+ m_eventSource(0), m_eventType(QEvent::None)
+ {}
+ TestEventTransition(QObject *object, QEvent::Type type,
+ QAbstractState *target)
+ : QEventTransition(object, type),
+ m_eventSource(0), m_eventType(QEvent::None)
+ { setTargetState(target); }
+ QObject *eventSourceReceived() const {
+ return m_eventSource;
+ }
+ QEvent::Type eventTypeReceived() const {
+ return m_eventType;
+ }
+protected:
+ bool eventTest(QEvent *e) {
+ if (!QEventTransition::eventTest(e))
+ return false;
+ QStateMachine::WrappedEvent *we = static_cast<QStateMachine::WrappedEvent*>(e);
+ m_eventSource = we->object();
+ m_eventType = we->event()->type();
+ return true;
+ }
+private:
+ QObject *m_eventSource;
+ QEvent::Type m_eventType;
+};
+
void tst_QStateMachine::eventTransitions()
{
QPushButton button;
@@ -2274,6 +2322,30 @@ void tst_QStateMachine::eventTransitions()
QTest::ignoreMessage(QtWarningMsg, "QObject event transitions are not supported for custom types");
QTRY_COMPARE(startedSpy.count(), 1);
}
+ // custom transition
+ {
+ QStateMachine machine;
+ QState *s0 = new QState(&machine);
+ QFinalState *s1 = new QFinalState(&machine);
+
+ TestEventTransition *trans = new TestEventTransition(&button, QEvent::MouseButtonPress, s1);
+ s0->addTransition(trans);
+ QCOMPARE(trans->eventSourceReceived(), (QObject*)0);
+ QCOMPARE(trans->eventTypeReceived(), QEvent::None);
+
+ QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
+ machine.setInitialState(s0);
+ machine.start();
+ QCoreApplication::processEvents();
+
+ QTest::mousePress(&button, Qt::LeftButton);
+ QCoreApplication::processEvents();
+
+ QTRY_COMPARE(finishedSpy.count(), 1);
+
+ QCOMPARE(trans->eventSourceReceived(), (QObject*)&button);
+ QCOMPARE(trans->eventTypeReceived(), QEvent::MouseButtonPress);
+ }
}
void tst_QStateMachine::historyStates()
@@ -3044,6 +3116,38 @@ void tst_QStateMachine::nestedTargetStateForAnimation()
QCOMPARE(counter.counter, 2);
}
+void tst_QStateMachine::polishedSignalTransitionsReuseAnimationGroup()
+{
+ QStateMachine machine;
+ QObject *object = new QObject(&machine);
+ object->setProperty("foo", 0);
+
+ QState *s1 = new QState(&machine);
+ s1->assignProperty(object, "foo", 123);
+ QState *s2 = new QState(&machine);
+ s2->assignProperty(object, "foo", 456);
+ QState *s3 = new QState(&machine);
+ s3->assignProperty(object, "foo", 789);
+ QFinalState *s4 = new QFinalState(&machine);
+
+ QParallelAnimationGroup animationGroup;
+ animationGroup.addAnimation(new QPropertyAnimation(object, "foo"));
+ QSignalSpy animationFinishedSpy(&animationGroup, SIGNAL(finished()));
+ s1->addTransition(s1, SIGNAL(polished()), s2)->addAnimation(&animationGroup);
+ s2->addTransition(s2, SIGNAL(polished()), s3)->addAnimation(&animationGroup);
+ s3->addTransition(s3, SIGNAL(polished()), s4);
+
+ machine.setInitialState(s1);
+ QSignalSpy machineFinishedSpy(&machine, SIGNAL(finished()));
+ machine.start();
+ QTRY_COMPARE(machineFinishedSpy.count(), 1);
+ QCOMPARE(machine.configuration().size(), 1);
+ QVERIFY(machine.configuration().contains(s4));
+ QCOMPARE(object->property("foo").toInt(), 789);
+
+ QCOMPARE(animationFinishedSpy.count(), 2);
+}
+
void tst_QStateMachine::animatedGlobalRestoreProperty()
{
QStateMachine machine;
@@ -3954,7 +4058,7 @@ public:
void onTransition(QEvent *e)
{
QSignalTransition::onTransition(e);
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
eventSignalIndex = se->signalIndex();
}
diff --git a/tests/auto/qsystemsemaphore/test/test.pro b/tests/auto/qsystemsemaphore/test/test.pro
index b8d3a4a..ed7898c 100644
--- a/tests/auto/qsystemsemaphore/test/test.pro
+++ b/tests/auto/qsystemsemaphore/test/test.pro
@@ -18,6 +18,7 @@ win32 {
RESOURCES += ../files.qrc
wince*: {
+requires(contains(QT_CONFIG,script))
# this test calls lackey, which then again depends on QtScript.
# let's add it here so that it gets deployed easily
QT += script
@@ -28,6 +29,7 @@ DEPLOYMENT += lackey
}
symbian: {
+requires(contains(QT_CONFIG,script))
# this test calls lackey, which then again depends on QtScript.
# let's add it here so that it gets deployed easily
QT += script
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index f5d5040..71218a3 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -2339,6 +2339,7 @@ void tst_QTableView::scrollTo()
// resizing to this size will ensure that there can ONLY_BE_ONE_CELL inside the view.
QSize forcedSize(columnWidth * 2, rowHeight * 2);
view.resize(forcedSize);
+ QTest::qWaitForWindowShown(&view);
QTest::qWait(0);
QTRY_COMPARE(view.size(), forcedSize);
diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp
index c0d7ed3..f393393 100644
--- a/tests/auto/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp
@@ -1787,21 +1787,17 @@ void tst_QTextDocument::cursorPositionChangedOnSetText()
{
CursorPosSignalSpy spy(doc);
- cursor = QTextCursor();
+ // doc has one QTextCursor stored in the
+ // cursor member variable, thus the signal
+ // gets emitted once.
doc->setPlainText("Foo\nBar\nBaz\nBlub\nBlah");
- // the signal should still be emitted once for the QTextCursor that
- // QTextDocument::setPlainText creates temporarily. But the signal
- // should not be emitted more often.
QCOMPARE(spy.calls, 1);
spy.calls = 0;
doc->setHtml("<p>Foo<p>Bar<p>Baz<p>Blah");
- // the signal should still be emitted once for the QTextCursor that
- // QTextDocument::setPlainText creates temporarily. But the signal
- // should not be emitted more often.
QCOMPARE(spy.calls, 1);
}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 31c102e..ab7ea78 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -1756,11 +1756,11 @@ void tst_QWidget::setTabOrder()
container.show();
container.activateWindow();
+ qApp->setActiveWindow(&container);
#ifdef Q_WS_X11
QTest::qWaitForWindowShown(&container);
QTest::qWait(50);
#endif
- qApp->setActiveWindow(&container);
QTest::qWait(100);
@@ -2316,8 +2316,9 @@ void tst_QWidget::showMinimizedKeepsFocus()
QTRY_COMPARE(qApp->focusWidget(), static_cast<QWidget*>(0));
window.showNormal();
- QTest::qWait(30);
qApp->setActiveWindow(&window);
+ QTest::qWaitForWindowShown(&window);
+ QTest::qWait(30);
#ifdef Q_WS_MAC
if (!macHasAccessToWindowsServer())
QEXPECT_FAIL("", "When not having WindowServer access, we lose focus.", Continue);
@@ -3116,7 +3117,7 @@ void tst_QWidget::saveRestoreGeometry()
widget.resize(size);
widget.show();
QTest::qWaitForWindowShown(&widget);
- QTest::qWait(100);
+ QTest::qWait(200);
QTRY_COMPARE(widget.geometry().size(), size);
QRect geom;
@@ -3126,15 +3127,15 @@ void tst_QWidget::saveRestoreGeometry()
geom = widget.geometry();
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
- QTest::qWait(100);
+ QTest::qWait(200);
QVERIFY(widget.restoreGeometry(savedGeometry));
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
QTRY_COMPARE(widget.geometry(), geom);
//Restore to full screen
widget.setWindowState(widget.windowState() | Qt::WindowFullScreen);
- QTest::qWait(20);
+ QTest::qWait(120);
QTRY_VERIFY((widget.windowState() & Qt::WindowFullScreen));
QTest::qWait(200);
savedGeometry = widget.saveGeometry();
@@ -3165,7 +3166,7 @@ void tst_QWidget::saveRestoreGeometry()
QTest::qWait(20);
QTRY_VERIFY((widget.windowState() & Qt::WindowMaximized));
QTRY_VERIFY(widget.geometry() != geom);
- QTest::qWait(100);
+ QTest::qWait(200);
QVERIFY(widget.restoreGeometry(savedGeometry));
QTest::qWait(20);
QTRY_COMPARE(widget.geometry(), geom);
@@ -5274,24 +5275,26 @@ public:
QRegion r;
};
-#define VERIFY_COLOR(region, color) { \
- const QRegion r = QRegion(region); \
- for (int i = 0; i < r.rects().size(); ++i) { \
- const QRect rect = r.rects().at(i); \
- for (int t = 0; t < 5; t++) { \
- const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(), \
- rect.left(), rect.top(), \
- rect.width(), rect.height()); \
- QCOMPARE(pixmap.size(), rect.size()); \
- QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \
- expectedPixmap.fill(color); \
- if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 ) \
- { QTest::qWait(200); continue; } \
- QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb()); \
- QCOMPARE(pixmap, expectedPixmap); \
- break; \
- } \
- } \
+template<typename R, typename C>
+void verifyColor(R const& region, C const& color)
+{
+ const QRegion r = QRegion(region);
+ for (int i = 0; i < r.rects().size(); ++i) {
+ const QRect rect = r.rects().at(i);
+ for (int t = 0; t < 5; t++) {
+ const QPixmap pixmap = QPixmap::grabWindow(QDesktopWidget().winId(),
+ rect.left(), rect.top(),
+ rect.width(), rect.height());
+ QCOMPARE(pixmap.size(), rect.size());
+ QPixmap expectedPixmap(pixmap); /* ensure equal formats */
+ expectedPixmap.fill(color);
+ if (pixmap.toImage().pixel(0,0) != QColor(color).rgb() && t < 4 )
+ { QTest::qWait(200); continue; }
+ QCOMPARE(pixmap.toImage().pixel(0,0), QColor(color).rgb());
+ QCOMPARE(pixmap, expectedPixmap);
+ break;
+ }
+ }
}
void tst_QWidget::moveChild_data()
@@ -5332,9 +5335,9 @@ void tst_QWidget::moveChild()
#endif
QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry());
QTRY_COMPARE(child.r, QRegion(child.rect()));
- VERIFY_COLOR(child.geometry().translated(tlwOffset),
+ verifyColor(child.geometry().translated(tlwOffset),
child.color);
- VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
+ verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
parent.color);
parent.reset();
child.reset();
@@ -5353,10 +5356,10 @@ void tst_QWidget::moveChild()
// should be scrolled in backingstore
QCOMPARE(child.r, QRegion());
#endif
- VERIFY_COLOR(child.geometry().translated(tlwOffset),
- child.color);
- VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
- parent.color);
+ verifyColor(child.geometry().translated(tlwOffset),
+ child.color);
+ verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset),
+ parent.color);
}
void tst_QWidget::showAndMoveChild()
@@ -5364,7 +5367,11 @@ void tst_QWidget::showAndMoveChild()
QWidget parent(0, Qt::FramelessWindowHint);
// prevent custom styles
parent.setStyle(new QWindowsStyle);
- parent.resize(300, 300);
+
+ QDesktopWidget desktop;
+ QRect desktopDimensions = desktop.availableGeometry(&parent);
+
+ parent.setGeometry(desktopDimensions);
parent.setPalette(Qt::red);
parent.show();
QTest::qWaitForWindowShown(&parent);
@@ -5372,18 +5379,18 @@ void tst_QWidget::showAndMoveChild()
const QPoint tlwOffset = parent.geometry().topLeft();
QWidget child(&parent);
- child.resize(100, 100);
+ child.resize(desktopDimensions.width()/2, desktopDimensions.height()/2);
child.setPalette(Qt::blue);
child.setAutoFillBackground(true);
// Ensure that the child is repainted correctly when moved right after show.
// NB! Do NOT processEvents() (or qWait()) in between show() and move().
child.show();
- child.move(150, 150);
+ child.move(desktopDimensions.width()/2, desktopDimensions.height()/2);
qApp->processEvents();
- VERIFY_COLOR(child.geometry().translated(tlwOffset), Qt::blue);
- VERIFY_COLOR(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red);
+ verifyColor(child.geometry().translated(tlwOffset), Qt::blue);
+ verifyColor(QRegion(parent.geometry()) - child.geometry().translated(tlwOffset), Qt::red);
}
void tst_QWidget::subtractOpaqueSiblings()
@@ -6402,7 +6409,7 @@ void tst_QWidget::render()
qApp->processEvents();
qApp->sendPostedEvents();
- QTest::qWait(100);
+ QTest::qWait(250);
QImage sourceImage = QPixmap::grabWidget(&source).toImage();
qApp->processEvents();
@@ -6508,6 +6515,7 @@ void tst_QWidget::renderInvisible()
dummyFocusWidget.show();
QTest::qWaitForWindowShown(&dummyFocusWidget);
qApp->processEvents();
+ QTest::qWait(100);
// Create normal reference image.
const QSize calendarSize = calendar->size();
@@ -9147,35 +9155,38 @@ void tst_QWidget::destroyBackingStore()
void tst_QWidget::rectOutsideCoordinatesLimit_task144779()
{
- QWidget main;
+ QApplication::setOverrideCursor(Qt::BlankCursor); //keep the cursor out of screen grabs
+ QWidget main(0,0,Qt::FramelessWindowHint); //don't get confused by the size of the window frame
QPalette palette;
palette.setColor(QPalette::Window, Qt::red);
main.setPalette(palette);
- main.resize(400, 400);
+
+ QDesktopWidget desktop;
+ QRect desktopDimensions = desktop.availableGeometry(&main);
+ QSize mainSize(400, 400);
+ mainSize = mainSize.boundedTo(desktopDimensions.size());
+ main.resize(mainSize);
QWidget *offsetWidget = new QWidget(&main);
- offsetWidget->setGeometry(0, -14600, 400, 15000);
+ offsetWidget->setGeometry(0, -(15000 - mainSize.height()), mainSize.width(), 15000);
// big widget is too big for the coordinates, it must be limited by wrect
// if wrect is not at the right position because of offsetWidget, bigwidget
// is not painted correctly
QWidget *bigWidget = new QWidget(offsetWidget);
- bigWidget->setGeometry(0, 0, 400, 50000);
+ bigWidget->setGeometry(0, 0, mainSize.width(), 50000);
palette.setColor(QPalette::Window, Qt::green);
bigWidget->setPalette(palette);
bigWidget->setAutoFillBackground(true);
main.show();
QTest::qWaitForWindowShown(&main);
- QTest::qWait(50);
- QCursor::setPos(main.pos()); //get the cursor out of the picture
- QTest::qWait(50);
QPixmap correct(main.size());
correct.fill(Qt::green);
- QRect center(100, 100, 200, 200); // to avoid the decorations
- QTRY_COMPARE(QPixmap::grabWindow(main.winId()).toImage().copy(center), correct.toImage().copy(center));
+ QTRY_COMPARE(QPixmap::grabWindow(main.winId()).toImage(), correct.toImage());
+ QApplication::restoreOverrideCursor();
}
void tst_QWidget::inputFocus_task257832()
diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
index 2c5ba72..0a6b7ad 100644
--- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
+++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp
@@ -230,7 +230,7 @@ void tst_QWindowSurface::grabWidget()
parentWidget.show();
QTest::qWaitForWindowShown(&parentWidget);
- QTest::qWait(20);
+ QTest::qWait(120);
QPixmap parentPixmap = parentWidget.windowSurface()->grabWidget(&parentWidget);
QPixmap childPixmap = childWidget.windowSurface()->grabWidget(&childWidget);
diff --git a/tests/auto/windowsmobile/test/testQMenuBar_current.png b/tests/auto/windowsmobile/test/testQMenuBar_current.png
index d03e69a..f0042b8 100644
--- a/tests/auto/windowsmobile/test/testQMenuBar_current.png
+++ b/tests/auto/windowsmobile/test/testQMenuBar_current.png
Binary files differ
diff --git a/tests/auto/windowsmobile/test/testSimpleWidget_current.png b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
index 09a10a3..8086c41 100644
--- a/tests/auto/windowsmobile/test/testSimpleWidget_current.png
+++ b/tests/auto/windowsmobile/test/testSimpleWidget_current.png
Binary files differ
diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
index 2d7c9ea..7a86a51 100644
--- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
+++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp
@@ -57,6 +57,8 @@ class tst_WindowsMobile : public QObject
public:
tst_WindowsMobile()
{
+ qApp->setCursorFlashTime (24 * 3600 * 1000); // once a day
+ // qApp->setCursorFlashTime (INT_MAX);
#ifdef Q_OS_WINCE_WM
q_initDD();
#endif
@@ -123,11 +125,20 @@ void compareScreenshots(const QString &image1, const QString &image2)
QImage screenShot(image1);
QImage original(image2);
- //ignore the clock
+ // cut away the title bar before comparing
+ QDesktopWidget desktop;
+ QRect desktopFrameRect = desktop.frameGeometry();
+ QRect desktopClientRect = desktop.availableGeometry();
+
QPainter p1(&screenShot);
QPainter p2(&original);
- p1.fillRect(310, 6, 400, 34, Qt::black);
- p2.fillRect(310, 6, 400, 34, Qt::black);
+
+ //screenShot.save("scr1.png", "PNG");
+ p1.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
+ p2.fillRect(0, 0, desktopFrameRect.width(), desktopClientRect.y(), Qt::black);
+
+ //screenShot.save("scr2.png", "PNG");
+ //original.save("orig1.png", "PNG");
QVERIFY(original == screenShot);
}
diff --git a/tests/benchmarks/qanimation/rectanimation.cpp b/tests/benchmarks/qanimation/rectanimation.cpp
index 5522847..ab381f4 100644
--- a/tests/benchmarks/qanimation/rectanimation.cpp
+++ b/tests/benchmarks/qanimation/rectanimation.cpp
@@ -73,9 +73,9 @@ int RectAnimation::duration() const
}
-void RectAnimation::updateCurrentTime()
+void RectAnimation::updateCurrentTime(int currentTime)
{
- qreal progress = m_easing.valueForProgress( currentTime() / qreal(m_dura) );
+ qreal progress = m_easing.valueForProgress( currentTime / qreal(m_dura) );
QRect now;
now.setCoords(interpolateInteger(m_start.left(), m_end.left(), progress),
interpolateInteger(m_start.top(), m_end.top(), progress),
diff --git a/tests/benchmarks/qanimation/rectanimation.h b/tests/benchmarks/qanimation/rectanimation.h
index 995becb..ea1f804 100644
--- a/tests/benchmarks/qanimation/rectanimation.h
+++ b/tests/benchmarks/qanimation/rectanimation.h
@@ -58,7 +58,7 @@ public:
void setDuration(int d);
int duration() const;
- virtual void updateCurrentTime();
+ virtual void updateCurrentTime(int currentTime);
virtual void updateState(QAbstractAnimation::State state);
private:
diff --git a/tools/designer/src/lib/shared/qdesigner_menubar.cpp b/tools/designer/src/lib/shared/qdesigner_menubar.cpp
index 6d231ca..80c7b53 100644
--- a/tools/designer/src/lib/shared/qdesigner_menubar.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menubar.cpp
@@ -104,6 +104,8 @@ QDesignerMenuBar::QDesignerMenuBar(QWidget *parent) :
setContextMenuPolicy(Qt::DefaultContextMenu);
setAcceptDrops(true); // ### fake
+ // Fake property: Keep the menu bar editable in the form even if a native menu bar is used.
+ setNativeMenuBar(false);
m_addMenu->setText(tr("Type Here"));
addAction(m_addMenu);
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index 851bfc1..7574fdd 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -63,6 +63,7 @@
#include <QtGui/QApplication>
#include <QtGui/QToolBar>
#include <QtGui/QMainWindow>
+#include <QtGui/QMenuBar>
QT_BEGIN_NAMESPACE
@@ -611,9 +612,15 @@ QDesignerPropertySheet::QDesignerPropertySheet(QObject *object, QObject *parent)
createFakeProperty(QLatin1String("dragEnabled"));
// windowModality is visible only for the main container, in which case the form windows enables it on loading
setVisible(createFakeProperty(QLatin1String("windowModality")), false);
- if (qobject_cast<const QToolBar *>(d->m_object)) // prevent toolbars from being dragged off
+ if (qobject_cast<const QToolBar *>(d->m_object)) { // prevent toolbars from being dragged off
createFakeProperty(QLatin1String("floatable"), QVariant(true));
-
+ } else {
+ if (qobject_cast<const QMenuBar *>(d->m_object)) {
+ // Keep the menu bar editable in the form even if a native menu bar is used.
+ const bool nativeMenuBarDefault = !qApp->testAttribute(Qt::AA_DontUseNativeMenuBar);
+ createFakeProperty(QLatin1String("nativeMenuBar"), QVariant(nativeMenuBarDefault));
+ }
+ }
if (d->m_canHaveLayoutAttributes) {
static const QString layoutGroup = QLatin1String("Layout");
const char* fakeLayoutProperties[] = {
diff --git a/tools/designer/translations/translations.pro b/tools/designer/translations/translations.pro
index 8395259..c8cd76d 100644
--- a/tools/designer/translations/translations.pro
+++ b/tools/designer/translations/translations.pro
@@ -133,7 +133,7 @@ HEADERS += ../../shared/findwidget/abstractfindwidget.h \
TRANSLATIONS=$$[QT_INSTALL_TRANSLATIONS]/designer_de.ts \
$$[QT_INSTALL_TRANSLATIONS]/designer_ja.ts \
$$[QT_INSTALL_TRANSLATIONS]/designer_pl.ts \
+ $$[QT_INSTALL_TRANSLATIONS]/designer_ru.ts \
$$[QT_INSTALL_TRANSLATIONS]/designer_zh_CN.ts \
$$[QT_INSTALL_TRANSLATIONS]/designer_zh_TW.ts \
$$[QT_INSTALL_TRANSLATIONS]/designer_untranslated.ts
-
diff --git a/tools/linguist/linguist/linguist.pro b/tools/linguist/linguist/linguist.pro
index 314163c..00ebec1 100644
--- a/tools/linguist/linguist/linguist.pro
+++ b/tools/linguist/linguist/linguist.pro
@@ -81,9 +81,6 @@ PROJECTNAME = Qt \
Linguist
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
-linguisttranslations.files = *.qm
-linguisttranslations.path = $$[QT_INSTALL_TRANSLATIONS]
-INSTALLS += linguisttranslations
phrasebooks.path = $$[QT_INSTALL_DATA]/phrasebooks
# ## will this work on windows?
diff --git a/tools/linguist/lupdate/cpp.cpp b/tools/linguist/lupdate/cpp.cpp
index ed41edb..7a616e3 100644
--- a/tools/linguist/lupdate/cpp.cpp
+++ b/tools/linguist/lupdate/cpp.cpp
@@ -1031,6 +1031,10 @@ QStringList CppParser::stringListifySegments(const QList<HashString> &segments)
}
struct QualifyOneData {
+ QualifyOneData(const NamespaceList &ns, int nsc, const HashString &seg, NamespaceList *rslvd)
+ : namespaces(ns), nsCount(nsc), segment(seg), resolved(rslvd)
+ {}
+
const NamespaceList &namespaces;
int nsCount;
const HashString &segment;
@@ -1069,7 +1073,7 @@ bool CppParser::qualifyOneCallbackUsing(const Namespace *ns, void *context) cons
bool CppParser::qualifyOne(const NamespaceList &namespaces, int nsCnt, const HashString &segment,
NamespaceList *resolved) const
{
- QualifyOneData data = { namespaces, nsCnt, segment, resolved, QSet<HashStringList>() };
+ QualifyOneData data(namespaces, nsCnt, segment, resolved);
if (visitNamespace(namespaces, nsCnt, &CppParser::qualifyOneCallbackOwn, &data))
return true;
diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph
index 69af041..9d40bd3 100644
--- a/tools/linguist/phrasebooks/russian.qph
+++ b/tools/linguist/phrasebooks/russian.qph
@@ -201,10 +201,6 @@
<target>разделить выбранные элементы</target>
</phrase>
<phrase>
- <source>dock</source>
- <target>док</target>
-</phrase>
-<phrase>
<source>document</source>
<target>документ</target>
</phrase>
@@ -302,7 +298,7 @@
</phrase>
<phrase>
<source>font style</source>
- <target>стиль шрифта</target>
+ <target>начертание</target>
</phrase>
<phrase>
<source>function key</source>
@@ -510,7 +506,7 @@
</phrase>
<phrase>
<source>OK</source>
- <target>Готово</target>
+ <target>ОК</target>
</phrase>
<phrase>
<source>OLE</source>
@@ -1038,10 +1034,6 @@
</phrase>
<phrase>
<source>OK</source>
- <target>Выбрать</target>
-</phrase>
-<phrase>
- <source>OK</source>
<target>Закрыть</target>
</phrase>
<phrase>
@@ -1092,4 +1084,84 @@
<source>Checkable</source>
<target>Переключаемое</target>
</phrase>
+<phrase>
+ <source>Style</source>
+ <target>Начертание</target>
+</phrase>
+<phrase>
+ <source>Point size</source>
+ <target>Размер</target>
+</phrase>
+<phrase>
+ <source>Family</source>
+ <target>Шрифт</target>
+</phrase>
+<phrase>
+ <source>Writing system</source>
+ <target>Система письма</target>
+</phrase>
+<phrase>
+ <source>OK</source>
+ <target>Удалить</target>
+</phrase>
+<phrase>
+ <source>Style</source>
+ <target>Стиль</target>
+</phrase>
+<phrase>
+ <source>Edit</source>
+ <target>Изменить</target>
+</phrase>
+<phrase>
+ <source>Invalid</source>
+ <target>Некорректный</target>
+</phrase>
+<phrase>
+ <source>Invalid</source>
+ <target>Некорректная</target>
+</phrase>
+<phrase>
+ <source>Invalid</source>
+ <target>Некорректное</target>
+</phrase>
+<phrase>
+ <source>tag</source>
+ <target>тэг</target>
+</phrase>
+<phrase>
+ <source>tab order</source>
+ <target>порядок обхода</target>
+</phrase>
+<phrase>
+ <source>Ascending</source>
+ <target>По возрастанию</target>
+</phrase>
+<phrase>
+ <source>Descending</source>
+ <target>По убыванию</target>
+</phrase>
+<phrase>
+ <source>Reset</source>
+ <target>Сбросить</target>
+</phrase>
+<phrase>
+ <source>Sort order</source>
+ <target>Порядок сортировки</target>
+</phrase>
+<phrase>
+ <source>Appearance</source>
+ <target>Внешний вид</target>
+</phrase>
+<phrase>
+ <source>View</source>
+ <target>Просмотр</target>
+</phrase>
+<phrase>
+ <source>Actions</source>
+ <target>Действия</target>
+</phrase>
+<phrase>
+ <source>Table of Contents</source>
+ <target>Оглавление</target>
+</phrase>
</QPH>
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 4b5f0c6..ec5ce96 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -47,6 +47,7 @@
#include <qfile.h>
#include <stdio.h>
+#include <errno.h>
#include "codechunk.h"
#include "config.h"
@@ -281,7 +282,7 @@ void CppCodeParser::parseSourceFile(const Location& location,
{
FILE *in = fopen(QFile::encodeName(filePath), "r");
if (!in) {
- location.error(tr("Cannot open C++ source file '%1'").arg(filePath));
+ location.error(tr("Cannot open C++ source file '%1' (%2)").arg(filePath).arg(strerror(errno)));
return;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 13e3b4d..5406017 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1494,7 +1494,7 @@ void HtmlGenerator::generateHeader(const QString& title,
if ((project != "Qtopia") && (project != "Qt Extended")) {
shortVersion = project + " " + shortVersion + ": ";
if (node && !node->doc().location().isEmpty())
- out() << "<!-- " << node->doc().location().filePath() << " -->\n";
+ out() << "<!-- " << node->doc().location().fileName() << " -->\n";
shortVersion = tre->version();
if (shortVersion.count(QChar('.')) == 2)
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 9ee8965..4ddc94a 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -31,7 +31,7 @@ qhp.Assistant.subprojects.examples.sortPages = true
language = Cpp
-sources = $QT_SOURCE_TREE/doc/src/assistant-manual.qdoc \
+sources = $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc
sources.fileextensions = "*.cpp *.qdoc"
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 2a65184..9d8bd23 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -31,7 +31,7 @@ qhp.Designer.subprojects.examples.sortPages = true
language = Cpp
-sources = $QT_SOURCE_TREE/doc/src/designer-manual.qdoc \
+sources = $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
$QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 6c71993..f433529 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -31,7 +31,7 @@ qhp.Linguist.subprojects.examples.sortPages = true
language = Cpp
-sources = $QT_SOURCE_TREE/doc/src/linguist-manual.qdoc \
+sources = $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
$QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index 3dc1d3b..dcb3c9a 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -27,7 +27,7 @@ qhp.qmake.subprojects.manual.selectors = fake:page
language = Cpp
-sources = $QT_SOURCE_TREE/doc/src/qmake-manual.qdoc
+sources = $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
sources.fileextensions = "*.cpp *.qdoc"
diff --git a/tools/qdoc3/test/qt-api-only-with-xcode.qdocconf b/tools/qdoc3/test/qt-api-only-with-xcode.qdocconf
index 0389386..0d78cda 100644
--- a/tools/qdoc3/test/qt-api-only-with-xcode.qdocconf
+++ b/tools/qdoc3/test/qt-api-only-with-xcode.qdocconf
@@ -9,9 +9,9 @@ url = ./
# Ensures that the documentation for the tools is not included in the generated
# .qhp file.
-qhp.Qt.excluded = $QT_SOURCE_TREE/doc/src/assistant-manual.qdoc \
+qhp.Qt.excluded = $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
- $QT_SOURCE_TREE/doc/src/designer-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
$QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
@@ -19,11 +19,11 @@ qhp.Qt.excluded = $QT_SOURCE_TREE/doc/src/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
$QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
$QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
- $QT_SOURCE_TREE/doc/src/linguist-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
$QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
- $QT_SOURCE_TREE/doc/src/qmake-manual.qdoc
+ $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
outputdir = $QT_BUILD_TREE/doc-build/html-qt
base = file:$QT_BUILD_TREE/doc-build/html-qt
diff --git a/tools/qdoc3/test/qt-api-only.qdocconf b/tools/qdoc3/test/qt-api-only.qdocconf
index bc5656b..10b7be5 100644
--- a/tools/qdoc3/test/qt-api-only.qdocconf
+++ b/tools/qdoc3/test/qt-api-only.qdocconf
@@ -9,9 +9,9 @@ url = ./
# Ensures that the documentation for the tools is not included in the generated
# .qhp file.
-qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/assistant-manual.qdoc \
+qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
- $QT_SOURCE_TREE/doc/src/designer-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
$QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
$QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
@@ -19,11 +19,11 @@ qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/assistant-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
$QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
$QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
- $QT_SOURCE_TREE/doc/src/linguist-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
$QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
$QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
$QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
- $QT_SOURCE_TREE/doc/src/qmake-manual.qdoc
+ $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
outputdir = $QT_BUILD_TREE/doc-build/html-qt
tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags
diff --git a/translations/translations.pri b/translations/translations.pri
index 480849f..8ddf01b 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -30,11 +30,13 @@ ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
activeqt \
corelib \
gui \
+ multimedia \
network \
opengl \
plugins \
qt3support \
script \
+ scripttools \
sql \
svg \
xml \
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
index 74a4f65..b1efe91 100755
--- a/util/webkit/mkdist-webkit
+++ b/util/webkit/mkdist-webkit
@@ -5,7 +5,7 @@ die() {
exit 1
}
-default_tag="qtwebkit-4.6-snapshot-24092009"
+default_tag="qtwebkit-4.6-snapshot-29092009-2"
if [ $# -eq 0 ]; then
tag="$default_tag"