Source/WebKit2/ChangeLog

 12012-03-14 Dinu Jacob <dinu.jacob@nokia.com>
 2
 3 [Qt][WK2] Move code common to both ProxyAuthentication and Authentication context objects into a base class
 4 https://bugs.webkit.org/show_bug.cgi?id=80627
 5
 6 Reviewed by Kenneth Rohde Christiansen.
 7
 8 No impact to AML API.
 9
 10 * UIProcess/qt/QtDialogRunner.cpp:
 11 (BaseAuthenticationContextObject):
 12 (BaseAuthenticationContextObject::BaseAuthenticationContextObject):
 13 (HttpAuthenticationDialogContextObject):
 14 (HttpAuthenticationDialogContextObject::HttpAuthenticationDialogContextObject):
 15 (HttpAuthenticationDialogContextObject::realm):
 16 (ProxyAuthenticationDialogContextObject):
 17 (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
 18 (QtDialogRunner::initForAuthentication):
 19
1202012-03-13 Anders Carlsson <andersca@apple.com>
221
322 Find bouncy doesn’t hide when a subframe is scrolled

Source/WebKit2/UIProcess/qt/QtDialogRunner.cpp

@@private:
6969 QString m_defaultValue;
7070};
7171
72 class AuthenticationDialogContextObject : public QObject {
 72class BaseAuthenticationContextObject : public QObject {
7373 Q_OBJECT
7474 Q_PROPERTY(QString hostname READ hostname CONSTANT)
75  Q_PROPERTY(QString realm READ realm CONSTANT)
7675 Q_PROPERTY(QString prefilledUsername READ prefilledUsername CONSTANT)
7776
7877public:
79  AuthenticationDialogContextObject(const QString& hostname, const QString& realm, const QString& prefilledUsername)
 78 BaseAuthenticationContextObject(const QString& hostname, const QString& prefilledUsername)
8079 : QObject()
8180 , m_hostname(hostname)
82  , m_realm(realm)
8381 , m_prefilledUsername(prefilledUsername)
8482 {
8583 }
8684
8785 QString hostname() const { return m_hostname; }
88  QString realm() const { return m_realm; }
8986 QString prefilledUsername() const { return m_prefilledUsername; }
9087
9188public slots:

@@signals:
9895
9996private:
10097 QString m_hostname;
101  QString m_realm;
10298 QString m_prefilledUsername;
10399};
104100
105 class ProxyAuthenticationDialogContextObject : public QObject {
 101class HttpAuthenticationDialogContextObject : public BaseAuthenticationContextObject {
 102 Q_OBJECT
 103 Q_PROPERTY(QString realm READ realm CONSTANT)
 104
 105public:
 106 HttpAuthenticationDialogContextObject(const QString& hostname, const QString& realm, const QString& prefilledUsername)
 107 : BaseAuthenticationContextObject(hostname, prefilledUsername)
 108 , m_realm(realm)
 109 {
 110 }
 111
 112 QString realm() const { return m_realm; }
 113
 114private:
 115 QString m_realm;
 116};
 117
 118class ProxyAuthenticationDialogContextObject : public BaseAuthenticationContextObject {
106119 Q_OBJECT
107  Q_PROPERTY(QString hostname READ hostname CONSTANT)
108120 Q_PROPERTY(quint16 port READ port CONSTANT)
109  Q_PROPERTY(QString prefilledUsername READ prefilledUsername CONSTANT)
110121
111122public:
112123 ProxyAuthenticationDialogContextObject(const QString& hostname, quint16 port, const QString& prefilledUsername)
113  : QObject()
114  , m_hostname(hostname)
 124 : BaseAuthenticationContextObject(hostname, prefilledUsername)
115125 , m_port(port)
116  , m_prefilledUsername(prefilledUsername)
117126 {
118127 }
119128
120  QString hostname() const { return m_hostname; }
121129 quint16 port() const { return m_port; }
122  QString prefilledUsername() const { return m_prefilledUsername; }
123 
124 public slots:
125  void accept(const QString& username, const QString& password) { emit accepted(username, password); }
126  void reject() { emit rejected(); }
127 
128 signals:
129  void accepted(const QString& username, const QString& password);
130  void rejected();
131130
132131private:
133  QString m_hostname;
134132 quint16 m_port;
135  QString m_prefilledUsername;
136133};
137134
138135class CertificateVerificationDialogContextObject : public QObject {

@@bool QtDialogRunner::initForPrompt(QDeclarativeComponent* component, QQuickItem*
196193
197194bool QtDialogRunner::initForAuthentication(QDeclarativeComponent* component, QQuickItem* dialogParent, const QString& hostname, const QString& realm, const QString& prefilledUsername)
198195{
199  AuthenticationDialogContextObject* contextObject = new AuthenticationDialogContextObject(hostname, realm, prefilledUsername);
 196 HttpAuthenticationDialogContextObject* contextObject = new HttpAuthenticationDialogContextObject(hostname, realm, prefilledUsername);
200197 if (!createDialog(component, dialogParent, contextObject))
201198 return false;
202199