summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-20 15:03:14 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-20 15:09:14 (GMT)
commitd7072b5577e3c07e984885cf05d5f9b217c6f473 (patch)
treed40cc0c71e15d482feb411b169a986c6940308f6 /doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp
parent68d6a91fd2db9ec95d9f46e7af10eff7da89f8f0 (diff)
downloadQt-d7072b5577e3c07e984885cf05d5f9b217c6f473.zip
Qt-d7072b5577e3c07e984885cf05d5f9b217c6f473.tar.gz
Qt-d7072b5577e3c07e984885cf05d5f9b217c6f473.tar.bz2
Fix tabbar issues with Oxygen style
Oxygen style was looking a bit broken when using 4.5 features such as close buttons and icons. This was because it re-implements the tabbartablabel primitive we needed to ensure spacing for the buttons. We had to modify the way we draw tabs slightly to make it more backward compatible so that oxygen get the same region as before and we ensure space for it in the CE_TabBarTab case instead. Note that the drawback to this approach is that the focus rect needs to be moved out of the tablabel and into the CE_TabBarTab case so it covers the entire tab which can potentially cause problems if people depend on the label to draw the focus rect. However the new case is also more consistent with how buttons draw their focus. Task-number: 251635 Reviewed-by: nrc
Diffstat (limited to 'doc/src/snippets/code/tools_shared_qtpropertybrowser_qtpropertybrowser.cpp')
0 files changed, 0 insertions, 0 deletions
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 - 460b651cbe4f6994b492ff08614e57b0e31a24c8 + 715b53069911a31a559aa0b3d94ffc6a5ac20988 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 98d4d51..2d20cbd 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,105 @@ +2010-09-09 Kristian Amlie + + Reviewed by Andreas Kling. + + [Qt] Fixed incorrect Symbian scoping. + + The missing install functionality is only true for mmp based systems. + + https://bugs.webkit.org/show_bug.cgi?id=45268 + + * WebCore.pro: + +2010-09-12 Oswald Buddenhagen + + Reviewed by Simon Hausmann. + + [Qt] fix qt_webkit_version.pri install for in-Qt builds + + Always add the target, even if building inside Qt - as opposed to the + headers and libraries, there are no rules for that coming from + qbase.pri. + + Task-number: QTBUG-13306 + + * WebCore.pro: + +2010-09-12 Oswald Buddenhagen + + Reviewed by Simon Hausmann. + + [Qt] Let QtWebKit inject itself into the qt configuration + + i.e., don't explicitly deal with qt_webkit_version.pri outside of the + webkit source directory. + + Task-number: QTBUG-12379 + + * WebCore.pro: + +2010-08-20 Girish Ramakrishnan + + Reviewed by Ariya Hidayat. + + [Qt] When using the raster graphics system on Maemo5, allow + Flash to render directly into the raster window surface. + wmode=transparent is now supported as a result of this change. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::paintUsingImageSurfaceExtension): + +2010-08-18 Girish Ramakrishnan + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Implement Maemo5 local rendering NPAPI extension. See + https://wiki.mozilla.org/Plugins:NokiaMaemoImageSurface for details. + + With the local rendering extension, Flash will paint into a 16-bit surface. + For wmode=transparent, Flash expects the surface to contain the contents + beneath it. As it is tricky to implement the content propagation across all + graphics systems, transparent Flash is not supported. We just fill the surface + with white and wmode=transparent behaves the same as wmode=opaque with a white + background. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCore.pro: + * plugins/PluginView.cpp: + (WebCore::PluginView::setValue): + (WebCore::PluginView::PluginView): + * plugins/PluginView.h: + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::updatePluginWidget): + (WebCore::PluginView::paintUsingImageSurfaceExtension): + (WebCore::PluginView::paint): + (WebCore::PluginView::platformGetValueStatic): + +2010-08-17 Girish Ramakrishnan + + Reviewed by Antonio Gomes. + + [Qt] On Maemo5, there is no libgdk-x11-2.0.so symlink. Look for + libgdk-x11-2.0.so.0 instead on X11 and Maemo5. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/qt/PluginViewQt.cpp: + (WebCore::getPluginDisplay): + +2010-08-17 Girish Ramakrishnan + + Reviewed by Kenneth Rohde Christiansen. + Set PluginQuirkRequiresDefaultScreenDepth for all Flash versions and not + just Flash 10. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/PluginPackage.cpp: + (WebCore::PluginPackage::determineQuirks): + 2010-08-10 Tor Arne Vestbø Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 5ea1e77..87638a0 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2192,6 +2192,9 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) { CONFIG += x11 LIBS += -lXrender } + maemo5 { + DEFINES += MOZ_PLATFORM_MAEMO=5 + } SOURCES += \ plugins/qt/PluginContainerQt.cpp \ plugins/qt/PluginPackageQt.cpp \ @@ -2857,13 +2860,13 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { } } -!symbian-abld:!symbian-sbsv2 { +!symbian { modfile.files = $$moduleFile modfile.path = $$[QMAKE_MKSPECS]/modules INSTALLS += modfile } else { - # INSTALLS is not implemented in qmake's mmp generators, copy headers manually + # INSTALLS is not implemented in qmake's s60 generators, copy headers manually inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_modfile.input = moduleFile @@ -2883,7 +2886,7 @@ HEADERS += $$WEBKIT_API_HEADERS exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS - !symbian { + !symbian-abld:!symbian-sbsv2 { headers.files = $$WEBKIT_INSTALL_HEADERS !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit @@ -2894,7 +2897,7 @@ HEADERS += $$WEBKIT_API_HEADERS INSTALLS += target headers } else { - # INSTALLS is not implemented in qmake's s60 generators, copy headers manually + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_headers.input = WEBKIT_INSTALL_HEADERS inst_headers.CONFIG = no_clean diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 533fcba..daa3a36 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -247,6 +247,12 @@ typedef struct _NPRect } NPRect; +typedef struct _NPSize +{ + int32 width; + int32 height; +} NPSize; + #ifdef XP_UNIX /* * Unix specific structures and definitions @@ -373,6 +379,11 @@ typedef enum { /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */ NPPVpluginCoreAnimationLayer = 1003 #endif + + +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + NPPVpluginWindowlessLocalBool = 2002 +#endif } NPPVariable; /* @@ -419,6 +430,9 @@ typedef enum { , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ #endif /* XP_MACOSX */ +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + , NPNVSupportsWindowlessLocal = 2002 +#endif } NPNVariable; typedef enum { @@ -539,6 +553,23 @@ typedef struct _NPWindow } NPWindow; +typedef struct _NPImageExpose +{ + char* data; /* image pointer */ + int32 stride; /* Stride of data image pointer */ + int32 depth; /* Depth of image pointer */ + int32 x; /* Expose x */ + int32 y; /* Expose y */ + uint32 width; /* Expose width */ + uint32 height; /* Expose height */ + NPSize dataSize; /* Data buffer size */ + float translateX; /* translate X matrix value */ + float translateY; /* translate Y matrix value */ + float scaleX; /* scale X matrix value */ + float scaleY; /* scale Y matrix value */ +} NPImageExpose; + + typedef struct _NPFullPrint { NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */ diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp index ad03ecd..3881f54 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp @@ -185,12 +185,12 @@ void PluginPackage::determineQuirks(const String& mimeType) #if PLATFORM(QT) m_quirks.add(PluginQuirkRequiresGtkToolKit); #endif - m_quirks.add(PluginQuirkRequiresDefaultScreenDepth); } else { // Flash 9 and older requests windowless plugins if we return a mozilla user agent m_quirks.add(PluginQuirkWantsMozillaUserAgent); } + m_quirks.add(PluginQuirkRequiresDefaultScreenDepth); m_quirks.add(PluginQuirkThrottleInvalidate); m_quirks.add(PluginQuirkThrottleWMUserPlusOneMessages); m_quirks.add(PluginQuirkFlashURLNotifyBug); diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp index df9a29b..b8b2f2f 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. + * Copyright (C) 2010 Girish Ramakrishnan * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -679,6 +680,12 @@ NPError PluginView::setValue(NPPVariable variable, void* value) } #endif // defined(XP_MACOSX) +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + case NPPVpluginWindowlessLocalBool: + m_renderToImage = true; + return NPERR_NO_ERROR; +#endif + default: notImplemented(); return NPERR_GENERIC_ERROR; @@ -852,6 +859,9 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p , m_colormap(0) , m_pluginDisplay(0) #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + , m_renderToImage(false) +#endif , m_loadManually(loadManually) , m_manualStream(0) , m_isJavaScriptPaused(false) diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.h b/src/3rdparty/webkit/WebCore/plugins/PluginView.h index 51b2127..f346134 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.h @@ -54,6 +54,10 @@ typedef PlatformWidget PlatformPluginWidget; #include #endif #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +#include +class QPainter; +#endif namespace JSC { namespace Bindings { @@ -371,6 +375,12 @@ private: void initXEvent(XEvent* event); #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + QImage m_image; + bool m_renderToImage; + void paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect); +#endif + IntRect m_clipRect; // The clip rect to apply to a windowed plug-in IntRect m_windowRect; // Our window rect. diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp index fb88b87..8dadc11 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp @@ -110,12 +110,20 @@ void PluginView::updatePluginWidget() return; if (!m_isWindowed && m_windowRect.size() != oldWindowRect.size()) { - if (m_drawable) - XFreePixmap(QX11Info::display(), m_drawable); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + // On Maemo5, Flash always renders to 16-bit buffer + if (m_renderToImage) + m_image = QImage(m_windowRect.width(), m_windowRect.height(), QImage::Format_RGB16); + else +#endif + { + if (m_drawable) + XFreePixmap(QX11Info::display(), m_drawable); - m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(), - ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth); - QApplication::syncX(); // make sure that the server knows about the Drawable + m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(), + ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth); + QApplication::syncX(); // make sure that the server knows about the Drawable + } } // do not call setNPWindowIfNeeded immediately, will be called on paint() @@ -154,6 +162,71 @@ void PluginView::hide() Widget::hide(); } +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +void PluginView::paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect) +{ + NPImageExpose imageExpose; + QPoint offset; + QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient(); + const bool surfaceHasUntransformedContents = client && qobject_cast(client->pluginParent()); + + QPaintDevice* surface = QPainter::redirected(painter->device(), &offset); + + // If the surface is a QImage, we can render directly into it + if (surfaceHasUntransformedContents && surface && surface->devType() == QInternal::Image) { + QImage* image = static_cast(surface); + offset = -offset; // negating the offset gives us the offset of the view within the surface + imageExpose.data = reinterpret_cast(image->bits()); + imageExpose.dataSize.width = image->width(); + imageExpose.dataSize.height = image->height(); + imageExpose.stride = image->bytesPerLine(); + imageExpose.depth = image->depth(); // this is guaranteed to be 16 on Maemo5 + imageExpose.translateX = offset.x() + m_windowRect.x(); + imageExpose.translateY = offset.y() + m_windowRect.y(); + imageExpose.scaleX = 1; + imageExpose.scaleY = 1; + } else { + if (m_isTransparent) { + // On Maemo5, Flash expects the buffer to contain the contents that are below it. + // We don't support transparency for non-raster graphicssystem, so clean the image + // before giving to Flash. + QPainter imagePainter(&m_image); + imagePainter.fillRect(exposedRect, Qt::white); + } + + imageExpose.data = reinterpret_cast(m_image.bits()); + imageExpose.dataSize.width = m_image.width(); + imageExpose.dataSize.height = m_image.height(); + imageExpose.stride = m_image.bytesPerLine(); + imageExpose.depth = m_image.depth(); + imageExpose.translateX = 0; + imageExpose.translateY = 0; + imageExpose.scaleX = 1; + imageExpose.scaleY = 1; + } + imageExpose.x = exposedRect.x(); + imageExpose.y = exposedRect.y(); + imageExpose.width = exposedRect.width(); + imageExpose.height = exposedRect.height(); + + XEvent xevent; + memset(&xevent, 0, sizeof(XEvent)); + XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose; + exposeEvent.type = GraphicsExpose; + exposeEvent.display = 0; + exposeEvent.drawable = reinterpret_cast(&imageExpose); + exposeEvent.x = exposedRect.x(); + exposeEvent.y = exposedRect.y(); + exposeEvent.width = exposedRect.width(); + exposeEvent.height = exposedRect.height(); + + dispatchNPEvent(xevent); + + if (!surfaceHasUntransformedContents || !surface || surface->devType() != QInternal::Image) + painter->drawImage(QPoint(frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y()), m_image, exposedRect); +} +#endif + void PluginView::paint(GraphicsContext* context, const IntRect& rect) { if (!m_isStarted) { @@ -166,19 +239,32 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) setNPWindowIfNeeded(); - if (m_isWindowed || !m_drawable) + if (m_isWindowed) return; - const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display(); + if (!m_drawable +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + && m_image.isNull() +#endif + ) + return; QPainter* painter = context->platformContext(); IntRect exposedRect(rect); exposedRect.intersect(frameRect()); exposedRect.move(-frameRect().x(), -frameRect().y()); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + if (!m_image.isNull()) { + paintUsingImageSurfaceExtension(painter, exposedRect); + return; + } +#endif + QPixmap qtDrawable = QPixmap::fromX11Pixmap(m_drawable, QPixmap::ExplicitlyShared); const int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth; ASSERT(drawableDepth == qtDrawable.depth()); + const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display(); // When printing, Qt uses a QPicture to capture the output in preview mode. The // QPicture holds a reference to the X Pixmap. As a result, the print preview would @@ -576,6 +662,13 @@ bool PluginView::platformGetValueStatic(NPNVariable variable, void* value, NPErr *result = NPERR_NO_ERROR; return true; +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + case NPNVSupportsWindowlessLocal: + *static_cast(value) = true; + *result = NPERR_NO_ERROR; + return true; +#endif + default: return false; } @@ -651,7 +744,7 @@ static Display *getPluginDisplay() // support gdk based plugins (like flash) that use a different X connection. // The code below has the same effect as this one: // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); - QLibrary library("libgdk-x11-2.0"); + QLibrary library("libgdk-x11-2.0.so.0"); if (!library.load()) return 0; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h index 665bf1b..63d9e55 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h @@ -22,9 +22,9 @@ #include -#define QTWEBKIT_VERSION_STR "2.0.0" +#define QTWEBKIT_VERSION_STR "2.0.1" // QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt. -#define QTWEBKIT_VERSION 0x020000 +#define QTWEBKIT_VERSION 0x020001 // Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt. #define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 5083ba5..c6c3d72 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,80 @@ +2010-09-12 Martin Smith + + Reviewed by Simon Hausmann. + + doc: Changed the title so lists of contents sort better. + + * docs/qtwebkit.qdoc: + +2010-09-12 David Boddie + + Reviewed by Simon Hausmann. + + Doc: More work on the QML documentation. + + * declarative/qdeclarativewebview.cpp: + +2010-09-12 Martin Jones + + Reviewed by Simon Hausmann. + + [Qml] Ensure WebView gets focus when an editable node is clicked on. + + Task-number: QTBUG-13342 + + * declarative/qdeclarativewebview.cpp: + (GraphicsWebView::mousePressEvent): + +2010-09-12 David Boddie + + Reviewed by Simon Hausmann. + + Doc: qdoc fixes. + + * declarative/qdeclarativewebview.cpp: + +2010-09-12 Oswald Buddenhagen + + Reviewed by Simon Hausmann. + + [Qt] let WebKit inject itself into the qt configuration + + Task-number: QTBUG-12379 + + * qt_webkit_version.pri: Use the faster + instead of * + operator to add webkit to the config. + +2010-09-12 Martin Smith + + Reviewed by Simon Hausmann. + + [Qt] Fix group of declarative web view in QML docs. + + * declarative/qdeclarativewebview.cpp: + +2010-08-20 Girish Ramakrishnan + + Reviewed by Ariya Hidayat. + + [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + +2010-08-19 Girish Ramakrishnan + + Reviewed by Kenneth Christiansen. + + [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5 + as Flash XEmbed support is flaky. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + 2010-08-05 David Leong Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 713fa39..dcbf614 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2008 Collabora Ltd. All rights reserved. * Coypright (C) 2008 Holger Hans Peter Freyther - * Coypright (C) 2009 Girish Ramakrishnan + * Coypright (C) 2009, 2010 Girish Ramakrishnan * * All rights reserved. * @@ -1349,7 +1349,19 @@ PassRefPtr FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, Vector values = paramValues; if (mimeType == "application/x-shockwave-flash") { QWebPageClient* client = m_webFrame->page()->d->client; - if (!client || !qobject_cast(client->pluginParent())) { + const bool isQWebView = client && qobject_cast(client->pluginParent()); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + size_t wmodeIndex = params.find("wmode"); + if (wmodeIndex == -1) { + // Disable XEmbed mode and force it to opaque mode + params.append("wmode"); + values.append("opaque"); + } else if (!isQWebView) { + // Disable transparency if client is not a QWebView + values[wmodeIndex] = "opaque"; + } +#else + if (!isQWebView) { // inject wmode=opaque when there is no client or the client is not a QWebView size_t wmodeIndex = params.find("wmode"); if (wmodeIndex == -1) { @@ -1358,6 +1370,7 @@ PassRefPtr FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, } else values[wmodeIndex] = "opaque"; } +#endif } RefPtr pluginView = PluginView::create(m_frame, pluginSize, element, url, diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri index 4594d1e..f2282f8 100644 --- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri +++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri @@ -1,5 +1,5 @@ -QT_WEBKIT_VERSION = 4.7.0 +QT_WEBKIT_VERSION = 4.7.1 QT_WEBKIT_MAJOR_VERSION = 4 QT_WEBKIT_MINOR_VERSION = 7 -QT_WEBKIT_PATCH_VERSION = 0 +QT_WEBKIT_PATCH_VERSION = 1 QT_CONFIG += webkit -- cgit v0.12 From b04672e479ae245063e641c77d43e311c0851dc0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 13 Sep 2010 09:32:42 +1000 Subject: Fix slot naming clash Reviewed-by: David Boddie --- src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp | 4 ++-- src/imports/folderlistmodel/qdeclarativefolderlistmodel.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 4983840..abab33c 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -167,7 +167,7 @@ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int)) , this, SLOT(removed(const QModelIndex&,int,int))); connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)) - , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&))); + , this, SLOT(handleDataChanged(const QModelIndex&,const QModelIndex&))); connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh())); connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh())); } @@ -363,7 +363,7 @@ void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, i } } -void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end) +void QDeclarativeFolderListModel::handleDataChanged(const QModelIndex &start, const QModelIndex &end) { if (start.parent() == d->folderIndex) emit dataChanged(index(start.row(),0), index(end.row(),0)); diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h index 1bab5f84..24edecd 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h @@ -138,7 +138,7 @@ private Q_SLOTS: void refresh(); void inserted(const QModelIndex &index, int start, int end); void removed(const QModelIndex &index, int start, int end); - void dataChanged(const QModelIndex &start, const QModelIndex &end); + void handleDataChanged(const QModelIndex &start, const QModelIndex &end); private: Q_DISABLE_COPY(QDeclarativeFolderListModel) -- cgit v0.12 From a39285f6f5c3355d48810851a7215b951f1aaa4c Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 13 Sep 2010 09:44:06 +1000 Subject: Fix compilation of QEgl with EGL 1.1 and older. Reviewed-by: Sarah Smith --- src/gui/egl/qegl.cpp | 2 +- src/gui/egl/qegl_p.h | 4 ++++ src/gui/egl/qeglproperties.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 605b1e6..af3b79a 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -259,7 +259,7 @@ EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options) // Add paint engine requirements if (api == OpenVG) { -#ifndef QVG_SCISSOR_CLIP +#if !defined(QVG_SCISSOR_CLIP) && defined(EGL_ALPHA_MASK_SIZE) configAttribs.setValue(EGL_ALPHA_MASK_SIZE, 1); #endif } else { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index c214e88..aa08934 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -65,6 +65,10 @@ QT_BEGIN_INCLUDE_NAMESPACE #else # include #endif +#if !defined(EGL_VERSION_1_2) +typedef unsigned int EGLenum; +typedef void *EGLClientBuffer; +#endif #else //types from egltypes.h for compiling stub without EGL headers diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 3638de5..eeae06d 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -241,8 +241,10 @@ void QEglProperties::setRenderableType(QEgl::API api) // reductions in complexity are possible. bool QEglProperties::reduceConfiguration() { +#ifdef EGL_SWAP_BEHAVIOR if (value(EGL_SWAP_BEHAVIOR) != EGL_DONT_CARE) removeValue(EGL_SWAP_BEHAVIOR); +#endif #ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT // For OpenVG, we sometimes try to create a surface using a pre-multiplied format. If we can't -- cgit v0.12 From 90c8a68eef4a87209279f4c528c540efe6525384 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 13 Sep 2010 10:54:25 +1000 Subject: Ensure flickable velocity is updated when view is moved by setCurrentIndex Task-number: QTBUG-13543 --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 6 +++--- src/declarative/graphicsitems/qdeclarativeflickable_p_p.h | 1 + src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 ++ src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 062bbfb..c0b664f 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -128,8 +128,8 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate() , flickingHorizontally(false), flickingVertically(false) , hMoved(false), vMoved(false) , movingHorizontally(false), movingVertically(false) - , stealMouse(false), pressed(false) - , interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100) + , stealMouse(false), pressed(false), interactive(true), calcVelocity(false) + , deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100) , delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600) , vTime(0), visibleArea(0) , flickableDirection(QDeclarativeFlickable::AutoFlickDirection) @@ -981,7 +981,7 @@ void QDeclarativeFlickable::viewportMoved() qreal prevY = d->lastFlickablePosition.x(); qreal prevX = d->lastFlickablePosition.y(); d->velocityTimeline.clear(); - if (d->pressed) { + if (d->pressed || d->calcVelocity) { int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime); if (elapsed > 0) { qreal horizontalVelocity = (prevX - d->hData.move.value()) * 1000 / elapsed; diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index c398faa..2da034c 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -141,6 +141,7 @@ public: bool stealMouse : 1; bool pressed : 1; bool interactive : 1; + bool calcVelocity : 1; QElapsedTimer lastPosTime; QPointF lastPos; QPointF pressPos; diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index a0faf14..6a99733 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2241,7 +2241,9 @@ void QDeclarativeGridView::trackedPositionChanged() } if (viewPos != pos) { cancelFlick(); + d->calcVelocity = true; d->setPosition(pos); + d->calcVelocity = false; } } } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 177c5b3..ae504aa 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2732,7 +2732,9 @@ void QDeclarativeListView::trackedPositionChanged() } if (viewPos !=