From 2ea7f415dbc26cc505fe04f6f6a6ce7766d19608 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 7 May 2010 10:22:23 +0200 Subject: Updated WebKit to 07b60cf799680fcfb7785ee88e14f8030a5dbfa2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bugzilla fixes integrated in this commit: || || [Qt] Regression: Google calendar edit event details gets stuck on loading || || || [Qt] QT_MOBILE_THEME compile time flag || || || Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document* || || || [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases || || || [Qt] Compilation error on Qt for Embedded Linux built with -qconfig small || || || Spatial Navigation: add a layout test which runs with Frame Flattening ON || --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 75 ++++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pri | 5 +- src/3rdparty/webkit/WebCore/WebCore.pro | 18 ++++-- .../webkit/WebCore/page/FocusController.cpp | 74 ++++++++++++++------- src/3rdparty/webkit/WebCore/page/FocusController.h | 5 +- src/3rdparty/webkit/WebCore/platform/FileSystem.h | 6 +- .../WebCore/platform/graphics/MediaPlayer.cpp | 2 +- .../platform/network/qt/QNetworkReplyHandler.cpp | 5 +- .../webkit/WebCore/platform/qt/FileSystemQt.cpp | 3 +- .../webkit/WebCore/platform/qt/RenderThemeQt.cpp | 16 +++-- .../webkit/WebCore/platform/qt/RenderThemeQt.h | 2 +- .../webkit/WebKit/qt/Api/qgraphicswebview.cpp | 2 + src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 3 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 43 +++++++++++++ .../WebKit/qt/WebCoreSupport/InspectorClientQt.cpp | 12 ++++ .../qt/WebCoreSupport/QtFallbackWebPopup.cpp | 2 + 18 files changed, 225 insertions(+), 52 deletions(-) diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 171d97b..75fc5e7 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -07b60cf799680fcfb7785ee88e14f8030a5dbfa2 +b4aa5e1ddc41edab895132aba3cc66d9d7129444 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 4dea1b3..98debf6 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - e4b73bb0b173f21db8f0de3dae885a8a71282996 + 07b60cf799680fcfb7785ee88e14f8030a5dbfa2 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 58b724a..6617b66 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,78 @@ +2010-05-04 Luiz Agostini + + Reviewed by Simon Hausmann. + + [Qt] QT_MOBILE_THEME compile time flag + https://bugs.webkit.org/show_bug.cgi?id=38439 + + Replacing preprocessor conditional used in RenderThemeQt from Q_WS_MAEMO_5 to + USE(QT_MOBILE_THEME). + + * WebCore.pro: + * platform/qt/RenderThemeQt.cpp: + (WebCore::RenderThemeQt::RenderThemeQt): + (WebCore::RenderThemeQt::qStyle): + (WebCore::RenderThemeQt::extraDefaultStyleSheet): + (WebCore::RenderThemeQt::adjustMenuListButtonStyle): + (WebCore::RenderThemeQt::setPaletteFromPageClientIfExists): + * platform/qt/RenderThemeQt.h: + +2010-03-25 Tasuku Suzuki + + Reviewed by Eric Seidel. + + [Qt]Fix compile error with QT_NO_LIBRARY + https://bugs.webkit.org/show_bug.cgi?id=36533 + + * platform/FileSystem.h: + * platform/qt/FileSystemQt.cpp: + (WebCore::unloadModule): + +2010-05-06 Csaba Osztrogonác + + Unreviewed WinCE buildfix after r58842. + Preprocessor doesn't understand "true", changed to "1" + + * platform/graphics/MediaPlayer.cpp: + +2010-05-06 Antonio Gomes + + Reviewed by Kenneth Christiansen. + + Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document* + https://bugs.webkit.org/show_bug.cgi?id=37803 + + Instead of receiving a Document pointer as incoming parameter, patch modifies + findFocusableNodeInDirection and deepFindFocusableNodeInDirection methods to + receive a Node pointer as start for content traversal. + This way we can make good use of deepFindFocusableNodeInDirection to traverse + other scrollable container like scrollable div's, and not only frames or iframes. + + Patch also makes use of 'while' instead of 'for' to loop control, that gives move + flexibility to the incremental step: e.g. if a scrollable div was processed, the incremental + step in the loop does not have to do node->traverseNextNode() but node->traverseNextSibling(). + + No behavior change. It is a preparation for supporting scrollable containers in Spatial + Navigation. + + * page/FocusController.cpp: + (WebCore::FocusController::advanceFocusDirectionally): + (WebCore::FocusController::findFocusableNodeInDirection): + (WebCore::FocusController::deepFindFocusableNodeInDirection): + * page/FocusController.h: + +2010-05-06 Simon Hausmann + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases + https://bugs.webkit.org/show_bug.cgi?id=36755 + + Enable the direct connection between QtNetwork and QtWebKit only for Qt versions + greater than 4.6.2, due to a bug in Qt that's been fixed after 4.6.2. + + * platform/network/qt/QNetworkReplyHandler.cpp: + 2010-05-05 Csaba Osztrogonác Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri index 039f26c..ad514a2 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pri +++ b/src/3rdparty/webkit/WebCore/WebCore.pri @@ -96,10 +96,9 @@ greaterThan(QT_MINOR_VERSION, 5) { # Web Socket support. !contains(DEFINES, ENABLE_WEB_SOCKETS=.): DEFINES += ENABLE_WEB_SOCKETS=1 -# XSLT support with QtXmlPatterns +# Disable XSLT support with QtXmlPatterns in the 2.0 release !contains(DEFINES, ENABLE_XSLT=.) { - contains(QT_CONFIG, xmlpatterns):DEFINES += ENABLE_XSLT=1 - else:DEFINES += ENABLE_XSLT=0 + DEFINES += ENABLE_XSLT=0 } !CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) { diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 11d3c8b..beeb529 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -126,6 +126,10 @@ maemo5|symbian|embedded { } maemo5 { + DEFINES += WTF_USE_QT_MOBILE_THEME=1 +} + +contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) { DEFINES += ENABLE_NO_LISTBOX_RENDERING=1 } @@ -2107,13 +2111,15 @@ SOURCES += \ ../WebKit/qt/Api/qwebinspector.cpp \ ../WebKit/qt/Api/qwebkitversion.cpp + +contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) { + HEADERS += platform/qt/Maemo5Webstyle.h + SOURCES += platform/qt/Maemo5Webstyle.cpp +} + maemo5 { - HEADERS += \ - ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h \ - platform/qt/Maemo5Webstyle.h - SOURCES += \ - ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp \ - platform/qt/Maemo5Webstyle.cpp + HEADERS += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.h + SOURCES += ../WebKit/qt/WebCoreSupport/QtMaemoWebPopup.cpp } diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.cpp b/src/3rdparty/webkit/WebCore/page/FocusController.cpp index fdd117b..6c2a956 100644 --- a/src/3rdparty/webkit/WebCore/page/FocusController.cpp +++ b/src/3rdparty/webkit/WebCore/page/FocusController.cpp @@ -304,7 +304,7 @@ bool FocusController::advanceFocusDirectionally(FocusDirection direction, Keyboa frame = frame->tree()->top(); FocusCandidate focusCandidate; - findFocusableNodeInDirection(frame->document(), focusedNode, direction, event, focusCandidate); + findFocusableNodeInDirection(frame->document()->firstChild(), focusedNode, direction, event, focusCandidate); Node* node = focusCandidate.node; if (!node || !node->isElementNode()) { @@ -391,20 +391,23 @@ static void updateFocusCandidateIfCloser(Node* focusedNode, const FocusCandidate } } -void FocusController::findFocusableNodeInDirection(Document* document, Node* focusedNode, +void FocusController::findFocusableNodeInDirection(Node* outer, Node* focusedNode, FocusDirection direction, KeyboardEvent* event, FocusCandidate& closestFocusCandidate, const FocusCandidate& candidateParent) { - ASSERT(document); - ASSERT(candidateParent.isNull() || static_cast(candidateParent.node)); + ASSERT(outer); + ASSERT(candidateParent.isNull() + || candidateParent.node->hasTagName(frameTag) + || candidateParent.node->hasTagName(iframeTag)); // Walk all the child nodes and update closestFocusCandidate if we find a nearer node. - for (Node* candidate = document->firstChild(); candidate; candidate = candidate->traverseNextNode()) { + Node* candidate = outer; + while (candidate) { // Inner documents case. if (candidate->isFrameOwnerElement()) - deepFindFocusableNodeInDirection(focusedNode, candidate, direction, event, closestFocusCandidate); + deepFindFocusableNodeInDirection(candidate, focusedNode, direction, event, closestFocusCandidate); else if (candidate != focusedNode && candidate->isKeyboardFocusable(event)) { FocusCandidate currentFocusCandidate(candidate); @@ -412,8 +415,10 @@ void FocusController::findFocusableNodeInDirection(Document* document, Node* foc distanceDataForNode(direction, focusedNode, currentFocusCandidate); // Bail out if distance is maximum. - if (currentFocusCandidate.distance == maxDistance()) + if (currentFocusCandidate.distance == maxDistance()) { + candidate = candidate->traverseNextNode(outer->parent()); continue; + } // If candidateParent is not null, it means that we are in a recursive call // from deepFineFocusableNodeInDirection (i.e. processing an element in an iframe), @@ -425,33 +430,54 @@ void FocusController::findFocusableNodeInDirection(Document* document, Node* foc updateFocusCandidateIfCloser(focusedNode, currentFocusCandidate, closestFocusCandidate); } + + candidate = candidate->traverseNextNode(outer->parent()); } } -void FocusController::deepFindFocusableNodeInDirection(Node* focusedNode, Node* candidate, +void FocusController::deepFindFocusableNodeInDirection(Node* container, Node* focusedNode, FocusDirection direction, KeyboardEvent* event, FocusCandidate& closestFocusCandidate) { - HTMLFrameOwnerElement* owner = static_cast(candidate); - if (!owner->contentFrame()) + ASSERT(container->hasTagName(frameTag) || container->hasTagName(iframeTag)); + + // Track if focusedNode is a descendant of the current container node being processed. + bool descendantOfContainer = false; + Node* firstChild = 0; + + // Iframe or Frame. + if (container->hasTagName(frameTag) || container->hasTagName(iframeTag)) { + + HTMLFrameOwnerElement* owner = static_cast(container); + if (!owner->contentFrame()) + return; + + Document* innerDocument = owner->contentFrame()->document(); + if (!innerDocument) + return; + + descendantOfContainer = innerDocument == focusedNode->document(); + firstChild = innerDocument->firstChild(); + + } + + if (descendantOfContainer) { + findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate); return; + } - Document* innerDocument = owner->contentFrame()->document(); - if (!innerDocument) + // Check if the current container element itself is a good candidate + // to move focus to. If it is, then we traverse its inner nodes. + FocusCandidate candidateParent = FocusCandidate(container); + distanceDataForNode(direction, focusedNode, candidateParent); + + // Bail out if distance is maximum. + if (candidateParent.distance == maxDistance()) return; - if (innerDocument == focusedNode->document()) - findFocusableNodeInDirection(innerDocument, focusedNode, direction, event, closestFocusCandidate); - else { - // Check if the current {i}frame element itself is a good candidate - // to move focus to. If it is, then we traverse its inner nodes. - FocusCandidate candidateParent = FocusCandidate(candidate); - distanceDataForNode(direction, focusedNode, candidateParent); - - // FIXME: Consider alignment? - if (candidateParent.distance < closestFocusCandidate.distance) - findFocusableNodeInDirection(innerDocument, focusedNode, direction, event, closestFocusCandidate, candidateParent); - } + // FIXME: Consider alignment? + if (candidateParent.distance < closestFocusCandidate.distance) + findFocusableNodeInDirection(firstChild, focusedNode, direction, event, closestFocusCandidate, candidateParent); } static bool relinquishesEditingFocus(Node *node) diff --git a/src/3rdparty/webkit/WebCore/page/FocusController.h b/src/3rdparty/webkit/WebCore/page/FocusController.h index dfa3780..4410833 100644 --- a/src/3rdparty/webkit/WebCore/page/FocusController.h +++ b/src/3rdparty/webkit/WebCore/page/FocusController.h @@ -63,9 +63,10 @@ private: bool advanceFocusDirectionally(FocusDirection, KeyboardEvent*); bool advanceFocusInDocumentOrder(FocusDirection, KeyboardEvent*, bool initialFocus); - void findFocusableNodeInDirection(Document*, Node*, FocusDirection, KeyboardEvent*, FocusCandidate& closestFocusCandidate, + void findFocusableNodeInDirection(Node* outter, Node*, FocusDirection, KeyboardEvent*, + FocusCandidate& closestFocusCandidate, const FocusCandidate& parentCandidate = FocusCandidate()); - void deepFindFocusableNodeInDirection(Node*, Node*, FocusDirection, KeyboardEvent*, FocusCandidate&); + void deepFindFocusableNodeInDirection(Node* container, Node* focused, FocusDirection, KeyboardEvent*, FocusCandidate&); Page* m_page; RefPtr m_focusedFrame; diff --git a/src/3rdparty/webkit/WebCore/platform/FileSystem.h b/src/3rdparty/webkit/WebCore/platform/FileSystem.h index 856d5bb..c236831 100644 --- a/src/3rdparty/webkit/WebCore/platform/FileSystem.h +++ b/src/3rdparty/webkit/WebCore/platform/FileSystem.h @@ -69,9 +69,11 @@ typedef HMODULE PlatformModule; #elif PLATFORM(QT) #if defined(Q_WS_MAC) typedef CFBundleRef PlatformModule; -#else +#elif !defined(QT_NO_LIBRARY) typedef QLibrary* PlatformModule; -#endif // defined(Q_WS_MAC) +#else +typedef void* PlatformModule; +#endif #elif PLATFORM(GTK) typedef GModule* PlatformModule; #elif PLATFORM(CF) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp index e93a090..035d1c5 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/MediaPlayer.cpp @@ -51,7 +51,7 @@ #include "MediaPlayerPrivateGStreamer.h" #elif PLATFORM(QT) // QtMultimedia support is disabled currently. -#if true || (QT_VERSION < 0x040700) +#if 1 || (QT_VERSION < 0x040700) #include "MediaPlayerPrivatePhonon.h" #else #include "MediaPlayerPrivateQt.h" diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp index 4237fca..403718f 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp @@ -41,8 +41,9 @@ // What type of connection should be used for the signals of the // QNetworkReply? This depends on if Qt has a bugfix for this or not. -// It is fixed in Qt 4.6.1. See https://bugs.webkit.org/show_bug.cgi?id=32113 -#if QT_VERSION > QT_VERSION_CHECK(4, 6, 0) +// It is fixed in Qt 4.6.3. See https://bugs.webkit.org/show_bug.cgi?id=32113 +// and https://bugs.webkit.org/show_bug.cgi?id=36755 +#if QT_VERSION > QT_VERSION_CHECK(4, 6, 2) #define SIGNAL_CONN Qt::DirectConnection #else #define SIGNAL_CONN Qt::QueuedConnection diff --git a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp index 4093fad..f9ced98 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/FileSystemQt.cpp @@ -154,11 +154,12 @@ bool unloadModule(PlatformModule module) return ::FreeLibrary(module); #else +#ifndef QT_NO_LIBRARY if (module->unload()) { delete module; return true; } - +#endif return false; #endif } diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp index 0a40342..577903b 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp @@ -42,7 +42,7 @@ #include "HTMLInputElement.h" #include "HTMLMediaElement.h" #include "HTMLNames.h" -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) #include "Maemo5Webstyle.h" #endif #include "NotImplemented.h" @@ -153,7 +153,7 @@ RenderThemeQt::RenderThemeQt(Page* page) m_buttonFontPixelSize = fontInfo.pixelSize(); #endif -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) m_fallbackStyle = new Maemo5WebStyle; #else m_fallbackStyle = QStyleFactory::create(QLatin1String("windows")); @@ -166,7 +166,7 @@ RenderThemeQt::~RenderThemeQt() delete m_lineEdit; } -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) bool RenderThemeQt::isControlStyled(const RenderStyle* style, const BorderData& border, const FillLayer& fill, const Color& backgroundColor) const { switch (style->appearance()) { @@ -198,7 +198,7 @@ QStyle* RenderThemeQt::fallbackStyle() const QStyle* RenderThemeQt::qStyle() const { -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) return fallbackStyle(); #endif @@ -218,7 +218,7 @@ String RenderThemeQt::extraDefaultStyleSheet() #if ENABLE(NO_LISTBOX_RENDERING) result += String(themeQtNoListboxesUserAgentStyleSheet, sizeof(themeQtNoListboxesUserAgentStyleSheet)); #endif -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) result += String(themeQtMaemo5UserAgentStyleSheet, sizeof(themeQtMaemo5UserAgentStyleSheet)); #endif return result; @@ -648,7 +648,9 @@ bool RenderThemeQt::paintMenuList(RenderObject* o, const RenderObject::PaintInfo void RenderThemeQt::adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle* style, Element*) const { -#ifndef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) + // Mobile theme uses border radius. +#else // WORKAROUND because html.css specifies -webkit-border-radius for