From d15d7385cb6cfb453ab08d6d7154b66c3fb087ee Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 9 Nov 2009 18:38:17 +0100 Subject: Updated WebKit from /home/jturcott/dev/webkit/ to qtwebkit/qtwebkit-4.6 ( 363898ca378e2198b855ca2f8921c5e4f898c5e2 ) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2009-11-09 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. https://bugs.webkit.org/show_bug.cgi?id=30772 Add a non-const iterator to QWebElementCollection. Move the two attributes of the iterator to private. * Api/qwebelement.h: (const_iterator::begin): (const_iterator::end): (const_iterator::constBegin): (const_iterator::constEnd): (const_iterator::iterator::iterator): (const_iterator::iterator::operator*): (const_iterator::iterator::operator==): (const_iterator::iterator::operator!=): (const_iterator::iterator::operator<): (const_iterator::iterator::operator<=): (const_iterator::iterator::operator>): (const_iterator::iterator::operator>=): (const_iterator::iterator::operator++): (const_iterator::iterator::operator--): (const_iterator::iterator::operator+=): (const_iterator::iterator::operator-=): (const_iterator::iterator::operator+): (const_iterator::iterator::operator-): * tests/qwebelement/tst_qwebelement.cpp: (tst_QWebElement::nonConstIterator): (tst_QWebElement::constIterator): 2009-11-09 Laszlo Gombos Reviewed by Kenneth Christiansen. [Qt] Remove the sessionStorage setting (per Page) https://bugs.webkit.org/show_bug.cgi?id=31249 This setting allows to run sessionStorage on/off on a per page basis. Remove this prematurely exposed API. * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): (QWebSettings::QWebSettings): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::database): (tst_QWebPage::testOptionalJSObjects): 2009-11-09 Jocelyn Turcotte Reviewed by Simon Hausmann. [Qt] Remove the QWebPage:webInspectorTriggered signal. User customization of the communication between QWebPage and QWebInspector will be properly designed in the next version. https://bugs.webkit.org/show_bug.cgi?id=30773 * Api/qwebinspector.cpp: * Api/qwebpage.cpp: (QWebPagePrivate::getOrCreateInspector): (QWebPage::triggerAction): * Api/qwebpage.h: * QtLauncher/main.cpp: (MainWindow::MainWindow): 2009-11-05 Simon Hausmann Reviewed by Tor Arne Vestbø. Added a missing re-implementation of QGraphicsItem::inputMethodQuery(). * Api/qgraphicswebview.cpp: (QGraphicsWebView::inputMethodQuery): * Api/qgraphicswebview.h: 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Provide a dummy re-implementation of QGraphicsLayoutItem::sizeHint(), similar to QWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::sizeHint): * Api/qgraphicswebview.h: 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Removed zoomFactoryChanged() signal and added linkClicked() to QGraphicsWebView, for consistency with QWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::setPage): (QGraphicsWebView::setZoomFactor): * Api/qgraphicswebview.h: 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Added QGraphicsWebView::findText() for convenience and consistency with QWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::findText): * Api/qgraphicswebview.h: 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Added QGraphicsWebView::pageAction() and triggerPageAction(), for consistency with QWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::pageAction): (QGraphicsWebView::triggerPageAction): * Api/qgraphicswebview.h: 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Removed QGraphicsWebView::toHtml() after API review. That's consistent with QWebView and also based on the assumption that toHtml() is called less frequently than setHtml(). * Api/qgraphicswebview.cpp: * Api/qgraphicswebview.h: * tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::qgraphicswebview): 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Removed the interactive property of QGraphicsWebView. There are clearly use-cases for this feature, but it will require more work to make this fully work with an enum to have fine-grained control over the interactivity levels. For now it is easy to achieve in user-code what the boolean property did. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): (QGraphicsWebView::hoverMoveEvent): (QGraphicsWebView::mouseMoveEvent): (QGraphicsWebView::mousePressEvent): (QGraphicsWebView::mouseReleaseEvent): (QGraphicsWebView::mouseDoubleClickEvent): (QGraphicsWebView::keyPressEvent): (QGraphicsWebView::keyReleaseEvent): (QGraphicsWebView::dragLeaveEvent): (QGraphicsWebView::dragMoveEvent): (QGraphicsWebView::dropEvent): (QGraphicsWebView::wheelEvent): (QGraphicsWebView::inputMethodEvent): * Api/qgraphicswebview.h: * tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::qgraphicswebview): 2009-11-04 Simon Hausmann Reviewed by Tor Arne Vestbø. Make the QGraphicsWebView constructor explicit. * Api/qgraphicswebview.h: 2009-11-05 Simon Hausmann Last Qt 4.5 build fix (*sigh*) * tests/qwebpage/tst_qwebpage.cpp: (inputMethodHints): inputMethodHints() is only used for Qt 4.6, so guard the whole function. 2009-11-05 Simon Hausmann Another prospective build fix against Qt 4.5 (build bot) Don't compile & run the QGraphicsWebView portion of the input methods auto test with Qt 4.5. * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods_data): (inputMethodHints): (inputMethodEnabled): (tst_QWebPage::inputMethods): 2009-11-05 Simon Hausmann Prospective build fix against Qt 4.5 (build bot) * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::setInputMethodEnabled): Guard the use of Qt 4.6 specific API with #ifdefs. 2009-11-01 Simon Hausmann Reviewed by Kenneth Christiansen. [Qt] Fix enabling of input method support on QGraphicsWebView. https://bugs.webkit.org/show_bug.cgi?id=30605 Instead of setting the unsupported widget attribute on the QGraphicsWidget in setInputMethodEnabled() set the ItemAcceptsInputMethod GraphicsItem flag directly. Changed the existing input method auto test to run once on a QWebView and once on a QGraphicsWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::setInputMethodEnabled): * tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::inputMethods_data): (inputMethodHints): (inputMethodEnabled): (tst_QWebPage::inputMethods): 2009-11-04 Simon Hausmann Reviewed by Kenneth Christiansen. Added QGraphicsWebView::modified property, for consistency with QWebView. * Api/qgraphicswebview.cpp: (QGraphicsWebView::isModified): * Api/qgraphicswebview.h: * tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::qgraphicswebview): 2009-11-04 Simon Hausmann Reviewed by Kenneth Christiansen. Removed status and progress properties of QGraphicsWebView. Added loadProgress and statusBarMessage signals instead, after API review. * Api/qgraphicswebview.cpp: (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): (QGraphicsWebView::setPage): * Api/qgraphicswebview.h: * tests/qgraphicswebview/tst_qgraphicswebview.cpp: (tst_QGraphicsWebView::qgraphicswebview): --- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 40 +-- .../webkit/JavaScriptCore/runtime/Collector.cpp | 8 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 18 ++ src/3rdparty/webkit/WebCore/WebCore.pro | 15 -- src/3rdparty/webkit/WebCore/platform/FileSystem.h | 11 - .../platform/network/qt/ResourceHandleQt.cpp | 17 ++ .../WebCore/platform/qt/PlatformScreenQt.cpp | 2 +- .../webkit/WebKit/qt/Api/qgraphicswebview.cpp | 286 ++++++++------------- .../webkit/WebKit/qt/Api/qgraphicswebview.h | 34 ++- src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h | 71 +++-- .../webkit/WebKit/qt/Api/qwebinspector.cpp | 6 +- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 41 +-- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h | 1 - src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 7 - src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 1 - src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 4 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 252 ++++++++++++++++++ .../qgraphicswebview/tst_qgraphicswebview.cpp | 6 +- .../qt/tests/qwebelement/tst_qwebelement.cpp | 33 +++ .../webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 2 +- .../WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 4 - .../webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 2 +- .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 125 ++++++--- 24 files changed, 598 insertions(+), 390 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 470ed0b..c999618 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -75,25 +75,12 @@ namespace JSC { #define THUMB_FUNC_PARAM(name) #endif -#if PLATFORM(LINUX) && (PLATFORM(X86_64) || PLATFORM(X86)) +#if PLATFORM(LINUX) && PLATFORM(X86_64) #define SYMBOL_STRING_RELOCATION(name) #name "@plt" #else #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name) #endif -#if PLATFORM(DARWIN) - // Mach-O platform -#define HIDE_SYMBOL(name) ".private_extern _" #name -#elif PLATFORM(AIX) - // IBM's own file format -#define HIDE_SYMBOL(name) ".lglobl " #name -#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD) - // ELF platform -#define HIDE_SYMBOL(name) ".hidden " #name -#else -#define HIDE_SYMBOL(name) -#endif - #if USE(JSVALUE32_64) #if COMPILER(GCC) && PLATFORM(X86) @@ -106,9 +93,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -129,7 +114,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -145,7 +129,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x3c, %esp" "\n" "popl %ebx" "\n" @@ -170,7 +153,6 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x80, JITStackFrame_code_ asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -197,7 +179,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -213,7 +194,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x48, %rsp" "\n" "popq %rbx" "\n" @@ -235,7 +215,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -262,7 +241,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -368,9 +346,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x30, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -391,7 +367,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -407,7 +382,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x1c, %esp" "\n" "popl %ebx" "\n" @@ -430,9 +404,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x48, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x78, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -466,7 +438,6 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -482,7 +453,6 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x78, %rsp" "\n" "popq %rbx" "\n" @@ -504,7 +474,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -531,7 +500,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -549,7 +517,6 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" @@ -564,9 +531,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" #elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL) asm volatile ( -".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" @@ -583,14 +548,12 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" "bl " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "add sp, sp, #36" "\n" "ldmia sp!, {r4-r8, lr}" "\n" @@ -925,7 +888,6 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD ".text" "\n" \ ".align 2" "\n" \ ".globl " SYMBOL_STRING(cti_##op) "\n" \ - HIDE_SYMBOL(cti_##op) "\n" \ ".thumb" "\n" \ ".thumb_func " THUMB_FUNC_PARAM(cti_##op) "\n" \ SYMBOL_STRING(cti_##op) ":" "\n" \ diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index 8b647a0..b885049 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -240,9 +240,7 @@ void Heap::destroy() template NEVER_INLINE CollectorBlock* Heap::allocateBlock() { - // Disable the use of vm_map for the Qt build on Darwin, because when compiled on 10.4 - // it crashes on 10.5 -#if PLATFORM(DARWIN) && !PLATFORM(QT) +#if PLATFORM(DARWIN) vm_address_t address = 0; // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: . vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT); @@ -334,9 +332,7 @@ NEVER_INLINE void Heap::freeBlock(size_t block) NEVER_INLINE void Heap::freeBlock(CollectorBlock* block) { - // Disable the use of vm_deallocate for the Qt build on Darwin, because when compiled on 10.4 - // it crashes on 10.5 -#if PLATFORM(DARWIN) && !PLATFORM(QT) +#if PLATFORM(DARWIN) vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE); #elif PLATFORM(SYMBIAN) userChunk->Free(reinterpret_cast(block)); diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 810781f..ae1c3b6 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 16aab1b39e14195abdc2100265da2e45b96b739f + 363898ca378e2198b855ca2f8921c5e4f898c5e2 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 1dfc2f9..be07193 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,21 @@ +2009-11-09 Yael Aharon + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Pass credentials provided by XMLHTTPRequest to the network request. + https://bugs.webkit.org/show_bug.cgi?id=31208 + + After r42483, the credentials are no longer passed to the network request + in the URL of the request. + Pass the credentials from XMLHTTPRequest to the network request, the same + way that other ports do. + + After this patch LayoutTests/http/xmlhttprequest/basic-auth.html passes. + + * platform/network/qt/ResourceHandleQt.cpp: + (WebCore::ResourceHandle::start): + (WebCore::ResourceHandle::loadResourceSynchronously): + 2009-11-03 Simon Hausmann Unreviewed build fix for WebInspector with Qt build. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 4e84a80..60e414f 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3381,18 +3381,3 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 plugins/win/PaintHooks.asm } } - -# Temporary workaround to pick up the DEF file from the same place as all the others -symbian { - shared { - contains(MMP_RULES, defBlock) { - MMP_RULES -= defBlock - - MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW" \ - "DEFFILE ../../../s60installs/bwins/$${TARGET}.def" \ - "$${LITERAL_HASH}elif defined EABI" \ - "DEFFILE ../../../s60installs/eabi/$${TARGET}.def" \ - "$${LITERAL_HASH}endif" - } - } -} diff --git a/src/3rdparty/webkit/WebCore/platform/FileSystem.h b/src/3rdparty/webkit/WebCore/platform/FileSystem.h index 791198d..9952b39 100644 --- a/src/3rdparty/webkit/WebCore/platform/FileSystem.h +++ b/src/3rdparty/webkit/WebCore/platform/FileSystem.h @@ -98,17 +98,6 @@ struct PlatformModuleVersion { { } - bool operator != (const PlatformModuleVersion& rhs) const - { - return mostSig != rhs.mostSig && leastSig != rhs.leastSig; - } - - - bool operator > (const PlatformModuleVersion& rhs) const - { - return mostSig > rhs.mostSig && leastSig > rhs.leastSig; - } - }; #else typedef unsigned PlatformModuleVersion; diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceHandleQt.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceHandleQt.cpp index f4c30c9..b3844bf 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceHandleQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceHandleQt.cpp @@ -131,6 +131,15 @@ bool ResourceHandle::start(Frame* frame) if (!page) return false; + if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) { + // If credentials were specified for this request, add them to the url, + // so that they will be passed to QNetworkRequest. + KURL urlWithCredentials(d->m_request.url()); + urlWithCredentials.setUser(d->m_user); + urlWithCredentials.setPass(d->m_pass); + d->m_request.setURL(urlWithCredentials); + } + getInternal()->m_frame = static_cast(frame->loader()->client())->webFrame(); #if QT_VERSION < 0x040400 return QWebNetworkManager::self()->add(this, getInternal()->m_frame->page()->d->networkInterface); @@ -204,6 +213,14 @@ void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, S } #else ResourceHandleInternal *d = handle.getInternal(); + if (!(d->m_user.isEmpty() || d->m_pass.isEmpty())) { + // If credentials were specified for this request, add them to the url, + // so that they will be passed to QNetworkRequest. + KURL urlWithCredentials(d->m_request.url()); + urlWithCredentials.setUser(d->m_user); + urlWithCredentials.setPass(d->m_pass); + d->m_request.setURL(urlWithCredentials); + } d->m_frame = static_cast(frame->loader()->client())->webFrame(); d->m_job = new QNetworkReplyHandler(&handle, QNetworkReplyHandler::LoadNormal); #endif diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp index 442ffa3..8221760 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp @@ -72,7 +72,7 @@ int screenDepthPerComponent(Widget* w) bool screenIsMonochrome(Widget* w) { - return QApplication::desktop()->screen(screenNumber(w))->colorCount() < 2; + return QApplication::desktop()->screen(screenNumber(w))->numColors() < 2; } FloatRect screenRect(Widget* w) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index b22109b..0365181 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -39,8 +39,6 @@ public: QGraphicsWebViewPrivate(QGraphicsWebView* parent) : q(parent) , page(0) - , interactive(true) - , progress(1.0) {} virtual void scroll(int dx, int dy, const QRect&); @@ -61,28 +59,12 @@ public: virtual QObject* pluginParent() const; - void _q_doLoadProgress(int progress); void _q_doLoadFinished(bool success); - void _q_setStatusBarMessage(const QString& message); QGraphicsWebView* q; QWebPage* page; - - QString statusBarMessage; - bool interactive; - qreal progress; }; -void QGraphicsWebViewPrivate::_q_doLoadProgress(int progress) -{ - if (qFuzzyCompare(this->progress, qreal(progress / 100.))) - return; - - this->progress = progress / 100.; - - emit q->progressChanged(this->progress); -} - void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) { // If the page had no title, still make sure it gets the signal @@ -105,8 +87,11 @@ void QGraphicsWebViewPrivate::update(const QRect & dirtyRect) void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable) { - q->setAttribute(Qt::WA_InputMethodEnabled, enable); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + q->setFlag(QGraphicsItem::ItemAcceptsInputMethod, enable); +#endif } + #if QT_VERSION >= 0x040600 void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -156,109 +141,19 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const return q; } -void QGraphicsWebViewPrivate::_q_setStatusBarMessage(const QString& s) -{ - statusBarMessage = s; - emit q->statusChanged(); -} - /*! \class QGraphicsWebView - \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. + \brief The QGraphicsWebView class allows web content to be added to a GraphicsView. \since 4.6 - An instance of this class renders Web content from a URL or supplied as data, using - features of the QtWebKit module. - - If the width and height of the item is not set, they will dynamically adjust to - a size appropriate for the content. This width may be large (e.g., 980 pixels or - more) for typical online Web pages. - - \section1 Browser Features - - Many of the functions, signals and properties provided by QWebView are also available - for this item, making it simple to adapt existing code to use QGraphicsWebView instead - of QWebView. - - The item uses a QWebPage object to perform the rendering of Web content, and this can - be obtained with the page() function, enabling the document itself to be accessed and - modified. - - As with QWebView, the item records the browsing history using a QWebHistory object, - accessible using the history() function. The QWebSettings object that defines the - configuration of the browser can be obtained with the settings() function, enabling - features like plugin support to be customized for each item. + A WebGraphicsItem renders web content based on a URL or set data. - \sa QWebView, QGraphicsTextItem + If the width and height of the item is not set, they will + dynamically adjust to a size appropriate for the content. + This width may be large (eg. 980) for typical online web pages. */ /*! - \fn void QGraphicsWebView::titleChanged(const QString &title) - - This signal is emitted whenever the \a title of the main frame changes. - - \sa title() -*/ - -/*! - \fn void QGraphicsWebView::urlChanged(const QUrl &url) - - This signal is emitted when the \a url of the view changes. - - \sa url(), load() -*/ - -/*! - \fn void QGraphicsWebView::statusChanged() - - This signal is emitted when the status bar text is changed by the page. -*/ - -/*! - \fn void QGraphicsWebView::iconChanged() - - This signal is emitted whenever the icon of the page is loaded or changes. - - In order for icons to be loaded, you will need to set an icon database path - using QWebSettings::setIconDatabasePath(). - - \sa icon(), QWebSettings::setIconDatabasePath() -*/ - -/*! - \fn void QGraphicsWebView::loadStarted() - - This signal is emitted when a new load of the page is started. - - \sa progressChanged(), loadFinished() -*/ - -/*! - \fn void QGraphicsWebView::loadFinished(bool ok) - - This signal is emitted when a load of the page is finished. - \a ok will indicate whether the load was successful or any error occurred. - - \sa loadStarted() -*/ - -/*! - \fn void QGraphicsWebView::progressChanged(qreal progress) - - This signal is emitted every time an element in the web page - completes loading and the overall loading progress advances. - - This signal tracks the progress of all child frames. - - The current value is provided by \a progress and scales from 0.0 to 1.0, - which is the default range of QProgressBar. - - \sa loadStarted(), loadFinished() -*/ - - - -/*! Constructs an empty QGraphicsWebView with parent \a parent. \sa load() @@ -275,7 +170,7 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) } /*! - Destroys the item. + Destroys the web graphicsitem. */ QGraphicsWebView::~QGraphicsWebView() { @@ -356,6 +251,24 @@ QVariant QGraphicsWebView::itemChange(GraphicsItemChange change, const QVariant& /*! \reimp */ +QSizeF QGraphicsWebView::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + if (which == Qt::PreferredSize) + return QSizeF(800, 600); // ### + return QGraphicsWidget::sizeHint(which, constraint); +} + +/*! \reimp +*/ +QVariant QGraphicsWebView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + if (d->page) + return d->page->inputMethodQuery(query); + return QVariant(); +} + +/*! \reimp +*/ bool QGraphicsWebView::event(QEvent* event) { // Re-implemented in order to allows fixing event-related bugs in patch releases. @@ -438,11 +351,13 @@ void QGraphicsWebView::setPage(QWebPage* page) connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); connect(d->page, SIGNAL(loadProgress(int)), - this, SLOT(_q_doLoadProgress(int))); + this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(_q_doLoadFinished(bool))); connect(d->page, SIGNAL(statusBarMessage(const QString&)), - this, SLOT(_q_setStatusBarMessage(const QString&))); + this, SIGNAL(statusBarMessage(const QString&))); + connect(d->page, SIGNAL(linkClicked(const QUrl &)), + this, SIGNAL(linkClicked(const QUrl &))); } /*! @@ -513,7 +428,6 @@ void QGraphicsWebView::setZoomFactor(qreal factor) return; page()->mainFrame()->setZoomFactor(factor); - emit zoomFactorChanged(); } qreal QGraphicsWebView::zoomFactor() const @@ -550,21 +464,6 @@ void QGraphicsWebView::setGeometry(const QRectF& rect) } /*! - \property QGraphicsWebView::status - \brief the load status message. - - Provides the latest status message set during the load of a URL. - Commonly shown by Status Bar widgets. - - \sa statusChanged() -*/ - -QString QGraphicsWebView::status() const -{ - return d->statusBarMessage; -} - -/*! Convenience slot that stops loading the document. \sa reload(), loadFinished() @@ -611,15 +510,6 @@ void QGraphicsWebView::reload() } /*! - \property QGraphicsWebView::progress - \brief the progress of loading the current URL, from 0 to 1. -*/ -qreal QGraphicsWebView::progress() const -{ - return d->progress; -} - -/*! Loads the specified \a url and displays it. \note The view remains the same until enough data has arrived to display the new \a url. @@ -651,15 +541,14 @@ void QGraphicsWebView::load(const QNetworkRequest& request, } /*! - \property QGraphicsWebView::html - This property provides an HTML interface to the text in the webview. + Sets the content of the web view to the specified \a html. - When setting this property, external objects such as stylesheets or images - referenced in the HTML document are located relative to \a baseUrl. + External objects such as stylesheets or images referenced in the HTML + document are located relative to \a baseUrl. The \a html is loaded immediately; external objects are loaded asynchronously. - When using these methods, WebKit assumes that external resources such as + When using this method, WebKit assumes that external resources such as JavaScript programs or style sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external script can be specified through the charset attribute of the HTML script tag. Alternatively, the @@ -672,11 +561,6 @@ void QGraphicsWebView::setHtml(const QString& html, const QUrl& baseUrl) page()->mainFrame()->setHtml(html, baseUrl); } -QString QGraphicsWebView::toHtml() const -{ - return page()->mainFrame()->toHtml(); -} - /*! Sets the content of the web graphicsitem to the specified content \a data. If the \a mimeType argument is empty it is currently assumed that the content is HTML but in future versions we may introduce @@ -706,22 +590,19 @@ QWebHistory* QGraphicsWebView::history() const } /*! - \property QGraphicsWebView::interactive - \brief controls whether the item responds to mouse and key events. -*/ + \property QGraphicsWebView::modified + \brief whether the document was modified by the user -bool QGraphicsWebView::isInteractive() const -{ - return d->interactive; -} + Parts of HTML documents can be editable for example through the + \c{contenteditable} attribute on HTML elements. -void QGraphicsWebView::setInteractive(bool allowed) + By default, this property is false. +*/ +bool QGraphicsWebView::isModified() const { - if (d->interactive == allowed) - return; - - d->interactive = allowed; - emit interactivityChanged(); + if (d->page) + return d->page->isModified(); + return false; } /*! @@ -738,11 +619,53 @@ QWebSettings* QGraphicsWebView::settings() const return page()->settings(); } +/*! + Returns a pointer to a QAction that encapsulates the specified web action \a action. +*/ +QAction *QGraphicsWebView::pageAction(QWebPage::WebAction action) const +{ + return page()->action(action); +} + +/*! + Triggers the specified \a action. If it is a checkable action the specified + \a checked state is assumed. + + \sa pageAction() +*/ +void QGraphicsWebView::triggerPageAction(QWebPage::WebAction action, bool checked) +{ + page()->triggerAction(action, checked); +} + +/*! + Finds the specified string, \a subString, in the page, using the given \a options. + + If the HighlightAllOccurrences flag is passed, the function will highlight all occurrences + that exist in the page. All subsequent calls will extend the highlight, rather than + replace it, with occurrences of the new string. + + If the HighlightAllOccurrences flag is not passed, the function will select an occurrence + and all subsequent calls will replace the current occurrence with the next one. + + To clear the selection, just pass an empty string. + + Returns true if \a subString was found; otherwise returns false. + + \sa selectedText(), selectionChanged() +*/ +bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags options) +{ + if (d->page) + return d->page->findText(subString, options); + return false; +} + /*! \reimp */ void QGraphicsWebView::hoverMoveEvent(QGraphicsSceneHoverEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); QMouseEvent me = QMouseEvent(QEvent::MouseMove, ev->pos().toPoint(), Qt::NoButton, @@ -766,7 +689,7 @@ void QGraphicsWebView::hoverLeaveEvent(QGraphicsSceneHoverEvent* ev) */ void QGraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -780,7 +703,7 @@ void QGraphicsWebView::mouseMoveEvent(QGraphicsSceneMouseEvent* ev) */ void QGraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -794,7 +717,7 @@ void QGraphicsWebView::mousePressEvent(QGraphicsSceneMouseEvent* ev) */ void QGraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -808,7 +731,7 @@ void QGraphicsWebView::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) */ void QGraphicsWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -822,7 +745,7 @@ void QGraphicsWebView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* ev) */ void QGraphicsWebView::keyPressEvent(QKeyEvent* ev) { - if (d->interactive && d->page) + if (d->page) d->page->event(ev); if (!ev->isAccepted()) @@ -833,7 +756,7 @@ void QGraphicsWebView::keyPressEvent(QKeyEvent* ev) */ void QGraphicsWebView::keyReleaseEvent(QKeyEvent* ev) { - if (d->interactive && d->page) + if (d->page) d->page->event(ev); if (!ev->isAccepted()) @@ -889,7 +812,7 @@ void QGraphicsWebView::dragEnterEvent(QGraphicsSceneDragDropEvent* ev) void QGraphicsWebView::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev) { #ifndef QT_NO_DRAGANDDROP - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -907,7 +830,7 @@ void QGraphicsWebView::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev) void QGraphicsWebView::dragMoveEvent(QGraphicsSceneDragDropEvent* ev) { #ifndef QT_NO_DRAGANDDROP - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -925,7 +848,7 @@ void QGraphicsWebView::dragMoveEvent(QGraphicsSceneDragDropEvent* ev) void QGraphicsWebView::dropEvent(QGraphicsSceneDragDropEvent* ev) { #ifndef QT_NO_DRAGANDDROP - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -956,7 +879,7 @@ void QGraphicsWebView::contextMenuEvent(QGraphicsSceneContextMenuEvent* ev) */ void QGraphicsWebView::wheelEvent(QGraphicsSceneWheelEvent* ev) { - if (d->interactive && d->page) { + if (d->page) { const bool accepted = ev->isAccepted(); d->page->event(ev); ev->setAccepted(accepted); @@ -971,11 +894,20 @@ void QGraphicsWebView::wheelEvent(QGraphicsSceneWheelEvent* ev) */ void QGraphicsWebView::inputMethodEvent(QInputMethodEvent* ev) { - if (d->interactive && d->page) + if (d->page) d->page->event(ev); if (!ev->isAccepted()) QGraphicsItem::inputMethodEvent(ev); } +/*! + \fn void QGraphicsWebView::linkClicked(const QUrl &url) + + This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy + property is set to delegate the link handling for the specified \a url. + + \sa QWebPage::linkDelegationPolicy() +*/ + #include "moc_qgraphicswebview.cpp" diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h index 43cf59a..f3afb4c 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.h @@ -21,6 +21,7 @@ #define QGraphicsWebView_h #include "qwebkitglobal.h" +#include "qwebpage.h" #include #include #include @@ -39,17 +40,14 @@ class QWEBKIT_EXPORT QGraphicsWebView : public QGraphicsWidget { Q_PROPERTY(QString title READ title NOTIFY titleChanged) Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged) - Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor NOTIFY zoomFactorChanged) - Q_PROPERTY(QString status READ status NOTIFY statusChanged) + Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) - Q_PROPERTY(QString html READ toHtml WRITE setHtml) Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) - Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) - Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactivityChanged) + Q_PROPERTY(bool modified READ isModified) public: - QGraphicsWebView(QGraphicsItem* parent = 0); + explicit QGraphicsWebView(QGraphicsItem* parent = 0); ~QGraphicsWebView(); QWebPage* page() const; @@ -64,15 +62,11 @@ public: qreal zoomFactor() const; void setZoomFactor(qreal); - bool isInteractive() const; - void setInteractive(bool); - - qreal progress() const; + bool isModified() const; void load(const QUrl &url); void load(const QNetworkRequest& request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray& body = QByteArray()); - QString toHtml() const; void setHtml(const QString& html, const QUrl& baseUrl = QUrl()); // FIXME: Consider rename to setHtml? void setContent(const QByteArray& data, const QString& mimeType = QString(), const QUrl& baseUrl = QUrl()); @@ -80,7 +74,10 @@ public: QWebHistory* history() const; QWebSettings* settings() const; - QString status() const; + QAction* pageAction(QWebPage::WebAction action) const; + void triggerPageAction(QWebPage::WebAction action, bool checked = false); + + bool findText(const QString& subString, QWebPage::FindFlags options = 0); virtual void setGeometry(const QRectF& rect); virtual void updateGeometry(); @@ -88,6 +85,10 @@ public: virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value); virtual bool event(QEvent*); + virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const; + + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + public Q_SLOTS: void stop(); void back(); @@ -98,13 +99,12 @@ Q_SIGNALS: void loadStarted(); void loadFinished(bool); - void progressChanged(qreal); - void interactivityChanged(); + void loadProgress(int progress); void urlChanged(const QUrl&); void titleChanged(const QString&); void iconChanged(); - void statusChanged(); - void zoomFactorChanged(); + void statusBarMessage(const QString& message); + void linkClicked(const QUrl&); protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent*); @@ -133,9 +133,7 @@ protected: virtual bool sceneEvent(QEvent*); private: - Q_PRIVATE_SLOT(d, void _q_doLoadProgress(int progress)) Q_PRIVATE_SLOT(d, void _q_doLoadFinished(bool success)) - Q_PRIVATE_SLOT(d, void _q_setStatusBarMessage(const QString& message)) QGraphicsWebViewPrivate* const d; friend class QGraphicsWebViewPrivate; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h index a18d262..9cb1ea1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h @@ -177,6 +177,7 @@ public: int count() const; QWebElement at(int i) const; + inline QWebElement operator[](int i) const { return at(i); } inline QWebElement first() const { return at(0); } inline QWebElement last() const { return at(count() - 1); } @@ -185,39 +186,69 @@ public: class const_iterator { public: - int i; - const QWebElementCollection *s; - - inline const_iterator(const QWebElementCollection *collection, int index) : i(index), s(collection) {} - inline const_iterator(const const_iterator &o) : i(o.i), s(o.s) {} + inline const_iterator(const QWebElementCollection* collection, int index) : i(index), collection(collection) {} + inline const_iterator(const const_iterator& o) : i(o.i), collection(o.collection) {} - inline const QWebElement operator*() const { return s->at(i); } + inline const QWebElement operator*() const { return collection->at(i); } - inline bool operator==(const const_iterator& o) const { return i == o.i && s == o.s; } - inline bool operator!=(const const_iterator& o) const { return i != o.i || s != o.s; } + inline bool operator==(const const_iterator& o) const { return i == o.i && collection == o.collection; } + inline bool operator!=(const const_iterator& o) const { return i != o.i || collection != o.collection; } inline bool operator<(const const_iterator& o) const { return i < o.i; } inline bool operator<=(const const_iterator& o) const { return i <= o.i; } inline bool operator>(const const_iterator& o) const { return i > o.i; } inline bool operator>=(const const_iterator& o) const { return i >= o.i; } - inline const_iterator &operator++() { ++i; return *this; } - inline const_iterator operator++(int) { const_iterator n(s, i); ++i; return n; } - inline const_iterator &operator--() { i--; return *this; } - inline const_iterator operator--(int) { const_iterator n(s, i); i--; return n; } - inline const_iterator &operator+=(int j) { i += j; return *this; } - inline const_iterator &operator-=(int j) { i -= j; return *this; } - inline const_iterator operator+(int j) const { return const_iterator(s, i + j); } - inline const_iterator operator-(int j) const { return const_iterator(s, i - j); } + inline const_iterator& operator++() { ++i; return *this; } + inline const_iterator operator++(int) { const_iterator n(collection, i); ++i; return n; } + inline const_iterator& operator--() { i--; return *this; } + inline const_iterator operator--(int) { const_iterator n(collection, i); i--; return n; } + inline const_iterator& operator+=(int j) { i += j; return *this; } + inline const_iterator& operator-=(int j) { i -= j; return *this; } + inline const_iterator operator+(int j) const { return const_iterator(collection, i + j); } + inline const_iterator operator-(int j) const { return const_iterator(collection, i - j); } inline int operator-(const_iterator j) const { return i - j.i; } private: - inline const_iterator() : i(0), s(0) {} + int i; + const QWebElementCollection* const collection; }; friend class const_iterator; - inline const_iterator begin() const { return const_iterator(this, 0); } - inline const_iterator end() const { return const_iterator(this, count()); } - inline QWebElement operator[](int i) const { return at(i); } + inline const_iterator begin() const { return constBegin(); } + inline const_iterator end() const { return constEnd(); } + inline const_iterator constBegin() const { return const_iterator(this, 0); } + inline const_iterator constEnd() const { return const_iterator(this, count()); }; + + class iterator { + public: + inline iterator(const QWebElementCollection* collection, int index) : i(index), collection(collection) {} + inline iterator(const iterator& o) : i(o.i), collection(o.collection) {} + + inline QWebElement operator*() const { return collection->at(i); } + + inline bool operator==(const iterator& o) const { return i == o.i && collection == o.collection; } + inline bool operator!=(const iterator& o) const { return i != o.i || collection != o.collection; } + inline bool operator<(const iterator& o) const { return i < o.i; } + inline bool operator<=(const iterator& o) const { return i <= o.i; } + inline bool operator>(const iterator& o) const { return i > o.i; } + inline bool operator>=(const iterator& o) const { return i >= o.i; } + + inline iterator& operator++() { ++i; return *this; } + inline iterator operator++(int) { iterator n(collection, i); ++i; return n; } + inline iterator& operator--() { i--; return *this; } + inline iterator operator--(int) { iterator n(collection, i); i--; return n; } + inline iterator& operator+=(int j) { i += j; return *this; } + inline iterator& operator-=(int j) { i -= j; return *this; } + inline iterator operator+(int j) const { return iterator(collection, i + j); } + inline iterator operator-(int j) const { return iterator(collection, i - j); } + inline int operator-(iterator j) const { return i - j.i; } + private: + int i; + const QWebElementCollection* const collection; + }; + friend class iterator; + inline iterator begin() { return iterator(this, 0); } + inline iterator end() { return iterator(this, count()); } private: QExplicitlySharedDataPointer d; }; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp index 409e1a0..f43cbbf 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebinspector.cpp @@ -50,6 +50,7 @@ \section1 Resources + This class acts mostly as a container and a controller for the inspector. Most of the resources needed by the inspector are owned by the associated QWebPage and are allocated the first time that: \list @@ -57,11 +58,6 @@ \o the QWebInspector is shown. \endlist - This class acts mostly as a container and a controller for the inspector. - You can defer the creation and association of the QWebInspector until - the first emission of QWebPage::webInspectorTriggered() to save additional - resources. - \section1 Inspector configuration persistence The inspector allows the user to configure some options through its diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index a1e131a..8499e10 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1471,8 +1471,6 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector() if (!inspector) { QWebInspector* insp = new QWebInspector; insp->setPage(q); - insp->connect(q, SIGNAL(webInspectorTriggered(const QWebElement&)), SLOT(show())); - insp->show(); // The inspector is expected to be shown on inspection inspectorIsInternalOnly = true; Q_ASSERT(inspector); // Associated through QWebInspector::setPage(q) @@ -2018,11 +2016,9 @@ void QWebPage::triggerAction(WebAction action, bool) editor->setBaseWritingDirection(RightToLeftWritingDirection); break; case InspectElement: { - QWebElement inspectedElement(QWebElement::enclosingElement(d->hitTestResult.d->innerNonSharedNode.get())); - emit webInspectorTriggered(inspectedElement); - if (!d->hitTestResult.isNull()) { d->getOrCreateInspector(); // Make sure the inspector is created + d->inspector->show(); // The inspector is expected to be shown on inspection d->page->inspectorController()->inspect(d->hitTestResult.d->innerNonSharedNode.get()); } break; @@ -2763,17 +2759,6 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) as a result of the user clicking on a "file upload" button in a HTML form where multiple file selection is allowed. - \omitvalue ErrorPageExtension (introduced in Qt 4.6) -*/ - -/*! - \enum QWebPage::ErrorDomain - \since 4.6 - \internal - - \value QtNetwork - \value Http - \value WebKit */ /*! @@ -2824,12 +2809,6 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) */ /*! - \fn QWebPage::ErrorPageExtensionReturn::ErrorPageExtensionReturn() - - Constructs a new error page object. -*/ - -/*! \class QWebPage::ChooseMultipleFilesExtensionOption \since 4.5 \brief The ChooseMultipleFilesExtensionOption class describes the option @@ -3440,24 +3419,6 @@ quint64 QWebPage::bytesReceived() const */ /*! - \fn void QWebPage::webInspectorTriggered(const QWebElement& inspectedElement); - \since 4.6 - - This signal is emitted when the user triggered an inspection through the - context menu. If a QWebInspector is associated to this page, it should be - visible to the user after this signal has been emitted. - - If still no QWebInspector is associated to this QWebPage after the emission - of this signal, a privately owned inspector will be shown to the user. - - \note \a inspectedElement contains the QWebElement under the context menu. - It is not garanteed to be the same as the focused element in the web - inspector. - - \sa QWebInspector -*/ - -/*! \fn void QWebPage::toolBarVisibilityChangeRequested(bool visible) This signal is emitted whenever the visibility of the toolbar in a web browser diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h index f39209c..8c455b1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h @@ -329,7 +329,6 @@ Q_SIGNALS: void windowCloseRequested(); void printRequested(QWebFrame *frame); void linkClicked(const QUrl &url); - void webInspectorTriggered(const QWebElement& inspectedElement); void toolBarVisibilityChangeRequested(bool visible); void statusBarVisibilityChangeRequested(bool visible); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index 3052056..ff86e1f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -206,10 +206,6 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); - - value = attributes.value(QWebSettings::SessionStorageEnabled, - global->attributes.value(QWebSettings::SessionStorageEnabled)); - settings->setSessionStorageEnabled(value); } else { QList settings = *::allSettings(); for (int i = 0; i < settings.count(); ++i) @@ -351,8 +347,6 @@ QWebSettings* QWebSettings::globalSettings() \value LocalStorageEnabled Specifies whether support for the HTML 5 local storage feature is enabled or not. Disabled by default. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. - \value SessionStorageEnabled Specifies whether support for the HTML 5 - session storage feature is enabled or not. Enabled by default. */ /*! @@ -383,7 +377,6 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::OfflineWebApplicationCacheEnabled, false); d->attributes.insert(QWebSettings::LocalStorageEnabled, false); d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); - d->attributes.insert(QWebSettings::SessionStorageEnabled, true); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); d->printingMinimumShrinkFactor = 0.0f; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h index c958ae7..3b6d1a7 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h @@ -67,7 +67,6 @@ public: LocalStorageDatabaseEnabled = LocalStorageEnabled, #endif LocalContentCanAccessRemoteUrls, - SessionStorageEnabled, DnsPrefetchEnabled }; enum WebGraphic { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 55ce1f7..12b20ab 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -70,7 +70,7 @@ void QWebViewPrivate::_q_pageDestroyed() It can be used in various applications to display web content live from the Internet. - The image below shows QWebView previewed in \QD with a Nokia website. + The image below shows QWebView previewed in \QD with the Trolltech website. \image qwebview-url.png @@ -974,7 +974,7 @@ void QWebView::changeEvent(QEvent *e) /*! \fn void QWebView::statusBarMessage(const QString& text) - This signal is emitted when the status bar \a text is changed by the page. + This signal is emitted when the statusbar \a text is changed by the page. */ /*! diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 84c5d43..296e06c 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,255 @@ +2009-11-09 Benjamin Poulain + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=30772 + Add a non-const iterator to QWebElementCollection. + Move the two attributes of the iterator to private. + + * Api/qwebelement.h: + (const_iterator::begin): + (const_iterator::end): + (const_iterator::constBegin): + (const_iterator::constEnd): + (const_iterator::iterator::iterator): + (const_iterator::iterator::operator*): + (const_iterator::iterator::operator==): + (const_iterator::iterator::operator!=): + (const_iterator::iterator::operator<): + (const_iterator::iterator::operator<=): + (const_iterator::iterator::operator>): + (const_iterator::iterator::operator>=): + (const_iterator::iterator::operator++): + (const_iterator::iterator::operator--): + (const_iterator::iterator::operator+=): + (const_iterator::iterator::operator-=): + (const_iterator::iterator::operator+): + (const_iterator::iterator::operator-): + * tests/qwebelement/tst_qwebelement.cpp: + (tst_QWebElement::nonConstIterator): + (tst_QWebElement::constIterator): + +2009-11-09 Laszlo Gombos + + Reviewed by Kenneth Christiansen. + + [Qt] Remove the sessionStorage setting (per Page) + https://bugs.webkit.org/show_bug.cgi?id=31249 + + This setting allows to run sessionStorage on/off on a per page + basis. Remove this prematurely exposed API. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::QWebSettings): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::database): + (tst_QWebPage::testOptionalJSObjects): + +2009-11-09 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] Remove the QWebPage:webInspectorTriggered signal. + User customization of the communication between QWebPage + and QWebInspector will be properly designed in the next version. + https://bugs.webkit.org/show_bug.cgi?id=30773 + + * Api/qwebinspector.cpp: + * Api/qwebpage.cpp: + (QWebPagePrivate::getOrCreateInspector): + (QWebPage::triggerAction): + * Api/qwebpage.h: + * QtLauncher/main.cpp: + (MainWindow::MainWindow): + +2009-11-05 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Added a missing re-implementation of QGraphicsItem::inputMethodQuery(). + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::inputMethodQuery): + * Api/qgraphicswebview.h: + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Provide a dummy re-implementation of QGraphicsLayoutItem::sizeHint(), + similar to QWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::sizeHint): + * Api/qgraphicswebview.h: + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Removed zoomFactoryChanged() signal and added + linkClicked() to QGraphicsWebView, for consistency with + QWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::setPage): + (QGraphicsWebView::setZoomFactor): + * Api/qgraphicswebview.h: + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Added QGraphicsWebView::findText() for convenience and consistency + with QWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::findText): + * Api/qgraphicswebview.h: + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Added QGraphicsWebView::pageAction() and triggerPageAction(), for + consistency with QWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::pageAction): + (QGraphicsWebView::triggerPageAction): + * Api/qgraphicswebview.h: + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Removed QGraphicsWebView::toHtml() after API review. + + That's consistent with QWebView and also based on the assumption that + toHtml() is called less frequently than setHtml(). + + * Api/qgraphicswebview.cpp: + * Api/qgraphicswebview.h: + * tests/qgraphicswebview/tst_qgraphicswebview.cpp: + (tst_QGraphicsWebView::qgraphicswebview): + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Removed the interactive property of QGraphicsWebView. + + There are clearly use-cases for this feature, but it will require + more work to make this fully work with an enum to have fine-grained + control over the interactivity levels. For now it is easy to achieve + in user-code what the boolean property did. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): + (QGraphicsWebView::hoverMoveEvent): + (QGraphicsWebView::mouseMoveEvent): + (QGraphicsWebView::mousePressEvent): + (QGraphicsWebView::mouseReleaseEvent): + (QGraphicsWebView::mouseDoubleClickEvent): + (QGraphicsWebView::keyPressEvent): + (QGraphicsWebView::keyReleaseEvent): + (QGraphicsWebView::dragLeaveEvent): + (QGraphicsWebView::dragMoveEvent): + (QGraphicsWebView::dropEvent): + (QGraphicsWebView::wheelEvent): + (QGraphicsWebView::inputMethodEvent): + * Api/qgraphicswebview.h: + * tests/qgraphicswebview/tst_qgraphicswebview.cpp: + (tst_QGraphicsWebView::qgraphicswebview): + +2009-11-04 Simon Hausmann + + Reviewed by Tor Arne Vestbø. + + Make the QGraphicsWebView constructor explicit. + + * Api/qgraphicswebview.h: + +2009-11-05 Simon Hausmann + + Last Qt 4.5 build fix (*sigh*) + + * tests/qwebpage/tst_qwebpage.cpp: + (inputMethodHints): inputMethodHints() is only used for + Qt 4.6, so guard the whole function. + +2009-11-05 Simon Hausmann + + Another prospective build fix against Qt 4.5 (build bot) + + Don't compile & run the QGraphicsWebView portion of the + input methods auto test with Qt 4.5. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods_data): + (inputMethodHints): + (inputMethodEnabled): + (tst_QWebPage::inputMethods): + +2009-11-05 Simon Hausmann + + Prospective build fix against Qt 4.5 (build bot) + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::setInputMethodEnabled): Guard the + use of Qt 4.6 specific API with #ifdefs. + +2009-11-01 Simon Hausmann + + Reviewed by Kenneth Christiansen. + + [Qt] Fix enabling of input method support on QGraphicsWebView. + https://bugs.webkit.org/show_bug.cgi?id=30605 + + Instead of setting the unsupported widget attribute on the + QGraphicsWidget in setInputMethodEnabled() set the + ItemAcceptsInputMethod GraphicsItem flag directly. + + Changed the existing input method auto test to run once + on a QWebView and once on a QGraphicsWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::setInputMethodEnabled): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods_data): + (inputMethodHints): + (inputMethodEnabled): + (tst_QWebPage::inputMethods): + +2009-11-04 Simon Hausmann + + Reviewed by Kenneth Christiansen. + + Added QGraphicsWebView::modified property, for consistency + with QWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::isModified): + * Api/qgraphicswebview.h: + * tests/qgraphicswebview/tst_qgraphicswebview.cpp: + (tst_QGraphicsWebView::qgraphicswebview): + +2009-11-04 Simon Hausmann + + Reviewed by Kenneth Christiansen. + + Removed status and progress properties of QGraphicsWebView. + Added loadProgress and statusBarMessage signals instead, + after API review. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::QGraphicsWebViewPrivate): + (QGraphicsWebView::setPage): + * Api/qgraphicswebview.h: + * tests/qgraphicswebview/tst_qgraphicswebview.cpp: + (tst_QGraphicsWebView::qgraphicswebview): + 2009-11-04 Yael Aharon Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp index 4bdb7f5..a52e167 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp @@ -63,21 +63,17 @@ void tst_QGraphicsWebView::qgraphicswebview() item.title(); item.icon(); item.zoomFactor(); - item.isInteractive(); - item.progress(); - item.toHtml(); item.history(); item.settings(); - item.status(); item.page(); item.setPage(0); item.page(); item.setUrl(QUrl()); item.setZoomFactor(0); - item.setInteractive(true); item.load(QUrl()); item.setHtml(QString()); item.setContent(QByteArray()); + item.isModified(); } class WebPage : public QWebPage 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 cf83fe8..117393a 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp @@ -71,6 +71,8 @@ private slots: void classes(); void namespaceURI(); void iteration(); + void nonConstIterator(); + void constIterator(); void foreachManipulation(); void emptyCollection(); void appendCollection(); @@ -305,6 +307,37 @@ void tst_QWebElement::iteration() QCOMPARE(paras.at(1), paras.last()); } +void tst_QWebElement::nonConstIterator() +{ + QString html = "

