diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-07 08:22:23 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-07 08:22:23 (GMT) |
commit | 2ea7f415dbc26cc505fe04f6f6a6ce7766d19608 (patch) | |
tree | 7243c1e0f755dea2d1ff17427df8681f55274818 /src/3rdparty/webkit/WebCore | |
parent | 91b2bd620bf10ddd9de65f2c3ac7781e591844d4 (diff) | |
download | Qt-2ea7f415dbc26cc505fe04f6f6a6ce7766d19608.zip Qt-2ea7f415dbc26cc505fe04f6f6a6ce7766d19608.tar.gz Qt-2ea7f415dbc26cc505fe04f6f6a6ce7766d19608.tar.bz2 |
Updated WebKit to 07b60cf799680fcfb7785ee88e14f8030a5dbfa2
Bugzilla fixes integrated in this commit:
|| <https://webkit.org/b/37445> || [Qt] Regression: Google calendar edit event details gets stuck on loading ||
|| <https://webkit.org/b/38439> || [Qt] QT_MOBILE_THEME compile time flag ||
|| <https://webkit.org/b/37803> || Spatial Navigation: adapt the logic of {deep}findFocusableNodeInDirection to do traversal starting from Node* not Document* ||
|| <https://webkit.org/b/36755> || [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases ||
|| <https://webkit.org/b/36533> || [Qt] Compilation error on Qt for Embedded Linux built with -qconfig small ||
|| <https://webkit.org/b/38585> || Spatial Navigation: add a layout test which runs with Frame Flattening ON ||
Diffstat (limited to 'src/3rdparty/webkit/WebCore')
11 files changed, 162 insertions, 49 deletions
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 <luiz.agostini@openbossa.org> + + 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 <tasuku.suzuki@nokia.com> + + 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 <ossy@webkit.org> + + Unreviewed WinCE buildfix after r58842. + Preprocessor doesn't understand "true", changed to "1" + + * platform/graphics/MediaPlayer.cpp: + +2010-05-06 Antonio Gomes <tonikitoo@webkit.org> + + 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 <simon.hausmann@nokia.com> + + 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 <ossy@webkit.org> 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<HTMLFrameOwnerElement*>(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<HTMLFrameOwnerElement*>(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<HTMLFrameOwnerElement*>(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<Frame> 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 <select> so we override it here // see also http://bugs.webkit.org/show_bug.cgi?id=18399 style->resetBorderRadius(); @@ -870,7 +872,7 @@ bool RenderThemeQt::supportsFocus(ControlPart appearance) const void RenderThemeQt::setPaletteFromPageClientIfExists(QPalette& palette) const { -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) static QPalette lightGrayPalette(Qt::lightGray); palette = lightGrayPalette; return; diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h index b16918a..591dd27 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.h @@ -75,7 +75,7 @@ public: virtual double caretBlinkInterval() const; -#ifdef Q_WS_MAEMO_5 +#if USE(QT_MOBILE_THEME) virtual bool isControlStyled(const RenderStyle*, const BorderData&, const FillLayer&, const Color& backgroundColor) const; virtual int popupInternalPaddingBottom(RenderStyle*) const; #endif |