WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

3939#include "WindowFeatures.h"
4040#include "DatabaseTracker.h"
4141#include "SecurityOrigin.h"
42 #include "QWebPageClient.h"
4342
4443#include "qwebpage.h"
4544#include "qwebpage_p.h"
 45#include "qwebpageclient.h"
4646#include "qwebframe_p.h"
4747#include "qwebsecurityorigin.h"
4848#include "qwebsecurityorigin_p.h"
50383

WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

5555#include "ResourceHandle.h"
5656#include "Settings.h"
5757#include "ScriptString.h"
58 #include "QWebPageClient.h"
5958
6059#include "qwebpage.h"
6160#include "qwebpage_p.h"
 61#include "qwebpageclient.h"
6262#include "qwebframe.h"
6363#include "qwebframe_p.h"
6464#include "qwebhistoryinterface.h"
50383

WebKit/qt/WebCoreSupport/EditorClientQt.cpp

3333
3434#include "qwebpage.h"
3535#include "qwebpage_p.h"
 36#include "qwebpageclient.h"
3637
3738#include "CSSStyleDeclaration.h"
3839#include "Document.h"

4950#include "Page.h"
5051#include "Page.h"
5152#include "PlatformKeyboardEvent.h"
52 #include "QWebPageClient.h"
5353#include "Range.h"
5454
5555#include <stdio.h>
50383

WebKit/qt/ChangeLog

 12009-11-01 Yael Aharon <yael.aharon@nokia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [Qt] Expose QWebPageClient through the QtWebKit API.
 6 https://bugs.webkit.org/show_bug.cgi?id=30979
 7
 8 Moved QWebPageClient.h out of WebCore, renamed the file to lowercase
 9 and exposed it in headers.pri.
 10 QWebPageClient now inherits from QObject so that in the future we
 11 can extend it as needed via signals and slots.
 12 Also added public API to set and get QWebPageClient.
 13
 14 * Api/headers.pri:
 15 * Api/qgraphicswebview.cpp:
 16 * Api/qwebpage.cpp:
 17 (QWebPage::pageClient):
 18 (QWebPage::setPageClient):
 19 * Api/qwebpage.h:
 20 * Api/qwebpageclient.h: Added.
 21 (QWebPageClient::resetCursor):
 22 (QWebPageClient::setCursor):
 23 * Api/qwebview.cpp:
 24 * WebCoreSupport/ChromeClientQt.cpp:
 25 * WebCoreSupport/EditorClientQt.cpp:
 26 * WebCoreSupport/FrameLoaderClientQt.cpp:
 27
1282009-10-30 Evan Stade <estade@chromium.org>
229
330 Reviewed by David Levin.
50383

