diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-27 17:31:31 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-27 17:31:31 (GMT) |
commit | cf91c3c07af4c4f70f5b87d604b001f9803f2fde (patch) | |
tree | ea8df301b85fee3a075eadebcf72e1257e1bc488 | |
parent | 41fbe7440778f36afe85608d1198c96de387148f (diff) | |
parent | 03f50396a6cd6db4c48e2329cdc57223aa65be49 (diff) | |
download | Qt-cf91c3c07af4c4f70f5b87d604b001f9803f2fde.zip Qt-cf91c3c07af4c4f70f5b87d604b001f9803f2fde.tar.gz Qt-cf91c3c07af4c4f70f5b87d604b001f9803f2fde.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit:
Updated WebKit to 807157e42add842605ec67d9363dd3f1861748ca
31 files changed, 594 insertions, 102 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 1973377..c4a7dd7 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -807157e42add842605ec67d9363dd3f1861748ca +eb07c6f9bd50d0d74e9ac19ade4a2fbd5cece7c7 diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 8f9c7ac..c2862fd 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,15 @@ +2010-05-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Unreviewed, build fix for Symbian. + + [Symbian] Symbian builds does not support shadow builds + + Revision r54715 broke the Symbian build. For Symbian + the include directory is generated in the root of the source tree. + This patch sets the INCLUDEPATH accordingly for Symbian. + + * WebKit.pri: + 2010-05-14 Simon Hausmann <simon.hausmann@nokia.com> Rubber-stamped by Antti Koivisto. diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 79581d1..0899e3c 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 - cacbdf18fc917122834042d77a9164a490aafde4 + 807157e42add842605ec67d9363dd3f1861748ca diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 481b416..625faa6 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,124 @@ +2010-05-19 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + Fix painting when using clipToImageBuffer() + + When we apply the transform of the parent painter to the painter of + the transparency layer, we adopt its coordinate system, thus offset + should not be in page coordinates, but in the coordinate system of + the parent painter. + + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::TransparencyLayer::TransparencyLayer): + +2010-05-19 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] REGRESSION: CoolClock isn't rendered properly + + https://bugs.webkit.org/show_bug.cgi?id=38526 + + CanvasRenderingContext2D's arc() should connect to the previous point + with a straight line (HTML5 spec 4.8.11.1.8), but if the path is empty + to begin with, we don't want a line back to (0,0) + This also fixes the rendering artifact discussed in bug 36226. + + Spec link: + http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-arc + + Test: fast/canvas/canvas-arc-connecting-line.html + + * platform/graphics/qt/PathQt.cpp: + (WebCore::Path::addArc): + +2010-05-18 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Rubberstamped by Simon Hausmann. + + Return null when creating an ImageBuffer failed, due to for + instance a nulled pixmap. + + * platform/graphics/qt/ImageBufferQt.cpp: + (WebCore::ImageBufferData::ImageBufferData): + (WebCore::ImageBuffer::ImageBuffer): + +2010-05-17 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=39218 + [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation + + Tiles sometimes flicker when exiting a zoom animation. This happens as a result + of the visible rectangle being momentarily out of sync. + + Instead of updating the visible rect by explicitly setting it, pull it through + the client and recompute in the WebKit level. + + * page/ChromeClient.h: + (WebCore::ChromeClient::visibleRectForTiledBackingStore): + * page/Frame.cpp: + (WebCore::Frame::tiledBackingStoreVisibleRect): + * page/Frame.h: + * platform/graphics/TiledBackingStore.cpp: + (WebCore::TiledBackingStore::checkVisibleRectChanged): + (WebCore::TiledBackingStore::createTiles): + * platform/graphics/TiledBackingStore.h: + * platform/graphics/TiledBackingStoreClient.h: + +2010-05-18 Zoltan Herczeg <zherczeg@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Implementing clipToImageBuffer for Qt port. + https://bugs.webkit.org/show_bug.cgi?id=24289 + + The implementation combines pixmap layers and destinationIn + composition mode. + + * platform/graphics/qt/GraphicsContextQt.cpp: + (WebCore::TransparencyLayer::TransparencyLayer): + (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): + (WebCore::GraphicsContext::savePlatformState): + (WebCore::GraphicsContext::restorePlatformState): + (WebCore::GraphicsContext::inTransparencyLayer): + (WebCore::GraphicsContext::beginTransparencyLayer): + (WebCore::GraphicsContext::endTransparencyLayer): + (WebCore::GraphicsContext::clipToImageBuffer): + +2010-05-16 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Canvas's toDataURL() should be case insensitive wrt the mimeType argument. + https://bugs.webkit.org/show_bug.cgi?id=39153 + + Spec link: + http://www.whatwg.org/specs/web-apps/current-work/#dom-canvas-todataurl + + Test: fast/canvas/canvas-toDataURL-case-insensitive-mimetype.html + + * dom/CanvasSurface.cpp: + (WebCore::CanvasSurface::toDataURL): + +2010-05-16 Andreas Kling <andreas.kling@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Canvas's getContext() must return null when called with an invalid/unsupported parameter. + (HTML5 spec 4.8.11): http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-getcontext + + https://bugs.webkit.org/show_bug.cgi?id=39150 + + Test: fast/canvas/canvas-getContext-invalid.html + + * bindings/js/JSHTMLCanvasElementCustom.cpp: + (WebCore::JSHTMLCanvasElement::getContext): + * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: + (WebCore::V8HTMLCanvasElement::getContextCallback): + 2010-05-17 Kenneth Rohde Christiansen <kenneth@webkit.org> Reviewed by Laszlo Gombos. diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp index 80634f7..8f241f9 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp @@ -78,7 +78,10 @@ JSValue JSHTMLCanvasElement::getContext(ExecState* exec, const ArgList& args) } } #endif - return toJS(exec, globalObject(), WTF::getPtr(canvas->getContext(contextId, attrs.get()))); + CanvasRenderingContext* context = canvas->getContext(contextId, attrs.get()); + if (!context) + return jsNull(); + return toJS(exec, globalObject(), WTF::getPtr(context)); } } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp b/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp index 30a620c..0c5159d 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLCanvasElement.cpp @@ -143,10 +143,12 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, ExceptionCode& ec) if (m_size.isEmpty() || !buffer()) return String("data:,"); - if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)) + String lowercaseMimeType = mimeType.lower(); + + if (mimeType.isNull() || !MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(lowercaseMimeType)) return buffer()->toDataURL("image/png"); - return buffer()->toDataURL(mimeType); + return buffer()->toDataURL(lowercaseMimeType); } CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type, CanvasContextAttributes* attrs) diff --git a/src/3rdparty/webkit/WebCore/page/ChromeClient.h b/src/3rdparty/webkit/WebCore/page/ChromeClient.h index 0bfdbaf..a01eef1 100644 --- a/src/3rdparty/webkit/WebCore/page/ChromeClient.h +++ b/src/3rdparty/webkit/WebCore/page/ChromeClient.h @@ -222,7 +222,11 @@ namespace WebCore { virtual bool supportsFullscreenForNode(const Node*) { return false; } virtual void enterFullscreenForNode(Node*) { } virtual void exitFullscreenForNode(Node*) { } - + +#if ENABLE(TILED_BACKING_STORE) + virtual IntRect visibleRectForTiledBackingStore() const { return IntRect(); } +#endif + #if PLATFORM(MAC) virtual KeyboardUIMode keyboardUIMode() { return KeyboardAccessDefault; } diff --git a/src/3rdparty/webkit/WebCore/page/Frame.cpp b/src/3rdparty/webkit/WebCore/page/Frame.cpp index 6dbca69..379bf7d 100644 --- a/src/3rdparty/webkit/WebCore/page/Frame.cpp +++ b/src/3rdparty/webkit/WebCore/page/Frame.cpp @@ -37,6 +37,7 @@ #include "CSSPropertyNames.h" #include "CachedCSSStyleSheet.h" #include "Chrome.h" +#include "ChromeClient.h" #include "DOMWindow.h" #include "DocLoader.h" #include "DocumentType.h" @@ -1853,6 +1854,13 @@ IntRect Frame::tiledBackingStoreContentsRect() return IntRect(); return IntRect(IntPoint(), m_view->contentsSize()); } + +IntRect Frame::tiledBackingStoreVisibleRect() +{ + if (!m_page) + return IntRect(); + return m_page->chrome()->client()->visibleRectForTiledBackingStore(); +} #endif } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/Frame.h b/src/3rdparty/webkit/WebCore/page/Frame.h index 67761f9..a654cd7 100644 --- a/src/3rdparty/webkit/WebCore/page/Frame.h +++ b/src/3rdparty/webkit/WebCore/page/Frame.h @@ -288,6 +288,7 @@ namespace WebCore { virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&); virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea); virtual IntRect tiledBackingStoreContentsRect(); + virtual IntRect tiledBackingStoreVisibleRect(); #endif #if PLATFORM(MAC) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp index 6214f1b..f00e792 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp @@ -129,13 +129,12 @@ void TiledBackingStore::paint(GraphicsContext* context, const IntRect& rect) context->restore(); } -void TiledBackingStore::viewportChanged(const IntRect& contentsViewport) +void TiledBackingStore::adjustVisibleRect() { - IntRect viewport = mapFromContents(contentsViewport); - if (m_viewport == viewport) + IntRect visibleRect = mapFromContents(m_client->tiledBackingStoreVisibleRect()); + if (m_previousVisibleRect == visibleRect) return; - - m_viewport = viewport; + m_previousVisibleRect = visibleRect; startTileCreationTimer(); } @@ -177,24 +176,27 @@ void TiledBackingStore::createTiles() { if (m_contentsFrozen) return; + + IntRect visibleRect = mapFromContents(m_client->tiledBackingStoreVisibleRect()); + m_previousVisibleRect = visibleRect; - if (m_viewport.isEmpty()) + if (visibleRect.isEmpty()) return; // Remove tiles that extend outside the current contents rect. dropOverhangingTiles(); // FIXME: Make configurable/adapt to memory. - IntRect keepRect = m_viewport; - keepRect.inflateX(m_viewport.width()); - keepRect.inflateY(3 * m_viewport.height()); + IntRect keepRect = visibleRect; + keepRect.inflateX(visibleRect.width()); + keepRect.inflateY(3 * visibleRect.height()); keepRect.intersect(contentsRect()); dropTilesOutsideRect(keepRect); - IntRect coverRect = m_viewport; - coverRect.inflateX(m_viewport.width() / 2); - coverRect.inflateY(2 * m_viewport.height()); + IntRect coverRect = visibleRect; + coverRect.inflateX(visibleRect.width() / 2); + coverRect.inflateY(2 * visibleRect.height()); coverRect.intersect(contentsRect()); // Search for the tile position closest to the viewport center that does not yet contain a tile. @@ -211,7 +213,7 @@ void TiledBackingStore::createTiles() continue; ++requiredTileCount; // Distance is 0 for all currently visible tiles. - double distance = tileDistance(m_viewport, currentCoordinate); + double distance = tileDistance(visibleRect, currentCoordinate); if (distance > shortestDistance) continue; if (distance < shortestDistance) { diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h index 8ed4336..d12f191 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h @@ -41,7 +41,7 @@ public: TiledBackingStore(TiledBackingStoreClient*); ~TiledBackingStore(); - void viewportChanged(const IntRect& viewportRect); + void adjustVisibleRect(); float contentsScale() { return m_contentsScale; } void setContentsScale(float); @@ -95,7 +95,7 @@ private: IntSize m_tileSize; - IntRect m_viewport; + IntRect m_previousVisibleRect; float m_contentsScale; float m_pendingScale; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStoreClient.h b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStoreClient.h index 4adbbab..c5845b9 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStoreClient.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStoreClient.h @@ -29,6 +29,7 @@ public: virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&) = 0; virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea) = 0; virtual IntRect tiledBackingStoreContentsRect() = 0; + virtual IntRect tiledBackingStoreVisibleRect() = 0; }; #else diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp index 0100b72..69121c8 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp @@ -167,10 +167,13 @@ static inline Qt::FillRule toQtFillRule(WindRule rule) } struct TransparencyLayer : FastAllocBase { - TransparencyLayer(const QPainter* p, const QRect &rect) + TransparencyLayer(const QPainter* p, const QRect &rect, qreal opacity, QPixmap& alphaMask) : pixmap(rect.width(), rect.height()) + , opacity(opacity) + , alphaMask(alphaMask) + , saveCounter(1) // see the comment for saveCounter { - offset = rect.topLeft(); + offset = p->transform().mapRect(rect).topLeft(); pixmap.fill(Qt::transparent); painter.begin(&pixmap); painter.setRenderHint(QPainter::Antialiasing, p->testRenderHint(QPainter::Antialiasing)); @@ -182,7 +185,9 @@ struct TransparencyLayer : FastAllocBase { painter.setFont(p->font()); if (painter.paintEngine()->hasFeature(QPaintEngine::PorterDuff)) painter.setCompositionMode(p->compositionMode()); - painter.setClipPath(p->clipPath()); + // if the path is an empty region, this assignment disables all painting + if (!p->clipPath().isEmpty()) + painter.setClipPath(p->clipPath()); } TransparencyLayer() @@ -193,6 +198,11 @@ struct TransparencyLayer : FastAllocBase { QPoint offset; QPainter painter; qreal opacity; + // for clipToImageBuffer + QPixmap alphaMask; + // saveCounter is only used in combination with alphaMask + // otherwise, its value is unspecified + int saveCounter; private: TransparencyLayer(const TransparencyLayer &) {} TransparencyLayer & operator=(const TransparencyLayer &) { return *this; } @@ -217,6 +227,9 @@ public: bool antiAliasingForRectsAndLines; QStack<TransparencyLayer*> layers; + // Counting real layers. Required by inTransparencyLayer() calls + // For example, layers with valid alphaMask are not real layers + int layerCount; QPainter* redirect; // reuse this brush for solid color (to prevent expensive QBrush construction) @@ -235,6 +248,7 @@ private: GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate(QPainter* p) { painter = p; + layerCount = 0; redirect = 0; solidColor = QBrush(Qt::black); @@ -289,11 +303,17 @@ AffineTransform GraphicsContext::getCTM() const void GraphicsContext::savePlatformState() { + if (!m_data->layers.isEmpty() && !m_data->layers.top()->alphaMask.isNull()) + ++m_data->layers.top()->saveCounter; m_data->p()->save(); } void GraphicsContext::restorePlatformState() { + if (!m_data->layers.isEmpty() && !m_data->layers.top()->alphaMask.isNull()) + if (!--m_data->layers.top()->saveCounter) + endTransparencyLayer(); + m_data->p()->restore(); if (!m_data->currentPath.isEmpty() && m_common->state.pathTransform.isInvertible()) { @@ -678,7 +698,7 @@ void GraphicsContext::addPath(const Path& path) bool GraphicsContext::inTransparencyLayer() const { - return !m_data->layers.isEmpty(); + return m_data->layerCount; } PlatformPath* GraphicsContext::currentPath() @@ -837,10 +857,9 @@ void GraphicsContext::beginTransparencyLayer(float opacity) w = int(qBound(qreal(0), deviceClip.width(), (qreal)w) + 2); h = int(qBound(qreal(0), deviceClip.height(), (qreal)h) + 2); - TransparencyLayer * layer = new TransparencyLayer(m_data->p(), QRect(x, y, w, h)); - - layer->opacity = opacity; - m_data->layers.push(layer); + QPixmap emptyAlphaMask; + m_data->layers.push(new TransparencyLayer(m_data->p(), QRect(x, y, w, h), opacity, emptyAlphaMask)); + ++m_data->layerCount; } void GraphicsContext::endTransparencyLayer() @@ -849,6 +868,12 @@ void GraphicsContext::endTransparencyLayer() return; TransparencyLayer* layer = m_data->layers.pop(); + if (!layer->alphaMask.isNull()) { + layer->painter.resetTransform(); + layer->painter.setCompositionMode(QPainter::CompositionMode_DestinationIn); + layer->painter.drawPixmap(QPoint(), layer->alphaMask); + } else + --m_data->layerCount; // see the comment for layerCount layer->painter.end(); QPainter* p = m_data->p(); @@ -1086,9 +1111,21 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& rect) } } -void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*) +void GraphicsContext::clipToImageBuffer(const FloatRect& floatRect, const ImageBuffer* image) { - notImplemented(); + if (paintingDisabled()) + return; + + QPixmap* nativeImage = image->image()->nativeImageForCurrentFrame(); + if (!nativeImage) + return; + + IntRect rect(floatRect); + QPixmap alphaMask = *nativeImage; + if (alphaMask.width() != rect.width() || alphaMask.height() != rect.height()) + alphaMask = alphaMask.scaled(rect.width(), rect.height()); + + m_data->layers.push(new TransparencyLayer(m_data->p(), rect, 1.0, alphaMask)); } void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp index d831566..eafdcf0 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp @@ -46,12 +46,19 @@ namespace WebCore { ImageBufferData::ImageBufferData(const IntSize& size) : m_pixmap(size) + , m_painter(0) { + if (m_pixmap.isNull()) + return; + m_pixmap.fill(QColor(Qt::transparent)); - QPainter* painter = new QPainter(&m_pixmap); + QPainter* painter = new QPainter; m_painter.set(painter); + if (!painter->begin(&m_pixmap)) + return; + // Since ImageBuffer is used mainly for Canvas, explicitly initialize // its painter's pen and brush with the corresponding canvas defaults // NOTE: keep in sync with CanvasRenderingContext2D::State @@ -72,8 +79,11 @@ ImageBuffer::ImageBuffer(const IntSize& size, ImageColorSpace, bool& success) : m_data(size) , m_size(size) { + success = m_data.m_painter && m_data.m_painter->isActive(); + if (!success) + return; + m_context.set(new GraphicsContext(m_data.m_painter.get())); - success = true; } ImageBuffer::~ImageBuffer() diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp index 4b0c21f..a7351a0 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/PathQt.cpp @@ -298,9 +298,10 @@ void Path::addArc(const FloatPoint& p, float r, float sar, float ear, bool antic span += ea - sa; } - // connect to the previous point by a straight line - m_path.lineTo(QPointF(xc + radius * cos(sar), - yc - radius * sin(sar))); + // If the path is empty, move to where the arc will start to avoid painting a line from (0,0) + // NOTE: QPainterPath::isEmpty() won't work here since it ignores a lone MoveToElement + if (!m_path.elementCount()) + m_path.arcMoveTo(xs, ys, width, height, sa); m_path.arcTo(xs, ys, width, height, sa, span); diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h b/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h index 467941f..8e48d1f 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h @@ -89,6 +89,8 @@ public: virtual QStyle* style() const = 0; + virtual QRectF graphicsItemVisibleRect() const { return QRectF(); } + protected: #ifndef QT_NO_CURSOR virtual QCursor cursor() const = 0; diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index a3ccd9d..921a6e0 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -48,7 +48,12 @@ CONFIG(release, debug|release) { } BASE_DIR = $$PWD -INCLUDEPATH += $$OUTPUT_DIR/include/QtWebKit + +symbian { + INCLUDEPATH += $$PWD/include/QtWebKit +} else { + INCLUDEPATH += $$OUTPUT_DIR/include/QtWebKit +} CONFIG -= warn_on *-g++*:QMAKE_CXXFLAGS += -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 75a23d9..7a25646 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -127,7 +127,7 @@ public: #endif void updateResizesToContentsForPage(); - QRectF graphicsItemVisibleRect() const; + virtual QRectF graphicsItemVisibleRect() const; #if ENABLE(TILED_BACKING_STORE) void updateTiledBackingStoreScale(); #endif @@ -597,12 +597,7 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem* #if ENABLE(TILED_BACKING_STORE) if (WebCore::TiledBackingStore* backingStore = QWebFramePrivate::core(page()->mainFrame())->tiledBackingStore()) { // FIXME: We should set the backing store viewport earlier than in paint - if (d->resizesToContents) - backingStore->viewportChanged(WebCore::IntRect(d->graphicsItemVisibleRect())); - else { - QRectF visibleRect(d->page->mainFrame()->scrollPosition(), d->page->mainFrame()->geometry().size()); - backingStore->viewportChanged(WebCore::IntRect(visibleRect)); - } + backingStore->adjustVisibleRect(); // QWebFrame::render is a public API, bypass it for tiled rendering so behavior does not need to change. WebCore::GraphicsContext context(painter); page()->mainFrame()->d->renderFromTiledBackingStore(&context, option->exposedRect.toAlignedRect()); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 44cc3b5..721aaa6 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -275,8 +275,9 @@ void QWEBKIT_EXPORT qt_drt_evaluateScriptInIsolatedWorld(QWebFrame* qFrame, int JSC::JSValue result = frame->script()->executeScriptInWorld(mainThreadNormalWorld(), script, true).jsValue(); } -static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos) +bool QWEBKIT_EXPORT qtwebkit_webframe_scrollOverflow(QWebFrame* qFrame, int dx, int dy, const QPoint& pos) { + WebCore::Frame* frame = QWebFramePrivate::core(qFrame); if (!frame || !frame->document() || !frame->view() || !frame->eventHandler()) return false; @@ -299,17 +300,24 @@ static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const bool scrolledHorizontal = false; bool scrolledVertical = false; - if (dx > 0) - scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); - else if (dx < 0) - scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); + do { + if (dx > 0) + scrolledHorizontal = renderLayer->scroll(ScrollRight, ScrollByPixel, dx); + else if (dx < 0) + scrolledHorizontal = renderLayer->scroll(ScrollLeft, ScrollByPixel, qAbs(dx)); + + if (dy > 0) + scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); + else if (dy < 0) + scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); - if (dy > 0) - scrolledVertical = renderLayer->scroll(ScrollDown, ScrollByPixel, dy); - else if (dy < 0) - scrolledVertical = renderLayer->scroll(ScrollUp, ScrollByPixel, qAbs(dy)); + if (scrolledHorizontal || scrolledVertical) + return true; - return (scrolledHorizontal || scrolledVertical); + renderLayer = renderLayer->parent(); + } while (renderLayer); + + return false; } @@ -325,7 +333,7 @@ void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int d if (!qFrame) return; - if (webframe_scrollOverflow(QWebFramePrivate::core(qFrame), dx, dy, pos)) + if (qtwebkit_webframe_scrollOverflow(qFrame, dx, dy, pos)) return; bool scrollHorizontal = false; @@ -339,7 +347,7 @@ void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int d if (dy > 0) // scroll down scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical); - else if (dy < 0) //scroll up + else if (dy < 0) //scroll up scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical); if (scrollHorizontal || scrollVertical) { diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp index d852012..06e6cfa 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebhistory.cpp @@ -540,6 +540,8 @@ QDataStream& operator>>(QDataStream& source, QWebHistory& history) d->lst->addItem(item); } d->lst->removeItem(nullItem); + // Update the HistoryController. + history.d->lst->page()->mainFrame()->loader()->history()->setCurrentItem(history.d->lst->entries()[currentIndex].get()); history.goToItem(history.itemAt(currentIndex)); } } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index c5f508f..44bd902 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1518,7 +1518,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const RefPtr<Range> range = editor->compositionRange(); return QVariant(renderTextControl->selectionEnd() - TextIterator::rangeLength(range.get())); } - return QVariant(renderTextControl->selectionEnd()); + return QVariant(frame->selection()->extent().offsetInContainerNode()); } return QVariant(); } @@ -1550,7 +1550,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const RefPtr<Range> range = editor->compositionRange(); return QVariant(renderTextControl->selectionStart() - TextIterator::rangeLength(range.get())); } - return QVariant(renderTextControl->selectionStart()); + return QVariant(frame->selection()->base().offsetInContainerNode()); } return QVariant(); } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index 115f9fc..81823f6 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -74,7 +74,6 @@ public: QString localStoragePath; QString offlineWebApplicationCachePath; qint64 offlineStorageDefaultQuota; - QUrl inspectorLocation; void apply(); WebCore::Settings* settings; @@ -1011,31 +1010,6 @@ void QWebSettings::setLocalStoragePath(const QString& path) } /*! - \since 4.7 - - Specifies the \a location of a frontend to load with each web page when using Web Inspector. - - \sa inspectorUrl() -*/ -void QWebSettings::setInspectorUrl(const QUrl& location) -{ - d->inspectorLocation = location; - d->apply(); -} - -/*! - \since 4.7 - - Returns the location of the Web Inspector frontend. - - \sa setInspectorUrl() -*/ -QUrl QWebSettings::inspectorUrl() const -{ - return d->inspectorLocation; -} - -/*! \since 4.6 Returns the path for HTML5 local storage. diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h index 3592e2c..b978f5e 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h @@ -136,9 +136,6 @@ public: void setLocalStoragePath(const QString& path); QString localStoragePath() const; - void setInspectorUrl(const QUrl &location); - QUrl inspectorUrl() const; - static void clearMemoryCaches(); static void enablePersistentStorage(const QString& path = QString()); diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index efc8f27..2f87c7b 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,132 @@ +2010-05-21 Simon Hausmann <simon.hausmann@nokia.com> + + Symbian build fix. + + [Qt] Updated the wins def file with one new export. + + The DRT symbols are still missing, but I can't build DRT ;( + + * symbian/bwins/QtWebKitu.def: + +2010-05-12 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Laszlo Gombos. + + Add a comment to explain the web inspector dynamic property url hook + and that it's there on purpose :) + + https://bugs.webkit.org/show_bug.cgi?id=35340 + + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::openInspectorFrontend): + +2010-05-06 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Replace public inspector url with private property for QtLauncher + https://bugs.webkit.org/show_bug.cgi?id=35340 + + Replace the public API with a private dynamic property until this feature + is ready. + + * Api/qwebsettings.cpp: + * Api/qwebsettings.h: + * WebCoreSupport/InspectorClientQt.cpp: + (WebCore::InspectorClientQt::openInspectorFrontend): + * symbian/bwins/QtWebKitu.def: + * symbian/eabi/QtWebKitu.def: + +2010-05-20 Luiz Agostini <luiz.agostini@openbossa.org> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Skipping popup focus test for maemo + https://bugs.webkit.org/show_bug.cgi?id=39314 + + Skipping popup focus test for maemo in qwebframe auto test. + + The test method tst_QWebFrame::popupFocus() was testing popup focus AND input + field focus. The input field focus has been removed from the method popupFocus() + and a new test method named inputFieldFocus() has been added. Finally the test + method popupFocus() has been skipped for maemo. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-05-20 Rajiv Ramanasankaran <rajiv.ramanasankaran@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] QWebPage::inputMethodQuery() returns wrong values for Qt::ImCursorPosition, Qt::ImAnchorPosition + https://bugs.webkit.org/show_bug.cgi?id=38779 + + The earlier implementation was written with the assumption that in this scenario the + anchor position always corresponds to the START index and that the current cursor position + always corresponds to the END index in WebKit. + + Updated the implementation of QWebPage::inputMethodQuery(Qt::ImCursorPosition) and + QWebPage::inputMethodQuery(Qt::ImAnchorPosition) for the case where the Editor is not in + composition mode. In the non-composition mode, the Anchor and the Current cursor positions + correspond to the Base and Extent position offsets in WebKit. + + Also added the auto-tests for the RIGHT to LEFT and LEFT to RIGHT selections. + + * Api/qwebpage.cpp: + (QWebPage::inputMethodQuery): Now returning correct values for Qt::ImCursorPosition and + Qt::ImAnchorPosition when the Editor is not in composition mode. + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): Added auto-tests for RIGHT to LEFT and LEFT to RIGHT selections + +2010-05-12 Joe Ligman <joseph.ligman@nokia.com> + + Reviewed by Laszlo Gombos. + + [Qt] Nested overflow div does not scroll + https://bugs.webkit.org/show_bug.cgi?id=38641 + + Modify qtwebkit_webframe_scrollOverflow, if the current node's render layer + does not scroll it will try and scroll the parent's render layer. Also export + qtwebkit_webframe_scrollOverflow so we can use it independently of + qtwebkit_webframe_scrollRecursively + + * Api/qwebframe.cpp: + (qtwebkit_webframe_scrollOverflow): + (qtwebkit_webframe_scrollRecursively): + +2010-05-17 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=39218 + [Qt] Tiled backing store tiles sometimes flicker when exiting a zoom animation + + Tiles sometimes flicker when exiting a zoom animation. This happens as a result + of the visible rectangle being momentarily out of sync. + + Instead of updating the visible rect by explicitly setting it, pull it through + the client and recompute in WebKit the level. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::paint): + * WebCoreSupport/ChromeClientQt.cpp: + (WebCore::ChromeClientQt::visibleRectForTiledBackingStore): + * WebCoreSupport/ChromeClientQt.h: + +2010-05-18 Jedrzej Nowacki <jedrzej.nowacki@nokia.com> + + Reviewed by Simon Hausmann. + + Fix QWebHistory serialization. + + Regression was caused by bug 33224. The streaming function + should generate a documentSequenceNumber for all loaded values. + + [Qt] tst_QWebHistory::serialize_2() fails + https://bugs.webkit.org/show_bug.cgi?id=37322 + + * Api/qwebhistory.cpp: + (operator>>): + 2010-05-14 Kent Hansen <kent.hansen@nokia.com>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>, Henry Haverinen <henry.haverinen@nokia.com>, Jedrzej Nowacki <jedrzej.nowacki@nokia.com>, Andreas Kling <andreas.kling@nokia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp index 9eb10d6..4e742fc 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp @@ -559,6 +559,15 @@ bool ChromeClientQt::allowsAcceleratedCompositing() const } #endif + +#if ENABLE(TILED_BACKING_STORE) +IntRect ChromeClientQt::visibleRectForTiledBackingStore() const +{ + if (!platformPageClient()) + return IntRect(); + return enclosingIntRect(FloatRect(platformPageClient()->graphicsItemVisibleRect())); +} +#endif QtAbstractWebPopup* ChromeClientQt::createSelectPopup() { diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h index f0a7c8c..a47adf0 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/ChromeClientQt.h @@ -140,6 +140,10 @@ namespace WebCore { virtual bool allowsAcceleratedCompositing() const; #endif +#if ENABLE(TILED_BACKING_STORE) + virtual IntRect visibleRectForTiledBackingStore() const; +#endif + #if ENABLE(TOUCH_EVENTS) virtual void needTouchEvents(bool) { } #endif diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp index 7fabbda..725c5fb 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp @@ -88,12 +88,17 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController*) InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView); inspectorView->setPage(inspectorPage); - QUrl inspectorUrl = m_inspectedWebPage->settings()->inspectorUrl(); + QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector(); + // This is a known hook that allows changing the default URL for the + // Web inspector. This is used for SDK purposes. Please keep this hook + // around and don't remove it. + // https://bugs.webkit.org/show_bug.cgi?id=35340 + QUrl inspectorUrl = inspector->property("_q_inspectorUrl").toUrl(); if (!inspectorUrl.isValid()) inspectorUrl = QUrl("qrc:/webkit/inspector/inspector.html"); inspectorView->page()->mainFrame()->load(inspectorUrl); m_inspectedWebPage->d->inspectorFrontend = inspectorView; - m_inspectedWebPage->d->getOrCreateInspector()->d->setFrontend(inspectorView); + inspector->d->setFrontend(inspectorView); inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView)); } diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def index 910ba8f..969defe 100644 --- a/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def +++ b/src/3rdparty/webkit/WebKit/qt/symbian/bwins/QtWebKitu.def @@ -625,7 +625,7 @@ EXPORTS ?qt_suspendActiveDOMObjects@@YAXPAVQWebFrame@@@Z @ 624 NONAME ; void qt_suspendActiveDOMObjects(class QWebFrame *) ?qtwebkit_webframe_scrollRecursively@@YA_NPAVQWebFrame@@HH@Z @ 625 NONAME ABSENT ; bool qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int) ?closeEvent@QWebInspector@@MAEXPAVQCloseEvent@@@Z @ 626 NONAME ; void QWebInspector::closeEvent(class QCloseEvent *) - ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ; class QUrl QWebSettings::inspectorUrl(void) const + ?inspectorUrl@QWebSettings@@QBE?AVQUrl@@XZ @ 627 NONAME ABSENT ; class QUrl QWebSettings::inspectorUrl(void) const ?isTiledBackingStoreFrozen@QGraphicsWebView@@QBE_NXZ @ 628 NONAME ; bool QGraphicsWebView::isTiledBackingStoreFrozen(void) const ?pageChanged@QWebFrame@@IAEXXZ @ 629 NONAME ; void QWebFrame::pageChanged(void) ?qt_drt_enableCaretBrowsing@@YAXPAVQWebPage@@_N@Z @ 630 NONAME ; void qt_drt_enableCaretBrowsing(class QWebPage *, bool) @@ -646,7 +646,8 @@ EXPORTS ?qtwebkit_webframe_scrollRecursively@@YAXPAVQWebFrame@@HHABVQPoint@@@Z @ 645 NONAME ; void qtwebkit_webframe_scrollRecursively(class QWebFrame *, int, int, class QPoint const &) ?resizesToContents@QGraphicsWebView@@QBE_NXZ @ 646 NONAME ; bool QGraphicsWebView::resizesToContents(void) const ?scrollToAnchor@QWebFrame@@QAEXABVQString@@@Z @ 647 NONAME ; void QWebFrame::scrollToAnchor(class QString const &) - ?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ; void QWebSettings::setInspectorUrl(class QUrl const &) + ?setInspectorUrl@QWebSettings@@QAEXABVQUrl@@@Z @ 648 NONAME ABSENT ; void QWebSettings::setInspectorUrl(class QUrl const &) ?setResizesToContents@QGraphicsWebView@@QAEX_N@Z @ 649 NONAME ; void QGraphicsWebView::setResizesToContents(bool) ?setTiledBackingStoreFrozen@QGraphicsWebView@@QAEX_N@Z @ 650 NONAME ; void QGraphicsWebView::setTiledBackingStoreFrozen(bool) + ?qtwebkit_webframe_scrollOverflow@@YA_NPAVQWebFrame@@HHABVQPoint@@@Z @ 651 NONAME ; bool qtwebkit_webframe_scrollOverflow(QWebFrame *, int, int, const QPoint&) diff --git a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def index ca462d0..e0f2125 100644 --- a/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -712,11 +712,61 @@ EXPORTS _Z47qt_drt_setDomainRelaxationForbiddenForURLSchemebRK7QString @ 711 NONAME _ZN9QWebFrame11pageChangedEv @ 712 NONAME _ZN9QWebFrame14scrollToAnchorERK7QString @ 713 NONAME - _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME + _ZN12QWebSettings15setInspectorUrlERK4QUrl @ 714 NONAME ABSENT _ZN13QWebInspector10closeEventEP11QCloseEvent @ 715 NONAME _ZN16QGraphicsWebView26setTiledBackingStoreFrozenEb @ 716 NONAME _ZNK16QGraphicsWebView25isTiledBackingStoreFrozenEv @ 717 NONAME _Z18qt_wrt_setViewModeP8QWebPageRK7QString @ 718 NONAME ABSENT _Z19qt_drt_setMediaTypeP9QWebFrameRK7QString @ 719 NONAME _Z26qt_drt_enableCaretBrowsingP8QWebPageb @ 720 NONAME - _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME + _ZNK12QWebSettings12inspectorUrlEv @ 721 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt19webPageSetGroupNameEP8QWebPageRK7QString @ 722 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt16webPageGroupNameEP8QWebPage @ 723 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt23garbageCollectorCollectEv @ 724 NONAME ABSENT + _Z32qtwebkit_webframe_scrollOverflowP9QWebFrameiiRK6QPoint @ 725 NONAME + _ZN23DumpRenderTreeSupportQt12setMediaTypeEP9QWebFrameRK7QString @ 726 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt13numberOfPagesEP9QWebFrameff @ 727 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt13selectedRangeEP8QWebPage @ 728 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt14clearFrameNameEP9QWebFrame @ 729 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt14pauseAnimationEP9QWebFrameRK7QStringdS4_ @ 730 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt15dumpFrameLoaderEb @ 731 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt16dumpNotificationEb @ 732 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt16isCommandEnabledEP8QWebPageRK7QString @ 733 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt16webInspectorShowEP8QWebPage @ 734 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt17pauseSVGAnimationEP9QWebFrameRK7QStringdS4_ @ 735 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt17webInspectorCloseEP8QWebPage @ 736 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt17workerThreadCountEv @ 737 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt18hasDocumentElementEP9QWebFrame @ 738 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt20dumpEditingCallbacksEb @ 739 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt21markerTextForListItemERK11QWebElement @ 740 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt22javaScriptObjectsCountEv @ 741 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt23setCaretBrowsingEnabledEP8QWebPageb @ 742 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt24executeCoreCommandByNameEP8QWebPageRK7QStringS4_ @ 743 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt21dumpSetAcceptsEditingEb @744 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt22resumeActiveDOMObjectsEP9QWebFrame @745 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt23suspendActiveDOMObjectsEP9QWebFrame @746 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt24numberOfActiveAnimationsEP9QWebFrame @747 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt24pageNumberForElementByIdEP9QWebFrameRK7QStringff @748 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt25dumpResourceLoadCallbacksEb @749 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt25pauseTransitionOfPropertyEP9QWebFrameRK7QStringdS4_ @750 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt25setFrameFlatteningEnabledEP8QWebPageb @751 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt25webInspectorExecuteScriptEP8QWebPagelRK7QString @752 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt25whiteListAccessFromOriginERK7QStringS2_S2_b @753 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt26counterValueForElementByIdEP9QWebFrameRK7QString @754 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt26firstRectForCharacterRangeEP8QWebPageii @755 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt26overwritePluginDirectoriesEv @756 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt27resetOriginAccessWhiteListsEv @757 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt27setSmartInsertDeleteEnabledEP8QWebPageb @758 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt27setTimelineProfilingEnabledEP8QWebPageb @759 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt28setDumpRenderTreeModeEnabledEb @760 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt29dumpResourceLoadCallbacksPathERK7QString @761 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt29evaluateScriptInIsolatedWorldEP9QWebFrameiRK7QString @762 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt29setJavaScriptProfilingEnabledEP9QWebFrameb @763 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt29setWillSendRequestReturnsNullEb @764 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt30setWillSendRequestClearHeadersERK11QStringList @765 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt33computedStyleIncludingVisitedInfoERK11QWebElement @766 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt34setSelectTrailingWhitespaceEnabledEP8QWebPageb @767 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt39elementDoesAutoCompleteForElementWithIdEP9QWebFrameRK7QString @768 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt39setWillSendRequestReturnsNullOnRedirectEb @769 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt40garbageCollectorCollectOnAlternateThreadEb @770 NONAME ABSENT + _ZN23DumpRenderTreeSupportQt40setDomainRelaxationForbiddenForURLSchemeEbRK7QString @771 NONAME ABSENT 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 bea7a67..c53a42d 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -600,7 +600,12 @@ private slots: void setHtmlWithBaseURL(); void ipv6HostEncoding(); void metaData(); +#if !defined(Q_WS_MAEMO_5) + // as maemo 5 does not use QComboBoxes to implement the popups + // this test does not make sense for it. void popupFocus(); +#endif + void inputFieldFocus(); void hitTestContent(); void jsByteArray(); void ownership(); @@ -686,13 +691,13 @@ private: QWebView* m_view; QWebPage* m_page; MyQObject* m_myObject; - QWebView* m_popupTestView; - int m_popupTestPaintCount; + QWebView* m_inputFieldsTestView; + int m_inputFieldTestPaintCount; }; tst_QWebFrame::tst_QWebFrame() : sTrue("true"), sFalse("false"), sUndefined("undefined"), sArray("array"), sFunction("function"), sError("error"), - sString("string"), sObject("object"), sNumber("number"), m_popupTestView(0), m_popupTestPaintCount(0) + sString("string"), sObject("object"), sNumber("number"), m_inputFieldsTestView(0), m_inputFieldTestPaintCount(0) { } @@ -702,10 +707,10 @@ tst_QWebFrame::~tst_QWebFrame() bool tst_QWebFrame::eventFilter(QObject* watched, QEvent* event) { - // used on the popupFocus test - if (watched == m_popupTestView) { + // used on the inputFieldFocus test + if (watched == m_inputFieldsTestView) { if (event->type() == QEvent::Paint) - m_popupTestPaintCount++; + m_inputFieldTestPaintCount++; } return QObject::eventFilter(watched, event); } @@ -2549,6 +2554,7 @@ void tst_QWebFrame::metaData() QCOMPARE(metaData.value("nonexistant"), QString()); } +#if !defined(Q_WS_MAEMO_5) void tst_QWebFrame::popupFocus() { QWebView view; @@ -2580,16 +2586,27 @@ void tst_QWebFrame::popupFocus() // hide the popup and check if focus is on the page combo->hidePopup(); QTRY_VERIFY(view.hasFocus() && !combo->view()->hasFocus()); // Focus should be back on the WebView +} +#endif + +void tst_QWebFrame::inputFieldFocus() +{ + QWebView view; + view.setHtml("<html><body><input type=\"text\"></input></body></html>"); + view.resize(400, 100); + view.show(); + view.setFocus(); + QTRY_VERIFY(view.hasFocus()); // double the flashing time, should at least blink once already int delay = qApp->cursorFlashTime() * 2; // focus the lineedit and check if it blinks - QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(200, 25)); - m_popupTestView = &view; + QTest::mouseClick(&view, Qt::LeftButton, 0, QPoint(25, 25)); + m_inputFieldsTestView = &view; view.installEventFilter( this ); QTest::qWait(delay); - QVERIFY2(m_popupTestPaintCount >= 3, + QVERIFY2(m_inputFieldTestPaintCount >= 3, "The input field should have a blinking caret"); } 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 12fb9b3..52dc6bb 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -1492,6 +1492,98 @@ void tst_QWebPage::inputMethods() QCOMPARE(value, QString("QtWebKit")); #endif + // Cancel current composition first + inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); + QInputMethodEvent eventSelection4("", inputAttributes); + page->event(&eventSelection4); + + // START - Tests for Selection when the Editor is NOT in Composition mode + + // LEFT to RIGHT selection + // Deselect the selection by sending MouseButtonPress events + // This moves the current cursor to the end of the text + page->event(&evpres); + page->event(&evrel); + + //Move to the start of the line + page->triggerAction(QWebPage::MoveToStartOfLine); + + QKeyEvent keyRightEventPress(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier); + QKeyEvent keyRightEventRelease(QEvent::KeyRelease, Qt::Key_Right, Qt::NoModifier); + + //Move 2 characters RIGHT + for (int j = 0; j < 2; ++j) { + page->event(&keyRightEventPress); + page->event(&keyRightEventRelease); + } + + //Select to the end of the line + page->triggerAction(QWebPage::SelectEndOfLine); + + //ImAnchorPosition QtWebKit + variant = page->inputMethodQuery(Qt::ImAnchorPosition); + anchorPosition = variant.toInt(); + QCOMPARE(anchorPosition, 2); + + //ImCursorPosition + variant = page->inputMethodQuery(Qt::ImCursorPosition); + cursorPosition = variant.toInt(); + QCOMPARE(cursorPosition, 8); + + //ImCurrentSelection + variant = page->inputMethodQuery(Qt::ImCurrentSelection); + selectionValue = variant.value<QString>(); + QCOMPARE(selectionValue, QString("WebKit")); + + //RIGHT to LEFT selection + //Deselect the selection (this moves the current cursor to the end of the text) + page->event(&evpres); + page->event(&evrel); + + //ImAnchorPosition + variant = page->inputMethodQuery(Qt::ImAnchorPosition); + anchorPosition = variant.toInt(); + QCOMPARE(anchorPosition, 8); + + //ImCursorPosition + variant = page->inputMethodQuery(Qt::ImCursorPosition); + cursorPosition = variant.toInt(); + QCOMPARE(cursorPosition, 8); + + //ImCurrentSelection + variant = page->inputMethodQuery(Qt::ImCurrentSelection); + selectionValue = variant.value<QString>(); + QCOMPARE(selectionValue, QString("")); + + QKeyEvent keyLeftEventPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier); + QKeyEvent keyLeftEventRelease(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier); + + //Move 2 characters LEFT + for (int i = 0; i < 2; ++i) { + page->event(&keyLeftEventPress); + page->event(&keyLeftEventRelease); + } + + //Select to the start of the line + page->triggerAction(QWebPage::SelectStartOfLine); + + //ImAnchorPosition + variant = page->inputMethodQuery(Qt::ImAnchorPosition); + anchorPosition = variant.toInt(); + QCOMPARE(anchorPosition, 6); + + //ImCursorPosition + variant = page->inputMethodQuery(Qt::ImCursorPosition); + cursorPosition = variant.toInt(); + QCOMPARE(cursorPosition, 0); + + //ImCurrentSelection + variant = page->inputMethodQuery(Qt::ImCurrentSelection); + selectionValue = variant.value<QString>(); + QCOMPARE(selectionValue, QString("QtWebK")); + + //END - Tests for Selection when the Editor is not in Composition mode + //ImhHiddenText QMouseEvent evpresPassword(QEvent::MouseButtonPress, inputs.at(1).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); page->event(&evpresPassword); |