2010-05-12 Laszlo Gombos Reviewed by Kenneth Rohde Christiansen. [Qt] Detect debug mode consistently https://bugs.webkit.org/show_bug.cgi?id=38863 No new tests as there is no new functionality. * WebCore.pro: 2010-05-14 Andreas Kling Reviewed by Darin Adler. Ignore invalid values for various CanvasRenderingContext2D properties (lineWidth, miterLimit, shadowOffsetX, shadowOffsetY and shadowBlur) https://bugs.webkit.org/show_bug.cgi?id=38841 Test: fast/canvas/canvas-invalid-values.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::setLineWidth): (WebCore::CanvasRenderingContext2D::setMiterLimit): (WebCore::CanvasRenderingContext2D::setShadowOffsetX): (WebCore::CanvasRenderingContext2D::setShadowOffsetY): (WebCore::CanvasRenderingContext2D::setShadowBlur): 2010-05-12 Noam Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] GraphicsLayer: depth-test causes flicker in certain situations This patch removes the simplistic 2D depth test as it leads to flickering side effects. https://bugs.webkit.org/show_bug.cgi?id=38370 Tested by http://webkit.org/blog-files/3d-transforms/morphing-cubes.html * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::updateTransform): 2010-04-29 James Robinson Reviewed by Simon Fraser. Calls FrameView::scrollPositionChanged whenever a ScrollView is scrolled https://bugs.webkit.org/show_bug.cgi?id=38286 When a ScrollView's scroll position is changed, we have to call FrameView::scrollPositionChanged to generate repaint invalidation for fixed position elements. This ends up getting called indirectly when the ScrollView has a platformWidget through the port layer (see WebHTMLView.mm's _frameOrBoundsChanged method for how the mac port does it) but not when there is no platformWidget. This is tested by the fast/repaint/fixed-* tests when run in pixel mode. Test: fast/repaint/fixed-move-after-keyboard-scroll.html * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::valueChanged): * platform/ScrollView.h: (WebCore::ScrollView::scrollPositionChanged): 2010-04-23 Kenneth Rohde Christiansen Unreviewed build fix. Change Media to StyleMedia * DerivedSources.make: 2010-04-22 Kenneth Rohde Christiansen Reviewed by Laszlo Gombos. Rename window.media to window.styleMedia https://bugs.webkit.org/show_bug.cgi?id=36187 Rename the interface Media to StyleMedia as required by the new CSSOM View spec. * Android.derived.jscbindings.mk: * Android.derived.v8bindings.mk: * GNUmakefile.am: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/Media.cpp: Removed. * css/Media.h: Removed. * css/Media.idl: Removed. * css/StyleMedia.cpp: Added. (WebCore::StyleMedia::StyleMedia): (WebCore::StyleMedia::type): (WebCore::StyleMedia::matchMedium): * css/StyleMedia.h: Added. (WebCore::StyleMedia::create): (WebCore::StyleMedia::disconnectFrame): * css/StyleMedia.idl: Added. * page/DOMWindow.cpp: (WebCore::DOMWindow::styleMedia): * page/DOMWindow.h: (WebCore::DOMWindow::optionalMedia): * page/DOMWindow.idl: 2010-04-22 Kenneth Rohde Christiansen Reviewed by Simon Fraser. Rename window.media to window.styleMedia https://bugs.webkit.org/show_bug.cgi?id=36187 It has been defined that the AbstractView media extension defined in the CSSOM View spec should be renamed to styleMedia. This patch does that and updates the current layout tests making use of it. * page/AbstractView.idl: * page/DOMWindow.cpp: (WebCore::DOMWindow::styleMedia): * page/DOMWindow.h: * page/DOMWindow.idl: 2010-05-11 Benjamin Poulain Reviewed by Kenneth Rohde Christiansen. [Qt] fast/text/find-hidden-text.html https://bugs.webkit.org/show_bug.cgi?id=32922 Use the real page step for populating the QStyleOption otherwhise the size can be negative, which can break the QStyle used. * platform/qt/ScrollbarThemeQt.cpp: (WebCore::styleOptionSlider): 2010-05-03 Antonio Gomes Reviewed by Kenneth Christiansen. Spatial Navigation: create a getter for the "fudgeFactor" https://bugs.webkit.org/show_bug.cgi?id=38488 A couple of places in the Spatial Navigation code make use of a "fudge factor" to improve precision by working around outline focus metrics and such. Patch adds a helper method for unify getter operations of this value, instead of having it declared locally in the various methods it is used. No behaviour change. * page/SpatialNavigation.cpp: (WebCore::scrollIntoView): (WebCore::deflateIfOverlapped): * page/SpatialNavigation.h: (WebCore::fudgeFactor): 2010-05-10 Markus Goetz Reviewed by Simon Hausmann. Qt after 4.6.3 has its integrated DNS cache. Therefore some code is not necessary anymore. https://bugs.webkit.org/show_bug.cgi?id=38834 * platform/network/qt/DnsPrefetchHelper.h: (WebCore::DnsPrefetchHelper::lookup): (WebCore::DnsPrefetchHelper::lookedUp): 2010-05-06 Laszlo Gombos Unreviewed, build fix WinCE for QtWebKit. [Qt] Compilation with Plugins disabled is broken https://bugs.webkit.org/show_bug.cgi?id=31407 Rename platform/qt/TemporaryLinkStubs.cpp to avoid name collition on Windows. Thanks for Ismail "cartman" Donmez for help. No new tests, as there is no new functionality. * WebCore.gypi: * WebCore.pro: * platform/qt/TemporaryLinkStubs.cpp: Removed. * platform/qt/TemporaryLinkStubsQt.cpp: Copied from WebCore/platform/qt/TemporaryLinkStubs.cpp. 2010-04-23 Qi Zhang Reviewed by Laszlo Gombos. [Qt] LayoutTests/fast/canvas/pointInPath.html passed, actually it failed https://bugs.webkit.org/show_bug.cgi?id=37276 QPainterPath::contains doesn't count the point on the bound. * platform/graphics/qt/PathQt.cpp: (WebCore::isPointOnPathBorder): (WebCore::Path::contains): 2010-05-07 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Fix rendering of -webkit-user-select: none -webkit-user-select: none is implemented by filling the area with an invalid default-constructed Color. In most ports passing an invalid color down to the graphics backend seems to produce transparent fills. In Qt the behavior of painting with an invalid QColor is undefined, and in practice it results in painting black opaque areas. One way to fix this would be to use Qt::transparent when converting an undefined Color to a QColor, but Qt does not have short circuits for fully transparent painting, and we actually end up in slow code paths due to the transparency. So, we're better of doing the short circuit in WebKit. https://bugs.webkit.org/show_bug.cgi?id=38523 * platform/graphics/qt/GraphicsContextQt.cpp: 2010-04-05 Robert Hogan Reviewed by Kenneth Rohde Christiansen. [Qt] Fix infinite redirection loop in QNetworkReplyHandler Put a maximum on consecutive redirections so we don't have to worry about whether it's the same url or not. Tolerate up to 10 consecutive redirections, anything beyond that is considered a potentially infinite recursion in the redirection requests. This is the same behaviour as Firefox. https://bugs.webkit.org/show_bug.cgi?id=37097 * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::QNetworkReplyHandler): (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): * platform/network/qt/QNetworkReplyHandler.h: 2010-04-05 Robert Hogan Reviewed by Kenneth Rohde-Christiansen. [Qt] Fix infinite redirection loop in QNetworkReplyHandler Qt enters an infinite loop if a redirect response redirects to itself. Fixes http/tests/xmlhttprequest/connection-error-sync.html https://bugs.webkit.org/show_bug.cgi?id=37097 * platform/network/qt/QNetworkReplyHandler.cpp: (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): 2010-05-07 Ben Murdoch Reviewed by Darin Adler. Potential crash in EventHandler::handleTouchEvent https://bugs.webkit.org/show_bug.cgi?id=38646 Fix a ref counting bug that can cause a crash if the m_originatingouchPointTargets hashmap holds the last ref to an EventTarget when the user lifts their finger. This is very hard to reproduce in a consistent way and clearly a simple logic error in the code, therefore no new tests. * page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent): Don't let the RefPtr we get back from the hasmap go out of scope so soon as it could delete the wrapped ptr if the hashmap held the last ref (and we use the raw ptr that the RefPtr wraps later in the WebCore::Touch constructor). 2010-05-04 Ben Murdoch Reviewed by Simon Hausmann. Crash in handleTouchEvent: using dangling node ptrs in hashmap https://bugs.webkit.org/show_bug.cgi?id=38514 When navigating away from a page, if you have your finger still pressed and then lift it on the new page we see a crash if the node got deleted as we still have a dangling pointer in the m_originatingTouchPointTargets hashmap and try to use it as the receiver to dispatch a touchend event. Test: fast/events/touch/touch-stale-node-crash.html * page/EventHandler.cpp: (WebCore::EventHandler::clear): Clear the hashmap of touch targets. 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. [Qt]Disable Qt Multimedia backend for HTML 5 Audio and Video elements Fall back to the Phonon backend until the release situation has been cleared up. https://bugs.webkit.org/show_bug.cgi?id=38612 Buildfix for QT_VERSION >= 0x040700 after r58810. * platform/graphics/MediaPlayer.cpp: 2010-05-03 Tor Arne Vestbø Reviewed by Simon Hausmann. [Qt] Fix rendering of