diff options
author | Ben Murdoch <benm@google.com> | 2010-08-13 05:20:16 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-08-13 05:20:16 -0700 |
commit | f4958a7d95cd5fbc1c74905e229b02c95cd5ee78 (patch) | |
tree | 14a0f1b07a19948c2ed93d0d8547caa7fe10aa0e /WebKit/qt/Api | |
parent | d074a7997da8ce379434eb6e208b97cde8a0841c (diff) | |
parent | f964bc1fd59a545a80a0cc2529ad8830be514871 (diff) | |
download | external_webkit-f4958a7d95cd5fbc1c74905e229b02c95cd5ee78.zip external_webkit-f4958a7d95cd5fbc1c74905e229b02c95cd5ee78.tar.gz external_webkit-f4958a7d95cd5fbc1c74905e229b02c95cd5ee78.tar.bz2 |
Merge changes I60a96064,I6929172f,Idefd9bec,I8cf448f2,I8791737a,I992c56b0,Ibb4b089d,I779a8ec0,Ife412e30,I2da1ae98,Ibcf41849
* changes:
Merge WebKit at r65072 : Update WebKit revision number.
Merge WebKit at r65072 : Update test_expectations.
Merge WebKit at r65072 : Complete cherry-pick of WebKit change 43848 to add EmptyDeviceMotionClient
Merge WebKit at r65072 : Implement DeviceMotionClientAndroid
Merge WebKit at r65072: JSC build fix in InspectorController.h
Merge WebKit at r65072: Fix V8 code generator.
Merge WebKit at r65072 : Build fix for JSC, update ambiguous usage of JSLock.
Merge WebKit at r65072: String class has moved to the WTF namespace.
Merge Webkit at r65072 : Fix conflicts.
Merge Webkit at r65072 : Fix Makefiles.
Merge WebKit at r65072 : Initial merge by git.
Diffstat (limited to 'WebKit/qt/Api')
-rw-r--r-- | WebKit/qt/Api/qgraphicswebview.cpp | 4 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebdatabase_p.h | 2 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebframe.cpp | 18 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebframe_p.h | 6 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebkitplatformplugin.h | 20 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebpage.cpp | 12 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebpage.h | 2 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebview.cpp | 2 |
8 files changed, 45 insertions, 21 deletions
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index 53c1494..47ab82a 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -241,7 +241,7 @@ QGraphicsWebView::QGraphicsWebView(QGraphicsItem* parent) : QGraphicsWidget(parent) , d(new QGraphicsWebViewPrivate(this)) { -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); #endif setAcceptDrops(true); @@ -417,7 +417,7 @@ void QGraphicsWebViewPrivate::detachCurrentPage() if (!page) return; -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) page->d->view.clear(); #else page->d->view = 0; diff --git a/WebKit/qt/Api/qwebdatabase_p.h b/WebKit/qt/Api/qwebdatabase_p.h index 9ae8fc8..ec03ea5 100644 --- a/WebKit/qt/Api/qwebdatabase_p.h +++ b/WebKit/qt/Api/qwebdatabase_p.h @@ -29,7 +29,7 @@ class QWebDatabasePrivate : public QSharedData { public: - WebCore::String name; + WTF::String name; WTF::RefPtr<WebCore::SecurityOrigin> origin; }; diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index e90367e..0bb6922 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -36,6 +36,7 @@ #include "GraphicsContext.h" #include "HTMLMetaElement.h" #include "HitTestResult.h" +#include "HTTPParsers.h" #include "IconDatabase.h" #include "InspectorController.h" #include "JSDOMBinding.h" @@ -178,7 +179,7 @@ void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int d QWebFrameData::QWebFrameData(WebCore::Page* parentPage, WebCore::Frame* parentFrame, WebCore::HTMLFrameOwnerElement* ownerFrameElement, - const WebCore::String& frameName) + const WTF::String& frameName) : name(frameName) , ownerElement(ownerFrameElement) , page(parentPage) @@ -753,7 +754,7 @@ void QWebFrame::load(const QNetworkRequest &req, case QNetworkAccessManager::PostOperation: request.setHTTPMethod("POST"); break; -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case QNetworkAccessManager::DeleteOperation: request.setHTTPMethod("DELETE"); break; @@ -808,7 +809,7 @@ void QWebFrame::setHtml(const QString &html, const QUrl &baseUrl) WebCore::ResourceRequest request(kurl); const QByteArray utf8 = html.toUtf8(); WTF::RefPtr<WebCore::SharedBuffer> data = WebCore::SharedBuffer::create(utf8.constData(), utf8.length()); - WebCore::SubstituteData substituteData(data, WebCore::String("text/html"), WebCore::String("utf-8"), KURL()); + WebCore::SubstituteData substituteData(data, WTF::String("text/html"), WTF::String("utf-8"), KURL()); d->frame->loader()->load(request, substituteData, false); } @@ -830,10 +831,15 @@ void QWebFrame::setContent(const QByteArray &data, const QString &mimeType, cons KURL kurl(baseUrl); WebCore::ResourceRequest request(kurl); WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(data.constData(), data.length()); - QString actualMimeType = mimeType; - if (actualMimeType.isEmpty()) + QString actualMimeType; + WTF::String encoding; + if (mimeType.isEmpty()) actualMimeType = QLatin1String("text/html"); - WebCore::SubstituteData substituteData(buffer, WebCore::String(actualMimeType), WebCore::String(), KURL()); + else { + actualMimeType = extractMIMETypeFromMediaType(mimeType); + encoding = extractCharsetFromMediaType(mimeType); + } + WebCore::SubstituteData substituteData(buffer, WTF::String(actualMimeType), encoding, KURL()); d->frame->loader()->load(request, substituteData, false); } diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index 62bd59e..15b0549 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -44,16 +44,16 @@ class QWebFrameData { public: QWebFrameData(WebCore::Page*, WebCore::Frame* parentFrame = 0, WebCore::HTMLFrameOwnerElement* = 0, - const WebCore::String& frameName = WebCore::String()); + const WTF::String& frameName = WTF::String()); WebCore::KURL url; - WebCore::String name; + WTF::String name; WebCore::HTMLFrameOwnerElement* ownerElement; WebCore::Page* page; RefPtr<WebCore::Frame> frame; WebCore::FrameLoaderClientQt* frameLoaderClient; - WebCore::String referrer; + WTF::String referrer; bool allowsScrolling; int marginWidth; int marginHeight; diff --git a/WebKit/qt/Api/qwebkitplatformplugin.h b/WebKit/qt/Api/qwebkitplatformplugin.h index 32d22d4..3c56c98 100644 --- a/WebKit/qt/Api/qwebkitplatformplugin.h +++ b/WebKit/qt/Api/qwebkitplatformplugin.h @@ -81,6 +81,20 @@ Q_SIGNALS: void notificationClosed(); }; +class QWebHapticFeedbackPlayer +{ +public: + enum HapticStrength { + None, Weak, Medium, Strong + }; + + enum HapticEvent { + Press, Release + }; + + virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0; +}; + class QWebKitPlatformPlugin { public: @@ -88,15 +102,17 @@ public: enum Extension { MultipleSelections, - Notifications + Notifications, + Haptics }; virtual bool supportsExtension(Extension extension) const = 0; virtual QWebSelectMethod* createSelectInputMethod() const = 0; virtual QWebNotificationPresenter* createNotificationPresenter() const = 0; + virtual QWebHapticFeedbackPlayer* createHapticFeedbackPlayer() const = 0; }; -Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.2"); +Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.3"); #endif // QWEBKITPLATFORMPLUGIN_H diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index a8bd06a..516ebc9 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -252,7 +252,7 @@ static inline Qt::DropAction dragOpToDropAction(unsigned actions) QWebPagePrivate::QWebPagePrivate(QWebPage *qq) : q(qq) , client(0) -#if QT_VERSION < 0x040600 +#if QT_VERSION < QT_VERSION_CHECK(4, 6, 0) , view(0) #endif , clickCausedFocus(false) @@ -1131,7 +1131,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) { WebCore::Frame *frame = page->focusController()->focusedOrMainFrame(); WebCore::Editor *editor = frame->editor(); -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) QInputMethodEvent::Attribute selection(QInputMethodEvent::Selection, 0, 0, QVariant()); #endif @@ -1172,7 +1172,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) } break; } -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case QInputMethodEvent::Selection: { selection = a; hasSelection = true; @@ -1190,7 +1190,7 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) // 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(); -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) if (hasSelection) { QString text = (renderTextControl) ? QString(renderTextControl->text()) : QString(); if (preedit.isEmpty() && selection.start + selection.length > 0) @@ -1473,7 +1473,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const return QVariant(); } -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) case Qt::ImAnchorPosition: { if (renderTextControl) { if (editor->hasComposition()) { @@ -1978,7 +1978,7 @@ void QWebPage::setView(QWidget* view) */ QWidget *QWebPage::view() const { -#if QT_VERSION < 0x040600 +#if QT_VERSION < QT_VERSION_CHECK(4, 6, 0) return d->view; #else return d->view.data(); diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h index f0d2438..14f3b8b 100644 --- a/WebKit/qt/Api/qwebpage.h +++ b/WebKit/qt/Api/qwebpage.h @@ -217,6 +217,7 @@ public: inline qreal initialScaleFactor() const { return m_initialScaleFactor; }; inline qreal minimumScaleFactor() const { return m_minimumScaleFactor; }; inline qreal maximumScaleFactor() const { return m_maximumScaleFactor; }; + inline int targetDensityDpi() const { return m_targetDensityDpi; }; inline bool isUserScalable() const { return m_isUserScalable; }; inline bool isValid() const { return m_isValid; }; inline QSize size() const { return m_size; }; @@ -226,6 +227,7 @@ public: qreal m_initialScaleFactor; qreal m_minimumScaleFactor; qreal m_maximumScaleFactor; + int m_targetDensityDpi; bool m_isUserScalable; bool m_isValid; QSize m_size; diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp index 773c79a..5e7265f 100644 --- a/WebKit/qt/Api/qwebview.cpp +++ b/WebKit/qt/Api/qwebview.cpp @@ -349,7 +349,7 @@ void QWebViewPrivate::detachCurrentPage() return; if (page) { -#if QT_VERSION >= 0x040600 +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) page->d->view.clear(); #else page->d->view = 0; |