Diff
Modified: trunk/Source/WebKit2/ChangeLog (98029 => 98030)
--- trunk/Source/WebKit2/ChangeLog 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/ChangeLog 2011-10-20 22:40:34 UTC (rev 98030)
@@ -1,3 +1,36 @@
+2011-10-20 Jesus Sanchez-Palencia <jesus.palen...@openbossa.org>
+
+ [Qt][WK2] qweberror* should follow the new file and class naming rules
+ https://bugs.webkit.org/show_bug.cgi?id=70550
+
+ Reviewed by Noam Rosenthal.
+
+ Renaming qweberror* files and class to QtWebError*.
+ QWebErrorPrivate is now merged into QtWebError.
+
+ * UIProcess/API/qt/qdesktopwebview.cpp:
+ (QDesktopWebViewPrivate::loadDidFail):
+ * UIProcess/API/qt/qdesktopwebview_p.h:
+ * UIProcess/qt/ClientImpl.cpp:
+ (dispatchLoadFailed):
+ * UIProcess/qt/QtTouchViewInterface.cpp:
+ (WebKit::QtTouchViewInterface::loadDidFail):
+ * UIProcess/qt/QtTouchViewInterface.h:
+ * UIProcess/qt/QtViewInterface.h:
+ * UIProcess/qt/QtWebError.cpp: Renamed from Source/WebKit2/UIProcess/qt/qweberror.cpp.
+ (QtWebError::QtWebError):
+ (QtWebError::type):
+ (QtWebError::errorCode):
+ (QtWebError::url):
+ * UIProcess/qt/QtWebError.h: Renamed from Source/WebKit2/UIProcess/qt/qweberror.h.
+ (QtWebError::errorCodeAsHttpStatusCode):
+ (QtWebError::errorCodeAsNetworkError):
+ * UIProcess/qt/QtWebPageProxy.cpp:
+ (QtWebPageProxy::loadDidFail):
+ * UIProcess/qt/QtWebPageProxy.h:
+ * UIProcess/qt/qweberror_p.h: Removed.
+ * WebKit2.pro:
+
2011-10-20 Alexey Proskuryakov <a...@apple.com>
REGRESSION (r96823): Contextual menu closes immediately when control-clicking in Flash plug-in
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -21,9 +21,9 @@
#include "config.h"
#include "qdesktopwebview.h"
+#include "QtWebError.h"
#include "UtilsQt.h"
#include "qdesktopwebview_p.h"
-#include "qweberror.h"
#include <QFileDialog>
#include <QGraphicsSceneEvent>
#include <QGraphicsSceneResizeEvent>
@@ -160,7 +160,7 @@
emit q->loadSucceeded();
}
-void QDesktopWebViewPrivate::loadDidFail(const QWebError& error)
+void QDesktopWebViewPrivate::loadDidFail(const QtWebError& error)
{
emit q->loadFailed(static_cast<QDesktopWebView::ErrorType>(error.type()), error.errorCode(), error.url());
}
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qdesktopwebview_p.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -74,7 +74,7 @@
virtual void loadDidBegin();
virtual void loadDidCommit();
virtual void loadDidSucceed();
- virtual void loadDidFail(const QWebError&);
+ virtual void loadDidFail(const QtWebError&);
virtual void didChangeLoadProgress(int);
virtual void showContextMenu(QSharedPointer<QMenu>);
Modified: trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -20,12 +20,11 @@
#include "config.h"
#include "ClientImpl.h"
+#include "QtWebError.h"
#include "WebFrameProxy.h"
#include "WKAPICast.h"
#include "WKStringQt.h"
#include "WKURLQt.h"
-#include "qweberror.h"
-#include "qweberror_p.h"
#include <QtPolicyInterface.h>
#include <QtViewInterface.h>
#include <QtWebPageProxy.h>
@@ -79,7 +78,7 @@
if (toImpl(error)->platformError().isCancellation() || errorCode == kWKErrorCodeFrameLoadInterruptedByPolicyChange || errorCode == kWKErrorCodePlugInWillHandleLoad)
return;
- toQtWebPageProxy(clientInfo)->loadDidFail(QWebErrorPrivate::createQWebError(error));
+ toQtWebPageProxy(clientInfo)->loadDidFail(QtWebError(error));
}
void qt_wk_didStartProvisionalLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
Modified: trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.cpp (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.cpp 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -21,11 +21,11 @@
#include "config.h"
#include "QtTouchViewInterface.h"
+#include "QtWebError.h"
#include "qtouchwebpage.h"
#include "qtouchwebpage_p.h"
#include "qtouchwebview.h"
#include "qtouchwebview_p.h"
-#include "qweberror.h"
#include <QDeclarativeEngine>
#include <QSGView>
@@ -132,7 +132,7 @@
emit m_pageView->loadSucceeded();
}
-void QtTouchViewInterface::loadDidFail(const QWebError& error)
+void QtTouchViewInterface::loadDidFail(const QtWebError& error)
{
emit m_pageView->loadFailed(static_cast<QTouchWebPage::ErrorType>(error.type()), error.errorCode(), error.url());
}
Modified: trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/QtTouchViewInterface.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -65,7 +65,7 @@
virtual void loadDidBegin();
virtual void loadDidCommit();
virtual void loadDidSucceed();
- virtual void loadDidFail(const QWebError&);
+ virtual void loadDidFail(const QtWebError&);
virtual void didChangeLoadProgress(int);
virtual void showContextMenu(QSharedPointer<QMenu>);
Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewInterface.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -26,7 +26,7 @@
#include <QtCore/QSize>
#include <WebKit2/WKBase.h>
-class QWebError;
+class QtWebError;
QT_BEGIN_NAMESPACE
class QCursor;
@@ -75,7 +75,7 @@
virtual void loadDidBegin() = 0;
virtual void loadDidCommit() = 0;
virtual void loadDidSucceed() = 0;
- virtual void loadDidFail(const QWebError&) = 0;
+ virtual void loadDidFail(const QtWebError&) = 0;
virtual void didChangeLoadProgress(int) = 0;
virtual void showContextMenu(QSharedPointer<QMenu>) = 0;
Copied: trunk/Source/WebKit2/UIProcess/qt/QtWebError.cpp (from rev 98029, trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp) (0 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebError.cpp (rev 0)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebError.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
+ *
+ * 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 program 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 program; 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 "QtWebError.h"
+
+#include <QtCore/QUrl>
+#include <WKSharedAPICast.h>
+#include <WKString.h>
+#include <WKStringQt.h>
+#include <WKType.h>
+#include <WKURL.h>
+#include <WKURLQt.h>
+
+using namespace WebKit;
+
+QtWebError::QtWebError(WKErrorRef errorRef)
+ : error(errorRef)
+{
+}
+
+QtWebError::Type QtWebError::type() const
+{
+ WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(error.get()));
+ WTF::String errorDomain = toWTFString(errorDomainPtr.get());
+
+ if (errorDomain == "QtNetwork")
+ return QtWebError::NetworkError;
+ if (errorDomain == "HTTP")
+ return QtWebError::HttpError;
+ if (errorDomain == "Download")
+ return QtWebError::DownloadError;
+ return QtWebError::EngineError;
+}
+
+int QtWebError::errorCode() const
+{
+ return WKErrorGetErrorCode(error.get());
+}
+
+QUrl QtWebError::url() const
+{
+ WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(error.get()));
+ return WKURLCopyQUrl(failingURL.get());
+}
Copied: trunk/Source/WebKit2/UIProcess/qt/QtWebError.h (from rev 98029, trunk/Source/WebKit2/UIProcess/qt/qweberror.h) (0 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebError.h (rev 0)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebError.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
+ *
+ * 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 program 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 program; 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 QtWebError_h
+#define QtWebError_h
+
+#include "qwebkitglobal.h"
+#include <QtNetwork/QNetworkReply>
+#include <WKError.h>
+#include <WKRetainPtr.h>
+
+QT_BEGIN_NAMESPACE
+class QUrl;
+QT_END_NAMESPACE
+
+class QtWebError {
+public:
+ enum Type {
+ EngineError,
+ NetworkError,
+ HttpError,
+ DownloadError
+ };
+
+ Type type() const;
+ QUrl url() const;
+ int errorCode() const;
+
+ int errorCodeAsHttpStatusCode() const { return errorCode(); }
+ QNetworkReply::NetworkError errorCodeAsNetworkError() const { return static_cast<QNetworkReply::NetworkError>(errorCode()); }
+
+ QtWebError(const QtWebError&);
+
+ QtWebError(WKErrorRef);
+
+private:
+ WKRetainPtr<WKErrorRef> error;
+};
+
+#endif /* QtWebError_h */
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -21,7 +21,7 @@
#include "config.h"
#include "QtWebPageProxy.h"
-#include "qweberror.h"
+#include "QtWebError.h"
#include "qwebpreferences_p.h"
#include "ClientImpl.h"
@@ -411,7 +411,7 @@
m_viewInterface->loadDidSucceed();
}
-void QtWebPageProxy::loadDidFail(const QWebError& error)
+void QtWebPageProxy::loadDidFail(const QtWebError& error)
{
m_viewInterface->loadDidFail(error);
}
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -41,7 +41,7 @@
class QUndoStack;
QT_END_NAMESPACE
-class QWebError;
+class QtWebError;
class QWebPreferences;
class QWKHistory;
@@ -133,7 +133,7 @@
void loadDidBegin();
void loadDidCommit();
void loadDidSucceed();
- void loadDidFail(const QWebError&);
+ void loadDidFail(const QtWebError&);
void didChangeLoadProgress(int);
int loadProgress() const { return m_loadProgress; }
Deleted: trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror.cpp 2011-10-20 22:40:34 UTC (rev 98030)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * 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 program 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 program; 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 "qweberror.h"
-
-#include "qweberror_p.h"
-#include <QtCore/QUrl>
-#include <WKSharedAPICast.h>
-#include <WKString.h>
-#include <WKStringQt.h>
-#include <WKType.h>
-#include <WKURL.h>
-#include <WKURLQt.h>
-
-using namespace WebKit;
-
-QWebError::QWebError(QWebErrorPrivate* priv)
- : d(priv)
-{
-}
-
-QWebError::QWebError(const QWebError& other)
- : d(other.d)
-{
-}
-
-QWebError QWebErrorPrivate::createQWebError(WKErrorRef errorRef)
-{
- return QWebError(new QWebErrorPrivate(errorRef));
-}
-
-QWebErrorPrivate::QWebErrorPrivate(WKErrorRef errorRef)
- : error(errorRef)
-{
-}
-
-QWebErrorPrivate::~QWebErrorPrivate()
-{
-}
-
-QWebError::Type QWebError::type() const
-{
- WKRetainPtr<WKStringRef> errorDomainPtr = adoptWK(WKErrorCopyDomain(d->error.get()));
- WTF::String errorDomain = toWTFString(errorDomainPtr.get());
-
- if (errorDomain == "QtNetwork")
- return QWebError::NetworkError;
- if (errorDomain == "HTTP")
- return QWebError::HttpError;
- if (errorDomain == "Download")
- return QWebError::DownloadError;
- return QWebError::EngineError;
-}
-
-int QWebError::errorCode() const
-{
- return WKErrorGetErrorCode(d->error.get());
-}
-
-QUrl QWebError::url() const
-{
- WKRetainPtr<WKURLRef> failingURL = adoptWK(WKErrorCopyFailingURL(d->error.get()));
- return WKURLCopyQUrl(failingURL.get());
-}
Deleted: trunk/Source/WebKit2/UIProcess/qt/qweberror.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/qweberror.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * 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 program 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 program; 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 qweberror_h
-#define qweberror_h
-
-#include "qwebkitglobal.h"
-#include <QSharedDataPointer>
-#include <QtNetwork/QNetworkReply>
-
-class QWebErrorPrivate;
-
-QT_BEGIN_NAMESPACE
-class QUrl;
-QT_END_NAMESPACE
-
-class QWebError {
-public:
- enum Type {
- EngineError,
- NetworkError,
- HttpError,
- DownloadError
- };
-
- Type type() const;
- QUrl url() const;
- int errorCode() const;
-
- int errorCodeAsHttpStatusCode() const { return errorCode(); }
- QNetworkReply::NetworkError errorCodeAsNetworkError() const { return static_cast<QNetworkReply::NetworkError>(errorCode()); }
-
- QWebError(const QWebError&);
-
-private:
- QWebError(QWebErrorPrivate*);
-
- QSharedDataPointer<QWebErrorPrivate> d;
- friend class QWebErrorPrivate;
-};
-
-#endif /* qweberror_h */
Deleted: trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h (98029 => 98030)
--- trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/UIProcess/qt/qweberror_p.h 2011-10-20 22:40:34 UTC (rev 98030)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2011 Andreas Kling <kl...@webkit.org>
- *
- * 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 program 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 program; 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 qweberror_p_h
-#define qweberror_p_h
-
-#include "qweberror.h"
-#include <QtCore/QSharedData>
-#include <WKError.h>
-#include <WKRetainPtr.h>
-
-class QWebErrorPrivate : public QSharedData {
-public:
- static QWebError createQWebError(WKErrorRef);
- QWebErrorPrivate(WKErrorRef);
- ~QWebErrorPrivate();
-
- WKRetainPtr<WKErrorRef> error;
-};
-
-#endif /* qweberror_p_h */
Modified: trunk/Source/WebKit2/WebKit2.pro (98029 => 98030)
--- trunk/Source/WebKit2/WebKit2.pro 2011-10-20 22:39:00 UTC (rev 98029)
+++ trunk/Source/WebKit2/WebKit2.pro 2011-10-20 22:40:34 UTC (rev 98030)
@@ -259,8 +259,7 @@
UIProcess/qt/QtPinchGestureRecognizer.h \
UIProcess/qt/QtDesktopWebPageProxy.h \
UIProcess/qt/QtTouchWebPageProxy.h \
- UIProcess/qt/qweberror.h \
- UIProcess/qt/qweberror_p.h \
+ UIProcess/qt/QtWebError.h \
UIProcess/qt/QtWebPageProxy.h \
UIProcess/qt/qwkhistory.h \
UIProcess/qt/qwkhistory_p.h \
@@ -501,7 +500,7 @@
UIProcess/qt/QtPinchGestureRecognizer.cpp \
UIProcess/qt/QtDesktopWebPageProxy.cpp \
UIProcess/qt/QtTouchWebPageProxy.cpp \
- UIProcess/qt/qweberror.cpp \
+ UIProcess/qt/QtWebError.cpp \
UIProcess/qt/QtWebPageProxy.cpp \
UIProcess/qt/qwkhistory.cpp \
UIProcess/qt/QtSGUpdateQueue.cpp \