WebKit/qt/Api/qwebpageclient.h

 1/*
 2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef QWEBPAGECLIENT_H
 27#define QWEBPAGECLIENT_H
 28
 29#include <QCursor>
 30#include <QObject>
 31#include <QPalette>
 32#include <QRect>
 33
 34class QWebPageClient : public QObject {
 35Q_OBJECT
 36public:
 37 virtual void scroll(int dx, int dy, const QRect&) = 0;
 38 virtual void update(const QRect&) = 0;
 39 virtual void setInputMethodEnabled(bool enable) = 0;
 40#if QT_VERSION >= 0x040600
 41 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable) = 0;
 42#endif
 43 inline void resetCursor()
 44 {
 45#ifndef QT_NO_CURSOR
 46 if (!cursor().bitmap() && cursor().shape() == m_lastCursor.shape())
 47 return;
 48 updateCursor(m_lastCursor);
 49#endif
 50 }
 51
 52 inline void setCursor(const QCursor& cursor)
 53 {
 54#ifndef QT_NO_CURSOR
 55 m_lastCursor = cursor;
 56 if (!cursor.bitmap() && cursor.shape() == this->cursor().shape())
 57 return;
 58 updateCursor(cursor);
 59#endif
 60 }
 61
 62 virtual QPalette palette() const = 0;
 63 virtual int screenNumber() const = 0;
 64 virtual QWidget* ownerWidget() const = 0;
 65
 66 virtual QObject* pluginParent() const = 0;
 67
 68protected:
 69#ifndef QT_NO_CURSOR
 70 virtual QCursor cursor() const = 0;
 71 virtual void updateCursor(const QCursor& cursor) = 0;
 72#endif
 73
 74private:
 75#ifndef QT_NO_CURSOR
 76 QCursor m_lastCursor;
 77#endif
 78};
 79
 80#endif
0

WebKit/qt/Api/qwebpage.h

4141class QWebFrame;
4242class QWebNetworkRequest;
4343class QWebHistory;
 44class QWebPageClient;
4445
4546class QWebPagePrivate;
4647class QWebFrameData;

240241 QSize preferredContentsSize() const;
241242 void setPreferredContentsSize(const QSize &size) const;
242243
 244 QWebPageClient* pageClient() const;
 245 void setPageClient(QWebPageClient* client);
 246
243247 virtual bool event(QEvent*);
244248 bool focusNextPrevChild(bool next);
245249
50383

WebKit/qt/Api/qgraphicswebview.cpp

2424#include "qwebframe.h"
2525#include "qwebpage.h"
2626#include "qwebpage_p.h"
27 #include "QWebPageClient.h"
 27#include "qwebpageclient.h"
2828#include <QtGui/QGraphicsScene>
2929#include <QtGui/QGraphicsView>
3030#include <QtGui/qapplication.h>
50383

WebKit/qt/Api/qwebpage.cpp

20052005 }
20062006}
20072007
 2008QWebPageClient* QWebPage::pageClient() const
 2009{
 2010 return d->client;
 2011}
 2012
 2013void QWebPage::setPageClient(QWebPageClient* client)
 2014{
 2015 d->client = client;
 2016}
 2017
20082018/*!
20092019 \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
20102020
50383

WebKit/qt/Api/headers.pri

22 $$PWD/qgraphicswebview.h \
33 $$PWD/qwebkitglobal.h \
44 $$PWD/qwebpage.h \
 5 $$PWD/qwebpageclient.h \
56 $$PWD/qwebview.h \
67 $$PWD/qwebsettings.h \
78 $$PWD/qwebhistoryinterface.h \
50383

WebKit/qt/Api/qwebview.cpp

2222#include "config.h"
2323#include "qwebview.h"
2424
25 #include "QWebPageClient.h"
2625#include "qwebframe.h"
2726#include "qwebpage_p.h"
 27#include "qwebpageclient.h"
2828
2929#include "qbitmap.h"
3030#include "qevent.h"
50383

WebCore/plugins/qt/PluginViewQt.cpp

5959#include "npruntime_impl.h"
6060#include "runtime.h"
6161#include "runtime_root.h"
62 #include "QWebPageClient.h"
 62#include "qwebpageclient.h"
6363#include <QApplication>
6464#include <QDesktopWidget>
6565#include <QKeyEvent>
50383

WebCore/plugins/mac/PluginViewMac.cpp

7575#if PLATFORM(QT)
7676#include <QWidget>
7777#include <QKeyEvent>
78 #include "QWebPageClient.h"
 78#include "qwebpageclient.h"
7979QT_BEGIN_NAMESPACE
8080#if QT_VERSION < 0x040500
8181extern Q_GUI_EXPORT WindowPtr qt_mac_window_for(const QWidget* w);
50383

WebCore/plugins/win/PluginViewWin.cpp

7777#endif
7878
7979#if PLATFORM(QT)
80 #include "QWebPageClient.h"
 80#include "qwebpageclient.h"
8181#include <QWidget>
8282#endif
8383
50383

WebCore/plugins/symbian/PluginViewSymbian.cpp

5151#include "npruntime_impl.h"
5252#include "runtime.h"
5353#include "runtime_root.h"
54 #include "QWebPageClient.h"
 54#include "qwebpageclient.h"
5555#include <QKeyEvent>
5656#include <QPixmap.h>
5757#include <QRegion>
50383

WebCore/WebCore.pro

19291929 platform/network/ResourceRequestBase.h \
19301930 platform/network/ResourceResponseBase.h \
19311931 platform/qt/ClipboardQt.h \
1932  platform/qt/QWebPageClient.h \
19331932 platform/qt/QWebPopup.h \
19341933 platform/qt/RenderThemeQt.h \
19351934 platform/qt/ScrollbarThemeQt.h \
50383

WebCore/ChangeLog

 12009-11-01 Yael Aharon <yael.aharon@nokia.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [Qt] Expose QWebPageClient through the QtWebKit API.
 6 https://bugs.webkit.org/show_bug.cgi?id=30979
 7
 8 Moved QWebPageClient.h out of WebCore, and renamed the file to lowercase.
 9 No new tests, as there is no new functionality.
 10
 11 * WebCore.pro:
 12 * platform/qt/PlatformScreenQt.cpp:
 13 * platform/qt/PopupMenuQt.cpp:
 14 * platform/qt/QWebPageClient.h: Removed.
 15 * platform/qt/RenderThemeQt.cpp:
 16 * platform/qt/WidgetQt.cpp:
 17 * plugins/mac/PluginViewMac.cpp:
 18 * plugins/qt/PluginViewQt.cpp:
 19 * plugins/symbian/PluginViewSymbian.cpp:
 20 * plugins/win/PluginViewWin.cpp:
 21
1222009-10-31 Oliver Hunt <oliver@apple.com>
223
324 Build fix
50383

WebCore/platform/qt/QWebPageClient.h

1 /*
2  * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 
26 #ifndef QWebPageClient_h
27 #define QWebPageClient_h
28 
29 #include <QRect>
30 
31 class QWebPageClient {
32 public:
33  virtual void scroll(int dx, int dy, const QRect&) = 0;
34  virtual void update(const QRect&) = 0;
35  virtual void setInputMethodEnabled(bool enable) = 0;
36 #if QT_VERSION >= 0x040600
37  virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable) = 0;
38 #endif
39  inline void resetCursor()
40  {
41 #ifndef QT_NO_CURSOR
42  if (!cursor().bitmap() && cursor().shape() == m_lastCursor.shape())
43  return;
44  updateCursor(m_lastCursor);
45 #endif
46  }
47 
48  inline void setCursor(const QCursor& cursor)
49  {
50 #ifndef QT_NO_CURSOR
51  m_lastCursor = cursor;
52  if (!cursor.bitmap() && cursor.shape() == this->cursor().shape())
53  return;
54  updateCursor(cursor);
55 #endif
56  }
57 
58  virtual QPalette palette() const = 0;
59  virtual int screenNumber() const = 0;
60  virtual QWidget* ownerWidget() const = 0;
61 
62  virtual QObject* pluginParent() const = 0;
63 
64 protected:
65 #ifndef QT_NO_CURSOR
66  virtual QCursor cursor() const = 0;
67  virtual void updateCursor(const QCursor& cursor) = 0;
68 #endif
69 
70 private:
71 #ifndef QT_NO_CURSOR
72  QCursor m_lastCursor;
73 #endif
74 };
75 
76 #endif
50383

WebCore/platform/qt/PlatformScreenQt.cpp

3636#include "FrameView.h"
3737#include "HostWindow.h"
3838#include "Widget.h"
39 #include "QWebPageClient.h"
 39
 40#include "qwebpageclient.h"
 41
4042#include <QApplication>
4143#include <QDesktopWidget>
4244
50383

WebCore/platform/qt/PopupMenuQt.cpp

3030#include "FrameView.h"
3131#include "HostWindow.h"
3232#include "PopupMenuClient.h"
33 #include "QWebPageClient.h"
3433#include "QWebPopup.h"
3534
 35#include "qwebpageclient.h"
 36
3637#include <QAction>
3738#include <QDebug>
3839#include <QListWidget>
50383

WebCore/platform/qt/RenderThemeQt.cpp

4545#include "RenderBox.h"
4646#include "RenderTheme.h"
4747#include "UserAgentStyleSheets.h"
48 #include "QWebPageClient.h"
4948#include "qwebpage.h"
 49#include "qwebpageclient.h"
5050
5151#include <QApplication>
5252#include <QColor>
50383

WebCore/platform/qt/WidgetQt.cpp

3939#include "IntRect.h"
4040#include "ScrollView.h"
4141#include "NotImplemented.h"
42 #include "QWebPageClient.h"
4342
4443#include "qwebframe.h"
4544#include "qwebframe_p.h"
4645#include "qwebpage.h"
 46#include "qwebpageclient.h"
4747
4848#include <QCoreApplication>
4949#include <QPainter>
50383