first para

second para

"; + m_mainFrame->setHtml(html); + QWebElement body = m_mainFrame->documentElement(); + QWebElementCollection paras = body.findAll("p"); + + QWebElementCollection::iterator it = paras.begin(); + QCOMPARE(*it, paras.at(0)); + ++it; + (*it).encloseWith("
"); + QCOMPARE(*it, paras.at(1)); + ++it; + QCOMPARE(it, paras.end()); +} + +void tst_QWebElement::constIterator() +{ + QString html = "

first para

second para

"; + m_mainFrame->setHtml(html); + QWebElement body = m_mainFrame->documentElement(); + const QWebElementCollection paras = body.findAll("p"); + + QWebElementCollection::const_iterator it = paras.begin(); + QCOMPARE(*it, paras.at(0)); + ++it; + QCOMPARE(*it, paras.at(1)); + ++it; + QCOMPARE(it, paras.end()); +} + void tst_QWebElement::foreachManipulation() { QString html = "

first para

second para

"; diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro index b8734cd..0e540e5 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebframe.cpp RESOURCES += qwebframe.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\" +DEFINES += SRCDIR=\\\"$$PWD/resources\\\" symbian { TARGET.UID3 = 0xA000E53D 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 6f07e90..7cc62b0 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -38,10 +38,6 @@ #endif #include "../util.h" -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -#endif - //TESTED_CLASS= //TESTED_FILES= diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro index 7853b28..6b28efd 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebpage.cpp RESOURCES += tst_qwebpage.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" +DEFINES += SRCDIR=\\\"$$PWD/\\\" symbian { TARGET.UID3 = 0xA000E53E diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 3eead92..87077e0 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -21,6 +21,9 @@ #include +#include +#include +#include #include #include #include @@ -37,10 +40,6 @@ #include #include -#if defined(Q_OS_SYMBIAN) -# define SRCDIR "" -#endif - // Will try to wait for the condition while allowing event processing #define QTRY_COMPARE(__expr, __expected) \ do { \ @@ -124,6 +123,7 @@ private slots: void testOptionalJSObjects(); void testEnablePersistentStorage(); void consoleOutput(); + void inputMethods_data(); void inputMethods(); void defaultTextEncoding(); void errorPageExtension(); @@ -456,7 +456,6 @@ void tst_QWebPage::database() QVERIFY(QWebSettings::offlineStorageDefaultQuota() == 1024 * 1024); m_page->settings()->setAttribute(QWebSettings::LocalStorageEnabled, true); - m_page->settings()->setAttribute(QWebSettings::SessionStorageEnabled, true); m_page->settings()->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, true); QString dbFileName = path + "Databases.db"; @@ -1268,28 +1267,87 @@ void tst_QWebPage::frameAt() frameAtHelper(webPage, webPage->mainFrame(), webPage->mainFrame()->pos()); } +void tst_QWebPage::inputMethods_data() +{ + QTest::addColumn("viewType"); + QTest::newRow("QWebView") << "QWebView"; +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QTest::newRow("QGraphicsWebView") << "QGraphicsWebView"; +#endif +} + +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) +static Qt::InputMethodHints inputMethodHints(QObject* object) +{ + if (QGraphicsObject* o = qobject_cast(object)) + return o->inputMethodHints(); + if (QWidget* w = qobject_cast(object)) + return w->inputMethodHints(); + return Qt::InputMethodHints(); +} +#endif + +static bool inputMethodEnabled(QObject* object) +{ +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + if (QGraphicsObject* o = qobject_cast(object)) + return o->flags() & QGraphicsItem::ItemAcceptsInputMethod; +#endif + if (QWidget* w = qobject_cast(object)) + return w->testAttribute(Qt::WA_InputMethodEnabled); + return false; +} + void tst_QWebPage::inputMethods() { - m_view->page()->mainFrame()->setHtml("" \ + QFETCH(QString, viewType); + QWebPage* page = new QWebPage; + QObject* view = 0; + QObject* container = 0; + if (viewType == "QWebView") { + QWebView* wv = new QWebView; + wv->setPage(page); + view = wv; + container = view; + } +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + else if (viewType == "QGraphicsWebView") { + QGraphicsWebView* wv = new QGraphicsWebView; + wv->setPage(page); + view = wv; + + QGraphicsView* gv = new QGraphicsView; + QGraphicsScene* scene = new QGraphicsScene(gv); + gv->setScene(scene); + scene->addItem(wv); + wv->setGeometry(QRect(0, 0, 500, 500)); + + container = gv; + } +#endif + else + QVERIFY2(false, "Unknown view type"); + + page->mainFrame()->setHtml("" \ "
" \ "" \ ""); - m_view->page()->mainFrame()->setFocus(); + page->mainFrame()->setFocus(); - QWebElementCollection inputs = m_view->page()->mainFrame()->documentElement().findAll("input"); + QWebElementCollection inputs = page->mainFrame()->documentElement().findAll("input"); QMouseEvent evpres(QEvent::MouseButtonPress, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); - m_view->page()->event(&evpres); + page->event(&evpres); QMouseEvent evrel(QEvent::MouseButtonRelease, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); - m_view->page()->event(&evrel); + page->event(&evrel); //ImMicroFocus - QVariant variant = m_view->page()->inputMethodQuery(Qt::ImMicroFocus); + QVariant variant = page->inputMethodQuery(Qt::ImMicroFocus); QRect focusRect = variant.toRect(); QVERIFY(inputs.at(0).geometry().contains(variant.toRect().topLeft())); //ImFont - variant = m_view->page()->inputMethodQuery(Qt::ImFont); + variant = page->inputMethodQuery(Qt::ImFont); QFont font = variant.value(); QCOMPARE(QString("-webkit-serif"), font.family()); @@ -1298,45 +1356,45 @@ void tst_QWebPage::inputMethods() //Insert text. { QInputMethodEvent eventText("QtWebKit", inputAttributes); - QSignalSpy signalSpy(m_view->page(), SIGNAL(microFocusChanged())); - m_view->page()->event(&eventText); + QSignalSpy signalSpy(page, SIGNAL(microFocusChanged())); + page->event(&eventText); QCOMPARE(signalSpy.count(), 0); } { QInputMethodEvent eventText("", inputAttributes); eventText.setCommitString(QString("QtWebKit"), 0, 0); - m_view->page()->event(&eventText); + page->event(&eventText); } #if QT_VERSION >= 0x040600 //ImMaximumTextLength - variant = m_view->page()->inputMethodQuery(Qt::ImMaximumTextLength); + variant = page->inputMethodQuery(Qt::ImMaximumTextLength); QCOMPARE(20, variant.toInt()); //Set selection inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 3, 2, QVariant()); QInputMethodEvent eventSelection("",inputAttributes); - m_view->page()->event(&eventSelection); + page->event(&eventSelection); //ImAnchorPosition - variant = m_view->page()->inputMethodQuery(Qt::ImAnchorPosition); + variant = page->inputMethodQuery(Qt::ImAnchorPosition); int anchorPosition = variant.toInt(); QCOMPARE(anchorPosition, 3); //ImCursorPosition - variant = m_view->page()->inputMethodQuery(Qt::ImCursorPosition); + variant = page->inputMethodQuery(Qt::ImCursorPosition); int cursorPosition = variant.toInt(); QCOMPARE(cursorPosition, 5); //ImCurrentSelection - variant = m_view->page()->inputMethodQuery(Qt::ImCurrentSelection); + variant = page->inputMethodQuery(Qt::ImCurrentSelection); QString selectionValue = variant.value(); QCOMPARE(selectionValue, QString("eb")); #endif //ImSurroundingText - variant = m_view->page()->inputMethodQuery(Qt::ImSurroundingText); + variant = page->inputMethodQuery(Qt::ImSurroundingText); QString value = variant.value(); QCOMPARE(value, QString("QtWebKit")); @@ -1347,29 +1405,31 @@ void tst_QWebPage::inputMethods() QInputMethodEvent::Attribute newSelection(QInputMethodEvent::Selection, 0, 0, QVariant()); attributes.append(newSelection); QInputMethodEvent event("composition", attributes); - m_view->page()->event(&event); + page->event(&event); } // A ongoing composition should not change the surrounding text before it is committed. - variant = m_view->page()->inputMethodQuery(Qt::ImSurroundingText); + variant = page->inputMethodQuery(Qt::ImSurroundingText); value = variant.value(); QCOMPARE(value, QString("QtWebKit")); #endif //ImhHiddenText QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); - m_view->page()->event(&evpresPassword); + page->event(&evpresPassword); QMouseEvent evrelPassword(QEvent::MouseButtonRelease, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); - m_view->page()->event(&evrelPassword); + page->event(&evrelPassword); - QVERIFY(m_view->testAttribute(Qt::WA_InputMethodEnabled)); + QVERIFY(inputMethodEnabled(view)); #if QT_VERSION >= 0x040600 - QVERIFY(m_view->inputMethodHints() & Qt::ImhHiddenText); + QVERIFY(inputMethodHints(view) & Qt::ImhHiddenText); - m_view->page()->event(&evpres); - m_view->page()->event(&evrel); - QVERIFY(!(m_view->inputMethodHints() & Qt::ImhHiddenText)); + page->event(&evpres); + page->event(&evrel); + QVERIFY(!(inputMethodHints(view) & Qt::ImhHiddenText)); #endif + + delete container; } // import a little DRT helper function to trigger the garbage collector @@ -1444,11 +1504,6 @@ void tst_QWebPage::testOptionalJSObjects() QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", true), true); QCOMPARE(testFlag(webPage1, QWebSettings::LocalStorageEnabled, "localStorage", false), false); QCOMPARE(testFlag(webPage2, QWebSettings::LocalStorageEnabled, "localStorage", false), true); - - QCOMPARE(testFlag(webPage1, QWebSettings::SessionStorageEnabled, "sessionStorage", false), false); - QCOMPARE(testFlag(webPage2, QWebSettings::SessionStorageEnabled, "sessionStorage", true), true); - QCOMPARE(testFlag(webPage1, QWebSettings::SessionStorageEnabled, "sessionStorage", false), false); - QCOMPARE(testFlag(webPage2, QWebSettings::SessionStorageEnabled, "sessionStorage", false), true); } void tst_QWebPage::testEnablePersistentStorage() -- cgit v0.12 From 5786450e3078c6b24f92859349fcd4231426e62d Mon Sep 17 00:00:00 2001 From: Liang QI Date: Tue, 3 Nov 2009 12:05:50 +0100 Subject: Re-apply change 29afcb69d6023aba012051bd2a026b57b3689732 by Liang QI Re-apply change 1db4a133a9d35e00bad50541fb8d64079a7debea by Liang QI Fix tst_qwebpage and tst_qwebframe compilation on Symbian. RevBy: TrustMe --- src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro | 2 +- src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 4 ++++ src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro | 2 +- src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro index 0e540e5..b8734cd 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/qwebframe.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebframe.cpp RESOURCES += qwebframe.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -DEFINES += SRCDIR=\\\"$$PWD/resources\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD/resources\\\" symbian { TARGET.UID3 = 0xA000E53D 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 7cc62b0..6f07e90 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -38,6 +38,10 @@ #endif #include "../util.h" +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + //TESTED_CLASS= //TESTED_FILES= diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro index 6b28efd..7853b28 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/qwebpage.pro @@ -5,7 +5,7 @@ SOURCES += tst_qwebpage.cpp RESOURCES += tst_qwebpage.qrc QT += testlib network QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR -DEFINES += SRCDIR=\\\"$$PWD/\\\" +!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" symbian { TARGET.UID3 = 0xA000E53E diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 87077e0..93a1784 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -40,6 +40,10 @@ #include #include +#if defined(Q_OS_SYMBIAN) +# define SRCDIR "" +#endif + // Will try to wait for the condition while allowing event processing #define QTRY_COMPARE(__expr, __expected) \ do { \ -- cgit v0.12 From 4261c163c17cd47a84f4d27bc82a6971c277d478 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 13 Oct 2009 11:34:27 +0200 Subject: Re-apply change fdb9419f23d1cd2a9ddfc1f7e2fb58f6e845483b by Jocelyn Turcotte Re-apply change 2fbc823bb66db6ef6f6acc74d2baa96ebe1dec81 by Jocelyn Turcotte Re-apply change 6125aabeccb01a07c706fe4227279eb827e8e890 by Jocelyn Turcotte Re-apply change 6b8ac349b9a477863a8c8388dcc0658f3284bc54 by Jocelyn Turcotte Re-applying commit ee0a43fee20cc398b505eb65218ebed56dfc8f39 by Simon Hausmann Fix crash of QtScript on Mac OS X When compiling on 10.4 but running on 10.5 the flags passed to vm_map cause it to crash. For now fall back to the use of mmap() as allocator instead. Reviewed-by: Kent Hansen --- src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index b885049..8b647a0 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -240,7 +240,9 @@ void Heap::destroy() template NEVER_INLINE CollectorBlock* Heap::allocateBlock() { -#if PLATFORM(DARWIN) + // Disable the use of vm_map for the Qt build on Darwin, because when compiled on 10.4 + // it crashes on 10.5 +#if PLATFORM(DARWIN) && !PLATFORM(QT) vm_address_t address = 0; // FIXME: tag the region as a JavaScriptCore heap when we get a registered VM tag: . vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT); @@ -332,7 +334,9 @@ NEVER_INLINE void Heap::freeBlock(size_t block) NEVER_INLINE void Heap::freeBlock(CollectorBlock* block) { -#if PLATFORM(DARWIN) + // Disable the use of vm_deallocate for the Qt build on Darwin, because when compiled on 10.4 + // it crashes on 10.5 +#if PLATFORM(DARWIN) && !PLATFORM(QT) vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE); #elif PLATFORM(SYMBIAN) userChunk->Free(reinterpret_cast(block)); -- cgit v0.12 From 85a4a5bdbebee299482c525750aa179c2cff6ef2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 16 Oct 2009 14:30:39 +0200 Subject: Re-apply change b065fda13c29110fc81f77c9bbf1069d562b4d67 by Martin Smith Re-apply change 422c747c5108f9f0c544b5dd0789df32aa498fb7 by Martin Smith Re-apply change cef1901dbd96be81fc4139b50b094dfae5223e6f by Martin Smith Re-apply change 0f8bff1970d4b0f10e98ce7d6ab341620f4ce76b by Martin Smith doc: Changed Trolltech to Nokia --- src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 12b20ab..6623f24 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -70,7 +70,7 @@ void QWebViewPrivate::_q_pageDestroyed() It can be used in various applications to display web content live from the Internet. - The image below shows QWebView previewed in \QD with the Trolltech website. + The image below shows QWebView previewed in \QD with a Nokia website. \image qwebview-url.png -- cgit v0.12 From d0c5bcf3b5793e73a059dea083b0f9ea0b16bfb3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 23 Oct 2009 14:51:48 +0200 Subject: Re-apply change 62ed4c43c8c2fe3457de6d7570c2ae4a09a5ecf0 by David Boddie Re-apply change 914de965a8380e7620209c7b26e984ed9fbccc57 by David Boddie Re-apply change 37dc859e7e2e0f135e4c40bc7f6f824fcdb21e86 by David Boddie Doc: Fixed and synchronized QWebView related documentation. Reviewed-by: Trust Me --- .../webkit/WebKit/qt/Api/qgraphicswebview.cpp | 96 ++++++++++++++++++++-- src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp | 2 +- 2 files changed, 91 insertions(+), 7 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 0365181..38d8c47 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -143,17 +143,101 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const /*! \class QGraphicsWebView - \brief The QGraphicsWebView class allows web content to be added to a GraphicsView. + \brief The QGraphicsWebView class allows Web content to be added to a GraphicsView. \since 4.6 - A WebGraphicsItem renders web content based on a URL or set data. + An instance of this class renders Web content from a URL or supplied as data, using + features of the QtWebKit module. - If the width and height of the item is not set, they will - dynamically adjust to a size appropriate for the content. - This width may be large (eg. 980) for typical online web pages. + If the width and height of the item is not set, they will dynamically adjust to + a size appropriate for the content. This width may be large (e.g., 980 pixels or + more) for typical online Web pages. + + \section1 Browser Features + + Many of the functions, signals and properties provided by QWebView are also available + for this item, making it simple to adapt existing code to use QGraphicsWebView instead + of QWebView. + + The item uses a QWebPage object to perform the rendering of Web content, and this can + be obtained with the page() function, enabling the document itself to be accessed and + modified. + + As with QWebView, the item records the browsing history using a QWebHistory object, + accessible using the history() function. The QWebSettings object that defines the + configuration of the browser can be obtained with the settings() function, enabling + features like plugin support to be customized for each item. + + \sa QWebView, QGraphicsTextItem +*/ + +/*! + \fn void QGraphicsWebView::titleChanged(const QString &title) + + This signal is emitted whenever the \a title of the main frame changes. + + \sa title() +*/ + +/*! + \fn void QGraphicsWebView::urlChanged(const QUrl &url) + + This signal is emitted when the \a url of the view changes. + + \sa url(), load() +*/ + +/*! + \fn void QGraphicsWebView::statusChanged() + + This signal is emitted when the status bar text is changed by the page. +*/ + +/*! + \fn void QGraphicsWebView::iconChanged() + + This signal is emitted whenever the icon of the page is loaded or changes. + + In order for icons to be loaded, you will need to set an icon database path + using QWebSettings::setIconDatabasePath(). + + \sa icon(), QWebSettings::setIconDatabasePath() +*/ + +/*! + \fn void QGraphicsWebView::loadStarted() + + This signal is emitted when a new load of the page is started. + + \sa progressChanged(), loadFinished() +*/ + +/*! + \fn void QGraphicsWebView::loadFinished(bool ok) + + This signal is emitted when a load of the page is finished. + \a ok will indicate whether the load was successful or any error occurred. + + \sa loadStarted() */ /*! + \fn void QGraphicsWebView::progressChanged(qreal progress) + + This signal is emitted every time an element in the web page + completes loading and the overall loading progress advances. + + This signal tracks the progress of all child frames. + + The current value is provided by \a progress and scales from 0.0 to 1.0, + which is the default range of QProgressBar. + + \sa loadStarted(), loadFinished() +*/ + + + +/*! Constructs an empty QGraphicsWebView with parent \a parent. \sa load() @@ -170,7 +254,7 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) } /*! - Destroys the web graphicsitem. + Destroys the item. */ QGraphicsWebView::~QGraphicsWebView() { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 6623f24..55ce1f7 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -974,7 +974,7 @@ void QWebView::changeEvent(QEvent *e) /*! \fn void QWebView::statusBarMessage(const QString& text) - This signal is emitted when the statusbar \a text is changed by the page. + This signal is emitted when the status bar \a text is changed by the page. */ /*! -- cgit v0.12 From d09f0e3949d4e705ef60516a9ccfacad736dff43 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Oct 2009 10:56:57 +0100 Subject: Re-apply change 16d98a3fa8e5cf5f41e35e257b8791ce030a4ce1 by Thiago Macieira Re-apply change cbb2efb13cdf05aabc245e2b0157883146cf069d by Thiago Macieira Re-apply change 3f7a99565de7ed17d7ac4c0a25b02997b094b1a9 by Thiago Macieira Fix linking of WebKit on Linux 32-bit. It was missing the ".text" directive at the top of the file, indicating that code would follow. Without it, the assembler created "NOTYPE" symbols, which would result in linker errors. --- src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index c999618..9fa898a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -75,7 +75,7 @@ namespace JSC { #define THUMB_FUNC_PARAM(name) #endif -#if PLATFORM(LINUX) && PLATFORM(X86_64) +#if PLATFORM(LINUX) && (PLATFORM(X86_64) || PLATFORM(X86)) #define SYMBOL_STRING_RELOCATION(name) #name "@plt" #else #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name) @@ -93,6 +93,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline); asm volatile ( +".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" -- cgit v0.12 From a6123418522a3865d462cb64022f567462603af1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 26 Oct 2009 11:04:21 +0100 Subject: Re-apply change 0951f86be22633e1ff763de935f9c35a20f8a575 by Thiago Macieira Re-apply change 7293097060383bcb75ee9f3e6a270de3b5bee2dc by Thiago Macieira Re-apply change e2ef97128c006ac2a5c99c67bb54eebaa3b45720 by Thiago Macieira Implement symbol hiding for JSC's JIT functions. These functions are implemented directly in assembly, so they need the proper directives to enable/disable visibility. On ELF systems, it's .hidden, whereas on Mach-O systems (Mac) it's .private_extern. On Windows, it's not necessary since you have to explicitly export. I also implemented the AIX idiom, though it's unlikely anyone will implement AIX/POWER JIT. That leaves only HP-UX on PA-RISC unimplemented, from the platforms that Qt supports. It's also unlikely that we'll imlpement JIT for it. Reviewed-by: Kent Hansen (this commit was 26d0990c66068bfc92a2ec77512b26d4a0c11b02, but was lost during a WebKit update) --- .../webkit/JavaScriptCore/jit/JITStubs.cpp | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 9fa898a..470ed0b 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -81,6 +81,19 @@ namespace JSC { #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name) #endif +#if PLATFORM(DARWIN) + // Mach-O platform +#define HIDE_SYMBOL(name) ".private_extern _" #name +#elif PLATFORM(AIX) + // IBM's own file format +#define HIDE_SYMBOL(name) ".lglobl " #name +#elif PLATFORM(LINUX) || PLATFORM(FREEBSD) || PLATFORM(OPENBSD) || PLATFORM(SOLARIS) || (PLATFORM(HPUX) && PLATFORM(IA64)) || PLATFORM(SYMBIAN) || PLATFORM(NETBSD) + // ELF platform +#define HIDE_SYMBOL(name) ".hidden " #name +#else +#define HIDE_SYMBOL(name) +#endif + #if USE(JSVALUE32_64) #if COMPILER(GCC) && PLATFORM(X86) @@ -95,6 +108,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_ asm volatile ( ".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -115,6 +129,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -130,6 +145,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x3c, %esp" "\n" "popl %ebx" "\n" @@ -154,6 +170,7 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x80, JITStackFrame_code_ asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -180,6 +197,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -195,6 +213,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x48, %rsp" "\n" "popq %rbx" "\n" @@ -216,6 +235,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -242,6 +262,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -347,7 +368,9 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x30, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x1c, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( +".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushl %ebp" "\n" "movl %esp, %ebp" "\n" @@ -368,6 +391,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) "movl %esp, %ecx" "\n" @@ -383,6 +407,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addl $0x1c, %esp" "\n" "popl %ebx" "\n" @@ -405,7 +430,9 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x48, JITStackFrame_code_ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedRBX) == 0x78, JITStackFrame_stub_argument_space_matches_ctiTrampoline); asm volatile ( +".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "pushq %rbp" "\n" "movq %rsp, %rbp" "\n" @@ -439,6 +466,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "movq %rsp, %rdi" "\n" "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" @@ -454,6 +482,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "addq $0x78, %rsp" "\n" "popq %rbx" "\n" @@ -475,6 +504,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" @@ -501,6 +531,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" @@ -518,6 +549,7 @@ asm volatile ( ".text" "\n" ".align 2" "\n" ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" ".thumb" "\n" ".thumb_func " THUMB_FUNC_PARAM(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" @@ -532,7 +564,9 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" #elif COMPILER(GCC) && PLATFORM(ARM_TRADITIONAL) asm volatile ( +".text\n" ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" @@ -549,12 +583,14 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" "bl " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "add sp, sp, #36" "\n" "ldmia sp!, {r4-r8, lr}" "\n" @@ -889,6 +925,7 @@ static NEVER_INLINE void throwStackOverflowError(CallFrame* callFrame, JSGlobalD ".text" "\n" \ ".align 2" "\n" \ ".globl " SYMBOL_STRING(cti_##op) "\n" \ + HIDE_SYMBOL(cti_##op) "\n" \ ".thumb" "\n" \ ".thumb_func " THUMB_FUNC_PARAM(cti_##op) "\n" \ SYMBOL_STRING(cti_##op) ":" "\n" \ -- cgit v0.12 From 8474d7e594f5b70ca88ef0188969298ed771e875 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 26 Oct 2009 17:35:17 +0100 Subject: Re-apply change 4f62d29e8ae464c223af5bc08ae219d9b198da63 by David Boddie Re-apply change b4be512bffba65bf4577a2b8275d7c38ce5501a1 by David Boddie Re-apply change 6f36d0aafaccbb9affe8ac1b82c225d985aa7491 by David Boddie Doc: Added internal or hidden placeholder documentation. Reviewed-by: Trust Me To-be-completed-by: QtWebKit developers --- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index 8499e10..d4a491b 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -2759,6 +2759,17 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) as a result of the user clicking on a "file upload" button in a HTML form where multiple file selection is allowed. + \omitvalue ErrorPageExtension (introduced in Qt 4.6) +*/ + +/*! + \enum QWebPage::ErrorDomain + \since 4.6 + \internal + + \value QtNetwork + \value Http + \value WebKit */ /*! @@ -2809,6 +2820,12 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) */ /*! + \fn QWebPage::ErrorPageExtensionReturn::ErrorPageExtensionReturn() + + Constructs a new error page object. +*/ + +/*! \class QWebPage::ChooseMultipleFilesExtensionOption \since 4.5 \brief The ChooseMultipleFilesExtensionOption class describes the option -- cgit v0.12 From ad79d84b8da174ecdd5d0b617504481add81430f Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 28 Oct 2009 08:52:30 +0100 Subject: Re-apply change 914d5847532a85a564a5df4a2bc8bdccb0f91abb by Shane Kearns Re-apply change cadd19cd98b9a6ff7ff8755f7774027400aadb0f by Shane Kearns Re-apply change 6bc9ef388590b4bfb281d2e1510dc7c3d1837349 by Shane Kearns Fix to 8e0fbc2caa3edefb78d6667721235b783bc1a850 This version of the fix will set the def file only if defblock is enabled in qbase.pri. That means that def files don't get turned on for webkit but not for the whole project (avoids build failures in the continuous integration system when other teams change the exported symbols) Reviewed-by: Jason Barron --- src/3rdparty/webkit/WebCore/WebCore.pro | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 60e414f..4e84a80 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3381,3 +3381,18 @@ CONFIG(QTDIR_build):isEqual(QT_MAJOR_VERSION, 4):greaterThan(QT_MINOR_VERSION, 4 plugins/win/PaintHooks.asm } } + +# Temporary workaround to pick up the DEF file from the same place as all the others +symbian { + shared { + contains(MMP_RULES, defBlock) { + MMP_RULES -= defBlock + + MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ../../../s60installs/bwins/$${TARGET}.def" \ + "$${LITERAL_HASH}elif defined EABI" \ + "DEFFILE ../../../s60installs/eabi/$${TARGET}.def" \ + "$${LITERAL_HASH}endif" + } + } +} -- cgit v0.12 From 9e06a5883b7e719417ecb3f8f5188e2a3b1bc953 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 27 Oct 2009 16:19:19 +0100 Subject: Re-apply change 2a9596d85a6c44fe1eba98447ab95ca913f10e29 by Joerg Bornemann Re-apply change 62923e7edacf6a1d28accaff70cbdc0176890d62 by Joerg Bornemann Re-apply change fa1856bcb2eff41dadf0900202dd43f44ddb2343 by Joerg Bornemann WebKit compile fix for Windows CE Not sure if this is right fix. We could also disable PLUGIN_PACKAGE_SIMPLE_HASH. But this is automatically enabled when NETSCAPE_PLUGIN_API is disabled. Reviewed-by: thartman --- src/3rdparty/webkit/WebCore/platform/FileSystem.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/3rdparty/webkit/WebCore/platform/FileSystem.h b/src/3rdparty/webkit/WebCore/platform/FileSystem.h index 9952b39..791198d 100644 --- a/src/3rdparty/webkit/WebCore/platform/FileSystem.h +++ b/src/3rdparty/webkit/WebCore/platform/FileSystem.h @@ -98,6 +98,17 @@ struct PlatformModuleVersion { { } + bool operator != (const PlatformModuleVersion& rhs) const + { + return mostSig != rhs.mostSig && leastSig != rhs.leastSig; + } + + + bool operator > (const PlatformModuleVersion& rhs) const + { + return mostSig > rhs.mostSig && leastSig > rhs.leastSig; + } + }; #else typedef unsigned PlatformModuleVersion; -- cgit v0.12 From d6c9a246b6fcfdc8e1f972d6a91da2c642ef3fc2 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 6 Nov 2009 09:33:33 +0100 Subject: Re-apply change e53c26b52c890f242491e0dfed4201313d98f720 by Marius Storm-Olsen API review: Rename functions numColors(), setNumColors() and numBytes() QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen --- src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp index 8221760..442ffa3 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp @@ -72,7 +72,7 @@ int screenDepthPerComponent(Widget* w) bool screenIsMonochrome(Widget* w) { - return QApplication::desktop()->screen(screenNumber(w))->numColors() < 2; + return QApplication::desktop()->screen(screenNumber(w))->colorCount() < 2; } FloatRect screenRect(Widget* w) -- cgit v0.12 From 08cb0e0b2d2b1f1f7ef4a0884e602323cf053d00 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 10 Nov 2009 10:35:17 +0100 Subject: Richards changes into the changelog --- dist/changes-4.6.0 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 895421d..b26a3f9 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -482,6 +482,23 @@ General changes on Mac OS X: - Building for ppc64 is no longer supported by the gcc tool chain. - Building for ppc is still supported. +Cocoa: +- Fixed stacking order of modal dialogs so that they never rearrange level, or + hide in the background. +- Fixed problem with plugins written with Qt that closes down the native application + when hiding a modal dialog. +- Fixed problem that native applications cannot quit when using plugins written with + Qt from a native application. +- Fixed problem that the menubar is not restored correctly when using plugins written + with Qt from a native application. +- The event dispatcher now integrates better with native applications that spins the + event loop them selves. +- Using Qt::AA_MacPluginApplication will now disable the use of native menubars on mac. +- Sliders and scroll views in Qt now uses pixel scrolling for mouse devices + that supports this. +- Wheel events can now contain a delta with a value as low as 1 for mouse devices that + uses pixel scrolling. + Qt for Embedded Linux --------------------- -- cgit v0.12 From 6255f2b8baaf002772e1f547ce477dfd81500b25 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 10 Nov 2009 10:49:59 +0100 Subject: Updated changelog with my changes --- dist/changes-4.6.0 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index b26a3f9..ae4c9be 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -99,6 +99,9 @@ QtCore * Improved performance of plugin loading by reusing the plugin cache instead of loading it every time. + - QRegExp + * New pattern syntax "QRegExp::WildcardUnix" with wildcard characters escaping + - QTextStream * [221316] Fixed crash on large input. * Improved reading utf8/utf16/utf32 data by correctly skipping the @@ -111,6 +114,9 @@ QtGui - QGraphicsAnchorLayout * Support for expanding size policy has been removed. (The Qt 4.6 Beta had support for it). + - QCalendarWidget + * [252943] QCalendarWidget::setDateTextFormat() reset the format if the date is invalid. + - QCompleter * [246056] Fixed a possible assertion when setting the completer prefix @@ -376,6 +382,12 @@ QtXml - QDomDocument * set the codec to UTF-8 if codec not present or unknown +Qt Plugins + + - Tiff plugin + * [258526] Rotate the image if the tiff file contains an orientation tag + * [254317] Add support for mono and indexed format + **************************************************************************** * Platform Specific Changes * **************************************************************************** @@ -420,6 +432,9 @@ Qt for Linux/X11 backend uses regular X11 pixmaps to store the image data, however it uses OpenGL to render into them. + - Tablet: Disable event compression of events of type QTabletEvent when the + current event is accepted by the receiver. + Qt for Windows -------------- -- cgit v0.12 From c52ca357a323ab6671cae130e7013b35023f5a67 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 10 Nov 2009 11:01:10 +0100 Subject: Changelog: My changes. Also reorganise some things I saw wrong. --- dist/changes-4.6.0 | 73 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 15 deletions(-) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index ae4c9be..91a7cc6 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -22,6 +22,9 @@ information about a particular change. - QtDBus * The minimum required version of the D-Bus reference library is now 0.93. + * Support for reading and writing of custom property types added. + * Support for getting return arguments in remote method invocation + via QMetaMethod::invokeMethod. - [MR#1742] Added new multimedia keys to the Qt::Key enum. @@ -54,17 +57,6 @@ Third party components * Library * **************************************************************************** - * [245219] Added QXmlQuery::setFocus(const QString &focus); - - - QGraphicsBlurEffect - * Since the 4.6 beta Qt::RenderHint has been moved to - QGraphicsBlurEffect::BlurHint. - - * Input contexts are not activated for disabled widgets anymore. - - * [250555] Data copied from Mozilla Firefox can now be pasted correctly to - a Qt application. - QtCore - QByteArray @@ -102,14 +94,31 @@ QtCore - QRegExp * New pattern syntax "QRegExp::WildcardUnix" with wildcard characters escaping -- QTextStream + - QSharedPointer + * Added support for creating the object along the internal private + data in one single memory allocation. (QSharedPointer::create) + * Fixed a bug where, in a race condition, QSharedPointer could + track a pointer that was being deleted. + + - QTextStream * [221316] Fixed crash on large input. * Improved reading utf8/utf16/utf32 data by correctly skipping the ByteOrderMark when reading data by one character at a time. -- QXmlStreamWriter + - QUrl + * Made QUrl hostname parser a lot stricter, requiring compliance + to STD3 to validate, thus preventing invalid hostnames from + being accepted. See below in "Important Behavior Changes". + + - QXmlStreamWriter * [256468] fix comment indentation + - QWeakPointer + * Added support for tracking QObject-derived classes that aren't + attached to a QSharedPointer. + * Added QWeakPointer::data which allows you to obtain the pointer + being tracked (without protection). + QtGui - QGraphicsAnchorLayout * Support for expanding size policy has been removed. (The Qt 4.6 Beta had support for it). @@ -123,6 +132,15 @@ QtGui - QFontDialog * [256466] fixed the dialog not always returning the selected style. + - QGraphicsBlurEffect + * Since the 4.6 beta Qt::RenderHint has been moved to + QGraphicsBlurEffect::BlurHint. + + * Input contexts are not activated for disabled widgets anymore. + + * [250555] Data copied from Mozilla Firefox can now be pasted correctly to + a Qt application. + - QGraphicsItem * Fixed bug and improved accuracy of QGraphicsItem::childrenBoundingRect(). * Many optimizations. @@ -266,7 +284,13 @@ QtGui * [255581] Fixed sizeHint recalculation bug. - QApplication - * [QTBUG-739] Removed internal widgets from QApplication::topLevelWidgets(). + * [QTBUG-739] Removed internal widgets from QApplication::topLevelWidgets(). + +QtDBus + + - QDBusConnection + * Made sending of invalid/incomplete messages consistently fail + with error (no more assertions). QtNetwork @@ -379,9 +403,14 @@ QtSql QtXml -- QDomDocument + - QDomDocument * set the codec to UTF-8 if codec not present or unknown +QtXmlPatterns + + - QXmlQuery + * [245219] Added QXmlQuery::setFocus(const QString &focus); + Qt Plugins - Tiff plugin @@ -395,6 +424,20 @@ Qt Plugins - Added community supported Qt ports for QNX and VxWorks. See platform notes in the Qt documentation for details. + - Improved support for AIX using IBM's Visual Age C/C++ compiler + version 7 (xlC). + + - Improved support for Solaris using Sun Studio 12 (CC 5.9). + +Qt for Unix (X11 and Mac OS X) +------------------------------ + + - Added support for thread-safe FD_CLOEXEC file-descriptor creation + where supported by the operating system (currently only Linux). + + - Ensured that system calls where EINTR is a possible result are + properly restarted. + Qt for Linux/X11 ---------------- -- cgit v0.12 From c7de6ce2e06a2479ec9cb88559482021b8919076 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 10 Nov 2009 11:07:44 +0100 Subject: Added my changes to changes-4.6.0. --- dist/changes-4.6.0 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 91a7cc6..daea2a6 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -240,6 +240,7 @@ QtGui - QPixmap * Optimized width(), height(), isNull() and depth(). + * [QTBUG-2832] Fixed bug where calling fill on pixmap with active painter could crash. - QRegion * Minor optimizations. @@ -266,6 +267,10 @@ QtGui - QSplitter * [206494] Added ability to style pressed slided with stylesheet + - QStroker + * [QTBUG-5212] Fixed bug where thick strokes around small shapes could + cause holes in the stroke. + - QWidget * [201649] Added QWidget::previousInFocusChain * [254563] Fixed a crash when setting a focus in a widget tree that @@ -280,9 +285,19 @@ QtGui * New qt_paint_device_metric() function to replace the friend declarations for window surface classes that need to access metric(). + - QPainterPath + * [QTBUG-1537] Fixed bug where the points of a rounded rectangle were added + in counter-clockwise order instead of clockwise order like other shapes. + + - QPen + * [QTBUG-2738] Made QPen::setDashOffset() work with non-custom dashed lines. + - QPushButton * [255581] Fixed sizeHint recalculation bug. + - QRasterPaintEngine + * [QTBUG-4210] Fixed bug where bitmaps were painted black instead of in pen colour. + - QApplication * [QTBUG-739] Removed internal widgets from QApplication::topLevelWidgets(). @@ -401,6 +416,14 @@ QtSql * QSqlDatabase now has a database level precisionPolicy. Queries now default to this. * Add proper iODBC linking support. +QtSvg + - QSvgHandler + * [245602] Fixed gradient and solid-color referencing. + * [202426] Made stroke attribute inheritance work with 'use' tags. + * [250618] Fixed gradient on strokes. + - QSvgPaintEngine + * [257052] Changed drawImage() to ignore aspect ratio. + QtXml - QDomDocument -- cgit v0.12 From 451e7fcad72366cf40bcb00931b86aafba1b983f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 10 Nov 2009 11:12:31 +0100 Subject: Add some of my changes to changes-4.6.0 Update changes-4.6.0 with relevant changes. Reviewed-by: Trond Conflicts: dist/changes-4.6.0 --- dist/changes-4.6.0 | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index daea2a6..03ee4a4 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -307,6 +307,41 @@ QtDBus * Made sending of invalid/incomplete messages consistently fail with error (no more assertions). + - QPlainTextEdit + * Fixed crash when clicking on a text edit which was smaller than the + height of the font used. + + - QPrinter + * [QTBUG-4497] Removed redundant SetPen command in the postscript code + when reusing a QPrinter object. + + - QTextLayout + * [QTBUG-4468] Count tabs as multiple characters when applying a fixed + column width. + * [176401] Take into account the negative right bearing of the last + character in an item of text if the glyph extends beyond its ascent. + + - QTextDocument + * [207189] Support setting font size using short hand syntax in the + CSS "font" property. + * [201228] Remove implicit margin on bullet lists when exporting to + HTML. + * [240086] Fixed bug which caused floating objects which span several + pages to float into the second page of the document even when it's + the only existing object, causing the document to contain a blank + first page. + * [240325] Even when wrap mode is set to Qt::TextWordWrap, the layout + would sometimes break outside word boundaries when floating objects + affected the width available to the text. This has been fixed. + + - QFontEngine + * [QTBUG-2354] Support certain 'Microsoft' platform symbol fonts which + also contain a regular unicode table for exactly the symbol range of + code points. + + - QFontMetrics + * [176401] Account for right bearing in bounding rect. + QtNetwork - QAbstractSocket @@ -480,6 +515,9 @@ Qt for Linux/X11 when using Synergy. - [MR#797] Fixed a crash when using QX11EmbedContainer/Widget on x86_64. - [MR#1111] Emit workAreaResized when _NET_WORKAREA is changed on X11. + + - [QTBUG-3620] Fixed bug on X11 that caused bitmap fonts to become so small + it was unreadable when printed or presented in a print preview widget. - Improved EGL integration on X11 (including better visual selection). @@ -537,6 +575,11 @@ Qt for Windows rendering. * Fixed a flicker issue when switching source with a transition time of 0 + - [QTBUG-4445] Fixed bug on Windows that caused problems when printing + text where several characters were represented by a single glyph, e.g. + a double 't' with the Calibri font. + + Qt for Mac OS X --------------- @@ -633,7 +676,7 @@ Qt for Windows CE - [257352] When configuring Qt for Windows CE, configure points the user to setcepaths, when its done. - [259850] Added a makespec template for Windows CE 6. - + **************************************************************************** * Tools * **************************************************************************** -- cgit v0.12 From bd8fa6425a43cbc375564cc1b022fe47402d251f Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 10 Nov 2009 11:40:24 +0100 Subject: Added my changelog entries. --- dist/changes-4.6.0 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index 03ee4a4..c0ce2af 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -129,6 +129,9 @@ QtGui - QCompleter * [246056] Fixed a possible assertion when setting the completer prefix + - QEvent + * Introduced RequestSoftwareInputPanel and CloseSoftwareInputPanel events. + - QFontDialog * [256466] fixed the dialog not always returning the selected style. @@ -206,6 +209,7 @@ QtGui - QLineEdit * [248948] Clear selection when redoing a delete operation. + * [QTBUG-5261] Fixed: Erasing characters from textedits does not update the text - QListView * [243335] Fixed the visualRect to return correct values when the widget is not yet show @@ -272,6 +276,7 @@ QtGui cause holes in the stroke. - QWidget + * Added inputMethodHints property. * [201649] Added QWidget::previousInFocusChain * [254563] Fixed a crash when setting a focus in a widget tree that contains invisible widgets -- cgit v0.12 From c2a1e160bd0cee91789ebce877018a459aa14b8c Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Tue, 10 Nov 2009 11:52:19 +0100 Subject: Added my changes in Qt 4.6.0 to the change log. --- dist/changes-4.6.0 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index c0ce2af..c008f31 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -457,10 +457,13 @@ QtSql * Add proper iODBC linking support. QtSvg + - QSvgHandler - * [245602] Fixed gradient and solid-color referencing. - * [202426] Made stroke attribute inheritance work with 'use' tags. + * [245602] [204686] Fixed gradient and solid-color referencing. + * [202426] Made attribute inheritance work with 'use' tags. * [250618] Fixed gradient on strokes. + * [254040] Added support for 'vector-effect'. + - QSvgPaintEngine * [257052] Changed drawImage() to ignore aspect ratio. -- cgit v0.12 From ee9b774ae230d3fce0f33510f421e8e772536c1d Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Tue, 10 Nov 2009 12:05:07 +0100 Subject: Add my changes to the 4.6.0 changelog. --- dist/changes-4.6.0 | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index c008f31..f457e63 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -119,9 +119,42 @@ QtCore * Added QWeakPointer::data which allows you to obtain the pointer being tracked (without protection). + - QUuid + * [QTBUG-3543] Fixed a bug in createUuid() which caused multiple + threads to generate the identical UUID sequences + + - QEventDispatcherGlib (internal class) + * Fix a regression introduced in 4.5.3 that would cause timers to not + be delivered. + + - QEventDispatcherUNIX (internal class) + * Improve detection of monotonic clock support to include + non-POSIX.1-2001 compliant systems. + * [250681] Fix time change detection on UNIX systems without + monotonic timers. + + - QEventDispatcherWin32 (internal class) + * Changed the threshold for using multimedia timers to 20ms (was 10ms). + * Changed the way Qt's posted events are sent by the event + dispatcher. The are now driven on top of a Windows message + instead of an explicit call in processEvents(). This means that + posted events are sent even when a Windows modal message loop is + running (for example, when the user is moving a window or when a + native modal dialog is visible). + * Fixed a bug that would allow the same timer id to be used by + multiple QTimer instances. + + - QTextCodec + * Instantiate the CP949 codec when building with -no-iconv. + + - QThread + * [249997] Document that QThread priority has no effect on Linux. + QtGui -- QGraphicsAnchorLayout - * Support for expanding size policy has been removed. (The Qt 4.6 Beta had support for it). + + - QGraphicsAnchorLayout + * Support for expanding size policy has been removed. (The Qt 4.6 + Beta had support for it). - QCalendarWidget * [252943] QCalendarWidget::setDateTextFormat() reset the format if the date is invalid. @@ -152,6 +185,7 @@ QtGui * Introduced QGraphicsItem::focusProxy(), focus proxy support * Introduced QGraphicsItem::ItemNegativeZStacksBehindParent * Introduced QGraphicsItem::ItemIsPanel, light-weight window support + * Introduced modality support for QGraphicsItem panels. * Introduced activation support. * Introduced QGraphicsItem::stackBefore() * Cached items are now always invalidated when update() is called. @@ -347,6 +381,10 @@ QtDBus - QFontMetrics * [176401] Account for right bearing in bounding rect. + - QPlastiqueStyle + * [QTBUG-3555] Fixed a bug in the Plastique style that would cause an + ASSERT failure in QFont when the application font has a pixel size set. + QtNetwork - QAbstractSocket @@ -547,6 +585,21 @@ Qt for Linux/X11 - Tablet: Disable event compression of events of type QTabletEvent when the current event is accepted by the receiver. + - [QTBUG-4242] Fixed a bug that allowed the user to close a window + event though the program is using the QEventLoop::ExcludeUserInputEvents + flag. + + - [255559] Fixed generation of XdndLeave events to include the + correct source id. + + - [258319] Avoid division by zero on some Xlib/Xserver implementations. + + - Fixed the default QWidget size on X servers with Xinerama to give widgets + a default size that should fit on a single screen. + + - Support _NET_WORKAREA on X servers with Xinerama (previously this property + was ignored). + Qt for Windows -------------- @@ -587,6 +640,7 @@ Qt for Windows text where several characters were represented by a single glyph, e.g. a double 't' with the Calibri font. + - Added QSysInfo::WV_WINDOWS7 and QSysInfo::WV_6_1 Qt for Mac OS X --------------- -- cgit v0.12