OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 ASSERT_NOT_REACHED(); | 482 ASSERT_NOT_REACHED(); |
483 | 483 |
484 event->setTarget(this); | 484 event->setTarget(this); |
485 m_pendingAutocompleteEventsQueue->enqueueEvent(event); | 485 m_pendingAutocompleteEventsQueue->enqueueEvent(event); |
486 } | 486 } |
487 | 487 |
488 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& oldValue, const AtomicString& value) | 488 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& oldValue, const AtomicString& value) |
489 { | 489 { |
490 if (name == actionAttr) { | 490 if (name == actionAttr) { |
491 m_attributes.parseAction(value); | 491 m_attributes.parseAction(value); |
492 // If the new action attribute is pointing to insecure "action" location
from a secure page | |
493 // it is marked as "passive" mixed content. | |
494 KURL actionURL = document().completeURL(m_attributes.action().isEmpty()
? document().url().getString() : m_attributes.action()); | |
495 if (MixedContentChecker::isMixedFormAction(document().frame(), actionURL
)) | |
496 UseCounter::count(document().frame(), UseCounter::MixedContentFormPr
esent); | |
497 logUpdateAttributeIfIsolatedWorldAndInDocument("form", actionAttr, oldVa
lue, value); | 492 logUpdateAttributeIfIsolatedWorldAndInDocument("form", actionAttr, oldVa
lue, value); |
| 493 |
| 494 if (document().getInsecureRequestsPolicy() != SecurityContext::InsecureR
equestsUpgrade) { |
| 495 // If we're not upgrading insecure requests, and the new action attr
ibute is pointing to |
| 496 // an insecure "action" location from a secure page it is marked as
"passive" mixed content. |
| 497 KURL actionURL = document().completeURL(m_attributes.action().isEmpt
y() ? document().url().getString() : m_attributes.action()); |
| 498 if (MixedContentChecker::isMixedFormAction(document().frame(), actio
nURL)) |
| 499 UseCounter::count(document().frame(), UseCounter::MixedContentFo
rmPresent); |
| 500 } |
498 } else if (name == targetAttr) { | 501 } else if (name == targetAttr) { |
499 m_attributes.setTarget(value); | 502 m_attributes.setTarget(value); |
500 } else if (name == methodAttr) { | 503 } else if (name == methodAttr) { |
501 m_attributes.updateMethodType(value); | 504 m_attributes.updateMethodType(value); |
502 } else if (name == enctypeAttr) { | 505 } else if (name == enctypeAttr) { |
503 m_attributes.updateEncodingType(value); | 506 m_attributes.updateEncodingType(value); |
504 } else if (name == accept_charsetAttr) { | 507 } else if (name == accept_charsetAttr) { |
505 m_attributes.setAcceptCharset(value); | 508 m_attributes.setAcceptCharset(value); |
506 } else if (name == onautocompleteAttr) { | 509 } else if (name == onautocompleteAttr) { |
507 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE
ventListener(this, name, value, eventParameterName())); | 510 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE
ventListener(this, name, value, eventParameterName())); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 { | 818 { |
816 for (const auto& control : associatedElements()) { | 819 for (const auto& control : associatedElements()) { |
817 if (!control->isFormControlElement()) | 820 if (!control->isFormControlElement()) |
818 continue; | 821 continue; |
819 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton()) | 822 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton()) |
820 toHTMLFormControlElement(control)->pseudoStateChanged(CSSSelector::P
seudoDefault); | 823 toHTMLFormControlElement(control)->pseudoStateChanged(CSSSelector::P
seudoDefault); |
821 } | 824 } |
822 } | 825 } |
823 | 826 |
824 } // namespace blink | 827 } // namespace blink |
OLD | NEW |