Diff
Modified: trunk/Source/WebKit2/ChangeLog (90576 => 90577)
--- trunk/Source/WebKit2/ChangeLog 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-07 17:43:30 UTC (rev 90577)
@@ -1,5 +1,37 @@
2011-07-07 Andreas Kling <[email protected]>
+ [Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations.
+ https://bugs.webkit.org/show_bug.cgi?id=64099
+
+ Reviewed by Benjamin Poulain.
+
+ * Shared/qt/WebEventFactoryQt.cpp:
+ (WebKit::WebEventFactory::createWebWheelEvent):
+ * UIProcess/API/qt/qdesktopwebview_p.h:
+ * UIProcess/qt/QtWebPageProxy.cpp:
+ (QtWebPageProxy::QtWebPageProxy):
+ (QtWebPageProxy::setCursor):
+ (QtWebPageProxy::registerEditCommand):
+ (QtWebPageProxy::clearAllEditCommands):
+ (QtWebPageProxy::canUndoRedo):
+ (QtWebPageProxy::executeUndoRedo):
+ (QtWebPageProxy::updateAction):
+ (QtWebPageProxy::webActionTriggered):
+ (QtWebPageProxy::triggerAction):
+ (QtWebPageProxy::action):
+ * UIProcess/qt/QtWebPageProxy.h:
+ * UIProcess/qt/TouchViewInterface.cpp:
+ (WebKit::TouchViewInterface::didChangeCursor):
+ * UIProcess/qt/TouchViewInterface.h:
+ * UIProcess/qt/ViewInterface.h:
+ * UIProcess/qt/WebUndoCommandQt.cpp:
+ (WebUndoCommandQt::WebUndoCommandQt):
+ * UIProcess/qt/WebUndoCommandQt.h:
+ * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
+ (WebKit::WebDragClient::startDrag):
+
+2011-07-07 Andreas Kling <[email protected]>
+
[Qt][WK2] Views should know about WebProcess crash/relaunch.
https://bugs.webkit.org/show_bug.cgi?id=64093
Modified: trunk/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp (90576 => 90577)
--- trunk/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -135,10 +135,8 @@
// Use the same single scroll step as QTextEdit
// (in QTextEditPrivate::init [h,v]bar->setSingleStep)
static const float cDefaultQtScrollStep = 20.f;
-#ifndef QT_NO_WHEELEVENT
deltaX *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
deltaY *= (fullTick) ? QApplication::wheelScrollLines() * cDefaultQtScrollStep : 1;
-#endif
return WebWheelEvent(WebEvent::Wheel, e->pos().toPoint(), e->screenPos(), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, modifiers, timestamp);
}
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h 2011-07-07 17:43:30 UTC (rev 90577)
@@ -55,9 +55,7 @@
virtual void didChangeTitle(const QString&);
virtual void didChangeToolTip(const QString&);
virtual void didChangeStatusText(const QString&);
-#ifndef QT_NO_CURSOR
virtual void didChangeCursor(const QCursor&);
-#endif
virtual void loadDidBegin();
virtual void loadDidSucceed();
virtual void didChangeLoadProgress(int);
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -124,9 +124,7 @@
, m_context(c)
, m_preferences(0)
, m_createNewPageFn(0)
-#ifndef QT_NO_UNDOSTACK
, m_undoStack(adoptPtr(new QUndoStack(this)))
-#endif
{
ASSERT(viewInterface);
memset(m_actions, 0, sizeof(m_actions));
@@ -263,9 +261,7 @@
void QtWebPageProxy::setCursor(const WebCore::Cursor& cursor)
{
-#ifndef QT_NO_CURSOR
m_viewInterface->didChangeCursor(*cursor.platformCursor());
-#endif
}
void QtWebPageProxy::setViewNeedsDisplay(const WebCore::IntRect& rect)
@@ -336,42 +332,32 @@
void QtWebPageProxy::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo)
{
-#ifndef QT_NO_UNDOSTACK
if (undoOrRedo == WebPageProxy::Undo) {
const WebUndoCommandQt* webUndoCommand = static_cast<const WebUndoCommandQt*>(m_undoStack->command(m_undoStack->index()));
if (webUndoCommand && webUndoCommand->inUndoRedo())
return;
m_undoStack->push(new WebUndoCommandQt(command));
}
-#endif
}
void QtWebPageProxy::clearAllEditCommands()
{
-#ifndef QT_NO_UNDOSTACK
m_undoStack->clear();
-#endif
}
bool QtWebPageProxy::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
-#ifdef QT_NO_UNDOSTACK
- return false;
-#else
if (undoOrRedo == WebPageProxy::Undo)
return m_undoStack->canUndo();
return m_undoStack->canRedo();
-#endif
}
void QtWebPageProxy::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
-#ifndef QT_NO_UNDOSTACK
if (undoOrRedo == WebPageProxy::Undo)
m_undoStack->undo();
else
m_undoStack->redo();
-#endif
}
FloatRect QtWebPageProxy::convertToDeviceSpace(const FloatRect& rect)
@@ -485,9 +471,6 @@
void QtWebPageProxy::updateAction(QtWebPageProxy::WebAction action)
{
-#ifdef QT_NO_ACTION
- Q_UNUSED(action)
-#else
QAction* a = m_actions[action];
if (!a)
return;
@@ -520,7 +503,6 @@
if (a->isCheckable())
a->setChecked(checked);
-#endif // QT_NO_ACTION
}
void QtWebPageProxy::updateNavigationActions()
@@ -531,7 +513,6 @@
updateAction(QtWebPageProxy::Reload);
}
-#ifndef QT_NO_ACTION
void QtWebPageProxy::webActionTriggered(bool checked)
{
QAction* a = qobject_cast<QAction*>(sender());
@@ -540,7 +521,6 @@
QtWebPageProxy::WebAction action = ""
triggerAction(action, checked);
}
-#endif // QT_NO_ACTION
void QtWebPageProxy::didRelaunchProcess()
{
@@ -646,7 +626,6 @@
#endif
}
-#ifndef QT_NO_ACTION
void QtWebPageProxy::triggerAction(WebAction webAction, bool)
{
switch (webAction) {
@@ -670,9 +649,7 @@
WebKit::WebContextMenuItemData menuItemData(ActionType, contextMenuActionForWebAction(webAction), qtAction->text(), qtAction->isEnabled(), qtAction->isChecked());
m_webPageProxy->contextMenuItemSelected(menuItemData);
}
-#endif // QT_NO_ACTION
-#ifndef QT_NO_ACTION
QAction* QtWebPageProxy::action(WebAction action) const
{
if (action == QtWebPageProxy::NoWebAction || action >= WebActionCount)
@@ -728,7 +705,6 @@
case SelectAll:
text = contextMenuItemTagSelectAll();
break;
-#ifndef QT_NO_UNDOSTACK
case Undo: {
QAction* undoAction = m_undoStack->createUndoAction(mutableSelf);
m_actions[action] = undoAction;
@@ -739,7 +715,6 @@
m_actions[action] = redoAction;
return redoAction;
}
-#endif
default:
return 0;
break;
@@ -760,7 +735,6 @@
mutableSelf->updateAction(action);
return a;
}
-#endif // QT_NO_ACTION
void QtWebPageProxy::findZoomableAreaForPoint(const QPoint& point)
{
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-07-07 17:43:30 UTC (rev 90577)
@@ -221,9 +221,7 @@
CreateNewPageFn m_createNewPageFn;
-#ifndef QT_NO_UNDOSTACK
OwnPtr<QUndoStack> m_undoStack;
-#endif
};
#endif /* QtWebPageProxy_h */
Modified: trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -88,12 +88,10 @@
// There is not yet any UI defined for status text so we ignore the call.
}
-#ifndef QT_NO_CURSOR
void TouchViewInterface::didChangeCursor(const QCursor&)
{
// The cursor is not visible on mobile, just ignore this message.
}
-#endif
void TouchViewInterface::loadDidBegin()
{
Modified: trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.h (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.h 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/TouchViewInterface.h 2011-07-07 17:43:30 UTC (rev 90577)
@@ -51,9 +51,7 @@
virtual void didChangeTitle(const QString&);
virtual void didChangeToolTip(const QString&);
virtual void didChangeStatusText(const QString&);
-#ifndef QT_NO_CURSOR
virtual void didChangeCursor(const QCursor&);
-#endif
virtual void loadDidBegin();
virtual void loadDidSucceed();
virtual void didChangeLoadProgress(int);
Modified: trunk/Source/WebKit2/UIProcess/qt/ViewInterface.h (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/ViewInterface.h 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/ViewInterface.h 2011-07-07 17:43:30 UTC (rev 90577)
@@ -56,9 +56,7 @@
virtual void didChangeTitle(const QString&) = 0;
virtual void didChangeToolTip(const QString&) = 0;
virtual void didChangeStatusText(const QString&) = 0;
-#ifndef QT_NO_CURSOR
virtual void didChangeCursor(const QCursor&) = 0;
-#endif
virtual void loadDidBegin() = 0;
virtual void loadDidSucceed() = 0;
virtual void didChangeLoadProgress(int) = 0;
Modified: trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.cpp (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -23,7 +23,6 @@
using namespace WebKit;
-#ifndef QT_NO_UNDOCOMMAND
WebUndoCommandQt::WebUndoCommandQt(PassRefPtr<WebEditCommandProxy> command, QUndoCommand* parent)
: QUndoCommand(parent)
, m_command(command)
@@ -31,14 +30,6 @@
, m_inUndoRedo(false)
{
}
-#else
-WebUndoCommandQt::WebUndoCommandQt(PassRefPtr<WebEditCommandProxy> command)
- : m_command(command)
- , m_first(true)
- , m_inUndoRedo(false)
-{
-}
-#endif
WebUndoCommandQt::~WebUndoCommandQt()
{
Modified: trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.h (90576 => 90577)
--- trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.h 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/UIProcess/qt/WebUndoCommandQt.h 2011-07-07 17:43:30 UTC (rev 90577)
@@ -26,17 +26,9 @@
#include <qglobal.h>
#include <wtf/RefPtr.h>
-class WebUndoCommandQt
-#ifndef QT_NO_UNDOCOMMAND
- : public QUndoCommand
-#endif
-{
+class WebUndoCommandQt : public QUndoCommand {
public:
-#ifndef QT_NO_UNDOCOMMAND
WebUndoCommandQt(PassRefPtr<WebKit::WebEditCommandProxy>, QUndoCommand* parent = 0);
-#else
- WebUndoCommandQt(PassRefPtr<WebKit::WebEditCommandProxy>);
-#endif
~WebUndoCommandQt();
void redo();
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp (90576 => 90577)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -54,7 +54,6 @@
void WebDragClient::startDrag(DragImageRef dragImage, const IntPoint& clientPosition, const IntPoint& globalPosition, Clipboard* clipboard, Frame*, bool)
{
-#ifndef QT_NO_DRAGANDDROP
QMimeData* clipboardData = static_cast<ClipboardQt*>(clipboard)->clipboardData();
DragOperation dragOperationMask = clipboard->sourceOperation();
static_cast<ClipboardQt*>(clipboard)->invalidateWritableData();
@@ -66,12 +65,6 @@
return;
m_page->send(Messages::WebPageProxy::StartDrag(dragData, handle));
-#else
- Q_UNUSED(dragImage)
- Q_UNUSED(clientPosition)
- Q_UNUSED(globalPosition)
- Q_UNUSED(clipboard)
-#endif
}
}
Modified: trunk/Tools/ChangeLog (90576 => 90577)
--- trunk/Tools/ChangeLog 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Tools/ChangeLog 2011-07-07 17:43:30 UTC (rev 90577)
@@ -1,3 +1,15 @@
+2011-07-07 Andreas Kling <[email protected]>
+
+ [Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations.
+ https://bugs.webkit.org/show_bug.cgi?id=64099
+
+ Reviewed by Benjamin Poulain.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::openFile):
+ (BrowserWindow::screenshot):
+ (BrowserWindow::loadURLListFromFile):
+
2011-07-07 Adam Roben <[email protected]>
Completely ignore too-many-failures builds in TestFailures in most circumstances
Modified: trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp (90576 => 90577)
--- trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp 2011-07-07 17:39:56 UTC (rev 90576)
+++ trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp 2011-07-07 17:43:30 UTC (rev 90577)
@@ -216,7 +216,6 @@
void BrowserWindow::openFile()
{
-#ifndef QT_NO_FILEDIALOG
static const QString filter("HTML Files (*.htm *.html *.xhtml);;Text Files (*.txt);;Image Files (*.gif *.jpg *.png);;SVG Files (*.svg);;All Files (*)");
QFileDialog fileDialog(this, tr("Open"), QString(), filter);
@@ -229,7 +228,6 @@
if (!selectedFile.isEmpty())
load(selectedFile);
}
-#endif
}
void BrowserWindow::screenshot()
@@ -244,7 +242,6 @@
label->show();
#endif
-#ifndef QT_NO_FILEDIALOG
QString fileName = QFileDialog::getSaveFileName(label, "Screenshot", QString(), QString("PNG File (.png)"));
if (!fileName.isEmpty()) {
QRegExp rx("*.png");
@@ -258,7 +255,6 @@
if (label)
label->setWindowTitle(QString("Screenshot - Saved at %1").arg(fileName));
}
-#endif
}
void BrowserWindow::toggleFullScreenMode(bool enable)
@@ -303,10 +299,8 @@
void BrowserWindow::loadURLListFromFile()
{
QString selectedFile;
-#ifndef QT_NO_FILEDIALOG
selectedFile = QFileDialog::getOpenFileName(this, tr("Load URL list from file")
, QString(), tr("Text Files (*.txt);;All Files (*)"));
-#endif
if (selectedFile.isEmpty())
return;