summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-07 11:21:11 +0200
commit2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch)
tree988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebKit/qt
parentdd91e772430dc294e3bf478c119ef8d43c0a3358 (diff)
downloadqtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebKit/qt')
-rw-r--r--Source/WebKit/qt/Api/qwebdatabase_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp14
-rw-r--r--Source/WebKit/qt/Api/qwebframe.cpp2
-rw-r--r--Source/WebKit/qt/Api/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/Api/qwebpage.cpp54
-rw-r--r--Source/WebKit/qt/Api/qwebpage.h4
-rw-r--r--Source/WebKit/qt/Api/qwebscriptworld_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebsecurityorigin_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp2
-rw-r--r--Source/WebKit/qt/ChangeLog752
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp63
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h49
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp89
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h62
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp61
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h47
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp74
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h59
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp103
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h5
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp51
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h22
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h4
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp88
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h14
-rw-r--r--Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp34
-rw-r--r--Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h14
-rw-r--r--Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp115
-rw-r--r--Source/WebKit/qt/WebCoreSupport/WebEventConversion.h6
-rw-r--r--Source/WebKit/qt/declarative/declarative.pro2
-rw-r--r--Source/WebKit/qt/declarative/experimental/experimental.pri12
-rw-r--r--Source/WebKit/qt/declarative/experimental/plugin.cpp4
-rw-r--r--Source/WebKit/qt/declarative/plugin.cpp11
-rw-r--r--Source/WebKit/qt/declarative/public.pri9
-rw-r--r--Source/WebKit/qt/docs/qtwebkit-bridge.qdoc2
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdocconf4
-rw-r--r--Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp8
-rw-r--r--Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h4
-rw-r--r--Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro3
-rw-r--r--Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp6
-rw-r--r--Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp6
52 files changed, 1109 insertions, 790 deletions
diff --git a/Source/WebKit/qt/Api/qwebdatabase_p.h b/Source/WebKit/qt/Api/qwebdatabase_p.h
index ec03ea5e2..298470442 100644
--- a/Source/WebKit/qt/Api/qwebdatabase_p.h
+++ b/Source/WebKit/qt/Api/qwebdatabase_p.h
@@ -24,7 +24,7 @@
#include "PlatformString.h"
#include "SecurityOrigin.h"
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
class QWebDatabasePrivate : public QSharedData {
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index 3fc64c96f..fb9be7892 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -26,7 +26,6 @@
#include "CSSRule.h"
#include "CSSRuleList.h"
#include "CSSStyleRule.h"
-#include "CSSStyleSelector.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "FrameView.h"
@@ -51,6 +50,7 @@
#include "RenderImage.h"
#include "ScriptState.h"
#include "StaticNodeList.h"
+#include "StyleResolver.h"
#include "qwebframe.h"
#include "qwebframe_p.h"
#if USE(JSC)
@@ -552,7 +552,7 @@ QRect QWebElement::geometry() const
{
if (!m_element)
return QRect();
- return m_element->getRect();
+ return m_element->getPixelSnappedRect();
}
/*!
@@ -839,7 +839,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
if (!m_element || !m_element->isStyledElement())
return QString();
- int propID = cssPropertyID(name);
+ CSSPropertyID propID = cssPropertyID(name);
if (!propID)
return QString();
@@ -862,7 +862,7 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
// declarations, as well as embedded and inline style declarations.
Document* doc = m_element->document();
- if (RefPtr<CSSRuleList> rules = doc->styleSelector()->styleRulesForElement(m_element, /*authorOnly*/ true)) {
+ if (RefPtr<CSSRuleList> rules = doc->styleResolver()->styleRulesForElement(m_element, /*authorOnly*/ true)) {
for (int i = rules->length(); i > 0; --i) {
CSSStyleRule* rule = static_cast<CSSStyleRule*>(rules->item(i - 1));
@@ -881,8 +881,6 @@ QString QWebElement::styleProperty(const QString &name, StyleResolveStrategy str
if (!m_element || !m_element->isStyledElement())
return QString();
- int propID = cssPropertyID(name);
-
RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(m_element, true);
if (!propID || !style)
return QString();
@@ -908,7 +906,7 @@ void QWebElement::setStyleProperty(const QString &name, const QString &value)
if (!m_element || !m_element->isStyledElement())
return;
- int propID = cssPropertyID(name);
+ CSSPropertyID propID = cssPropertyID(name);
static_cast<StyledElement*>(m_element)->setInlineStyleProperty(propID, value);
}
@@ -1495,7 +1493,7 @@ void QWebElement::render(QPainter* painter, const QRect& clip)
view->updateLayoutAndStyleIfNeededRecursive();
- IntRect rect = e->getRect();
+ IntRect rect = e->getPixelSnappedRect();
if (rect.size().isEmpty())
return;
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index dcf23061d..f09a8a80d 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -1509,7 +1509,7 @@ void QWebFrame::print(QPrinter *printer) const
int(qprinterRect.width() / zoomFactorX),
int(qprinterRect.height() / zoomFactorY));
- printContext.begin(pageRect.width());
+ printContext.begin(pageRect.width(), pageRect.height());
printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight);
diff --git a/Source/WebKit/qt/Api/qwebkitplatformplugin.h b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
index b28c05801..aa8ec7ea6 100644
--- a/Source/WebKit/qt/Api/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/Api/qwebkitplatformplugin.h
@@ -75,7 +75,7 @@ public:
virtual const QString title() const = 0;
virtual const QString message() const = 0;
- virtual const QByteArray iconData() const = 0;
+ virtual const QUrl iconUrl() const = 0;
virtual const QUrl openerPageUrl() const = 0;
};
@@ -180,7 +180,7 @@ public:
};
QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index 4928318d6..e85dfd282 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -45,9 +45,11 @@
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
#include "ContextMenuController.h"
+#if ENABLE(DEVICE_ORIENTATION)
#include "DeviceMotionClientQt.h"
#include "DeviceOrientationClientMock.h"
#include "DeviceOrientationClientQt.h"
+#endif
#include "DocumentLoader.h"
#include "DragClientQt.h"
#include "DragController.h"
@@ -64,16 +66,16 @@
#include "FrameLoaderClientQt.h"
#include "FrameTree.h"
#include "FrameView.h"
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
#include "GeolocationClientMock.h"
#include "GeolocationClientQt.h"
-#endif // CLIENT_BASED_GEOLOCATION
+#include "GeolocationController.h"
+#endif
#include "GeolocationPermissionClientQt.h"
#include "HTMLFormElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
-#include "HashMap.h"
#include "HitTestResult.h"
#include "Image.h"
#include "InitWebCoreQt.h"
@@ -100,7 +102,6 @@
#include "PluginPackage.h"
#include "ProgressTracker.h"
#include "QtPlatformPlugin.h"
-#include "RefPtr.h"
#include "RenderTextControl.h"
#include "RenderThemeQt.h"
#include "SchemeRegistry.h"
@@ -314,7 +315,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
, inspectorIsInternalOnly(false)
, m_lastDropAction(Qt::IgnoreAction)
{
-#if ENABLE(DEVICE_ORIENTATION) || ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION) || ENABLE(DEVICE_ORIENTATION)
bool useMock = QWebPagePrivate::drtRun;
#endif
@@ -326,13 +327,16 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
pageClients.editorClient = new EditorClientQt(q);
pageClients.dragClient = new DragClientQt(q);
pageClients.inspectorClient = new InspectorClientQt(q);
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- if (useMock)
- pageClients.geolocationClient = new GeolocationClientMock;
- else
- pageClients.geolocationClient = new GeolocationClientQt(q);
-#endif
page = new Page(pageClients);
+#if ENABLE(GEOLOCATION)
+ if (useMock) {
+ // In case running in DumpRenderTree mode set the controller to mock provider.
+ GeolocationClientMock* mock = new GeolocationClientMock;
+ WebCore::provideGeolocationTo(page, mock);
+ mock->setController(WebCore::GeolocationController::from(page));
+ } else
+ WebCore::provideGeolocationTo(page, new GeolocationClientQt(q));
+#endif
#if ENABLE(DEVICE_ORIENTATION)
if (useMock)
WebCore::provideDeviceOrientationTo(page, new DeviceOrientationClientMock);
@@ -340,7 +344,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
WebCore::provideDeviceOrientationTo(page, new DeviceOrientationClientQt);
WebCore::provideDeviceMotionTo(page, new DeviceMotionClientQt);
#endif
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
WebCore::provideNotification(page, NotificationPresenterClientQt::notificationPresenter());
#endif
@@ -351,19 +355,18 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
// as expected out of the box, we use a default group similar to what other ports are doing.
page->setGroupName("Default Group");
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // In case running in DumpRenderTree mode set the controller to mock provider.
- if (QWebPagePrivate::drtRun)
- static_cast<GeolocationClientMock*>(pageClients.geolocationClient)->setController(page->geolocationController());
-#endif
settings = new QWebSettings(page->settings());
+#if ENABLE(WEB_SOCKETS)
+ page->settings()->setUseHixie76WebSocketProtocol(false);
+#endif
+
history.d = new QWebHistoryPrivate(static_cast<WebCore::BackForwardListImpl*>(page->backForwardList()));
memset(actions, 0, sizeof(actions));
PageGroup::setShouldTrackVisitedLinks(true);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->addClient();
#endif
}
@@ -387,7 +390,7 @@ QWebPagePrivate::~QWebPagePrivate()
if (inspector)
inspector->setPage(0);
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->removeClient();
#endif
}
@@ -1346,7 +1349,7 @@ bool QWebPagePrivate::touchEvent(QTouchEvent* event)
event->setAccepted(true);
// Return whether the default action was cancelled in the JS event handler
- return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event));
+ return frame->eventHandler()->handleTouchEvent(convertTouchEvent(event));
#else
event->ignore();
return false;
@@ -1391,7 +1394,7 @@ QVariant QWebPage::inputMethodQuery(Qt::InputMethodQuery property) const
case Qt::ImFont: {
if (renderTextControl) {
RenderStyle* renderStyle = renderTextControl->style();
- return QVariant(QFont(renderStyle->font().font()));
+ return QVariant(QFont(renderStyle->font().syntheticFont()));
}
return QVariant(QFont());
}
@@ -1564,7 +1567,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
int x = touchPoint.x();
int y = touchPoint.y();
- RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false);
+ RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false /*ignoreClipping*/, false /*allowShadowContent*/);
if (!intersectedNodes)
return IntPoint();
@@ -1584,7 +1587,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
if (!currentElement || (!isClickableElement(currentElement, 0) && !isValidFrameOwner(currentElement)))
continue;
- IntRect currentElementBoundingRect = currentElement->getRect();
+ IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect();
currentElementBoundingRect.intersect(touchRect);
if (currentElementBoundingRect.isEmpty())
@@ -1632,6 +1635,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
\value FindWrapsAroundDocument Makes findText() restart from the beginning of the document if the end
was reached and the text was not found.
\value HighlightAllOccurrences Highlights all existing occurrences of a specific string.
+ (This value was introduced in 4.6.)
*/
/*!
@@ -2149,7 +2153,7 @@ void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, Permissio
{
switch (feature) {
case Notifications:
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
if (policy == PermissionGrantedByUser)
NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame->d->frame);
#endif
@@ -2529,7 +2533,7 @@ QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& av
WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(conf);
result.m_isValid = true;
- result.m_size = conf.layoutSize;
+ result.m_size = QSizeF(conf.layoutSize.width(), conf.layoutSize.height());
result.m_initialScaleFactor = conf.initialScale;
result.m_minimumScaleFactor = conf.minimumScale;
result.m_maximumScaleFactor = conf.maximumScale;
diff --git a/Source/WebKit/qt/Api/qwebpage.h b/Source/WebKit/qt/Api/qwebpage.h
index fd2fd4b3b..0bf35e247 100644
--- a/Source/WebKit/qt/Api/qwebpage.h
+++ b/Source/WebKit/qt/Api/qwebpage.h
@@ -232,7 +232,7 @@ public:
inline qreal devicePixelRatio() const { return m_devicePixelRatio; }
inline bool isUserScalable() const { return m_isUserScalable; }
inline bool isValid() const { return m_isValid; }
- inline QSize size() const { return m_size; }
+ inline QSizeF size() const { return m_size; }
private:
QSharedDataPointer<QtViewportAttributesPrivate> d;
@@ -242,7 +242,7 @@ public:
qreal m_devicePixelRatio;
bool m_isUserScalable;
bool m_isValid;
- QSize m_size;
+ QSizeF m_size;
friend class WebCore::ChromeClientQt;
friend class QWebPage;
diff --git a/Source/WebKit/qt/Api/qwebscriptworld_p.h b/Source/WebKit/qt/Api/qwebscriptworld_p.h
index 7115eb2c5..8c18e23ed 100644
--- a/Source/WebKit/qt/Api/qwebscriptworld_p.h
+++ b/Source/WebKit/qt/Api/qwebscriptworld_p.h
@@ -20,7 +20,7 @@
#ifndef _QWEBSCRIPTWORLD_P_H_
#define _QWEBSCRIPTWORLD_P_H_
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
namespace WebCore {
class DOMWrapperWorld;
diff --git a/Source/WebKit/qt/Api/qwebsecurityorigin_p.h b/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
index cdc93bd14..1b64c49f0 100644
--- a/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
+++ b/Source/WebKit/qt/Api/qwebsecurityorigin_p.h
@@ -21,7 +21,7 @@
#define _WEBSECURITYORIGIN_P_H_
#include "SecurityOrigin.h"
-#include "RefPtr.h"
+#include <wtf/RefPtr.h>
class QWebSecurityOriginPrivate : public QSharedData {
public:
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index 0f55b0b89..ca264c8af 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -442,11 +442,13 @@ QWebSettings* QWebSettings::globalSettings()
web application cache feature is enabled or not. This is disabled by default.
\value LocalStorageEnabled Specifies whether support for the HTML 5
local storage feature is enabled or not. This is disabled by default.
+ (This value was introduced in 4.6.)
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are
allowed to access remote urls. This is disabled by default. For more information
about security origins and local vs. remote content see QWebSecurityOrigin.
+ (This value was introduced in 4.6.)
\value LocalContentCanAccessFileUrls Specifies whether locally loaded documents are
allowed to access other local urls. This is enabled by default. For more information
about security origins and local vs. remote content see QWebSecurityOrigin.
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index d9c4ee953..9bb4acc99 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,755 @@
+2012-05-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Convert isPageBoxVisible to use Internals interface.
+ https://bugs.webkit.org/show_bug.cgi?id=85692
+
+ Reviewed by Darin Adler.
+
+ Remove isPageBoxVisible functions, because it is able to work in the
+ cross-port way through the Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2012-05-04 Nate Chapin <japhet@chromium.org>
+
+ Don't require FrameLoaderClient to manufacture a commitData() call for empty documents.
+ https://bugs.webkit.org/show_bug.cgi?id=85533
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
+ (WebCore):
+ (WebCore::FrameLoaderClientQt::finishedLoading):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::makeRepresentation):
+ (WebCore::FrameLoaderClientQt::revertToProvisionalState):
+ (FrameLoaderClientQt):
+
+2012-05-03 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportAttributesForSize):
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-04-27 Jon Lee <jonlee@apple.com>
+
+ Migrate permission functions to Notification from NotificationCenter
+ https://bugs.webkit.org/show_bug.cgi?id=80485
+ <rdar://problem/10965458>
+
+ Reviewed by Jian Li.
+
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (NotificationPresenterClientQt): Add stub implementation of requestPermission.
+ (WebCore::NotificationPresenterClientQt::requestPermission):
+
+2012-05-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r115907.
+ http://trac.webkit.org/changeset/115907
+ https://bugs.webkit.org/show_bug.cgi?id=85458
+
+ It broke all viewport tests on Qt and on GTK (Requested by
+ Ossy on #webkit).
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportAttributesForSize):
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-04-18 Jon Honeycutt <jhoneycutt@apple.com>
+
+ FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
+ information about the form being submitted
+ https://bugs.webkit.org/show_bug.cgi?id=84297
+
+ Reviewed by Andy Estes.
+
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (WebCore::FrameLoaderClientQt::dispatchWillSendSubmitEvent):
+ Updated method declaration.
+
+2012-05-02 Fady Samuel <fsamuel@chromium.org>
+
+ Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
+ https://bugs.webkit.org/show_bug.cgi?id=70609
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2012-05-02 Milian Wolff <milian.wolff@kdab.com>
+
+ [Qt] Pass page-height to PrintContext::begin to fix print layouting
+ https://bugs.webkit.org/show_bug.cgi?id=84864
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::print):
+
+2012-05-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [Qt] Add initial QML documentation
+ https://bugs.webkit.org/show_bug.cgi?id=85370
+
+ Reviewed by Simon Hausmann.
+
+ * docs/qtwebkit.qdocconf: Add WebKit2 dirs.
+
+2012-05-02 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Buildfix after r115812 for !ENABLE(DEVICE_ORIENTATION) builds.
+ https://bugs.webkit.org/show_bug.cgi?id=64595
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+
+2012-04-27 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Move WebKit1 specific conversion of touch-events to WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=84951
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix compile when touch-events are disabled.
+
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebCore):
+ * WebCoreSupport/WebEventConversion.h:
+ (WebCore):
+
+2012-04-26 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Move WebKit1 specific conversion of touch-events to WebKit1.
+ https://bugs.webkit.org/show_bug.cgi?id=84951
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::touchEvent):
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebKitPlatformTouchEvent):
+ (WebKitPlatformTouchPoint):
+ (WebCore::WebKitPlatformTouchEvent::WebKitPlatformTouchEvent):
+ (WebCore::WebKitPlatformTouchPoint::WebKitPlatformTouchPoint):
+ (WebCore::convertTouchEvent):
+ * WebCoreSupport/WebEventConversion.h:
+
+2012-04-25 Alexis Menard <alexis.menard@openbossa.org>
+
+ Rename CSSStyleSelector files to StyleResolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84814
+
+ Reviewed by Antti Koivisto.
+
+ Rename CSSStyleSelector files to match the new class name StyleResolver.
+ Update the includes all over the code base to the new name.
+
+ * Api/qwebelement.cpp:
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+
+2012-04-25 Milian Wolff <milian.wolff@kdab.com>
+
+ [Qt] add LayoutTestController::setPrinting support to Qt unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=84246
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::paintPagesWithBoundaries):
+ * Api/qwebframe.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::paintPagesWithBoundaries):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Replace occurences of style selector from variables and methods names by style resolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84765
+
+ Reviewed by Andreas Kling.
+
+ Rename methods and variables to follow the new name StyleResolver. It requires to update the
+ local variables, methods parameters, and function names to match the new name and to remove
+ the concept of "selector" to avoid clashing with the CSS concept. The next and last patch
+ will be to rename CSSStyleSelector file and update the includes.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setMediaType):
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::adjustButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
+ (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
+
+2012-04-24 Alexis Menard <alexis.menard@openbossa.org>
+
+ Rename CSSStyleSelector class to StyleResolver.
+ https://bugs.webkit.org/show_bug.cgi?id=84734
+
+ Reviewed by Andreas Kling.
+
+ The name CSSStyleSelector is confusing as it conflicts a bit with
+ the CSS concept of selectors. One could think it's an encapsulation
+ of the CSS selectors but it's not, in fact this class is responsible
+ of finding the RenderStyle for a given element. This is the first patch
+ as I will later rename the files, and then rename the local variables.
+
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::adjustButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustTextAreaStyle):
+ (WebCore::RenderThemeQStyle::adjustMenuListButtonStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderTrackStyle):
+ (WebCore::RenderThemeQStyle::adjustSliderThumbStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldDecorationStyle):
+ (WebCore::RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle):
+ * WebCoreSupport/RenderThemeQStyle.h:
+ (RenderThemeQStyle):
+
+2012-04-24 Yael Aharon <yael.aharon@nokia.com>
+
+ [Qt] Move notification icon download out of WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=80700
+
+ Reviewed by Simon Hausmann.
+
+ Remove the code that handles the notification's icon and use the icon url instead.
+ The "display" event has to be asynchronous, so a timer was added to achieve that.
+ The platform plugin API and example were updated to reflect this change.
+ This change does not address the recent changes in web notifications spec.
+
+ * Api/qwebkitplatformplugin.h:
+ (QWebNotificationData):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationWrapper::NotificationWrapper):
+ (WebCore::NotificationWrapper::sendDisplayEvent):
+ (WebCore):
+ (WebCore::NotificationWrapper::iconUrl):
+ (WebCore::NotificationPresenterClientQt::show):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::sendDisplayEvent):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (NotificationWrapper):
+ (NotificationPresenterClientQt):
+ * examples/platformplugin/WebNotificationPresenter.cpp:
+ (WebNotificationWidget::showNotification):
+ * examples/platformplugin/qwebkitplatformplugin.h:
+ (QWebNotificationData):
+
+2012-04-18 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Clean-up WheelEvent Conversion.
+ https://bugs.webkit.org/show_bug.cgi?id=84243
+
+ Reviewed by Simon Hausmann.
+
+ * WebCoreSupport/WebEventConversion.cpp:
+ (WebCore::WebKitPlatformWheelEvent::applyDelta):
+
+2012-04-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Build fix with QT_NO_BEARERMANAGEMENT
+
+ Reviewed by Jocelyn Turcotte.
+
+ * tests/benchmarks/loading/tst_loading.cpp:
+ (tst_Loading):
+ (tst_Loading::load):
+ * tests/benchmarks/painting/tst_painting.cpp:
+ (tst_Painting):
+ (tst_Painting::paint):
+
+2012-04-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Fix build on OS X
+
+ We were manually including the directories needed from WTF, instead of
+ using the WEBKIT qmake variable to add dependencies, which also adds
+ other tricks from WTF.pri, such as the right include paths for ICU.
+
+ Reviewed by Simon Hausmann.
+
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+
+2012-04-12 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Fix WebKit1 build with V8
+ https://bugs.webkit.org/show_bug.cgi?id=83322
+
+ Reviewed by Adam Barth.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::didCreateScriptContext):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+ (WebCore::FrameLoaderClientQt::allowScriptExtension):
+ * WebCoreSupport/InitWebCoreQt.cpp:
+
+2012-03-05 Pierre Rossi <pierre.rossi@gmail.com>
+
+ [Qt] Use QRawFont when building with Qt 5
+ https://bugs.webkit.org/show_bug.cgi?id=78001
+
+ Since QFont is not used internally, we now need
+ to query for a QFont that should be a good
+ enough match.
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::inputMethodQuery):
+ * WebCoreSupport/PopupMenuQt.cpp:
+ (WebCore::PopupMenuQt::show):
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::computeSizeBasedOnStyle):
+
+2012-04-06 Levi Weintraub <leviw@chromium.org>
+
+ Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
+ https://bugs.webkit.org/show_bug.cgi?id=83376
+
+ Reviewed by Eric Seidel.
+
+ Calculating the progress animation using the pixel-snapped RenderProgress size instead
+ of the internal sub-pixel version.
+
+ * WebCoreSupport/RenderThemeQStyle.cpp:
+ (WebCore::RenderThemeQStyle::animationDurationForProgressBar):
+
+2012-04-05 Patrick Gansterer <paroga@webkit.org>
+
+ [Qt] Correct <wtf/*.h> include paths.
+ https://bugs.webkit.org/show_bug.cgi?id=83270
+
+ Reviewed by Eric Seidel.
+
+ Modify the #include declerations so that the
+ wtf types are included using the full path.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/ContextMenuClientQt.h:
+ * WebCoreSupport/EditorClientQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ * WebCoreSupport/InspectorServerQt.cpp:
+
+2012-04-05 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Fix includes after QtDeclarative -> QtQML renaming
+ https://bugs.webkit.org/show_bug.cgi?id=82195
+
+ Relanding r112651, because Qt5 is updated everywhere.
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-04-04 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt][WK2] Make the WebView a subclass of Flickable
+ https://bugs.webkit.org/show_bug.cgi?id=83033
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add needed dependency to quick-private for projects that include the WebView header.
+
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+
+2012-04-03 Alexis Menard <alexis.menard@openbossa.org>
+
+ [Part 2] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
+ https://bugs.webkit.org/show_bug.cgi?id=82977
+
+ Reviewed by Andreas Kling.
+
+ Update the code to use CSSPropertyID rather than an integer.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::setStyleProperty):
+
+2012-04-02 Alexis Menard <alexis.menard@openbossa.org>
+
+ We should use CSSPropertyID rather than integers when manipulating CSS property ids.
+ https://bugs.webkit.org/show_bug.cgi?id=82941
+
+ Reviewed by Andreas Kling.
+
+ CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
+ as integers. While it's not incorrect it is nicer to use the enum as a parameter of
+ functions manipulating property ids, as we ensure that the value passed will be an
+ existing value. It will also feel more correct after this patch that CSSProperty::id()
+ return a value of the enum rather than an integer. As this modification is quite big this
+ is the first part only so it will be easier to review.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::styleProperty): Adapt to the API change and also remove an unecessary name->id
+ conversion.
+
+2012-04-02 Casper van Donderen <casper.vandonderen@nokia.com>
+
+ Qt: Doc: Fix typo which marks document to be printed in console font.
+ https://bugs.webkit.org/show_bug.cgi?id=82893
+
+ Reviewed by Simon Hausmann.
+
+ The qtwebkit-bridge.qdoc file contained a typo where a \c {} was
+ missing its closing curly bracket, this marked the rest of the page as
+ text to be printed using the code/console font.
+ * docs/qtwebkit-bridge.qdoc:
+
+2012-04-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112651.
+ http://trac.webkit.org/changeset/112651
+ https://bugs.webkit.org/show_bug.cgi?id=82887
+
+ It doesn't work with older Qt5 (Requested by Ossy on #webkit).
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-04-01 Jon Lee <jonlee@apple.com>
+
+ Rename notification properties and functions
+ https://bugs.webkit.org/show_bug.cgi?id=80482
+ <rdar://problem/10912432>
+
+ Reviewed by Kentaro Hara.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::show): Refactor to call tag().
+ (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue): Refactor to call tag().
+
+2012-03-30 Emil A Eklund <eae@chromium.org>
+
+ Change WebKit/WebKit2 platform code to use pixel snapped values
+ https://bugs.webkit.org/show_bug.cgi?id=82549
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ Replace getRect with getPixelSnappedRect to avoid having to expose
+ subpixel types to the platform layer.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
+ Use pixel snapped element rect when comparing with the touch rect as the
+ touch rect use screen cordinates which are represented with pixel
+ accuracy.
+
+ * WebCoreSupport/ChromeClientQt.h:
+ (WebCore::ChromeClientQt::scrollRectIntoView):
+ Change scrollRectIntoView to take a LayoutRect to match base class
+ interface.
+
+2012-03-30 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-29 Ádám Kallai <kadam@inf.u-szeged.hu>
+
+ [Qt] Build fix by renameing QtDeclarative to QtQml in header calls.
+ https://bugs.webkit.org/show_bug.cgi?id=82195
+
+ Reviewed by Simon Hausmann.
+
+ * declarative/experimental/plugin.cpp:
+ * declarative/plugin.cpp:
+ (WebKitQmlPlugin::initializeEngine):
+
+2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r112553.
+ http://trac.webkit.org/changeset/112553
+ https://bugs.webkit.org/show_bug.cgi?id=82638
+
+ It made all tests crash on Qt WK2 (Requested by Ossy_away on
+ #webkit).
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-29 Mark Pilgrim <pilgrim@chromium.org>
+
+ GEOLOCATION should be implemented as Page Supplement
+ https://bugs.webkit.org/show_bug.cgi?id=82228
+
+ Reviewed by Adam Barth.
+
+ Geolocation is now a Supplement in Page so the interface
+ has changed for setting up the page's geolocation client
+ initially and accessing the controller later.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.cpp:
+ (WebCore::GeolocationClientQt::positionUpdated):
+ (WebCore::GeolocationClientQt::startUpdating):
+
+2012-03-28 Nate Chapin <japhet@chromium.org>
+
+ Remove dispatchDidLoadMainResource callback, since no
+ port implements it.
+ https://bugs.webkit.org/show_bug.cgi?id=82539
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+
+2012-03-20 Eric Seidel <eric@webkit.org>
+
+ Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
+ https://bugs.webkit.org/show_bug.cgi?id=80911
+
+ Reviewed by Adam Barth.
+
+ Fix WTF header include paths since although
+ Source/WTF is included, no longer are all the
+ subdirectories (thus "RefPtr.h" can't work).
+
+ * Api/qwebdatabase_p.h:
+ * Api/qwebscriptworld_p.h:
+ * Api/qwebsecurityorigin_p.h:
+ * WebCoreSupport/InspectorClientQt.h:
+ * WebCoreSupport/QtFallbackWebPopup.h:
+ * WebCoreSupport/QtWebComboBox.h:
+ * declarative/experimental/experimental.pri:
+ * declarative/public.pri:
+ * tests/MIMESniffing/MIMESniffing.pro:
+
+2012-03-19 Adam Barth <abarth@webkit.org>
+
+ Remove support for "magic" iframe
+ https://bugs.webkit.org/show_bug.cgi?id=81590
+
+ Reviewed by Eric Seidel.
+
+ Remove FrameLoaderClient methods that no longer exist.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+ (FrameLoaderClientQt):
+
+2012-03-19 Emil A Eklund <eae@chromium.org>
+
+ [mac/qt/chromium] Change platform code to use pixelSnappedRect methods
+ https://bugs.webkit.org/show_bug.cgi?id=81016
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ (QWebElement::render):
+
+2012-03-16 Teemu Katajisto <teemu.katajisto@digia.com>
+
+ [Qt] QtWebKit documentation missing a few since 4.6 information
+ https://bugs.webkit.org/show_bug.cgi?id=81328
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ * Api/qwebsettings.cpp:
+
+2012-03-15 Yuta Kitamura <yutak@chromium.org>
+
+ [Qt] Change default WebSocket protocol to the latest one
+ https://bugs.webkit.org/show_bug.cgi?id=73630
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ Use RFC6455 WebSocket protocol by default.
+
+2012-03-07 Jon Lee <jonlee@apple.com>
+
+ Move NotificationContents into Notification
+ https://bugs.webkit.org/show_bug.cgi?id=80487
+ <rdar://problem/10965519>
+
+ Reviewed by Jian Li.
+
+ Refactor to use accessor methods on Notification.
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationWrapper::title):
+ (WebCore::NotificationWrapper::message):
+ (WebCore::NotificationPresenterClientQt::displayNotification):
+ (WebCore::NotificationPresenterClientQt::cancel):
+ (WebCore::NotificationPresenterClientQt::notificationClicked):
+ (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
+ (WebCore::NotificationPresenterClientQt::dumpShowText):
+
+2012-03-13 Jon Lee <jonlee@apple.com>
+
+ Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
+ https://bugs.webkit.org/show_bug.cgi?id=80922
+ <rdar://problem/11035082>
+
+ Reviewed by Jian Li.
+
+ You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
+ LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
+ new API. Therefore, APIs that are common between the two will have:
+ #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+
+ This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
+ the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
+
+ Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ (QWebPagePrivate::~QWebPagePrivate):
+ (QWebPage::setFeaturePermission):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::dumpNotification):
+ (DumpRenderTreeSupportQt::simulateDesktopNotificationClick):
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore):
+ (WebCore::NotificationWrapper::NotificationWrapper):
+ (WebCore::NotificationWrapper::close):
+ (WebCore::NotificationWrapper::title):
+ (WebCore::NotificationWrapper::message):
+ (WebCore::NotificationWrapper::iconData):
+ (WebCore::NotificationWrapper::openerPageUrl):
+ (WebCore::NotificationWrapper::notificationClicked):
+ (WebCore::NotificationWrapper::notificationClosed):
+ * WebCoreSupport/NotificationPresenterClientQt.h:
+ (WebCore):
+
+2012-03-14 Csaba Osztrogonác <ossy@webkit.org>
+
+ Last buildfix for Qt after r110595. :)
+
+ Reviewed by Benjamin Poulain.
+
+ * Api/qwebpage.cpp:
+ * WebCoreSupport/GeolocationClientQt.h:
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Attempt to fix QtMinimal bot after r110595
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Another attempt at fixing QtMinimal bot after r110595
+
+ Blind fix, unreviewed.
+
+ * WebCoreSupport/GeolocationClientQt.h:
+
+2012-03-13 Benjamin Poulain <bpoulain@apple.com>
+
+ Attempt to fix QtMinimal bot after r110595
+
+ Blind fix, unreviewed.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationPermissionClientQt.h:
+
+2012-03-13 Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>
+
+ Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
+ https://bugs.webkit.org/show_bug.cgi?id=78853
+
+ Reviewed by Adam Barth.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (toGeolocationClientMock):
+ (DumpRenderTreeSupportQt::resetGeolocationMock):
+ (DumpRenderTreeSupportQt::setMockGeolocationPermission):
+ (DumpRenderTreeSupportQt::setMockGeolocationPosition):
+ (DumpRenderTreeSupportQt::setMockGeolocationError):
+ (DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests):
+ * WebCoreSupport/GeolocationClientQt.h:
+ (WebCore):
+
+2012-03-12 Antonio Gomes <agomes@rim.com>
+
+ Convert nodesFromRect tests to use Internals interface
+ https://bugs.webkit.org/show_bug.cgi?id=80886
+
+ Reviewed by Ryosuke Niwa.
+
+ Removed DRTSupportQt::nodesFromRect support, since
+ it can work in the cross-port way through the
+ Internals interface.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
2012-03-09 Jon Lee <jonlee@apple.com>
Rename NotificationPresenter to NotificationClient
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 386b986d4..6c26018bc 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -171,10 +171,7 @@ public:
virtual void setCursor(const Cursor&);
virtual void setCursorHiddenUntilMouseMoves(bool) { }
- virtual void scrollRectIntoView(const IntRect&) const { }
-
- virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) { }
- virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { }
+ virtual void scrollRectIntoView(const LayoutRect) const { }
virtual bool selectItemWritingDirectionIsNatural();
virtual bool selectItemAlignmentFollowsMenuWritingDirection();
diff --git a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
index 1b4475f35..0420f8d4a 100644
--- a/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ContextMenuClientQt.h
@@ -28,7 +28,7 @@
#include "ContextMenuClient.h"
-#include <RefCounted.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
class ContextMenu;
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
deleted file mode 100644
index 464633784..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "DeviceMotionClientQt.h"
-
-#include "DeviceMotionProviderQt.h"
-
-namespace WebCore {
-
-DeviceMotionClientQt::DeviceMotionClientQt()
- : m_provider(new DeviceMotionProviderQt)
-{
-}
-
-DeviceMotionClientQt::~DeviceMotionClientQt()
-{
- delete m_provider;
-}
-
-void DeviceMotionClientQt::setController(DeviceMotionController* controller)
-{
- m_provider->setController(controller);
-}
-
-void DeviceMotionClientQt::startUpdating()
-{
- m_provider->start();
-}
-
-void DeviceMotionClientQt::stopUpdating()
-{
- m_provider->stop();
-}
-
-DeviceMotionData* DeviceMotionClientQt::currentDeviceMotion() const
-{
- return m_provider->currentDeviceMotion();
-}
-
-void DeviceMotionClientQt::deviceMotionControllerDestroyed()
-{
- delete this;
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
deleted file mode 100644
index 2b964a33e..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef DeviceMotionClientQt_h
-#define DeviceMotionClientQt_h
-
-#include "DeviceMotionClient.h"
-#include "DeviceMotionData.h"
-
-namespace WebCore {
-
-class DeviceMotionController;
-class DeviceMotionProviderQt;
-
-class DeviceMotionClientQt : public DeviceMotionClient {
-public:
- DeviceMotionClientQt();
- virtual ~DeviceMotionClientQt();
-
- virtual void setController(DeviceMotionController*);
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual DeviceMotionData* currentDeviceMotion() const;
- virtual void deviceMotionControllerDestroyed();
-
-private:
- DeviceMotionProviderQt* m_provider;
-};
-
-} // namespece WebCore
-
-#endif // DeviceMotionClientQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
deleted file mode 100644
index 655703d77..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "config.h"
-#include "DeviceMotionProviderQt.h"
-
-#include "DeviceMotionController.h"
-#include "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceMotionProviderQt::DeviceMotionProviderQt()
- : m_motion(DeviceMotionData::create())
- , m_deviceOrientation(new DeviceOrientationProviderQt)
- , m_controller(0)
-{
- m_acceleration.addFilter(this);
-}
-
-DeviceMotionProviderQt::~DeviceMotionProviderQt()
-{
- delete m_deviceOrientation;
-}
-
-void DeviceMotionProviderQt::setController(DeviceMotionController* controller)
-{
- ASSERT(controller);
- ASSERT(!m_controller);
- m_controller = controller;
-}
-
-void DeviceMotionProviderQt::start()
-{
- m_acceleration.start();
- m_deviceOrientation->start();
-}
-
-void DeviceMotionProviderQt::stop()
-{
- m_acceleration.stop();
- m_deviceOrientation->stop();
-}
-
-bool DeviceMotionProviderQt::filter(QAccelerometerReading* reading)
-{
- if (!m_controller) {
- // We are the only filter. No need to propagate from here.
- return false;
- }
-
- RefPtr<DeviceMotionData::Acceleration> accel = DeviceMotionData::Acceleration::create(
- /* x available */ true, reading->x(),
- /* y available */ true, reading->y(),
- /* z available */ true, reading->z());
-
- RefPtr<DeviceMotionData::RotationRate> rotation = DeviceMotionData::RotationRate::create(
- m_deviceOrientation->hasAlpha(), m_deviceOrientation->lastOrientation()->alpha(),
- /* beta available */ true, m_deviceOrientation->lastOrientation()->beta(),
- /* gamma available */ true, m_deviceOrientation->lastOrientation()->gamma());
-
- m_motion = DeviceMotionData::create(accel,
- accel, /* FIXME: Needs to provide acceleration include gravity. */
- rotation,
- false, 0 /* The interval is treated internally by Qt mobility */);
-
- m_controller->didChangeDeviceMotion(m_motion.get());
-
- // We are the only filter. No need to propagate from here.
- return false;
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
deleted file mode 100644
index 466490f2c..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef DeviceMotionProviderQt_h
-#define DeviceMotionProviderQt_h
-
-#include "DeviceMotionData.h"
-
-#include <wtf/RefPtr.h>
-#include <QAccelerometerFilter>
-
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-using QTM_NAMESPACE::QAccelerometer;
-using QTM_NAMESPACE::QAccelerometerFilter;
-using QTM_NAMESPACE::QAccelerometerReading;
-#endif
-
-namespace WebCore {
-
-class DeviceMotionController;
-class DeviceOrientationProviderQt;
-
-class DeviceMotionProviderQt : public QAccelerometerFilter {
-public:
- DeviceMotionProviderQt();
- ~DeviceMotionProviderQt();
-
- void setController(DeviceMotionController*);
-
- bool filter(QAccelerometerReading*);
-
- void start();
- void stop();
- DeviceMotionData* currentDeviceMotion() const { return m_motion.get(); }
-
-private:
- RefPtr<DeviceMotionData> m_motion;
- QAccelerometer m_acceleration;
- DeviceOrientationProviderQt* m_deviceOrientation;
- DeviceMotionController* m_controller;
-};
-
-} // namespace WebCore
-
-#endif // DeviceMotionProviderQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
deleted file mode 100644
index ee7942210..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-#include "config.h"
-#include "DeviceOrientationClientQt.h"
-#include "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceOrientationClientQt::DeviceOrientationClientQt()
- : m_provider(new DeviceOrientationProviderQt)
-{
-}
-
-DeviceOrientationClientQt::~DeviceOrientationClientQt()
-{
- delete m_provider;
-}
-
-void DeviceOrientationClientQt::setController(DeviceOrientationController* controller)
-{
- m_provider->setController(controller);
-}
-
-void DeviceOrientationClientQt::startUpdating()
-{
- m_provider->start();
-}
-
-void DeviceOrientationClientQt::stopUpdating()
-{
- m_provider->stop();
-}
-
-DeviceOrientation* DeviceOrientationClientQt::lastOrientation() const
-{
- return m_provider->lastOrientation();
-}
-
-void DeviceOrientationClientQt::deviceOrientationControllerDestroyed()
-{
- delete this;
-}
-
-} // namespace WebCore
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
deleted file mode 100644
index 8b8441e0f..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-#ifndef DeviceOrientationClientQt_h
-#define DeviceOrientationClientQt_h
-
-#include "DeviceOrientation.h"
-#include "DeviceOrientationClient.h"
-
-namespace WebCore {
-
-class DeviceOrientationProviderQt;
-
-class DeviceOrientationClientQt : public DeviceOrientationClient {
-public:
- DeviceOrientationClientQt();
- virtual ~DeviceOrientationClientQt();
-
- virtual void setController(DeviceOrientationController*);
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual DeviceOrientation* lastOrientation() const;
- virtual void deviceOrientationControllerDestroyed();
-
-private:
- DeviceOrientationProviderQt* m_provider;
-};
-
-} // namespace WebCore
-
-#endif // DeviceOrientationClientQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
deleted file mode 100644
index de46d244c..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-#include "config.h"
-#include "DeviceOrientationProviderQt.h"
-
-namespace WebCore {
-
-DeviceOrientationProviderQt::DeviceOrientationProviderQt()
- : m_controller(0)
-{
- m_sensor.addFilter(this);
- m_lastOrientation = DeviceOrientation::create();
-}
-
-void DeviceOrientationProviderQt::setController(DeviceOrientationController* controller)
-{
- if (!controller)
- stop();
-
- m_controller = controller;
-}
-
-void DeviceOrientationProviderQt::start()
-{
- m_sensor.start();
-}
-
-void DeviceOrientationProviderQt::stop()
-{
- m_sensor.stop();
-}
-
-bool DeviceOrientationProviderQt::filter(QRotationReading* reading)
-{
- if (m_controller) {
- // Provide device orientation data according W3C spec:
- // http://dev.w3.org/geo/api/spec-source-orientation.html
- // Qt mobility provide these data via QRotationSensor using the
- // QRotationReading class:
- // - the rotation around z axis (alpha) is given as z in QRotationReading;
- // - the rotation around x axis (beta) is given as x in QRotationReading;
- // - the rotation around y axis (gamma) is given as y in QRotationReading;
- // See: http://doc.qt.nokia.com/qtmobility-1.0/qrotationreading.html
- // The Z (alpha) rotation angle is checked via hasAlpha() private method,
- // depending if the device is able do detect the alpha rotation. X (beta) and
- // Y (gamma) axis are availble in this context.
- m_lastOrientation = DeviceOrientation::create(hasAlpha(), reading->z(),
- /* x available */ true, reading->x(),
- /* y available */ true, reading->y());
- m_controller->didChangeDeviceOrientation(m_lastOrientation.get());
- }
-
- // We are the only filter, so no need to propagate.
- return false;
-}
-
-}
diff --git a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h b/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
deleted file mode 100644
index d07f0a9b0..000000000
--- a/Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-#ifndef DeviceOrientationProviderQt_h
-#define DeviceOrientationProviderQt_h
-
-#include "DeviceOrientation.h"
-#include "DeviceOrientationController.h"
-#include <wtf/RefPtr.h>
-
-#include <QRotationFilter>
-
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-using QTM_NAMESPACE::QRotationFilter;
-using QTM_NAMESPACE::QRotationReading;
-using QTM_NAMESPACE::QRotationSensor;
-#endif
-
-namespace WebCore {
-
-class DeviceOrientationProviderQt : public QRotationFilter {
-public:
- DeviceOrientationProviderQt();
-
- void setController(DeviceOrientationController*);
-
- bool filter(QRotationReading*);
-
- void start();
- void stop();
- bool isActive() const { return m_sensor.isActive(); }
- DeviceOrientation* lastOrientation() const { return m_lastOrientation.get(); }
- bool hasAlpha() const { return m_sensor.property("hasZ").toBool(); }
-
-private:
- RefPtr<DeviceOrientation> m_lastOrientation;
- DeviceOrientationController* m_controller;
- QRotationSensor m_sensor;
-};
-
-}
-
-#endif // DeviceOrientationProviderQt_h
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 457b49e26..f55e25667 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -100,12 +100,13 @@
#include <QAction>
#include <QMenu>
+#include <QPainter>
using namespace WebCore;
QMap<int, QWebScriptWorld*> m_worldMap;
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client)
{
ASSERT(QWebPagePrivate::drtRun);
@@ -530,7 +531,7 @@ void DumpRenderTreeSupportQt::setMediaType(QWebFrame* frame, const QString& type
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
WebCore::FrameView* view = coreFrame->view();
view->setMediaType(type);
- coreFrame->document()->styleSelectorChanged(RecalcStyleImmediately);
+ coreFrame->document()->styleResolverChanged(RecalcStyleImmediately);
view->layout();
}
@@ -790,7 +791,7 @@ void DumpRenderTreeSupportQt::dumpSetAcceptsEditing(bool b)
void DumpRenderTreeSupportQt::dumpNotification(bool b)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::dumpNotification = b;
#endif
}
@@ -810,8 +811,8 @@ QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, int deviceDPI, c
QString res;
res = res.sprintf("viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n",
- conf.layoutSize.width(),
- conf.layoutSize.height(),
+ static_cast<int>(conf.layoutSize.width()),
+ static_cast<int>(conf.layoutSize.height()),
conf.initialScale,
conf.minimumScale,
conf.maximumScale,
@@ -838,34 +839,34 @@ void DumpRenderTreeSupportQt::setMockDeviceOrientation(QWebPage* page, bool canP
void DumpRenderTreeSupportQt::resetGeolocationMock(QWebPage* page)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->reset();
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationPermission(QWebPage* page, bool allowed)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->setPermission(allowed);
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationPosition(QWebPage* page, double latitude, double longitude, double accuracy)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
mockClient->setPosition(GeolocationPosition::create(currentTime(), latitude, longitude, accuracy));
#endif
}
void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorCode, const QString& message)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
GeolocationError::ErrorCode code = GeolocationError::PositionUnavailable;
@@ -878,16 +879,16 @@ void DumpRenderTreeSupportQt::setMockGeolocationError(QWebPage* page, int errorC
break;
}
- GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = static_cast<GeolocationClientMock*>(GeolocationController::from(corePage)->client());
mockClient->setError(GeolocationError::create(code, message));
#endif
}
int DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(QWebPage* page)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#if ENABLE(GEOLOCATION)
Page* corePage = QWebPagePrivate::core(page);
- GeolocationClientMock* mockClient = toGeolocationClientMock(corePage->geolocationController()->client());
+ GeolocationClientMock* mockClient = toGeolocationClientMock(GeolocationController::from(corePage)->client());
return mockClient->numberOfPendingPermissionRequests();
#else
return -1;
@@ -961,12 +962,6 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in
#endif
}
-bool DumpRenderTreeSupportQt::isPageBoxVisible(QWebFrame* frame, int pageIndex)
-{
- WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
- return coreFrame->document()->isPageBoxVisible(pageIndex);
-}
-
QString DumpRenderTreeSupportQt::pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft)
{
WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
@@ -987,32 +982,11 @@ void DumpRenderTreeSupportQt::addUserStyleSheet(QWebPage* page, const QString& s
void DumpRenderTreeSupportQt::simulateDesktopNotificationClick(const QString& title)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->notificationClicked(title);
#endif
}
-QVariantList DumpRenderTreeSupportQt::nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping)
-{
- QVariantList res;
- WebCore::Element* webElement = document.m_element;
- if (!webElement)
- return res;
-
- Document* doc = webElement->document();
- if (!doc)
- return res;
- RefPtr<NodeList> nodes = doc->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping);
- for (unsigned i = 0; i < nodes->length(); i++) {
- // QWebElement will be null if the Node is not an HTML Element
- if (nodes->item(i)->isHTMLElement())
- res << QVariant::fromValue(QWebElement(nodes->item(i)));
- else
- res << QVariant::fromValue(QDRTNode(nodes->item(i)));
- }
- return res;
-}
-
void DumpRenderTreeSupportQt::setDefersLoading(QWebPage* page, bool flag)
{
Page* corePage = QWebPagePrivate::core(page);
@@ -1234,6 +1208,49 @@ void DumpRenderTreeSupportQt::setHixie76WebSocketProtocolEnabled(QWebPage* page,
#endif
}
+QImage DumpRenderTreeSupportQt::paintPagesWithBoundaries(QWebFrame* qframe)
+{
+ Frame* frame = QWebFramePrivate::core(qframe);
+ PrintContext printContext(frame);
+
+ QRect rect = frame->view()->frameRect();
+
+ IntRect pageRect(0, 0, rect.width(), rect.height());
+
+ printContext.begin(pageRect.width(), pageRect.height());
+ float pageHeight = 0;
+ printContext.computePageRects(pageRect, /* headerHeight */ 0, /* footerHeight */ 0, /* userScaleFactor */ 1.0, pageHeight);
+
+ QPainter painter;
+ int pageCount = printContext.pageCount();
+ // pages * pageHeight and 1px line between each page
+ int totalHeight = pageCount * (pageRect.height() + 1) - 1;
+ QImage image(pageRect.width(), totalHeight, QImage::Format_ARGB32);
+ image.fill(Qt::white);
+ painter.begin(&image);
+
+ GraphicsContext ctx(&painter);
+ for (int i = 0; i < printContext.pageCount(); ++i) {
+ printContext.spoolPage(ctx, i, pageRect.width());
+ // translate to next page coordinates
+ ctx.translate(0, pageRect.height() + 1);
+
+ // if there is a next page, draw a blue line between these two
+ if (i + 1 < printContext.pageCount()) {
+ ctx.save();
+ ctx.setStrokeColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
+ ctx.setFillColor(Color(0, 0, 255), ColorSpaceDeviceRGB);
+ ctx.drawLine(IntPoint(0, -1), IntPoint(pageRect.width(), -1));
+ ctx.restore();
+ }
+ }
+
+ painter.end();
+ printContext.end();
+
+ return image;
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index d949e5154..eadc1af35 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -196,8 +196,6 @@ public:
static void setCustomPolicyDelegate(bool enabled, bool permissive);
- static bool isPageBoxVisible(QWebFrame* frame, int pageIndex);
-
static QString pageSizeAndMarginsInPixels(QWebFrame* frame, int pageIndex, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft);
static QString pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber);
static void addUserStyleSheet(QWebPage* page, const QString& sourceCode);
@@ -206,7 +204,6 @@ public:
static void scalePageBy(QWebFrame*, float scale, const QPoint& origin);
- static QVariantList nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
static QString responseMimeType(QWebFrame*);
static void clearOpener(QWebFrame*);
static void addURLToRedirect(const QString& origin, const QString& destination);
@@ -235,6 +232,8 @@ public:
static bool defaultHixie76WebSocketProtocolEnabled();
static void setHixie76WebSocketProtocolEnabled(QWebPage*, bool);
+
+ static QImage paintPagesWithBoundaries(QWebFrame*);
};
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
index 2830989e4..7437533cd 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -31,9 +31,9 @@
#define EditorClientQt_h
#include "EditorClient.h"
-#include "RefCounted.h"
#include "TextCheckerClientQt.h"
#include <wtf/Forward.h>
+#include <wtf/RefCounted.h>
class QWebPage;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 8364219d6..85b609185 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -212,7 +212,6 @@ FrameLoaderClientQt::FrameLoaderClientQt()
, m_webFrame(0)
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_hasRepresentation(false)
, m_isOriginatingLoad(false)
{
}
@@ -312,11 +311,6 @@ void FrameLoaderClientQt::dispatchDidBecomeFrameset(bool)
{
}
-void FrameLoaderClientQt::makeRepresentation(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
void FrameLoaderClientQt::forceLayout()
{
@@ -397,7 +391,7 @@ void FrameLoaderClientQt::dispatchDidChangeLocationWithinPage()
}
#if USE(V8)
-void FrameLoaderClientQt::didCreateScriptContext(v8::Handle<v8::Context>, int)
+void FrameLoaderClientQt::didCreateScriptContext(v8::Handle<v8::Context>, int, int)
{
}
void FrameLoaderClientQt::willReleaseScriptContext(v8::Handle<v8::Context>, int)
@@ -567,17 +561,6 @@ void FrameLoaderClientQt::dispatchWillSubmitForm(FramePolicyFunction function,
}
-void FrameLoaderClientQt::dispatchDidLoadMainResource(DocumentLoader*)
-{
-}
-
-
-void FrameLoaderClientQt::revertToProvisionalState(DocumentLoader*)
-{
- m_hasRepresentation = true;
-}
-
-
void FrameLoaderClientQt::postProgressStartedNotification()
{
if (m_webFrame && m_frame->page())
@@ -631,16 +614,10 @@ void FrameLoaderClientQt::didChangeTitle(DocumentLoader*)
}
-void FrameLoaderClientQt::finishedLoading(DocumentLoader* loader)
+void FrameLoaderClientQt::finishedLoading(DocumentLoader*)
{
- if (!m_pluginView) {
- // This is necessary to create an empty document. See bug 634004.
- // However, we only want to do this if makeRepresentation has been called,
- // to match the behavior on the Mac.
- if (m_hasRepresentation)
- loader->writer()->setEncoding("", false);
+ if (!m_pluginView)
return;
- }
if (m_pluginView->isPluginView())
m_pluginView->didFinishLoading();
m_pluginView = 0;
@@ -1366,28 +1343,6 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
return frameData.frame.release();
}
-void FrameLoaderClientQt::didTransferChildFrameToNewDocument(Page*)
-{
- ASSERT(m_frame->ownerElement());
-
- if (!m_webFrame)
- return;
-
- Frame* parentFrame = m_webFrame->d->frame->tree()->parent();
- ASSERT(parentFrame);
-
- if (QWebFrame* parent = QWebFramePrivate::kit(parentFrame)) {
- m_webFrame->d->setPage(parent->page());
-
- if (m_webFrame->parent() != qobject_cast<QObject*>(parent))
- m_webFrame->setParent(parent);
- }
-}
-
-void FrameLoaderClientQt::transferLoadingResourceFromPage(ResourceLoader*, const ResourceRequest&, Page*)
-{
-}
-
ObjectContentType FrameLoaderClientQt::objectContentType(const KURL& url, const String& mimeTypeIn, bool shouldPreferPlugInsForImages)
{
// qDebug()<<" ++++++++++++++++ url is "<<url.string()<<", mime = "<<mimeTypeIn;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 8c5b14dd1..d123b56c8 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -35,14 +35,14 @@
#include "FrameLoader.h"
#include "FrameLoaderClient.h"
#include "KURL.h"
-#include <wtf/OwnPtr.h>
#include "WebCore/plugins/PluginView.h"
-#include "RefCounted.h"
#include "ResourceError.h"
#include "ResourceResponse.h"
#include <QUrl>
#include <qobject.h>
#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/RefCounted.h>
QT_BEGIN_NAMESPACE
class QNetworkReply;
@@ -83,7 +83,7 @@ public:
virtual bool hasWebView() const; // mainly for assertions
- virtual void makeRepresentation(DocumentLoader*);
+ virtual void makeRepresentation(DocumentLoader*) { }
virtual void forceLayout();
virtual void forceLayoutForNonHTML();
@@ -135,11 +135,10 @@ public:
virtual void dispatchUnableToImplementPolicy(const WebCore::ResourceError&);
- virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) { }
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) { }
virtual void dispatchWillSubmitForm(FramePolicyFunction, PassRefPtr<FormState>);
- virtual void dispatchDidLoadMainResource(DocumentLoader*);
- virtual void revertToProvisionalState(DocumentLoader*);
+ virtual void revertToProvisionalState(DocumentLoader*) { }
virtual void setMainDocumentError(DocumentLoader*, const ResourceError&);
virtual void postProgressStartedNotification();
@@ -207,8 +206,6 @@ public:
virtual PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
- virtual void didTransferChildFrameToNewDocument(WebCore::Page*);
- virtual void transferLoadingResourceFromPage(WebCore::ResourceLoader*, const WebCore::ResourceRequest&, WebCore::Page*);
virtual PassRefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool);
virtual void redirectDataToPlugin(Widget* pluginWidget);
@@ -223,7 +220,7 @@ public:
#if USE(V8)
// A frame's V8 context was created or destroyed.
- virtual void didCreateScriptContext(v8::Handle<v8::Context>, int);
+ virtual void didCreateScriptContext(v8::Handle<v8::Context>, int, int);
virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int);
// A context untied to a frame was created (through evaluateInIsolatedWorld).
@@ -233,7 +230,7 @@ public:
// Returns true if we should allow the given V8 extension to be added to
// the script context at the currently loading page and given extension group.
- virtual bool allowScriptExtension(const String& extensionName, int extensionGroup) { return false; }
+ virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldID) { return false; }
#endif
virtual void registerForIconNotification(bool);
@@ -275,11 +272,6 @@ private:
WebCore::PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
- // True if makeRepresentation was called. We don't actually have a concept
- // of a "representation", but we need to know when we're expected to have one.
- // See finishedLoading().
- bool m_hasRepresentation;
-
KURL m_lastRequestedUrl;
bool m_isOriginatingLoad;
};
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
index cda5f350b..8551cf906 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
@@ -94,7 +94,7 @@ void GeolocationClientQt::positionUpdated(const QGeoPositionInfo& geoPosition)
providesHeading, heading, providesSpeed, speed);
WebCore::Page* page = QWebPagePrivate::core(m_page);
- page->geolocationController()->positionChanged(m_lastPosition.get());
+ GeolocationController::from(page)->positionChanged(m_lastPosition.get());
}
void GeolocationClientQt::startUpdating()
@@ -105,7 +105,7 @@ void GeolocationClientQt::startUpdating()
if (!m_location) {
WebCore::Page* page = QWebPagePrivate::core(m_page);
RefPtr<WebCore::GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, failedToStartServiceErrorMessage);
- page->geolocationController()->errorOccurred(error.get());
+ GeolocationController::from(page)->errorOccurred(error.get());
return;
}
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
index 9a2825d94..9d07a9155 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
@@ -47,7 +47,7 @@ class QWebPage;
namespace WebCore {
-// This class provides an implementation of a GeolocationService for QtWebkit.
+// This class provides an implementation of a GeolocationClient for QtWebkit.
class GeolocationClientQt : public QObject, public GeolocationClient {
Q_OBJECT
diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h b/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
index abe9c766c..1b4540d87 100644
--- a/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h
@@ -31,6 +31,8 @@
#ifndef GeolocationPermissionClientQt_h
#define GeolocationPermissionClientQt_h
+#if ENABLE(GEOLOCATION)
+
#include "Geolocation.h"
#include "qwebpage.h"
@@ -57,4 +59,6 @@ private:
}
+#endif // ENABLE(GEOLOCATION)
+
#endif
diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
index b09413345..452091c28 100644
--- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
@@ -42,10 +42,9 @@
#endif
#include "qwebelement_p.h"
+#include <JavaScriptCore/runtime/InitializeThreading.h>
#include <QApplication>
#include <QStyle>
-
-#include <runtime/InitializeThreading.h>
#include <wtf/MainThread.h>
namespace WebKit {
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
index c94d61a32..6c7d00f85 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
@@ -32,10 +32,10 @@
#include "InspectorClient.h"
#include "InspectorFrontendClientLocal.h"
-#include "OwnPtr.h"
-#include "PassOwnPtr.h"
#include <QtCore/QString>
#include <wtf/Forward.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
class QWebPage;
class QWebView;
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
index 26c52ff89..23f33baf2 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
@@ -22,7 +22,6 @@
#include "InspectorClientQt.h"
#include "InspectorController.h"
-#include "MD5.h"
#include "Page.h"
#include "qhttpheader_p.h"
#include "qwebpage.h"
@@ -35,6 +34,7 @@
#include <QUrl>
#include <QWidget>
#include <qendian.h>
+#include <wtf/MD5.h>
#include <wtf/text/CString.h>
namespace WebCore {
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index 00052184a..d693c4a95 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -48,7 +48,7 @@
namespace WebCore {
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
const double notificationTimeout = 10.0;
@@ -69,8 +69,9 @@ NotificationPresenterClientQt* NotificationPresenterClientQt::notificationPresen
NotificationWrapper::NotificationWrapper()
: m_closeTimer(this, &NotificationWrapper::close)
+ , m_displayEventTimer(this, &NotificationWrapper::sendDisplayEvent)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
#ifndef QT_NO_SYSTEMTRAYICON
m_notificationIcon = nullptr;
@@ -81,48 +82,52 @@ NotificationWrapper::NotificationWrapper()
void NotificationWrapper::close(Timer<NotificationWrapper>*)
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->cancel(this);
#endif
}
+void NotificationWrapper::sendDisplayEvent(Timer<NotificationWrapper>*)
+{
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ NotificationPresenterClientQt::notificationPresenter()->sendDisplayEvent(this);
+#endif
+}
+
const QString NotificationWrapper::title() const
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification)
- return notification->contents().title;
+ return notification->title();
#endif
return QString();
}
const QString NotificationWrapper::message() const
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification)
- return notification->contents().body;
+ return notification->body();
#endif
return QString();
}
-const QByteArray NotificationWrapper::iconData() const
+const QUrl NotificationWrapper::iconUrl() const
{
- QByteArray iconData;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
- if (notification) {
- if (notification->iconData())
- iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
- }
+ if (notification)
+ return notification->iconURL();
#endif
- return iconData;
+ return QUrl();
}
const QUrl NotificationWrapper::openerPageUrl() const
{
QUrl url;
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
if (notification) {
if (notification->scriptExecutionContext())
@@ -134,19 +139,19 @@ const QUrl NotificationWrapper::openerPageUrl() const
void NotificationWrapper::notificationClicked()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->notificationClicked(this);
#endif
}
void NotificationWrapper::notificationClosed()
{
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::notificationPresenter()->cancel(this);
#endif
}
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
NotificationPresenterClientQt::NotificationPresenterClientQt() : m_clientCount(0)
{
@@ -175,19 +180,15 @@ bool NotificationPresenterClientQt::show(Notification* notification)
if (notification->scriptExecutionContext()->isWorkerContext())
return false;
notification->setPendingActivity(notification);
- if (!notification->replaceId().isEmpty())
+ if (!notification->tag().isEmpty())
removeReplacedNotificationFromQueue(notification);
if (dumpNotification)
dumpShowText(notification);
- QByteArray iconData;
- if (notification->iconData())
- iconData = QByteArray::fromRawData(notification->iconData()->data(), notification->iconData()->size());
- displayNotification(notification, iconData);
- notification->releaseIconData();
+ displayNotification(notification);
return true;
}
-void NotificationPresenterClientQt::displayNotification(Notification* notification, const QByteArray& bytes)
+void NotificationPresenterClientQt::displayNotification(Notification* notification)
{
NotificationWrapper* wrapper = new NotificationWrapper();
m_notifications.insert(notification, wrapper);
@@ -197,8 +198,8 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
if (notification->isHTML())
message = notification->url().string();
else {
- title = notification->contents().title;
- message = notification->contents().body;
+ title = notification->title();
+ message = notification->body();
}
if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))
@@ -208,16 +209,11 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
#ifndef QT_NO_SYSTEMTRAYICON
if (!dumpNotification)
wrapper->m_closeTimer.startOneShot(notificationTimeout);
- QPixmap pixmap;
- if (bytes.length() && pixmap.loadFromData(bytes)) {
- QIcon icon(pixmap);
- wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon(icon));
- } else
wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon());
#endif
}
- sendEvent(notification, "display");
+ wrapper->m_displayEventTimer.startOneShot(0);
// Make sure the notification was not cancelled during handling the display event
if (m_notifications.find(notification) == m_notifications.end())
@@ -233,7 +229,7 @@ void NotificationPresenterClientQt::displayNotification(Notification* notificati
#ifndef QT_NO_SYSTEMTRAYICON
wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
wrapper->m_notificationIcon->show();
- wrapper->m_notificationIcon->showMessage(notification->contents().title, notification->contents().body);
+ wrapper->m_notificationIcon->showMessage(notification->title(), notification->body());
#endif
}
@@ -243,7 +239,7 @@ void NotificationPresenterClientQt::cancel(Notification* notification)
if (notification->isHTML())
printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
else
- printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title).toUtf8().constData());
+ printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->title()).toUtf8().constData());
}
NotificationsQueue::Iterator iter = m_notifications.find(notification);
@@ -283,7 +279,7 @@ void NotificationPresenterClientQt::notificationClicked(const QString& title)
if (notification->isHTML())
notificationTitle = notification->url().string();
else
- notificationTitle = notification->contents().title;
+ notificationTitle = notification->title();
if (notificationTitle == title)
break;
iter++;
@@ -384,6 +380,14 @@ void NotificationPresenterClientQt::allowNotificationForFrame(Frame* frame)
m_pendingPermissionRequests.remove(iter.key());
}
+void NotificationPresenterClientQt::sendDisplayEvent(NotificationWrapper* wrapper)
+{
+ Notification* notification = notificationForWrapper(wrapper);
+ if (notification)
+ sendEvent(notification, "display");
+}
+
+
void NotificationPresenterClientQt::sendEvent(Notification* notification, const AtomicString& eventName)
{
if (notification->scriptExecutionContext())
@@ -398,7 +402,7 @@ void NotificationPresenterClientQt::removeReplacedNotificationFromQueue(Notifica
while (iter != end) {
Notification* existingNotification = iter.key();
- if (existingNotification->replaceId() == notification->replaceId() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
+ if (existingNotification->tag() == notification->tag() && existingNotification->url().protocol() == notification->url().protocol() && existingNotification->url().host() == notification->url().host()) {
oldNotification = iter.key();
break;
}
@@ -423,7 +427,7 @@ void NotificationPresenterClientQt::detachNotification(Notification* notificatio
void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
{
if (notification)
- printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title).toUtf8().constData());
+ printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->title()).toUtf8().constData());
}
void NotificationPresenterClientQt::dumpShowText(Notification* notification)
@@ -433,8 +437,8 @@ void NotificationPresenterClientQt::dumpShowText(Notification* notification)
else {
printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
notification->dir() == "rtl" ? "(RTL)" : "",
- QString(notification->contents().icon.string()).toUtf8().constData(), QString(notification->contents().title).toUtf8().constData(),
- QString(notification->contents().body).toUtf8().constData());
+ QString(notification->iconURL().string()).toUtf8().constData(), QString(notification->title()).toUtf8().constData(),
+ QString(notification->body()).toUtf8().constData());
}
}
@@ -464,7 +468,7 @@ QWebFrame* NotificationPresenterClientQt::toFrame(ScriptExecutionContext* contex
return QWebFramePrivate::kit(document->frame());
}
-#endif // ENABLE(NOTIFICATIONS)
+#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
}
#include "moc_NotificationPresenterClientQt.cpp"
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
index 12b06fe9b..5819b4d80 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h
@@ -59,9 +59,10 @@ public:
void close();
void close(Timer<NotificationWrapper>*);
+ void sendDisplayEvent(Timer<NotificationWrapper>*);
const QString title() const;
const QString message() const;
- const QByteArray iconData() const;
+ const QUrl iconUrl() const;
const QUrl openerPageUrl() const;
public Q_SLOTS:
@@ -75,9 +76,10 @@ public:
OwnPtr<QWebNotificationPresenter> m_presenter;
Timer<NotificationWrapper> m_closeTimer;
+ Timer<NotificationWrapper> m_displayEventTimer;
};
-#if ENABLE(NOTIFICATIONS)
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
typedef QHash <Notification*, NotificationWrapper*> NotificationsQueue;
@@ -91,7 +93,12 @@ public:
virtual void cancel(Notification*);
virtual void notificationObjectDestroyed(Notification*);
virtual void notificationControllerDestroyed();
+#if ENABLE(LEGACY_NOTIFICATIONS)
virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>);
+#endif
+#if ENABLE(NOTIFICATIONS)
+ virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback>) { }
+#endif
virtual NotificationClient::Permission checkPermission(ScriptExecutionContext*);
virtual void cancelRequestsForPermission(ScriptExecutionContext*);
@@ -108,10 +115,11 @@ public:
Notification* notificationForWrapper(const NotificationWrapper*) const;
void notificationClicked(NotificationWrapper*);
void notificationClicked(const QString& title);
+ void sendDisplayEvent(NotificationWrapper*);
private:
void sendEvent(Notification*, const AtomicString& eventName);
- void displayNotification(Notification*, const QByteArray&);
+ void displayNotification(Notification*);
void removeReplacedNotificationFromQueue(Notification*);
void detachNotification(Notification*);
void dumpReplacedIdText(Notification*);
diff --git a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
index 7d65f5cbf..29e4624eb 100644
--- a/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
@@ -103,7 +103,7 @@ void PopupMenuQt::show(const IntRect& rect, FrameView* view, int index)
QRect geometry(rect);
geometry.moveTopLeft(view->contentsToWindow(rect.location()));
m_popup->setGeometry(geometry);
- m_popup->setFont(m_popupClient->menuStyle().font().font());
+ m_popup->setFont(m_popupClient->menuStyle().font().syntheticFont());
m_selectData = adoptPtr(new SelectData(m_popupClient));
m_popup->show(*m_selectData.get());
diff --git a/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h b/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
index ea111fa5c..2980d4582 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
+++ b/Source/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h
@@ -20,8 +20,8 @@
#ifndef QtFallbackWebPopup_h
#define QtFallbackWebPopup_h
-#include "Platform.h"
#include "qwebkitplatformplugin.h"
+#include <wtf/Platform.h>
#include <QComboBox>
diff --git a/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h b/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
index bca2e5f38..426475766 100644
--- a/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
+++ b/Source/WebKit/qt/WebCoreSupport/QtWebComboBox.h
@@ -21,7 +21,7 @@
#ifndef QtWebComboBox_h
#define QtWebComboBox_h
-#include "Platform.h"
+#include <wtf/Platform.h>
#include <QComboBox>
diff --git a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
index ac42fdd8b..b9d72edff 100644
--- a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp
@@ -31,7 +31,6 @@
#include "RenderThemeQStyle.h"
#include "CSSFontSelector.h"
-#include "CSSStyleSelector.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "ChromeClient.h"
@@ -54,6 +53,7 @@
#include "RenderSlider.h"
#include "ScrollbarThemeQStyle.h"
#include "SliderThumbElement.h"
+#include "StyleResolver.h"
#include "UserAgentStyleSheets.h"
#include <QApplication>
@@ -209,7 +209,7 @@ QRect RenderThemeQStyle::inflateButtonRect(const QRect& originalRect) const
void RenderThemeQStyle::computeSizeBasedOnStyle(RenderStyle* renderStyle) const
{
QSize size(0, 0);
- const QFontMetrics fm(renderStyle->font().font());
+ const QFontMetrics fm(renderStyle->font().syntheticFont());
QStyle* style = qStyle();
switch (renderStyle->appearance()) {
@@ -289,7 +289,7 @@ void RenderThemeQStyle::computeSizeBasedOnStyle(RenderStyle* renderStyle) const
-void RenderThemeQStyle::adjustButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element*) const
+void RenderThemeQStyle::adjustButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element*) const
{
// Ditch the border.
style->resetBorder();
@@ -317,7 +317,7 @@ void RenderThemeQStyle::adjustButtonStyle(CSSStyleSelector* selector, RenderStyl
fontFamily.setFamily(m_buttonFontFamily);
fontDescription.setFamily(fontFamily);
style->setFontDescription(fontDescription);
- style->font().update(selector->fontSelector());
+ style->font().update(styleResolver->fontSelector());
style->setLineHeight(RenderStyle::initialLineHeight());
setButtonSize(style);
setButtonPadding(style);
@@ -407,9 +407,9 @@ bool RenderThemeQStyle::paintTextField(RenderObject* o, const PaintInfo& i, cons
return false;
}
-void RenderThemeQStyle::adjustTextAreaStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const
+void RenderThemeQStyle::adjustTextAreaStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
{
- adjustTextFieldStyle(selector, style, element);
+ adjustTextFieldStyle(styleResolver, style, element);
}
bool RenderThemeQStyle::paintTextArea(RenderObject* o, const PaintInfo& i, const IntRect& r)
@@ -463,13 +463,13 @@ bool RenderThemeQStyle::paintMenuList(RenderObject* o, const PaintInfo& i, const
return false;
}
-void RenderThemeQStyle::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
+void RenderThemeQStyle::adjustMenuListButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
// WORKAROUND because html.css specifies -webkit-border-radius for <select> so we override it here
// see also http://bugs.webkit.org/show_bug.cgi?id=18399
style->resetBorderRadius();
- RenderThemeQt::adjustMenuListButtonStyle(selector, style, e);
+ RenderThemeQt::adjustMenuListButtonStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintMenuListButton(RenderObject* o, const PaintInfo& i,
@@ -499,7 +499,7 @@ double RenderThemeQStyle::animationDurationForProgressBar(RenderProgress* render
return 0;
QStyleOptionProgressBarV2 option;
- option.rect.setSize(renderProgress->size());
+ option.rect.setSize(renderProgress->pixelSnappedSize());
// FIXME: Until http://bugreports.qt.nokia.com/browse/QTBUG-9171 is fixed,
// we simulate one square animating across the progress bar.
return (option.rect.width() / qStyle()->pixelMetric(QStyle::PM_ProgressBarChunkWidth, &option)) * animationRepeatIntervalForProgressBar(renderProgress);
@@ -594,7 +594,7 @@ bool RenderThemeQStyle::paintSliderTrack(RenderObject* o, const PaintInfo& pi,
return false;
}
-void RenderThemeQStyle::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const
+void RenderThemeQStyle::adjustSliderTrackStyle(StyleResolver*, RenderStyle* style, Element*) const
{
style->setBoxShadow(nullptr);
}
@@ -627,9 +627,9 @@ bool RenderThemeQStyle::paintSliderThumb(RenderObject* o, const PaintInfo& pi,
return false;
}
-void RenderThemeQStyle::adjustSliderThumbStyle(CSSStyleSelector* selector, RenderStyle* style, Element* element) const
+void RenderThemeQStyle::adjustSliderThumbStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
{
- RenderTheme::adjustSliderThumbStyle(selector, style, element);
+ RenderTheme::adjustSliderThumbStyle(styleResolver, style, element);
style->setBoxShadow(nullptr);
}
@@ -639,11 +639,10 @@ bool RenderThemeQStyle::paintSearchField(RenderObject* o, const PaintInfo& pi,
return paintTextField(o, pi, r);
}
-void RenderThemeQStyle::adjustSearchFieldDecorationStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
+void RenderThemeQStyle::adjustSearchFieldDecorationStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
notImplemented();
- RenderTheme::adjustSearchFieldDecorationStyle(selector, style, e);
+ RenderTheme::adjustSearchFieldDecorationStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintSearchFieldDecoration(RenderObject* o, const PaintInfo& pi,
@@ -653,11 +652,10 @@ bool RenderThemeQStyle::paintSearchFieldDecoration(RenderObject* o, const PaintI
return RenderTheme::paintSearchFieldDecoration(o, pi, r);
}
-void RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style,
- Element* e) const
+void RenderThemeQStyle::adjustSearchFieldResultsDecorationStyle(StyleResolver* styleResolver, RenderStyle* style, Element* e) const
{
notImplemented();
- RenderTheme::adjustSearchFieldResultsDecorationStyle(selector, style, e);
+ RenderTheme::adjustSearchFieldResultsDecorationStyle(styleResolver, style, e);
}
bool RenderThemeQStyle::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& pi,
diff --git a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
index a83e02f5a..023a7c721 100644
--- a/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
+++ b/Source/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h
@@ -51,18 +51,18 @@ public:
QStyle* qStyle() const;
protected:
- virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintButton(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintTextField(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintTextArea(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustTextAreaStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintMenuList(RenderObject*, const PaintInfo&, const IntRect&);
virtual bool paintMenuListButton(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustMenuListButtonStyle(StyleResolver*, RenderStyle*, Element*) const;
#if ENABLE(PROGRESS_TAG)
// Returns the duration of the animation for the progress bar.
@@ -71,17 +71,17 @@ protected:
#endif
virtual bool paintSliderTrack(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSliderTrackStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSliderThumb(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSliderThumbStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSliderThumbStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchField(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSearchFieldDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldDecoration(RenderObject*, const PaintInfo&, const IntRect&);
- virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual void adjustSearchFieldResultsDecorationStyle(StyleResolver*, RenderStyle*, Element*) const;
virtual bool paintSearchFieldResultsDecoration(RenderObject*, const PaintInfo&, const IntRect&);
#ifndef QT_NO_SPINBOX
diff --git a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
index be5f5298e..d45f8ce31 100644
--- a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
@@ -23,9 +23,12 @@
#include "WebEventConversion.h"
#include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
+#include "PlatformTouchPoint.h"
#include "PlatformWheelEvent.h"
#include <QApplication>
#include <QGraphicsSceneMouseEvent>
+#include <QTouchEvent>
#include <QWheelEvent>
#include <wtf/CurrentTime.h>
@@ -178,27 +181,21 @@ private:
void WebKitPlatformWheelEvent::applyDelta(int delta, Qt::Orientation orientation)
{
- // A delta that is not mod 120 indicates a device that is sending
- // fine-resolution scroll events, so use the delta as number of wheel ticks
- // and number of pixels to scroll.See also webkit.org/b/29601
- bool fullTick = !(delta % 120);
-
if (orientation == Qt::Horizontal) {
- m_deltaX = (fullTick) ? delta / 120.0f : delta;
+ m_deltaX = delta;
m_deltaY = 0;
} else {
m_deltaX = 0;
- m_deltaY = (fullTick) ? delta / 120.0f : delta;
+ m_deltaY = delta;
}
+ m_wheelTicksX = m_deltaX / 120.0f;
+ m_wheelTicksY = m_deltaY / 120.0f;
- m_wheelTicksX = m_deltaX;
- m_wheelTicksY = m_deltaY;
-
- // Use the same single scroll step as QTextEdit
- // (in QTextEditPrivate::init [h,v]bar->setSingleStep)
+ // Since we request the scroll delta by the pixel, convert the wheel delta to pixel delta using the standard scroll step.
+ // Use the same single scroll step as QTextEdit (in QTextEditPrivate::init [h,v]bar->setSingleStep)
static const float cDefaultQtScrollStep = 20.f;
- m_deltaX *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
- m_deltaY *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
+ m_deltaX = m_wheelTicksX * QApplication::wheelScrollLines() * cDefaultQtScrollStep;
+ m_deltaY = m_wheelTicksY * QApplication::wheelScrollLines() * cDefaultQtScrollStep;
}
WebKitPlatformWheelEvent::WebKitPlatformWheelEvent(QGraphicsSceneWheelEvent* e)
@@ -223,6 +220,89 @@ WebKitPlatformWheelEvent::WebKitPlatformWheelEvent(QWheelEvent* e)
applyDelta(e->delta(), e->orientation());
}
+#if ENABLE(TOUCH_EVENTS)
+class WebKitPlatformTouchEvent : public PlatformTouchEvent {
+public:
+ WebKitPlatformTouchEvent(QTouchEvent*);
+};
+
+class WebKitPlatformTouchPoint : public PlatformTouchPoint {
+public:
+ WebKitPlatformTouchPoint(const QTouchEvent::TouchPoint&, State);
+};
+
+WebKitPlatformTouchEvent::WebKitPlatformTouchEvent(QTouchEvent* event)
+{
+ switch (event->type()) {
+ case QEvent::TouchBegin:
+ m_type = PlatformEvent::TouchStart;
+ break;
+ case QEvent::TouchUpdate:
+ m_type = PlatformEvent::TouchMove;
+ break;
+ case QEvent::TouchEnd:
+ m_type = PlatformEvent::TouchEnd;
+ break;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ case QEvent::TouchCancel:
+ m_type = PlatformEvent::TouchCancel;
+ break;
+#endif
+ }
+
+ const QList<QTouchEvent::TouchPoint>& points = event->touchPoints();
+ for (int i = 0; i < points.count(); ++i) {
+ PlatformTouchPoint::State state = PlatformTouchPoint::TouchStateEnd;
+
+ switch (points.at(i).state()) {
+ case Qt::TouchPointReleased:
+ state = PlatformTouchPoint::TouchReleased;
+ break;
+ case Qt::TouchPointMoved:
+ state = PlatformTouchPoint::TouchMoved;
+ break;
+ case Qt::TouchPointPressed:
+ state = PlatformTouchPoint::TouchPressed;
+ break;
+ case Qt::TouchPointStationary:
+ state = PlatformTouchPoint::TouchStationary;
+ break;
+ }
+
+ // Qt does not have a Qt::TouchPointCancelled point state, so if we receive a touch cancel event,
+ // simply cancel all touch points here.
+ if (m_type == PlatformEvent::TouchCancel)
+ state = PlatformTouchPoint::TouchCancelled;
+
+ m_touchPoints.append(WebKitPlatformTouchPoint(points.at(i), state));
+ }
+
+ mouseEventModifiersFromQtKeyboardModifiers(event->modifiers(), m_modifiers);
+
+ m_timestamp = WTF::currentTime();
+}
+
+WebKitPlatformTouchPoint::WebKitPlatformTouchPoint(const QTouchEvent::TouchPoint& point, State state)
+{
+ // The QTouchEvent::TouchPoint API states that ids will be >= 0.
+ m_id = point.id();
+ m_state = state;
+ m_screenPos = point.screenPos().toPoint();
+ m_pos = point.pos().toPoint();
+ // Qt reports touch point size as rectangles, but we will pretend it is an oval.
+ QRect touchRect = point.rect().toAlignedRect();
+ if (touchRect.isValid()) {
+ m_radiusX = point.rect().width() / 2;
+ m_radiusY = point.rect().height() / 2;
+ } else {
+ // http://www.w3.org/TR/2011/WD-touch-events-20110505: 1 if no value is known.
+ m_radiusX = 1;
+ m_radiusY = 1;
+ }
+ m_force = point.pressure();
+ // FIXME: Support m_rotationAngle if QTouchEvent at some point supports it.
+}
+#endif
PlatformWheelEvent convertWheelEvent(QWheelEvent* event)
{
@@ -234,4 +314,11 @@ PlatformWheelEvent convertWheelEvent(QGraphicsSceneWheelEvent* event)
return WebKitPlatformWheelEvent(event);
}
+#if ENABLE(TOUCH_EVENTS)
+PlatformTouchEvent convertTouchEvent(QTouchEvent* event)
+{
+ return WebKitPlatformTouchEvent(event);
+}
+#endif
+
}
diff --git a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
index 25d02df22..09c63d17c 100644
--- a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
+++ b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.h
@@ -26,6 +26,7 @@ class QInputEvent;
class QGraphicsSceneMouseEvent;
class QWheelEvent;
class QGraphicsSceneWheelEvent;
+class QTouchEvent;
QT_END_NAMESPACE
namespace WebCore {
@@ -33,9 +34,14 @@ namespace WebCore {
class PlatformMouseEvent;
class PlatformWheelEvent;
+
PlatformMouseEvent convertMouseEvent(QInputEvent*, int clickCount);
PlatformMouseEvent convertMouseEvent(QGraphicsSceneMouseEvent*, int clickCount);
PlatformWheelEvent convertWheelEvent(QWheelEvent*);
PlatformWheelEvent convertWheelEvent(QGraphicsSceneWheelEvent*);
+#if ENABLE(TOUCH_EVENTS)
+class PlatformTouchEvent;
+PlatformTouchEvent convertTouchEvent(QTouchEvent*);
+#endif
}
diff --git a/Source/WebKit/qt/declarative/declarative.pro b/Source/WebKit/qt/declarative/declarative.pro
index 737928338..e7ed4496c 100644
--- a/Source/WebKit/qt/declarative/declarative.pro
+++ b/Source/WebKit/qt/declarative/declarative.pro
@@ -7,6 +7,8 @@
TEMPLATE = subdirs
CONFIG += ordered
+load(features)
+
public_api.file = public.pri
public_api.makefile = Makefile.declarative.public
SUBDIRS += public_api
diff --git a/Source/WebKit/qt/declarative/experimental/experimental.pri b/Source/WebKit/qt/declarative/experimental/experimental.pri
index 583726f62..20d54523c 100644
--- a/Source/WebKit/qt/declarative/experimental/experimental.pri
+++ b/Source/WebKit/qt/declarative/experimental/experimental.pri
@@ -24,7 +24,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
wince*:LIBS += $$QMAKE_LIBS_GUI
-QT += declarative widgets network quick webkit webkit-private
+QT += declarative widgets network quick quick-private webkit webkit-private
DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
@@ -35,15 +35,7 @@ SOURCES += plugin.cpp
DEFINES += HAVE_WEBKIT2
-# FIXME: Why are these needed, and why can't we use WEBKIT += ... ?
-INCLUDEPATH += \
- ../../../../WebKit2/Shared/qt \
- ../../../../JavaScriptCore \
- ../../../../JavaScriptCore/wtf \
- ../../../../JavaScriptCore/wtf/unicode \
- ../../../../JavaScriptCore/runtime \
- ../../../../WebKit2/Platform \
- ../../../../WebKit2/Platform/CoreIPC
+WEBKIT += wtf javascriptcore webkit2
target.path = $$[QT_INSTALL_IMPORTS]/$${TARGET.module_name}
diff --git a/Source/WebKit/qt/declarative/experimental/plugin.cpp b/Source/WebKit/qt/declarative/experimental/plugin.cpp
index 7d380e66a..d33a47955 100644
--- a/Source/WebKit/qt/declarative/experimental/plugin.cpp
+++ b/Source/WebKit/qt/declarative/experimental/plugin.cpp
@@ -30,8 +30,8 @@
#include "private/qwebpreferences_p.h"
#include "private/qwebviewportinfo_p.h"
-#include <QtDeclarative/qdeclarative.h>
-#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
QT_BEGIN_NAMESPACE
diff --git a/Source/WebKit/qt/declarative/plugin.cpp b/Source/WebKit/qt/declarative/plugin.cpp
index 968b1fe18..08532bf01 100644
--- a/Source/WebKit/qt/declarative/plugin.cpp
+++ b/Source/WebKit/qt/declarative/plugin.cpp
@@ -17,12 +17,19 @@
Boston, MA 02110-1301, USA.
*/
+#include "qglobal.h"
+
#if defined(HAVE_QQUICK1)
#include "qdeclarativewebview_p.h"
#endif
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlextensionplugin.h>
+#else
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/qdeclarativeextensionplugin.h>
+#endif
#if defined(HAVE_WEBKIT2)
#include "private/qquickwebpage_p.h"
@@ -31,8 +38,8 @@
#include "private/qwebloadrequest_p.h"
#include "private/qwebnavigationrequest_p.h"
-#include <QtDeclarative/qdeclarativeengine.h>
#include <QtNetwork/qnetworkreply.h>
+#include <QtQml/qqmlengine.h>
#endif
QT_BEGIN_NAMESPACE
@@ -41,7 +48,7 @@ class WebKitQmlPlugin : public QDeclarativeExtensionPlugin {
Q_OBJECT
public:
#if defined(HAVE_WEBKIT2)
- virtual void initializeEngine(QDeclarativeEngine* engine, const char* uri)
+ virtual void initializeEngine(QQmlEngine* engine, const char* uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebKit"));
engine->addImageProvider(QLatin1String("webicon"), new QWebIconImageProvider);
diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri
index e389e38eb..04b17b724 100644
--- a/Source/WebKit/qt/declarative/public.pri
+++ b/Source/WebKit/qt/declarative/public.pri
@@ -27,7 +27,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
wince*:LIBS += $$QMAKE_LIBS_GUI
QT += declarative webkit webkit-private
-haveQt(5): QT += widgets quick
+haveQt(5): QT += widgets quick quick-private
contains(DEFINES, HAVE_QQUICK1=1) {
SOURCES += qdeclarativewebview.cpp
@@ -39,13 +39,6 @@ DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name}
CONFIG += rpath
RPATHDIR_RELATIVE_TO_DESTDIR = ../../lib
-# FIXME: Why are these needed, and why can't we use WEBKIT += ... ?
-INCLUDEPATH += \
- ../../../WebKit2/Shared/qt \
- ../../../JavaScriptCore \
- ../../../JavaScriptCore/runtime \
- ../../../JavaScriptCore/wtf
-
SOURCES += plugin.cpp
!no_webkit2: {
diff --git a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
index 807cdaec0..2975d157f 100644
--- a/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
+++ b/Source/WebKit/qt/docs/qtwebkit-bridge.qdoc
@@ -132,7 +132,7 @@
\snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10
- The call to \c{connect() establishes a connection between the signal
+ The call to \c{connect()} establishes a connection between the signal
\c{somethingChanged} and the slot \c{function}. Whenever the object
\c{myObject} emits the signal \c{somethingChanged}, the slot \c{function}
of the object \c{thisObject} gets called automatically. Let's illustrate
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdocconf b/Source/WebKit/qt/docs/qtwebkit.qdocconf
index 278d77ba8..1f51ea37e 100644
--- a/Source/WebKit/qt/docs/qtwebkit.qdocconf
+++ b/Source/WebKit/qt/docs/qtwebkit.qdocconf
@@ -3,8 +3,8 @@
project = qtwebkit
description = "Qt WebKit API Documentation"
-headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative
+headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/declarative $SRCDIR/WebKit2/UIProcess/API/qt
+sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit/qt/declarative $SRCDIR/WebKit2/UIProcess/API/qt
outputdir = $OUTPUT_DIR/doc/html
outputformats = HTML
sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
diff --git a/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp b/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
index d991ab162..339bade03 100644
--- a/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
+++ b/Source/WebKit/qt/examples/platformplugin/WebNotificationPresenter.cpp
@@ -39,13 +39,7 @@ void WebNotificationWidget::showNotification(const QWebNotificationData* data)
QGridLayout* layout = new QGridLayout(this);
layout->addWidget(new QLabel(data->title()), 0, 0, 1, 5);
int messagePosition = 0;
- QPixmap pixmap;
- if (data->iconData().length() && pixmap.loadFromData(data->iconData())) {
- QLabel* label = new QLabel;
- label->setPixmap(pixmap);
- layout->addWidget(label, 1, 0, 1, 1);
- messagePosition++;
- }
+
QLabel* messageLabel = new QLabel(data->message());
messageLabel->setMask(bitmap);
messageLabel->setWordWrap(true);
diff --git a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
index b28c05801..aa8ec7ea6 100644
--- a/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
+++ b/Source/WebKit/qt/examples/platformplugin/qwebkitplatformplugin.h
@@ -75,7 +75,7 @@ public:
virtual const QString title() const = 0;
virtual const QString message() const = 0;
- virtual const QByteArray iconData() const = 0;
+ virtual const QUrl iconUrl() const = 0;
virtual const QUrl openerPageUrl() const = 0;
};
@@ -180,7 +180,7 @@ public:
};
QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.8");
+Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9");
QT_END_NAMESPACE
#endif // QWEBKITPLATFORMPLUGIN_H
diff --git a/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
index fe50f1b34..c856a6e7d 100644
--- a/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
+++ b/Source/WebKit/qt/tests/MIMESniffing/MIMESniffing.pro
@@ -10,6 +10,7 @@ HEADERS += \
INCLUDEPATH += \
../../../../WebCore/platform/network \
../../../../JavaScriptCore \
- ../../../../JavaScriptCore/runtime
+ ../../../../JavaScriptCore/runtime \
+ ../../../../WTF
RESOURCES += resources.qrc
diff --git a/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp b/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
index 1c3985b83..2ebf3775d 100644
--- a/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
+++ b/Source/WebKit/qt/tests/benchmarks/loading/tst_loading.cpp
@@ -17,7 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QNetworkConfigurationManager>
+#endif
#include <QtTest/QtTest>
@@ -42,7 +44,9 @@ private Q_SLOTS:
void load();
private:
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager m_manager;
+#endif
QWebView* m_view;
QWebPage* m_page;
};
@@ -74,8 +78,10 @@ void tst_Loading::load()
{
QFETCH(QUrl, url);
+#ifndef QT_NO_BEARERMANAGEMENT
if (!m_manager.isOnline())
W_QSKIP("This test requires an active network connection", SkipSingle);
+#endif
QBENCHMARK {
m_view->load(url);
diff --git a/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp b/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
index 3f97b5aea..8abba4bad 100644
--- a/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
+++ b/Source/WebKit/qt/tests/benchmarks/painting/tst_painting.cpp
@@ -17,7 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
+#ifndef QT_NO_BEARERMANAGEMENT
#include <QNetworkConfigurationManager>
+#endif
#include <QtTest/QtTest>
@@ -44,7 +46,9 @@ private Q_SLOTS:
void textAreas();
private:
+#ifndef QT_NO_BEARERMANAGEMENT
QNetworkConfigurationManager m_manager;
+#endif
QWebView* m_view;
QWebPage* m_page;
};
@@ -74,8 +78,10 @@ void tst_Painting::paint()
{
QFETCH(QUrl, url);
+#ifndef QT_NO_BEARERMANAGEMENT
if (!m_manager.isOnline())
W_QSKIP("This test requires an active network connection", SkipSingle);
+#endif
m_view->load(url);
::waitForSignal(m_view, SIGNAL(loadFinished(bool)), 0);