Chromium Code Reviews| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 496 m_pendingAutocompleteEventsQueue->enqueueEvent(event.release()); | 496 m_pendingAutocompleteEventsQueue->enqueueEvent(event.release()); |
| 497 } | 497 } |
| 498 | 498 |
| 499 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value) | 499 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri ng& value) |
| 500 { | 500 { |
| 501 if (name == actionAttr) { | 501 if (name == actionAttr) { |
| 502 m_attributes.parseAction(value); | 502 m_attributes.parseAction(value); |
| 503 // If the new action attribute is pointing to insecure "action" location from a secure page | 503 // If the new action attribute is pointing to insecure "action" location from a secure page |
| 504 // it is marked as "passive" mixed content. | 504 // it is marked as "passive" mixed content. |
| 505 KURL actionURL = document().completeURL(m_attributes.action().isEmpty() ? document().url().string() : m_attributes.action()); | 505 KURL actionURL = document().completeURL(m_attributes.action().isEmpty() ? document().url().string() : m_attributes.action()); |
| 506 if (MixedContentChecker::isMixedContent(document().securityOrigin(), act ionURL)) | 506 // Check if the DOM has a frame before checking mixed content (crbug/398 066). |
|
jww
2014/08/01 23:20:52
It's clear that you're checking if the DOM has a f
mhm
2014/08/01 23:28:44
Done.
| |
| 507 document().frame()->loader().mixedContentChecker()->canSubmitToInsec ureForm(document().securityOrigin(), actionURL); | 507 if (document().frame()) { |
| 508 if (MixedContentChecker::isMixedContent(document().securityOrigin(), actionURL)) | |
| 509 document().frame()->loader().mixedContentChecker()->canSubmitToI nsecureForm(document().securityOrigin(), actionURL); | |
| 510 } | |
| 508 } else if (name == targetAttr) | 511 } else if (name == targetAttr) |
| 509 m_attributes.setTarget(value); | 512 m_attributes.setTarget(value); |
| 510 else if (name == methodAttr) | 513 else if (name == methodAttr) |
| 511 m_attributes.updateMethodType(value); | 514 m_attributes.updateMethodType(value); |
| 512 else if (name == enctypeAttr) | 515 else if (name == enctypeAttr) |
| 513 m_attributes.updateEncodingType(value); | 516 m_attributes.updateEncodingType(value); |
| 514 else if (name == accept_charsetAttr) | 517 else if (name == accept_charsetAttr) |
| 515 m_attributes.setAcceptCharset(value); | 518 m_attributes.setAcceptCharset(value); |
| 516 else if (name == onautocompleteAttr) | 519 else if (name == onautocompleteAttr) |
| 517 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value, eventParameterName())); | 520 setAttributeEventListener(EventTypeNames::autocomplete, createAttributeE ventListener(this, name, value, eventParameterName())); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 827 } | 830 } |
| 828 | 831 |
| 829 void HTMLFormElement::setDemoted(bool demoted) | 832 void HTMLFormElement::setDemoted(bool demoted) |
| 830 { | 833 { |
| 831 if (demoted) | 834 if (demoted) |
| 832 UseCounter::count(document(), UseCounter::DemotedFormElement); | 835 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 833 m_wasDemoted = demoted; | 836 m_wasDemoted = demoted; |
| 834 } | 837 } |
| 835 | 838 |
| 836 } // namespace | 839 } // namespace |
| OLD | NEW |