diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/WebKit/qt | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/WebKit/qt')
-rw-r--r-- | Source/WebKit/qt/Api/qgraphicswebview.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 13 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebframe.cpp | 10 | ||||
-rw-r--r-- | Source/WebKit/qt/ChangeLog | 123 | ||||
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp | 8 | ||||
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp | 12 | ||||
-rw-r--r-- | Source/WebKit/qt/declarative/experimental/plugin.cpp | 18 | ||||
-rw-r--r-- | Source/WebKit/qt/declarative/public.pri | 6 | ||||
-rw-r--r-- | Source/WebKit/qt/declarative/qdeclarativewebview_p.h | 11 | ||||
-rw-r--r-- | Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp | 5 | ||||
-rw-r--r-- | Source/WebKit/qt/tests/tests.pri | 2 |
11 files changed, 158 insertions, 51 deletions
diff --git a/Source/WebKit/qt/Api/qgraphicswebview.cpp b/Source/WebKit/qt/Api/qgraphicswebview.cpp index 7811ab170..c1eb5293a 100644 --- a/Source/WebKit/qt/Api/qgraphicswebview.cpp +++ b/Source/WebKit/qt/Api/qgraphicswebview.cpp @@ -40,7 +40,6 @@ #include <qgraphicsview.h> #include <qscrollbar.h> #include <qstyleoption.h> -#include <qinputcontext.h> #include <QtCore/qmetaobject.h> #include <QtCore/qsharedpointer.h> #include <QtCore/qtimer.h> diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index 771ad56fb..178c70e5b 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -22,7 +22,6 @@ #include "qwebelement_p.h" #include "CSSComputedStyleDeclaration.h" -#include "CSSMutableStyleDeclaration.h" #include "CSSParser.h" #include "CSSRule.h" #include "CSSRuleList.h" @@ -33,6 +32,7 @@ #include "FrameView.h" #include "GraphicsContext.h" #include "HTMLElement.h" +#include "StylePropertySet.h" #if USE(JSC) #include "Completion.h" #include "JSGlobalObject.h" @@ -503,12 +503,11 @@ QStringList QWebElement::attributeNames(const QString& namespaceUri) const return QStringList(); QStringList attributeNameList; - const NamedNodeMap* const attrs = m_element->updatedAttributes(); - if (attrs) { + if (m_element->hasAttributes()) { const String namespaceUriString(namespaceUri); // convert QString -> String once - const unsigned attrsCount = attrs->length(); + const unsigned attrsCount = m_element->attributeCount(); for (unsigned i = 0; i < attrsCount; ++i) { - const Attribute* const attribute = attrs->attributeItem(i); + const Attribute* const attribute = m_element->attributeItem(i); if (namespaceUriString == attribute->namespaceURI()) attributeNameList.append(attribute->localName()); } @@ -844,7 +843,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str if (!propID) return QString(); - CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); + StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); if (strategy == InlineStyle) return style->getPropertyValue(propID); @@ -909,7 +908,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value) return; int propID = cssPropertyID(name); - CSSMutableStyleDeclaration* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); + StylePropertySet* style = static_cast<StyledElement*>(m_element)->ensureInlineStyleDecl(); if (!propID || !style) return; diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index c8e8dad5e..39b9d20d4 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -69,6 +69,7 @@ #include "PlatformWheelEvent.h" #include "PrintContext.h" #if USE(JSC) +#include "PropertyDescriptor.h" #include "PutPropertySlot.h" #endif #include "RenderLayer.h" @@ -336,7 +337,6 @@ void QWebFramePrivate::renderCompositedLayers(GraphicsContext* context, const In textureMapper->setGraphicsContext(context); textureMapper->setImageInterpolationQuality(context->imageInterpolationQuality()); textureMapper->setTextDrawingMode(context->textDrawingMode()); - textureMapper->setViewportSize(frame->view()->frameRect().size()); QPainter* painter = context->platformContext(); const QTransform transform = painter->worldTransform(); const TransformationMatrix matrix( @@ -518,8 +518,12 @@ void QWebFramePrivate::addQtSenderToGlobalObject() JSObjectRef function = JSObjectMakeFunctionWithCallback(context, propertyName.get(), qtSenderCallback); // JSC public API doesn't support setting a Getter for a property of a given object, https://bugs.webkit.org/show_bug.cgi?id=61374. - window->methodTable()->defineGetter(window, exec, propertyName.get()->identifier(&exec->globalData()), ::toJS(function), - JSC::ReadOnly | JSC::DontEnum | JSC::DontDelete); + JSC::PropertyDescriptor descriptor; + descriptor.setGetter(::toJS(function)); + descriptor.setSetter(JSC::jsUndefined()); + descriptor.setEnumerable(false); + descriptor.setConfigurable(false); + window->methodTable()->defineOwnProperty(window, exec, propertyName.get()->identifier(&exec->globalData()), descriptor, false); } #endif diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index 0b854f952..148a27369 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,126 @@ +2012-02-09 Simon Hausmann <simon.hausmann@nokia.com> + + [Qt] Fix compilation with newer Qt5 + https://bugs.webkit.org/show_bug.cgi?id=77653 + + Reviewed by Tor Arne Vestbø. + + * Api/qgraphicswebview.cpp: Removed unnecessary inclusion of removed header file. + * declarative/public.pri: Use quick1 instead of qtquick1. It's mandator with Qt 5. + * tests/tests.pri: Ditto. + * declarative/qdeclarativewebview_p.h: Fix includes, just use the module-less + version that works with all Qt versions. + * tests/qdeclarativewebview/tst_qdeclarativewebview.cpp: Ditto. + +2012-02-08 Leo Franchi <lfranchi@kde.org> + + Remote web inspector reentrancy fixes + https://bugs.webkit.org/show_bug.cgi?id=77022 + + Reviewed by Joseph Pecoraro. + + * WebCoreSupport/InspectorServerQt.cpp: + (WebCore::InspectorServerRequestHandlerQt::tcpReadyRead): + (WebCore::InspectorServerRequestHandlerQt::webSocketReadyRead): + +2012-02-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> + + Provide more attribute methods in Element + https://bugs.webkit.org/show_bug.cgi?id=77800 + + Reviewed by Ryosuke Niwa. + + * Api/qwebelement.cpp: + (QWebElement::attributeNames): access attributes via Element interface. + +2012-02-03 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + [Qt] Don't version QtWebKit.experimental. + https://bugs.webkit.org/show_bug.cgi?id=77739 + + Reviewed by Tor Arne Vestbø. + + We won't support previous versions of the experimental API. + + * declarative/experimental/plugin.cpp: + +2012-02-05 Gavin Barraclough <barraclough@apple.com> + + Remove JSObject defineGetter/defineSetter lookupGetter/lookupSetter + https://bugs.webkit.org/show_bug.cgi?id=77451 + + Reviewed by Sam Weinig. + + These can now all be implemented in terms of defineOwnProperty & getPropertyDescriptor. + Also remove initializeGetterSetterProperty, since this is equivalent to putDirectAccessor. + + * Api/qwebframe.cpp: + (QWebFramePrivate::addQtSenderToGlobalObject): + +2012-02-03 Antti Koivisto <antti@apple.com> + + Rename CSSMutableStyleDeclaration.h/.cpp to StylePropertySet.h/.cpp + https://bugs.webkit.org/show_bug.cgi?id=77779 + + Reviewed by Darin Adler. + + * Api/qwebelement.cpp: + +2012-02-03 Antti Koivisto <antti@apple.com> + + https://bugs.webkit.org/show_bug.cgi?id=77740 + Split CSSMutableStyleDeclaration into separate internal and CSSOM types + + Reviewed by Andreas Kling and Darin Adler. + + * Api/qwebelement.cpp: + (QWebElement::styleProperty): + +2012-02-03 No'am Rosenthal <noam.rosenthal@nokia.com> + + [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible. + https://bugs.webkit.org/show_bug.cgi?id=77148 + + Reviewed by Martin Robinson. + + Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly. + + * Api/qwebframe.cpp: + (QWebFramePrivate::renderCompositedLayers): + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQWidget::setRootGraphicsLayer): + (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer): + +2012-02-02 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r106620. + http://trac.webkit.org/changeset/106620 + https://bugs.webkit.org/show_bug.cgi?id=77716 + + It broke non ENABLE(3D_RENDERING) builds (Requested by + Ossy_morning on #webkit). + + * Api/qwebframe.cpp: + (QWebFramePrivate::renderCompositedLayers): + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQWidget::setRootGraphicsLayer): + (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer): + +2012-02-02 No'am Rosenthal <noam.rosenthal@nokia.com> + + [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible. + https://bugs.webkit.org/show_bug.cgi?id=77148 + + Reviewed by Martin Robinson. + + Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly. + + * Api/qwebframe.cpp: + (QWebFramePrivate::renderCompositedLayers): + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQWidget::setRootGraphicsLayer): + (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer): + 2012-02-01 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Avoid creating NamedNodeMap unnecessarily diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp index fdc14f533..26c52ff89 100644 --- a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp @@ -209,7 +209,7 @@ void InspectorServerRequestHandlerQt::tcpReadyRead() // switch to websocket-style WebSocketService messaging if (m_tcpConnection) { m_tcpConnection->disconnect(SIGNAL(readyRead())); - connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(webSocketReadyRead())); + connect(m_tcpConnection, SIGNAL(readyRead()), SLOT(webSocketReadyRead()), Qt::QueuedConnection); QByteArray key3 = m_tcpConnection->read(8); @@ -357,6 +357,10 @@ void InspectorServerRequestHandlerQt::webSocketReadyRead() QByteArray payload = m_data.mid(1, length); + // Remove this WebSocket message from m_data (payload, start-of-frame byte, end-of-frame byte). + // Truncate data before delivering message in case of re-entrancy. + m_data = m_data.mid(length + 2); + #if ENABLE(INSPECTOR) if (m_inspectorClient) { InspectorController* inspectorController = m_inspectorClient->m_inspectedWebPage->d->page->inspectorController(); @@ -364,8 +368,6 @@ void InspectorServerRequestHandlerQt::webSocketReadyRead() } #endif - // Remove this WebSocket message from m_data (payload, start-of-frame byte, end-of-frame byte). - m_data = m_data.mid(length + 2); } } diff --git a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp index 40e6b148d..45dcfbbe1 100644 --- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp @@ -28,12 +28,8 @@ #endif #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) -#include "TextureMapperQt.h" +#include "TextureMapper.h" #include "texmap/TextureMapperNode.h" - -#if USE(TEXTURE_MAPPER_GL) -#include "opengl/TextureMapperGL.h" -#endif #endif namespace WebCore { @@ -76,7 +72,7 @@ void PageClientQWidget::setRootGraphicsLayer(GraphicsLayer* layer) { if (layer) { textureMapperNodeClient = adoptPtr(new TextureMapperNodeClientQt(page->mainFrame(), layer)); - textureMapperNodeClient->setTextureMapper(adoptPtr(new TextureMapperQt)); + textureMapperNodeClient->setTextureMapper(TextureMapper::create()); textureMapperNodeClient->syncRootLayer(); return; } @@ -267,11 +263,11 @@ void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer) #if USE(TEXTURE_MAPPER_GL) QGraphicsView* graphicsView = view->scene()->views()[0]; if (graphicsView && graphicsView->viewport() && graphicsView->viewport()->inherits("QGLWidget")) { - textureMapperNodeClient->setTextureMapper(TextureMapperGL::create()); + textureMapperNodeClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode)); return; } #endif - textureMapperNodeClient->setTextureMapper(TextureMapperQt::create()); + textureMapperNodeClient->setTextureMapper(TextureMapper::create()); return; } textureMapperNodeClient.clear(); diff --git a/Source/WebKit/qt/declarative/experimental/plugin.cpp b/Source/WebKit/qt/declarative/experimental/plugin.cpp index cab0fba09..7a41657ac 100644 --- a/Source/WebKit/qt/declarative/experimental/plugin.cpp +++ b/Source/WebKit/qt/declarative/experimental/plugin.cpp @@ -48,18 +48,18 @@ public: { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit.experimental")); - qmlRegisterUncreatableType<QWebDownloadItem>(uri, 3, 0, "DownloadItem", QObject::tr("Cannot create separate instance of DownloadItem")); - qmlRegisterUncreatableType<QWebNavigationListModel>(uri, 3, 0, "NavigationListModel", QObject::tr("Cannot create separate instance of NavigationListModel")); - qmlRegisterUncreatableType<QWebNavigationHistory>(uri, 3, 0, "NavigationHistory", QObject::tr("Cannot create separate instance of NavigationHistory")); - qmlRegisterExtendedType<QQuickWebView, QQuickWebViewExperimentalExtension>(uri, 3, 0, "WebView"); - qmlRegisterUncreatableType<QQuickWebViewExperimental>(uri, 3, 0, "WebViewExperimental", + qmlRegisterUncreatableType<QWebDownloadItem>(uri, 1, 0, "DownloadItem", QObject::tr("Cannot create separate instance of DownloadItem")); + qmlRegisterUncreatableType<QWebNavigationListModel>(uri, 1, 0, "NavigationListModel", QObject::tr("Cannot create separate instance of NavigationListModel")); + qmlRegisterUncreatableType<QWebNavigationHistory>(uri, 1, 0, "NavigationHistory", QObject::tr("Cannot create separate instance of NavigationHistory")); + qmlRegisterExtendedType<QQuickWebView, QQuickWebViewExperimentalExtension>(uri, 1, 0, "WebView"); + qmlRegisterUncreatableType<QQuickWebViewExperimental>(uri, 1, 0, "WebViewExperimental", QObject::tr("Cannot create separate instance of WebViewExperimental")); - qmlRegisterUncreatableType<QWebViewportInfo>(uri, 3, 0, "QWebViewportInfo", + qmlRegisterUncreatableType<QWebViewportInfo>(uri, 1, 0, "QWebViewportInfo", QObject::tr("Cannot create separate instance of QWebViewportInfo")); - qmlRegisterType<QQuickUrlSchemeDelegate>(uri, 3, 0, "UrlSchemeDelegate"); - qmlRegisterUncreatableType<QQuickNetworkRequest>(uri, 3, 0, "NetworkRequest", + qmlRegisterType<QQuickUrlSchemeDelegate>(uri, 1, 0, "UrlSchemeDelegate"); + qmlRegisterUncreatableType<QQuickNetworkRequest>(uri, 1, 0, "NetworkRequest", QObject::tr("NetworkRequest should not be created from QML")); - qmlRegisterUncreatableType<QQuickNetworkReply>(uri, 3, 0, "NetworkReply", + qmlRegisterUncreatableType<QQuickNetworkReply>(uri, 1, 0, "NetworkReply", QObject::tr("NetworkReply should not be created from QML")); } }; diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri index 667d944e2..a6665eda6 100644 --- a/Source/WebKit/qt/declarative/public.pri +++ b/Source/WebKit/qt/declarative/public.pri @@ -27,11 +27,7 @@ wince*:LIBS += $$QMAKE_LIBS_GUI CONFIG += qtwebkit qtwebkit-private QT += declarative -haveQt(5): QT += widgets quick - -contains(QT_CONFIG, qtquick1): { - QT += qtquick1 -} +haveQt(5): QT += widgets quick quick1 DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name} diff --git a/Source/WebKit/qt/declarative/qdeclarativewebview_p.h b/Source/WebKit/qt/declarative/qdeclarativewebview_p.h index 83463db97..088f23bc8 100644 --- a/Source/WebKit/qt/declarative/qdeclarativewebview_p.h +++ b/Source/WebKit/qt/declarative/qdeclarativewebview_p.h @@ -21,17 +21,10 @@ #ifndef qdeclarativewebview_p_h #define qdeclarativewebview_p_h +#include <QAction> +#include <QDeclarativeItem> #include <QtCore/QBasicTimer> #include <QtCore/QUrl> - -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) -#include <QtQuick1/QDeclarativeItem> -#include <QtWidgets/QAction> -#else -#include <QtDeclarative/QDeclarativeItem> -#include <QtGui/QAction> -#endif - #include <QtNetwork/QNetworkAccessManager> #include "qgraphicswebview.h" #include "qwebpage.h" diff --git a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp index b38db1daf..1f9a2ff84 100644 --- a/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp +++ b/Source/WebKit/qt/tests/qdeclarativewebview/tst_qdeclarativewebview.cpp @@ -2,13 +2,8 @@ #include <QAction> #include <QColor> #include <QDebug> -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) -#include <QtQuick1/QDeclarativeItem> -#include <QtQuick1/QDeclarativeView> -#else #include <QDeclarativeItem> #include <QDeclarativeView> -#endif #include <QDeclarativeComponent> #include <QDeclarativeEngine> #include <QDeclarativeProperty> diff --git a/Source/WebKit/qt/tests/tests.pri b/Source/WebKit/qt/tests/tests.pri index 2a08136b1..c4a5818f9 100644 --- a/Source/WebKit/qt/tests/tests.pri +++ b/Source/WebKit/qt/tests/tests.pri @@ -22,7 +22,7 @@ haveQt(5): QT += widgets CONFIG += qtwebkit haveQt(5) { - contains(QT_CONFIG, qtquick1): QT += declarative qtquick1 + QT += declarative quick1 } else { contains(QT_CONFIG, declarative): QT += declarative } |