| Index: third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp b/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp
|
| index 06b7fbc0df3c21bc0ac550e7dad4760e26b3ae2c..ab57a788443e9ea402e0c2e1d87f602729b4a3d3 100644
|
| --- a/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp
|
| +++ b/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp
|
| @@ -38,8 +38,6 @@
|
| #include "core/html/HTMLInputElement.h"
|
| #include "core/html/forms/FormController.h"
|
| #include "core/layout/LayoutTextControlSingleLine.h"
|
| -#include "public/platform/InterfaceProvider.h"
|
| -#include "public/platform/modules/sensitive_input_visibility/sensitive_input_visibility_service.mojom-blink.h"
|
| #include "wtf/Assertions.h"
|
| #include "wtf/PassRefPtr.h"
|
|
|
| @@ -93,43 +91,11 @@ void PasswordInputType::disableSecureTextInput() {
|
| }
|
|
|
| void PasswordInputType::onAttachWithLayoutObject() {
|
| - Document& document = element().document();
|
| - DCHECK(document.frame());
|
| - if (document.isSecureContext()) {
|
| - // The browser process only cares about passwords on pages where the
|
| - // top-level URL is not secure. Secure contexts must have a top-level
|
| - // URL that is secure, so there is no need to send notifications for
|
| - // password fields in secure contexts.
|
| - return;
|
| - }
|
| -
|
| - document.incrementPasswordCount();
|
| - if (document.passwordCount() > 1) {
|
| - // Only send a message on the first visible password field; the
|
| - // browser process doesn't care about the presence of additional
|
| - // password fields beyond that.
|
| - return;
|
| - }
|
| - mojom::blink::SensitiveInputVisibilityServicePtr sensitiveInputServicePtr;
|
| - document.frame()->interfaceProvider()->getInterface(
|
| - mojo::GetProxy(&sensitiveInputServicePtr));
|
| - sensitiveInputServicePtr->PasswordFieldVisibleInInsecureContext();
|
| + element().document().incrementPasswordCount();
|
| }
|
|
|
| void PasswordInputType::onDetachWithLayoutObject() {
|
| - Document& document = element().document();
|
| - DCHECK(document.frame());
|
| - if (document.isSecureContext()) {
|
| - return;
|
| - }
|
| - document.decrementPasswordCount();
|
| - if (document.passwordCount() > 0)
|
| - return;
|
| -
|
| - mojom::blink::SensitiveInputVisibilityServicePtr sensitiveInputServicePtr;
|
| - document.frame()->interfaceProvider()->getInterface(
|
| - mojo::GetProxy(&sensitiveInputServicePtr));
|
| - sensitiveInputServicePtr->AllPasswordFieldsInInsecureContextInvisible();
|
| + element().document().decrementPasswordCount();
|
| }
|
|
|
| } // namespace blink
|
|
|