diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebKit/blackberry/ChangeLog | 23 | ||||
-rw-r--r-- | Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp | 20 | ||||
-rw-r--r-- | Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h | 3 | ||||
-rw-r--r-- | Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebpage.cpp | 2 | ||||
-rw-r--r-- | Source/WebKit/qt/ChangeLog | 36 | ||||
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp | 4 | ||||
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h | 2 | ||||
-rw-r--r-- | Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp | 13 | ||||
-rw-r--r-- | Source/WebKit2/ChangeLog | 31 | ||||
-rw-r--r-- | Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp | 5 | ||||
-rw-r--r-- | Source/WebKit2/qt/MainQt.cpp | 4 |
12 files changed, 125 insertions, 20 deletions
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog index 9382a941c..8950d4e85 100644 --- a/Source/WebKit/blackberry/ChangeLog +++ b/Source/WebKit/blackberry/ChangeLog @@ -1,3 +1,26 @@ +2012-11-26 Jonathan Dong <jonathan.dong@torchmobile.com.cn> + + [BlackBerry] Should not autofill username and password when there're more than one password inputs on the same page + https://bugs.webkit.org/show_bug.cgi?id=103104 + + Reviewed by Rob Buis. + + RIM PR: 245334 + Added the oldPassword detection back into the password input + detection logic, which was removed for simplicity when imported + those pieces of codes from Chromium. And we won't do autofill + when there're more than one password field detected. + + Internally reviewed by Rob Buis. + + * WebCoreSupport/CredentialTransformData.cpp: + (WebCore::CredentialTransformData::CredentialTransformData): + (WebCore::CredentialTransformData::findPasswordFormFields): + * WebCoreSupport/CredentialTransformData.h: + (CredentialTransformData): + * WebCoreSupport/FrameLoaderClientBlackBerry.cpp: + (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent): + 2012-11-25 Jacky Jiang <zhajiang@rim.com> [BlackBerry] Get rid of resetBitmapZoomScale() diff --git a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp index 0d05a7543..e602c4ff7 100644 --- a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp +++ b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.cpp @@ -64,10 +64,10 @@ KURL stripURL(const KURL& url) // Helper method to determine which password is the main one, and which is // an old password (e.g on a "make new password" form), if any. -bool locateSpecificPasswords(Vector<HTMLInputElement*>& passwords, - HTMLInputElement** password) +bool locateSpecificPasswords(Vector<HTMLInputElement*>& passwords, HTMLInputElement** password, HTMLInputElement** oldPassword) { ASSERT(password); + ASSERT(oldPassword); switch (passwords.size()) { case 1: @@ -80,6 +80,7 @@ bool locateSpecificPasswords(Vector<HTMLInputElement*>& passwords, *password = passwords[0]; else { // Assume first is old password, second is new (no choice but to guess). + *oldPassword = passwords[0]; *password = passwords[1]; } break; @@ -90,9 +91,12 @@ bool locateSpecificPasswords(Vector<HTMLInputElement*>& passwords, *password = passwords[0]; } else if (passwords[0]->value() == passwords[1]->value()) { // Two the same and one different -> old password is duplicated one. + *oldPassword = passwords[0]; *password = passwords[2]; - } else if (passwords[1]->value() == passwords[2]->value()) + } else if (passwords[1]->value() == passwords[2]->value()) { + *oldPassword = passwords[0]; *password = passwords[1]; + } else { // Three different passwords, or first and last match with middle // different. No idea which is which, so no luck. @@ -107,9 +111,10 @@ bool locateSpecificPasswords(Vector<HTMLInputElement*>& passwords, } // namespace -CredentialTransformData::CredentialTransformData(HTMLFormElement* form) +CredentialTransformData::CredentialTransformData(HTMLFormElement* form, bool isForSaving) : m_userNameElement(0) , m_passwordElement(0) + , m_oldPasswordElement(0) , m_isValid(false) { ASSERT(form); @@ -128,6 +133,10 @@ CredentialTransformData::CredentialTransformData(HTMLFormElement* form) if (!findPasswordFormFields(form)) return; + // Won't restore password if there're two password inputs on the page. + if (!isForSaving && m_oldPasswordElement) + return; + m_url = stripURL(fullOrigin); m_action = stripURL(fullAction); m_protectionSpace = ProtectionSpace(m_url.host(), m_url.port(), ProtectionSpaceServerHTTP, "Form", ProtectionSpaceAuthenticationSchemeHTMLForm); @@ -142,6 +151,7 @@ CredentialTransformData::CredentialTransformData(const KURL& url, const Protecti , m_credential(credential) , m_userNameElement(0) , m_passwordElement(0) + , m_oldPasswordElement(0) , m_isValid(true) { } @@ -227,7 +237,7 @@ bool CredentialTransformData::findPasswordFormFields(HTMLFormElement* form) if (!m_userNameElement) return false; - if (!locateSpecificPasswords(passwords, &(m_passwordElement))) + if (!locateSpecificPasswords(passwords, &m_passwordElement, &m_oldPasswordElement)) return false; return true; } diff --git a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h index 734a53b65..657b83a2d 100644 --- a/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h +++ b/Source/WebKit/blackberry/WebCoreSupport/CredentialTransformData.h @@ -29,7 +29,7 @@ namespace WebCore { struct CredentialTransformData { // If the provided form is suitable for password completion, isValid() will // return true; - CredentialTransformData(HTMLFormElement*); + CredentialTransformData(HTMLFormElement*, bool isForSaving = false); CredentialTransformData(const KURL&, const ProtectionSpace&, const Credential&); // If creation failed, return false. @@ -49,6 +49,7 @@ private: mutable Credential m_credential; HTMLInputElement* m_userNameElement; HTMLInputElement* m_passwordElement; + HTMLInputElement* m_oldPasswordElement; bool m_isValid; }; diff --git a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp index 0e0619b4b..0b92aec37 100644 --- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp +++ b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp @@ -766,7 +766,7 @@ void FrameLoaderClientBlackBerry::dispatchWillSendSubmitEvent(PassRefPtr<FormSta m_webPagePrivate->m_autofillManager->saveTextFields(prpFormState->form()); #if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST) if (m_webPagePrivate->m_webSettings->isCredentialAutofillEnabled()) - credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(prpFormState->form())); + credentialManager().saveCredentialIfConfirmed(m_webPagePrivate, CredentialTransformData(prpFormState->form(), true)); #endif } } diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index 81571b05b..65624d190 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -68,6 +68,7 @@ #include "HTMLNames.h" #include "HitTestResult.h" #include "Image.h" +#include "InitWebCoreQt.h" #include "InitWebKitQt.h" #include "InspectorClientQt.h" #include "InspectorClientWebPage.h" @@ -325,6 +326,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq) #endif WebKit::initializeWebKitWidgets(); + WebCore::initializeWebCoreQt(); Page::PageClients pageClients; pageClients.chromeClient = new ChromeClientQt(this); diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index af879c5b5..f8ba65ff8 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,39 @@ +2012-11-26 Pierre Rossi <pierre.rossi@gmail.com> + + [Qt] REGRESSION(r135575): It made all tests assert + https://bugs.webkit.org/show_bug.cgi?id=103169 + + Reviewed by Simon Hausmann. + + This fixes another regression introduced in r135515: + initializeWebKitQt shouldn't implicitely call initializeWebCoreQt + since it can be called from WebKit2 to initialize QStyle for testing. + This would then lead to things such as PlatformStrategies being + initialized twice. + + * Api/qwebpage.cpp: Explicitely call initializeWebCoreQt(). + (QWebPagePrivate::QWebPagePrivate): + * WebCoreSupport/InitWebCoreQt.cpp: + (WebKit::initializeWebKitQt): + (WebCore::initializeWebCoreQt): + * WebCoreSupport/InitWebCoreQt.h: + (WebCore): + +2012-11-26 Zeno Albisser <zeno@webkit.org> + + [Qt] Make sure the QGLWidget context is current when creating the TextureMapper. + https://bugs.webkit.org/show_bug.cgi?id=103142 + + When creating the TextureMapperGL for WK1 we have to make sure + that the GL context provided by the QGLWidget is current. + Otherwise the GraphicsContext3DQt created by TextureMapperGL will pick up + the wrong pointer by calling QOpenGLContext::currentContext(). + + Reviewed by Simon Hausmann. + + * WebCoreSupport/PageClientQt.cpp: + (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer): + 2012-11-26 Michael BrĂ¼ning <michael.bruning@digia.com> [Qt] QStyleFacadeImp build break with latest Qt 5 diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp index e75b852fe..d2f75ec18 100644 --- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp @@ -62,8 +62,6 @@ Q_DECL_EXPORT void initializeWebKitQt() WebCore::RenderThemeQStyle::setStyleFactoryFunction(initCallback); WebCore::RenderThemeQt::setCustomTheme(WebCore::RenderThemeQStyle::create, new WebCore::ScrollbarThemeQStyle); } - - WebCore::initializeWebCoreQt(); } Q_DECL_EXPORT void setImagePlatformResource(const char* name, const QPixmap& pixmap) @@ -75,7 +73,7 @@ Q_DECL_EXPORT void setImagePlatformResource(const char* name, const QPixmap& pix namespace WebCore { -void initializeWebCoreQt() +Q_DECL_EXPORT void initializeWebCoreQt() { static bool initialized = false; if (initialized) diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h index 56ea74321..7e1b0b7a2 100644 --- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h +++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.h @@ -48,7 +48,7 @@ Q_DECL_EXPORT void setImagePlatformResource(const char* /* name */, const QPixma namespace WebCore { -void initializeWebCoreQt(); +Q_DECL_EXPORT void initializeWebCoreQt(); } diff --git a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp index 92ab84b64..369307cba 100644 --- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp @@ -282,11 +282,16 @@ void PageClientQGraphicsWidget::setRootGraphicsLayer(GraphicsLayer* layer) { if (layer) { TextureMapperLayerClient = adoptPtr(new TextureMapperLayerClientQt(page->mainFrame(), layer)); -#if USE(TEXTURE_MAPPER_GL) +#if USE(TEXTURE_MAPPER_GL) && defined(QT_OPENGL_LIB) QGraphicsView* graphicsView = view->scene()->views()[0]; - if (graphicsView && graphicsView->viewport() && graphicsView->viewport()->inherits("QGLWidget")) { - TextureMapperLayerClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode)); - return; + if (graphicsView && graphicsView->viewport()) { + QGLWidget* glWidget = qobject_cast<QGLWidget*>(graphicsView->viewport()); + if (glWidget) { + // The GL context belonging to the QGLWidget viewport must be current when TextureMapper is being created. + glWidget->makeCurrent(); + TextureMapperLayerClient->setTextureMapper(TextureMapper::create(TextureMapper::OpenGLMode)); + return; + } } #endif TextureMapperLayerClient->setTextureMapper(TextureMapper::create()); diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 71a25bbfe..bbe9d54db 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,34 @@ +2012-11-26 Pierre Rossi <pierre.rossi@gmail.com> + + [Qt] REGRESSION(r135575): It made all tests assert + https://bugs.webkit.org/show_bug.cgi?id=103169 + + Reviewed by Simon Hausmann. + + This fixes another regression introduced in r135515: + initializeWebKitQt shouldn't implicitely call initializeWebCoreQt + since it can be called from WebKit2 to initialize QStyle for testing. + This would then lead to things such as PlatformStrategies being + initialized twice. + + * qt/MainQt.cpp: No need to initialize anything if we're not using QStyle. + (WebKit): + (main): + +2012-11-26 Huang Dongsung <luxtella@company100.net> + + REGRESSION(134142): ASSERT(!m_size.isZero()) hits in CoordinatedBackingStore::paintToTextureMapper(). + https://bugs.webkit.org/show_bug.cgi?id=103217 + + Reviewed by Noam Rosenthal. + + It is possible for CoordinatedBackingStore of directed composited image to not + have tiles, because CoordinatedImageBacking does not create tiles when the image + is invisible. + + * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: + (WebKit::CoordinatedBackingStore::paintToTextureMapper): + 2012-11-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> [WK2] TiledBackingStore: page contents is scaled wrongly diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp b/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp index 12afbc94e..dc1b213d4 100644 --- a/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp +++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp @@ -140,6 +140,10 @@ void CoordinatedBackingStore::paintTilesToTextureMapper(Vector<TextureMapperTile void CoordinatedBackingStore::paintToTextureMapper(TextureMapper* textureMapper, const FloatRect& targetRect, const TransformationMatrix& transform, float opacity, BitmapTexture* mask) { + if (m_tiles.isEmpty()) + return; + ASSERT(!m_size.isZero()); + Vector<TextureMapperTile*> tilesToPaint; Vector<TextureMapperTile*> previousTilesToPaint; @@ -165,7 +169,6 @@ void CoordinatedBackingStore::paintToTextureMapper(TextureMapper* textureMapper, previousTilesToPaint.append(&tile); } - ASSERT(!m_size.isZero()); FloatRect rectOnContents(FloatPoint::zero(), m_size); TransformationMatrix adjustedTransform = transform; // targetRect is on the contents coordinate system, so we must compare two rects on the contents coordinate system. diff --git a/Source/WebKit2/qt/MainQt.cpp b/Source/WebKit2/qt/MainQt.cpp index 0990c01f8..17ad8537d 100644 --- a/Source/WebKit2/qt/MainQt.cpp +++ b/Source/WebKit2/qt/MainQt.cpp @@ -45,7 +45,6 @@ Q_DECL_IMPORT int WebProcessMainQt(QGuiApplication*); #if !defined(QT_NO_WIDGETS) Q_DECL_IMPORT void initializeWebKitWidgets(); #endif -Q_DECL_IMPORT void initializeWebKitQt(); } #if !defined(NDEBUG) && defined(Q_OS_UNIX) @@ -96,10 +95,7 @@ int main(int argc, char** argv) #if !defined(QT_NO_WIDGETS) if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle") WebKit::initializeWebKitWidgets(); - else #endif - WebKit::initializeWebKitQt(); - return WebKit::WebProcessMainQt(appInstance); } |