diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-30 03:29:47 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-30 03:29:47 (GMT) |
commit | 8b713b39082226665563fa72ac2f9cbe15bad74e (patch) | |
tree | 9d2c938c59dd39a49a4f3f8bd283ca68ba42ce39 | |
parent | 81b73d11e3d147f97d20af220721617bcf3c412f (diff) | |
parent | e27032a8c5e759a0f7132dfbded5d5eeb9d0bbd3 (diff) | |
download | Qt-8b713b39082226665563fa72ac2f9cbe15bad74e.zip Qt-8b713b39082226665563fa72ac2f9cbe15bad74e.tar.gz Qt-8b713b39082226665563fa72ac2f9cbe15bad74e.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 eb07c6f9bd50d0d74e9ac19ade4a2fbd5cece7c7
Updated WebKit to 807157e42add842605ec67d9363dd3f1861748ca
38 files changed, 813 insertions, 174 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 1973377..a8729b7 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -807157e42add842605ec67d9363dd3f1861748ca +531b0d7cd2af830f0d17b83b6e4a489794481539 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..53687cf 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 + eb07c6f9bd50d0d74e9ac19ade4a2fbd5cece7c7 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 481b416..e5ae24f 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,196 @@ +2010-05-13 Antti Koivisto <koivisto@iki.fi> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=39063 + [Qt] Tiled backing store checker pattern does not paint correctly when scaling factor is not 1 + + Use the dirty rect that has been adjusted for scaling instead of the original one. + + * platform/graphics/TiledBackingStore.cpp: + (WebCore::TiledBackingStore::paint): + +2010-05-24 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Make text filling work together with text stroke. + + When the text has stroke a new QPen was set, overriding the pen + set for text filling. This patch fixes that by storing the two + pens and using where appropriate. + + * platform/graphics/qt/FontQt.cpp: + (WebCore::Font::drawComplexText): + +2010-05-17 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Darin Adler. + + Add an optional "starting node' parameter to scrollRecursively and scrollOverflow of EventHandler + https://bugs.webkit.org/show_bug.cgi?id=39217 + + It would be usefull if scrollOverflow and scrollRecursively methods of EventHandler + could receive a parameter to specify where to start scrolling from. Currently they + start scrolling from either the current focused node or the node where mouse last + pressed on. Patch proposes an aditional starting point as an optional parameter. + Since it is optional, all call sites can remain as are, and if a Null node is passed + in, both methods work as previously. + + * page/EventHandler.cpp: + (WebCore::EventHandler::scrollOverflow): + (WebCore::EventHandler::scrollRecursively): + * page/EventHandler.h: + +2010-05-23 Noam Rosenthal <noam.rosenthal@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Using Accelerated Composing the rocket back animation on http://www.the-art-of-web.com/css/css-animation/ works differently as when not using AC. + https://bugs.webkit.org/show_bug.cgi?id=39513 + + The value of GraphicsLayer->transform() needs to be changed during the animation, regardless of m_fillsForward. + m_fillsForward should only apply at the end of the animation. Based on previous patch by Kenneth Christiansen. + + * platform/graphics/qt/GraphicsLayerQt.cpp: + (WebCore::TransformAnimationQt::applyFrame): + (WebCore::OpacityAnimationQt::applyFrame): + +2010-05-25 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> + + Reviewed by Laszlo Gombos. + + [Qt] Running with accelerated compositing enabled sometimes result in a crash + https://bugs.webkit.org/show_bug.cgi?id=39609 + + Check if we have a scene before applying the workaround for + the QGraphicsScene bug where opacity change doesn't always have + immediate effect. + + * platform/graphics/qt/GraphicsLayerQt.cpp: + (WebCore::OpacityAnimationQt::applyFrame): + +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/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 63e78a7..5def728 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -159,7 +159,7 @@ defineTest(addExtraCompiler) { for(file,input) { base = $$basename(file) - base ~= s/\\..+// + base ~= s/\..+// newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base) SOURCES += $$newfile } 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/EventHandler.cpp b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp index 46dd7ae..c40299c 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.cpp +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.cpp @@ -929,9 +929,13 @@ void EventHandler::setMousePressNode(PassRefPtr<Node> node) m_mousePressNode = node; } -bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity granularity) +bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode) { - Node* node = m_frame->document()->focusedNode(); + Node* node = startingNode; + + if (!node) + node = m_frame->document()->focusedNode(); + if (!node) node = m_mousePressNode.get(); @@ -946,9 +950,9 @@ bool EventHandler::scrollOverflow(ScrollDirection direction, ScrollGranularity g return false; } -bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularity granularity) +bool EventHandler::scrollRecursively(ScrollDirection direction, ScrollGranularity granularity, Node* startingNode) { - bool handled = scrollOverflow(direction, granularity); + bool handled = scrollOverflow(direction, granularity, startingNode); if (!handled) { Frame* frame = m_frame; do { diff --git a/src/3rdparty/webkit/WebCore/page/EventHandler.h b/src/3rdparty/webkit/WebCore/page/EventHandler.h index 282100d..a94e7bf 100644 --- a/src/3rdparty/webkit/WebCore/page/EventHandler.h +++ b/src/3rdparty/webkit/WebCore/page/EventHandler.h @@ -130,9 +130,9 @@ public: static Frame* subframeForTargetNode(Node*); - bool scrollOverflow(ScrollDirection, ScrollGranularity); + bool scrollOverflow(ScrollDirection, ScrollGranularity, Node* startingNode = 0); - bool scrollRecursively(ScrollDirection, ScrollGranularity); + bool scrollRecursively(ScrollDirection, ScrollGranularity, Node* startingNode = 0); #if ENABLE(DRAG_SUPPORT) bool shouldDragAutoNode(Node*, const IntPoint&) const; // -webkit-user-drag == auto 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..0250061 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp @@ -120,22 +120,23 @@ void TiledBackingStore::paint(GraphicsContext* context, const IntRect& rect) if (currentTile && currentTile->isReadyToPaint()) currentTile->paint(context, dirtyRect); else { - FloatRect tileRect = tileRectForCoordinate(currentCoordinate); - FloatRect target = intersection(tileRect, FloatRect(rect)); - Tile::paintCheckerPattern(context, target); + IntRect tileRect = tileRectForCoordinate(currentCoordinate); + IntRect target = intersection(tileRect, dirtyRect); + if (target.isEmpty()) + continue; + Tile::paintCheckerPattern(context, FloatRect(target)); } } } 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 +178,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 +215,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/FontQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp index 1e92dcc..b707f9d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontQt.cpp @@ -73,28 +73,31 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float QPainter *p = ctx->platformContext(); + QPen textFillPen; if (ctx->textDrawingMode() & cTextFill) { if (ctx->fillGradient()) { QBrush brush(*ctx->fillGradient()->platformGradient()); brush.setTransform(ctx->fillGradient()->gradientSpaceTransform()); - p->setPen(QPen(brush, 0)); + textFillPen = QPen(brush, 0); } else if (ctx->fillPattern()) { AffineTransform affine; - p->setPen(QPen(QBrush(ctx->fillPattern()->createPlatformPattern(affine)), 0)); + textFillPen = QPen(QBrush(ctx->fillPattern()->createPlatformPattern(affine)), 0); } else - p->setPen(QColor(ctx->fillColor())); + textFillPen = QPen(QColor(ctx->fillColor())); } + QPen textStrokePen; if (ctx->textDrawingMode() & cTextStroke) { if (ctx->strokeGradient()) { QBrush brush(*ctx->strokeGradient()->platformGradient()); brush.setTransform(ctx->strokeGradient()->gradientSpaceTransform()); - p->setPen(QPen(brush, ctx->strokeThickness())); + textStrokePen = QPen(brush, ctx->strokeThickness()); } else if (ctx->strokePattern()) { AffineTransform affine; - p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), ctx->strokeThickness())); + QBrush brush(ctx->strokePattern()->createPlatformPattern(affine)); + textStrokePen = QPen(brush, ctx->strokeThickness()); } else - p->setPen(QPen(QColor(ctx->strokeColor()), ctx->strokeThickness())); + textStrokePen = QPen(QColor(ctx->strokeColor()), ctx->strokeThickness()); } String sanitized = Font::normalizeSpaces(String(run.characters(), run.length())); @@ -163,10 +166,13 @@ void Font::drawComplexText(GraphicsContext* ctx, const TextRun& run, const Float if (ctx->textDrawingMode() & cTextStroke) { QPainterPath path; path.addText(pt, font(), string); + p->setPen(textStrokePen); p->strokePath(path, p->pen()); } - if (ctx->textDrawingMode() & cTextFill) + if (ctx->textDrawingMode() & cTextFill) { + p->setPen(textFillPen); p->drawText(pt, string, flags, run.padding()); + } } float Font::floatWidthForComplexText(const TextRun& run, HashSet<const SimpleFontData*>*) const 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/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp index 969e00a..02bf25e 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp @@ -1191,9 +1191,9 @@ public: transformMatrix.blend(m_sourceMatrix, progress); } + m_layer.data()->m_layer->setTransform(transformMatrix); + // We force the actual opacity change, otherwise it would be ignored because of the animation. m_layer.data()->setBaseTransform(transformMatrix); - if (m_fillsForwards) - m_layer.data()->m_layer->setTransform(m_layer.data()->m_baseTransform); } virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) @@ -1231,18 +1231,19 @@ public: if (m_fillsForwards) setCurrentTime(1); } + virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress) { qreal opacity = qBound(qreal(0), fromValue + (toValue-fromValue)*progress, qreal(1)); // FIXME: this is a hack, due to a probable QGraphicsScene bug. // Without this the opacity change doesn't always have immediate effect. - if (!m_layer.data()->opacity() && opacity) + if (m_layer.data()->scene() && !m_layer.data()->opacity() && opacity) m_layer.data()->scene()->update(); + m_layer.data()->m_layer->setOpacity(opacity); + // We force the actual opacity change, otherwise it would be ignored because of the animation. m_layer.data()->setOpacity(opacity); - if (m_fillsForwards) - m_layer.data()->m_layer->setOpacity(opacity); } virtual void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) 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/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro index 22d4c8d..389fb5f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro +++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro @@ -28,7 +28,7 @@ qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}define QT_QTWEBKIT_MOD qtheader_module.commands += echo $${QUOTE}$${LITERAL_HASH}include $${ESCAPE}<QtNetwork/QtNetwork$${ESCAPE}>$${QUOTE} >> $${qtheader_module.target} && WEBKIT_CLASS_HEADERS = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}PWD/QtWebKit -regex = ".*\\sclass\\sQWEBKIT_EXPORT\\s(\\w+)\\s(.*)" +regex = ".*\sclass\sQWEBKIT_EXPORT\s(\w+)\s(.*)" for(HEADER, WEBKIT_API_HEADERS) { # 1. Append to QtWebKit header that includes all other header files @@ -70,7 +70,7 @@ for(HEADER, WEBKIT_API_HEADERS) { res = $$find(src, $$regex) isEmpty(res):break() - exp = $$replace(src, $$regex, "EXPORTED_CLASS = \\1") + exp = $$replace(src, $$regex, "EXPORTED_CLASS = \1") eval($$exp) CLASS_TARGET = "qtheader_$${EXPORTED_CLASS}" @@ -87,7 +87,7 @@ for(HEADER, WEBKIT_API_HEADERS) { # Qt's QRegExp does not support inline non-greedy matching, # so we'll have to work around it by updating the haystack - src = $$replace(src, $$regex, "\\2") + src = $$replace(src, $$regex, "\2") src_words = $$join(src, $${LITERAL_WHITESPACE}) } } 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..b7182b4 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1294,6 +1294,9 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) { WebCore::Frame *frame = page->focusController()->focusedOrMainFrame(); WebCore::Editor *editor = frame->editor(); +#if QT_VERSION >= 0x040600 + QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant()); +#endif if (!editor->canEdit()) { ev->ignore(); @@ -1310,6 +1313,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) renderTextControl = toRenderTextControl(renderer); Vector<CompositionUnderline> underlines; + bool hasSelection = false; for (int i = 0; i < ev->attributes().size(); ++i) { const QInputMethodEvent::Attribute& a = ev->attributes().at(i); @@ -1333,10 +1337,8 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) } #if QT_VERSION >= 0x040600 case QInputMethodEvent::Selection: { - if (renderTextControl) { - renderTextControl->setSelectionStart(qMin(a.start, (a.start + a.length))); - renderTextControl->setSelectionEnd(qMax(a.start, (a.start + a.length))); - } + selection = a; + hasSelection = true; break; } #endif @@ -1345,10 +1347,25 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) if (!ev->commitString().isEmpty()) editor->confirmComposition(ev->commitString()); - else if (!ev->preeditString().isEmpty()) { + else { + // 1. empty preedit with a selection attribute, and start/end of 0 cancels composition + // 2. empty preedit with a selection attribute, and start/end of non-0 updates selection of current preedit text + // 3. populated preedit with a selection attribute, and start/end of 0 or non-0 updates selection of supplied preedit text + // 4. otherwise event is updating supplied pre-edit text QString preedit = ev->preeditString(); - editor->setComposition(preedit, underlines, preedit.length(), 0); +#if QT_VERSION >= 0x040600 + if (hasSelection) { + QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString(); + if (preedit.isEmpty() && selection.start + selection.length > 0) + preedit = text; + editor->setComposition(preedit, underlines, + (selection.length < 0) ? selection.start + selection.length : selection.start, + (selection.length < 0) ? selection.start : selection.start + selection.length); + } else +#endif + editor->setComposition(preedit, underlines, preedit.length(), 0); } + ev->accept(); } @@ -1518,7 +1535,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 +1567,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(); } @@ -3329,12 +3346,37 @@ QString QWebPage::userAgentForUrl(const QUrl&) const #elif defined Q_WS_X11 "X11" #elif defined Q_OS_SYMBIAN - "SymbianOS" + "Symbian" #else "Unknown" #endif ); +#if defined Q_OS_SYMBIAN + QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); + switch (symbianVersion) { + case QSysInfo::SV_9_2: + firstPartTemp += QString::fromLatin1("OS/9.2"); + break; + case QSysInfo::SV_9_3: + firstPartTemp += QString::fromLatin1("OS/9.3"); + break; + case QSysInfo::SV_9_4: + firstPartTemp += QString::fromLatin1("OS/9.4"); + break; + case QSysInfo::SV_SF_2: + firstPartTemp += QString::fromLatin1("/2"); + break; + case QSysInfo::SV_SF_3: + firstPartTemp += QString::fromLatin1("/3"); + break; + case QSysInfo::SV_SF_4: + firstPartTemp += QString::fromLatin1("/4"); + default: + break; + } +#endif + firstPartTemp += QString::fromLatin1("; "); // SSL support @@ -3458,51 +3500,22 @@ QString QWebPage::userAgentForUrl(const QUrl&) const firstPartTemp += QString::fromLatin1("Sun Solaris"); #elif defined Q_OS_ULTRIX firstPartTemp += QString::fromLatin1("DEC Ultrix"); -#elif defined Q_OS_SYMBIAN - firstPartTemp += QString::fromLatin1("SymbianOS"); - QSysInfo::SymbianVersion symbianVersion = QSysInfo::symbianVersion(); - switch (symbianVersion) { - case QSysInfo::SV_9_2: - firstPartTemp += QString::fromLatin1("/9.2"); - break; - case QSysInfo::SV_9_3: - firstPartTemp += QString::fromLatin1("/9.3"); - break; - case QSysInfo::SV_9_4: - firstPartTemp += QString::fromLatin1("/9.4"); - break; - case QSysInfo::SV_SF_2: - firstPartTemp += QString::fromLatin1("^2"); - break; - case QSysInfo::SV_SF_3: - firstPartTemp += QString::fromLatin1("^3"); - break; - case QSysInfo::SV_SF_4: - firstPartTemp += QString::fromLatin1("^4"); - break; - default: - firstPartTemp += QString::fromLatin1("/Unknown"); - } - -#if defined Q_WS_S60 +#elif defined Q_WS_S60 firstPartTemp += QLatin1Char(' '); - firstPartTemp += QString::fromLatin1("Series60"); QSysInfo::S60Version s60Version = QSysInfo::s60Version(); switch (s60Version) { case QSysInfo::SV_S60_3_1: - firstPartTemp += QString::fromLatin1("/3.1"); + firstPartTemp += QString::fromLatin1("Series60/3.1"); break; case QSysInfo::SV_S60_3_2: - firstPartTemp += QString::fromLatin1("/3.2"); + firstPartTemp += QString::fromLatin1("Series60/3.2"); break; case QSysInfo::SV_S60_5_0: - firstPartTemp += QString::fromLatin1("/5.0"); + firstPartTemp += QString::fromLatin1("Series60/5.0"); break; default: - firstPartTemp += QString::fromLatin1("/Unknown"); + break; } -#endif - #elif defined Q_OS_UNIX firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system"); #elif defined Q_OS_UNIXWARE @@ -3532,8 +3545,8 @@ QString QWebPage::userAgentForUrl(const QUrl&) const QString thirdPartTemp; thirdPartTemp.reserve(150); -#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) - thirdPartTemp + QLatin1String(" Mobile Safari/"); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + thirdPartTemp += QLatin1String(" Mobile Safari/"); #else thirdPartTemp += QLatin1String(" Safari/"); #endif 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..79c1ef3 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,176 @@ +2010-04-20 Robert Hogan <robert@webkit.org> + + Reviewed by Simon Hausmann. + + [Qt] Add more support for textInputController + + Add support for selectedRange(), setMarkedText(), insertText(), + and firstRectForCharacterRange(). + + https://bugs.webkit.org/show_bug.cgi?id=35702 + + * Api/qwebpage.cpp: + (QWebPagePrivate::inputMethodEvent): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): + +2010-05-20 Janne Koskinen <janne.p.koskinen@digia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] WINSCW compile fix for qwebframe test + https://bugs.webkit.org/show_bug.cgi?id=38722 + + WINSCW cannot determine template type up the hierarchy + to common base class. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-05-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Update the Symbian version for the user agent + https://bugs.webkit.org/show_bug.cgi?id=38389 + + Fixes a regression introduced by r58648. Ensure that the "Symbian" string + is only listed one time in the User Agent string. + + In addition make an effort to align the User Agent string to already + released WebKit based products for Symbian. + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): + +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/docs/docs.pri b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri index a56ddb4..804817b 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/docs.pri +++ b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri @@ -3,7 +3,7 @@ include(../../../WebKit.pri) unix { QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/bin/qdoc3 } else { - QDOC = $$(QTDIR)\\bin\\qdoc3.exe + QDOC = $$(QTDIR)\bin\qdoc3.exe } unix { 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..76fdba3 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); } @@ -780,7 +785,7 @@ void tst_QWebFrame::getSetStaticProperty() QCOMPARE(vm.size(), 3); QCOMPARE(vm.value("a").toInt(), 123); QCOMPARE(vm.value("b").toString(), QLatin1String("foo")); - QCOMPARE(vm.value("c").value<QObject*>(), m_myObject); + QCOMPARE(vm.value("c").value<QObject*>(), static_cast<QObject*>(m_myObject)); } QCOMPARE(evalJS("myObject.variantMapProperty.a === 123"), sTrue); QCOMPARE(evalJS("myObject.variantMapProperty.b === 'foo'"), sTrue); @@ -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..19c6bde 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -1450,11 +1450,16 @@ void tst_QWebPage::inputMethods() QString selectionValue = variant.value<QString>(); QCOMPARE(selectionValue, QString("eb")); - //Set selection with negative length - inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); + //Cancel current composition first + inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); QInputMethodEvent eventSelection2("",inputAttributes); page->event(&eventSelection2); + //Set selection with negative length + inputAttributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 6, -5, QVariant()); + QInputMethodEvent eventSelection3("",inputAttributes); + page->event(&eventSelection3); + //ImAnchorPosition variant = page->inputMethodQuery(Qt::ImAnchorPosition); anchorPosition = variant.toInt(); @@ -1492,6 +1497,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); |