summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/qt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/qt
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/qt')
-rw-r--r--Source/WebKit/qt/Api/qwebdatabase_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp17
-rw-r--r--Source/WebKit/qt/Api/qwebframe.cpp7
-rw-r--r--Source/WebKit/qt/Api/qwebframe_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebhistory.cpp2
-rw-r--r--Source/WebKit/qt/Api/qwebhistoryinterface.cpp2
-rw-r--r--Source/WebKit/qt/Api/qwebpage.cpp22
-rw-r--r--Source/WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp2
-rw-r--r--Source/WebKit/qt/ChangeLog226
-rw-r--r--Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp24
-rw-r--r--Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h3
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp15
-rw-r--r--Source/WebKit/qt/WebCoreSupport/EditorClientQt.h2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp2
-rw-r--r--Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp1
-rw-r--r--Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp2
-rw-r--r--Source/WebKit/qt/docs/docs.pri15
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdocconf2
-rw-r--r--Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp14
-rw-r--r--Source/WebKit/qt/tests/qwebview/.gitignore1
22 files changed, 288 insertions, 79 deletions
diff --git a/Source/WebKit/qt/Api/qwebdatabase_p.h b/Source/WebKit/qt/Api/qwebdatabase_p.h
index 298470442..80cb804a6 100644
--- a/Source/WebKit/qt/Api/qwebdatabase_p.h
+++ b/Source/WebKit/qt/Api/qwebdatabase_p.h
@@ -22,9 +22,9 @@
#include <QString>
#include <QtCore/qshareddata.h>
-#include "PlatformString.h"
#include "SecurityOrigin.h"
#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
class QWebDatabasePrivate : public QSharedData {
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index a208cbc4e..298f6cdc3 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "qwebelement.h"
+#include "APICast.h"
#include "qwebelement_p.h"
#include "CSSComputedStyleDeclaration.h"
#include "CSSParser.h"
@@ -545,7 +546,7 @@ QRect QWebElement::geometry() const
{
if (!m_element)
return QRect();
- return m_element->getPixelSnappedRect();
+ return m_element->pixelSnappedBoundingBox();
}
/*!
@@ -750,16 +751,16 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
if (!setupScriptContext(m_element, thisValue, state, scriptController))
return QVariant();
- JSC::ScopeChainNode* scopeChain = state->dynamicGlobalObject()->globalScopeChain();
- JSC::UString script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
+ String script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
JSC::JSValue evaluationException;
- JSC::JSValue evaluationResult = JSC::evaluate(state, scopeChain, JSC::makeSource(script), thisValue, &evaluationException);
+ JSC::JSValue evaluationResult = JSC::evaluate(state, JSC::makeSource(script), thisValue, &evaluationException);
if (evaluationException)
return QVariant();
int distance = 0;
- return JSC::Bindings::convertValueToQVariant(state, evaluationResult, QMetaType::Void, &distance);
+ JSValueRef* ignoredException = 0;
+ return JSC::Bindings::convertValueToQVariant(toRef(state), toRef(state, evaluationResult), QMetaType::Void, &distance, ignoredException);
}
/*!
@@ -1453,7 +1454,7 @@ void QWebElement::render(QPainter* painter, const QRect& clip)
view->updateLayoutAndStyleIfNeededRecursive();
- IntRect rect = e->getPixelSnappedRect();
+ IntRect rect = e->pixelSnappedBoundingBox();
if (rect.size().isEmpty())
return;
@@ -2046,7 +2047,7 @@ Element* QtWebElementRuntime::get(const QWebElement& element)
return element.m_element;
}
-static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *distance, HashSet<JSC::JSObject*>* visitedObjects)
+static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *distance, HashSet<JSObjectRef>* visitedObjects)
{
Element* element = 0;
QVariant ret;
@@ -2055,7 +2056,7 @@ static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *di
*distance = 0;
// Allow other objects to reach this one. This won't cause our algorithm to
// loop since when we find an Element we do not recurse.
- visitedObjects->remove(object);
+ visitedObjects->remove(toRef(object));
} else if (object && object->inherits(&JSDocument::s_info)) {
// To support TestRunnerQt::nodesFromRect(), used in DRT, we do an implicit
// conversion from 'document' to the QWebElement representing the 'document.documentElement'.
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp
index 22e47c55d..8ac18f8e3 100644
--- a/Source/WebKit/qt/Api/qwebframe.cpp
+++ b/Source/WebKit/qt/Api/qwebframe.cpp
@@ -1406,7 +1406,7 @@ QWebHitTestResult QWebFrame::hitTestContent(const QPoint &pos) const
if (!d->frame->view() || !d->frame->contentRenderer())
return QWebHitTestResult();
- HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
+ HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
if (result.scrollbar())
return QWebHitTestResult();
@@ -1534,8 +1534,9 @@ QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource)
if (proxy) {
int distance = 0;
JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
-
- rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject(mainThreadNormalWorld())->globalExec(), v, QMetaType::Void, &distance);
+ JSC::ExecState* exec = proxy->globalObject(mainThreadNormalWorld())->globalExec();
+ JSValueRef* ignoredException = 0;
+ rc = JSC::Bindings::convertValueToQVariant(toRef(exec), toRef(exec, v), QMetaType::Void, &distance, ignoredException);
}
return rc;
}
diff --git a/Source/WebKit/qt/Api/qwebframe_p.h b/Source/WebKit/qt/Api/qwebframe_p.h
index 3201aaa57..d6779f2bc 100644
--- a/Source/WebKit/qt/Api/qwebframe_p.h
+++ b/Source/WebKit/qt/Api/qwebframe_p.h
@@ -27,7 +27,6 @@
#include "EventHandler.h"
#include "GraphicsContext.h"
#include "KURL.h"
-#include "PlatformString.h"
#if ENABLE(ORIENTATION_EVENTS)
#include "qorientationsensor.h"
#endif // ENABLE(ORIENTATION_EVENTS).
@@ -35,6 +34,7 @@
#include "wtf/RefPtr.h"
#include "Frame.h"
#include "ViewportArguments.h"
+#include <wtf/text/WTFString.h>
#if USE(ACCELERATED_COMPOSITING)
#include "texmap/TextureMapper.h"
diff --git a/Source/WebKit/qt/Api/qwebhistory.cpp b/Source/WebKit/qt/Api/qwebhistory.cpp
index 712c28f88..4bf63583b 100644
--- a/Source/WebKit/qt/Api/qwebhistory.cpp
+++ b/Source/WebKit/qt/Api/qwebhistory.cpp
@@ -29,7 +29,7 @@
#include "KURL.h"
#include "Page.h"
#include "PageGroup.h"
-#include "PlatformString.h"
+#include <wtf/text/WTFString.h>
#include <QSharedData>
#include <QDebug>
diff --git a/Source/WebKit/qt/Api/qwebhistoryinterface.cpp b/Source/WebKit/qt/Api/qwebhistoryinterface.cpp
index 40ff5c99b..305ff6781 100644
--- a/Source/WebKit/qt/Api/qwebhistoryinterface.cpp
+++ b/Source/WebKit/qt/Api/qwebhistoryinterface.cpp
@@ -25,7 +25,7 @@
#include <QCoreApplication>
#include "PageGroup.h"
-#include "PlatformString.h"
+#include <wtf/text/WTFString.h>
static QWebHistoryInterface* default_interface;
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp
index 08e86183a..e1c06515b 100644
--- a/Source/WebKit/qt/Api/qwebpage.cpp
+++ b/Source/WebKit/qt/Api/qwebpage.cpp
@@ -757,21 +757,13 @@ void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button)
{
#ifndef QT_NO_CLIPBOARD
if (QApplication::clipboard()->supportsSelection()) {
- bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode();
- Pasteboard::generalPasteboard()->setSelectionMode(true);
WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame();
- if (button == Qt::LeftButton) {
- if (focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) {
- Pasteboard::generalPasteboard()->writeSelection(focusFrame->editor()->selectedRange().get(), focusFrame->editor()->canSmartCopyOrDelete(), focusFrame);
- ev->setAccepted(true);
- }
- } else if (button == Qt::MidButton) {
- if (focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) {
- focusFrame->editor()->paste();
+ if (button == Qt::MidButton) {
+ if (focusFrame) {
+ focusFrame->editor()->command(AtomicString("PasteGlobalSelection")).execute();
ev->setAccepted(true);
}
}
- Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode);
}
#endif
}
@@ -808,7 +800,7 @@ void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button, const QPo
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel(
client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) {
- HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), false);
+ HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos));
if (result.isContentEditable()) {
QEvent event(QEvent::RequestSoftwareInputPanel);
QApplication::sendEvent(client->ownerWidget(), &event);
@@ -1565,7 +1557,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 /*ignoreClipping*/, false /*allowShadowContent*/);
+ RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
if (!intersectedNodes)
return IntPoint();
@@ -1585,7 +1577,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi
if (!currentElement || (!isClickableElement(currentElement, 0) && !isValidFrameOwner(currentElement)))
continue;
- IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect();
+ IntRect currentElementBoundingRect = currentElement->pixelSnappedBoundingBox();
currentElementBoundingRect.intersect(touchRect);
if (currentElementBoundingRect.isEmpty())
@@ -3371,7 +3363,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
d->createMainFrame();
WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame();
- HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false);
+ HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos));
if (result.scrollbar())
d->hitTestResult = QWebHitTestResult();
else
diff --git a/Source/WebKit/qt/Api/qwebpage_p.h b/Source/WebKit/qt/Api/qwebpage_p.h
index ca3aa94ad..a8e373bca 100644
--- a/Source/WebKit/qt/Api/qwebpage_p.h
+++ b/Source/WebKit/qt/Api/qwebpage_p.h
@@ -34,10 +34,10 @@
#include "IntPoint.h"
#include "KURL.h"
-#include "PlatformString.h"
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
#include "ViewportArguments.h"
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index 741457f47..0f504f817 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -36,7 +36,6 @@
#include "PageCache.h"
#include "Settings.h"
#include "KURL.h"
-#include "PlatformString.h"
#include "IconDatabase.h"
#include "PluginDatabase.h"
#include "Image.h"
@@ -44,6 +43,7 @@
#include "ApplicationCacheStorage.h"
#include "DatabaseTracker.h"
#include "FileSystem.h"
+#include <wtf/text/WTFString.h>
#include <QApplication>
#include <QStandardPaths>
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 8c13066b1..1ae43c77a 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,229 @@
+2012-09-09 Emil A Eklund <eae@chromium.org>
+
+ Rename Node::getRect/getPixelSnappedRect and remove ContainerNode::getRect
+ https://bugs.webkit.org/show_bug.cgi?id=81413
+
+ Reviewed by David Hyatt.
+
+ Update qwebelement and qwebpage to call pixelSnappedBoundingBox.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::geometry):
+ (QWebElement::render):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
+
+2012-09-07 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ Simplify hitTestResultAtPoint and nodesFromRect APIs
+ https://bugs.webkit.org/show_bug.cgi?id=95720
+
+ Reviewed by Antonio Gomes.
+
+ Update calls to new API.
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::hitTestContent):
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::handleSoftwareInputPanel):
+ (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):
+ (QWebPage::updatePositionDependentActions):
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
+
+2012-09-07 Allan Sandfeld Jensen <allan.jensen@nokia.com>
+
+ X11 Global Selection
+ https://bugs.webkit.org/show_bug.cgi?id=88238
+
+ Reviewed by Tony Chang.
+
+ Use new editor command for pasting global selection, and update it using
+ the respondToChangedSelection callback.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::handleClipboard):
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::respondToChangedSelection):
+ (WebCore::EditorClientQt::supportsGlobalSelection):
+ * WebCoreSupport/EditorClientQt.h:
+ (EditorClientQt):
+
+2012-09-05 Sam Weinig <sam@webkit.org>
+
+ Part 2 of removing PlatformString.h, remove PlatformString.h
+ https://bugs.webkit.org/show_bug.cgi?id=95931
+
+ Reviewed by Adam Barth.
+
+ Remove PlatformString.h
+
+ * Api/qwebdatabase_p.h:
+ * Api/qwebframe_p.h:
+ * Api/qwebhistory.cpp:
+ * Api/qwebhistoryinterface.cpp:
+ * Api/qwebpage_p.h:
+ * Api/qwebsettings.cpp:
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/InspectorClientQt.cpp:
+
+2012-09-05 Kaustubh Atrawalkar <kaustubh@motorola.com>
+
+ [DRT] LTC:: Move printing related APIs from LayoutTestController to Internals
+ https://bugs.webkit.org/show_bug.cgi?id=92735
+
+ Reviewed by Hajime Morita.
+
+ Move numberOfPages, pageProperty & pageSizeAndMarginsInPixels in Internals and remove duplicated code from DumprenderTree & WebkitTestRunner.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2012-09-04 Jon Lee <jonlee@apple.com>
+
+ [Qt] REGRESSION(r127321): It made 3 notification test timeout
+ https://bugs.webkit.org/show_bug.cgi?id=95638
+
+ Reviewed by Csaba Osztrogonác.
+
+ Dispatch show event instead of display after r127321.
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::sendDisplayEvent):
+
+2012-08-31 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Port convertValueToQVariant to use the JSC C API
+ https://bugs.webkit.org/show_bug.cgi?id=94695
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Minor adaptations are needed here to accomodate the changed signature of
+ convertValueToQVariant.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::evaluateJavaScript):
+ (convertJSValueToWebElementVariant):
+ * Api/qwebframe.cpp:
+ (QWebFrame::evaluateJavaScript):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (convertJSValueToNodeVariant):
+
+2012-08-30 Geoffrey Garen <ggaren@apple.com>
+
+ Use one object instead of two for closures, eliminating ScopeChainNode
+ https://bugs.webkit.org/show_bug.cgi?id=95501
+
+ Reviewed by Filip Pizlo.
+
+ Mechanical change to update for JSC interface change.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::evaluateJavaScript):
+
+2012-08-30 Benjamin Poulain <bpoulain@apple.com>
+
+ Replace JSC::UString by WTF::String
+ https://bugs.webkit.org/show_bug.cgi?id=95271
+
+ Reviewed by Geoffrey Garen.
+
+ Replace UString by String.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::evaluateJavaScript):
+
+2012-08-29 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Fix doc generation with make docs
+ https://bugs.webkit.org/show_bug.cgi?id=95340
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix doc target, similar to what the other Qt 5 modules are using and comment out the indexes
+ line, because cross-referencing doesn't work right now and the use of the QTDIR environment
+ is wrong, too.
+
+ * docs/docs.pri:
+ * docs/qtwebkit.qdocconf:
+
+2012-08-22 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] REGRESSION(r125428): fast/profiler/nested-start-and-stop-profiler.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=93897
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fixed some test expectations.
+
+ * tests/qobjectbridge/tst_qobjectbridge.cpp:
+ (tst_QObjectBridge::objectDeleted): Since runtime methods are real function objects again, we
+ can go back to testing Function.prototype.call, as it was done before r125428.
+ (tst_QObjectBridge::introspectQtMethods_data): Removed tests for the length property.
+ (tst_QObjectBridge::introspectQtMethods): Changed test expectation of the properties of
+ run-time methods back to being non-configurable, as before r125428.
+
+2012-08-28 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r126914.
+ http://trac.webkit.org/changeset/126914
+ https://bugs.webkit.org/show_bug.cgi?id=95239
+
+ it breaks everything and fixes nothing (Requested by pizlo on
+ #webkit).
+
+ * Api/qwebpage.cpp:
+ (extractContentTypeFromPluginVector):
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginInfo::mimeTypes):
+ * WebCoreSupport/PlatformStrategiesQt.cpp:
+ (PlatformStrategiesQt::getPluginInfo):
+
+2012-08-28 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Rename first/second to key/value in HashMap iterators
+ https://bugs.webkit.org/show_bug.cgi?id=82784
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebpage.cpp:
+ (extractContentTypeFromPluginVector):
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginInfo::mimeTypes):
+ * WebCoreSupport/PlatformStrategiesQt.cpp:
+ (PlatformStrategiesQt::getPluginInfo):
+
+2012-08-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r126836.
+ http://trac.webkit.org/changeset/126836
+ https://bugs.webkit.org/show_bug.cgi?id=95163
+
+ Broke all Apple ports, EFL, and Qt. (Requested by tkent on
+ #webkit).
+
+ * Api/qwebpage.cpp:
+ (extractContentTypeFromPluginVector):
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginInfo::mimeTypes):
+ * WebCoreSupport/PlatformStrategiesQt.cpp:
+ (PlatformStrategiesQt::getPluginInfo):
+
+2012-08-27 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Rename first/second to key/value in HashMap iterators
+ https://bugs.webkit.org/show_bug.cgi?id=82784
+
+ Reviewed by Eric Seidel.
+
+ * Api/qwebpage.cpp:
+ (extractContentTypeFromPluginVector):
+ * Api/qwebplugindatabase.cpp:
+ (QWebPluginInfo::mimeTypes):
+ * WebCoreSupport/PlatformStrategiesQt.cpp:
+ (PlatformStrategiesQt::getPluginInfo):
+
2012-08-22 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r126287.
diff --git a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 79d43b3f7..27368e7f1 100644
--- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -32,10 +32,10 @@
#include "ChromeClient.h"
#include "FloatRect.h"
#include "KURL.h"
-#include "PlatformString.h"
#include "QtPlatformPlugin.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
QT_BEGIN_NAMESPACE
class QEventLoop;
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 714f560f0..ac1654ec0 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -166,7 +166,7 @@ WebCore::Node* QtDRTNodeRuntime::get(const QDRTNode& node)
return node.m_node;
}
-static QVariant convertJSValueToNodeVariant(JSC::JSObject* object, int *distance, HashSet<JSC::JSObject*>*)
+static QVariant convertJSValueToNodeVariant(JSC::JSObject* object, int *distance, HashSet<JSObjectRef>*)
{
if (!object || !object->inherits(&JSNode::s_info))
return QVariant();
@@ -386,15 +386,6 @@ void DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(bool wait
gcController().garbageCollectOnAlternateThreadForDebugging(waitUntilDone);
}
-int DumpRenderTreeSupportQt::numberOfPages(QWebFrame* frame, float width, float height)
-{
- Frame* coreFrame = QWebFramePrivate::core(frame);
- if (!coreFrame)
- return -1;
-
- return PrintContext::numberOfPages(coreFrame, FloatSize(width, height));
-}
-
// Suspend active DOM objects in this frame.
void DumpRenderTreeSupportQt::suspendActiveDOMObjects(QWebFrame* frame)
{
@@ -858,19 +849,6 @@ void DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(QWebFrame* frame, in
proxy->executeScriptInWorld(scriptWorld->world(), script, true);
}
-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);
- return PrintContext::pageSizeAndMarginsInPixels(coreFrame, pageIndex, width, height,
- marginTop, marginRight, marginBottom, marginLeft);
-}
-
-QString DumpRenderTreeSupportQt::pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber)
-{
- WebCore::Frame* coreFrame = QWebFramePrivate::core(frame);
- return PrintContext::pageProperty(coreFrame, propertyName.toUtf8().constData(), pageNumber);
-}
-
void DumpRenderTreeSupportQt::addUserStyleSheet(QWebPage* page, const QString& sourceCode)
{
page->handle()->page->group().addUserStyleSheetToWorld(mainThreadNormalWorld(), sourceCode, QUrl(), nullptr, nullptr, WebCore::InjectInAllFrames);
diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 5ed249222..92759acd3 100644
--- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -127,7 +127,6 @@ public:
static void clearFrameName(QWebFrame* frame);
static void overwritePluginDirectories();
static int numberOfActiveAnimations(QWebFrame*);
- static int numberOfPages(QWebFrame* frame, float width, float height);
static bool hasDocumentElement(QWebFrame* frame);
static bool elementDoesAutoCompleteForElementWithId(QWebFrame* frame, const QString& elementId);
static void setWindowsBehaviorAsEditingBehavior(QWebPage*);
@@ -179,8 +178,6 @@ public:
static void setCustomPolicyDelegate(bool enabled, bool permissive);
- 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);
static void removeUserStyleSheets(QWebPage*);
static void simulateDesktopNotificationClick(const QString& title);
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 166e0063f..a5a1d80d9 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -42,6 +42,7 @@
#include "KeyboardEvent.h"
#include "NotImplemented.h"
#include "Page.h"
+#include "Pasteboard.h"
#include "PlatformKeyboardEvent.h"
#include "QWebPageClient.h"
#include "Range.h"
@@ -49,9 +50,11 @@
#include "SpatialNavigation.h"
#include "StylePropertySet.h"
#include "WindowsKeyboardCodes.h"
+#include "qguiapplication.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
+#include <QClipboard>
#include <QUndoStack>
#include <stdio.h>
#include <wtf/OwnPtr.h>
@@ -210,6 +213,13 @@ void EditorClientQt::respondToChangedSelection(Frame* frame)
// selection.formatForDebugger(buffer, sizeof(buffer));
// printf("%s\n", buffer);
+ if (supportsGlobalSelection() && frame->selection()->isRange()) {
+ bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode();
+ Pasteboard::generalPasteboard()->setSelectionMode(true);
+ Pasteboard::generalPasteboard()->writeSelection(frame->selection()->toNormalizedRange().get(), frame->editor()->canSmartCopyOrDelete(), frame);
+ Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode);
+ }
+
m_page->d->updateEditorActions();
emit m_page->selectionChanged();
if (!frame->editor()->ignoreCompositionSelectionChange())
@@ -632,6 +642,11 @@ void EditorClientQt::setInputMethodState(bool active)
emit m_page->microFocusChanged();
}
+bool EditorClientQt::supportsGlobalSelection()
+{
+ return qApp->clipboard()->supportsSelection();
+}
+
}
// vim: ts=4 sw=4 et
diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
index a25795ea0..863c67b71 100644
--- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -105,6 +105,8 @@ public:
virtual void setInputMethodState(bool enabled);
virtual TextCheckerClient* textChecker() { return &m_textCheckerClient; }
+ virtual bool supportsGlobalSelection() OVERRIDE;
+
bool isEditing() const;
static bool dumpEditingCallbacks;
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index bcf072d65..72a5e0049 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -1272,7 +1272,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFun
if (event->isMouseEvent()) {
const MouseEvent* mouseEvent = static_cast<const MouseEvent*>(event);
node = QWebFramePrivate::core(m_webFrame)->eventHandler()->hitTestResultAtPoint(
- mouseEvent->absoluteLocation(), false).innerNonSharedNode();
+ mouseEvent->absoluteLocation()).innerNonSharedNode();
break;
}
}
diff --git a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index 5595cc603..daa593d7e 100644
--- a/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -38,7 +38,6 @@
#include "InspectorServerQt.h"
#include "NotImplemented.h"
#include "Page.h"
-#include "PlatformString.h"
#include "ScriptDebugServer.h"
#include "qwebinspector.h"
#include "qwebinspector_p.h"
diff --git a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index d693c4a95..56ed0b4cb 100644
--- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -384,7 +384,7 @@ void NotificationPresenterClientQt::sendDisplayEvent(NotificationWrapper* wrappe
{
Notification* notification = notificationForWrapper(wrapper);
if (notification)
- sendEvent(notification, "display");
+ sendEvent(notification, "show");
}
diff --git a/Source/WebKit/qt/docs/docs.pri b/Source/WebKit/qt/docs/docs.pri
index 2d9a0941e..b95f924f7 100644
--- a/Source/WebKit/qt/docs/docs.pri
+++ b/Source/WebKit/qt/docs/docs.pri
@@ -1,13 +1,12 @@
-unix {
- QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$${ROOT_BUILD_DIR} $$(QTDIR)/bin/qdoc3
-} else {
- QDOC = $$(QTDIR)\\bin\\qdoc3.exe
-}
+QDOC = $$QT.core.bins/qdoc
-unix {
- docs.commands = $$QDOC $$PWD/qtwebkit.qdocconf
+$$unixstyle {
} else {
- docs.commands = \"$$QDOC $$PWD/qtwebkit.qdocconf\"
+ QDOC = $$replace(QDOC, "qdoc", "qdoc3.exe")
}
+QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$${ROOT_BUILD_DIR} $$QDOC
+
+docs.commands = $$QDOC $$PWD/qtwebkit.qdocconf
+
QMAKE_EXTRA_TARGETS += docs
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdocconf b/Source/WebKit/qt/docs/qtwebkit.qdocconf
index 1f51ea37e..23d277001 100644
--- a/Source/WebKit/qt/docs/qtwebkit.qdocconf
+++ b/Source/WebKit/qt/docs/qtwebkit.qdocconf
@@ -11,7 +11,7 @@ sources.fileextensions = "*.cpp *.doc *.qdoc *.h"
exampledirs = $SRCDIR/WebKit/qt/docs
imagedirs = $SRCDIR/WebKit/qt/docs
-indexes = $QTDIR/doc/html/qt.index
+#indexes = $QTDIR/doc/html/qt.index
# macros.qdocconf
diff --git a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
index 2ce791d89..13d98af93 100644
--- a/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
+++ b/Source/WebKit/qt/tests/qobjectbridge/tst_qobjectbridge.cpp
@@ -1879,7 +1879,7 @@ void tst_QObjectBridge::objectDeleted()
evalJS("bar.intProperty = 123;");
QCOMPARE(qobj->intProperty(), 123);
qobj->resetQtFunctionInvoked();
- evalJS("bar.myInvokable(bar);");
+ evalJS("bar.myInvokable.call(bar);");
QCOMPARE(qobj->qtFunctionInvoked(), 0);
// do this, to ensure that we cache that it implements call
@@ -2148,15 +2148,15 @@ void tst_QObjectBridge::introspectQtMethods_data()
QTest::addColumn<QStringList>("expectedPropertyNames");
QTest::newRow("myObject.mySignal")
- << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ << "myObject" << "mySignal" << (QStringList() << "connect" << "disconnect" << "name");
QTest::newRow("myObject.mySlot")
- << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ << "myObject" << "mySlot" << (QStringList() << "connect" << "disconnect" << "name");
QTest::newRow("myObject.myInvokable")
- << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "length" << "name");
+ << "myObject" << "myInvokable" << (QStringList() << "connect" << "disconnect" << "name");
QTest::newRow("myObject.mySignal.connect")
- << "myObject.mySignal" << "connect" << (QStringList() << "length" << "name");
+ << "myObject.mySignal" << "connect" << (QStringList() << "name");
QTest::newRow("myObject.mySignal.disconnect")
- << "myObject.mySignal" << "disconnect" << (QStringList() << "length" << "name");
+ << "myObject.mySignal" << "disconnect" << (QStringList() << "name");
}
void tst_QObjectBridge::introspectQtMethods()
@@ -2177,7 +2177,7 @@ void tst_QObjectBridge::introspectQtMethods()
QCOMPARE(evalJS("descriptor.set"), sUndefined);
QCOMPARE(evalJS(QString::fromLatin1("descriptor.value === %0['%1']").arg(methodLookup).arg(name)), sTrue);
QCOMPARE(evalJS(QString::fromLatin1("descriptor.enumerable")), sFalse);
- QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sTrue);
+ QCOMPARE(evalJS(QString::fromLatin1("descriptor.configurable")), sFalse);
}
QVERIFY(evalJSV("var props=[]; for (var p in myObject.deleteLater) {props.push(p);}; props.sort()").toStringList().isEmpty());
diff --git a/Source/WebKit/qt/tests/qwebview/.gitignore b/Source/WebKit/qt/tests/qwebview/.gitignore
deleted file mode 100644
index 444afe65e..000000000
--- a/Source/WebKit/qt/tests/qwebview/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-qwebview