| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #include "core/dom/ElementTraversal.h" | 28 #include "core/dom/ElementTraversal.h" |
| 29 #include "core/events/Event.h" | 29 #include "core/events/Event.h" |
| 30 #include "core/frame/UseCounter.h" | 30 #include "core/frame/UseCounter.h" |
| 31 #include "core/html/HTMLDataListElement.h" | 31 #include "core/html/HTMLDataListElement.h" |
| 32 #include "core/html/HTMLFieldSetElement.h" | 32 #include "core/html/HTMLFieldSetElement.h" |
| 33 #include "core/html/HTMLFormElement.h" | 33 #include "core/html/HTMLFormElement.h" |
| 34 #include "core/html/HTMLInputElement.h" | 34 #include "core/html/HTMLInputElement.h" |
| 35 #include "core/html/HTMLLegendElement.h" | 35 #include "core/html/HTMLLegendElement.h" |
| 36 #include "core/html/ValidityState.h" | 36 #include "core/html/ValidityState.h" |
| 37 #include "core/html/parser/HTMLParserIdioms.h" |
| 37 #include "core/inspector/ConsoleMessage.h" | 38 #include "core/inspector/ConsoleMessage.h" |
| 38 #include "core/layout/LayoutBox.h" | 39 #include "core/layout/LayoutBox.h" |
| 39 #include "core/layout/LayoutTheme.h" | 40 #include "core/layout/LayoutTheme.h" |
| 40 #include "core/page/Page.h" | 41 #include "core/page/Page.h" |
| 41 #include "core/page/ValidationMessageClient.h" | 42 #include "core/page/ValidationMessageClient.h" |
| 42 #include "platform/text/BidiTextRun.h" | 43 #include "platform/text/BidiTextRun.h" |
| 43 #include "wtf/Vector.h" | 44 #include "wtf/Vector.h" |
| 44 | 45 |
| 45 namespace blink { | 46 namespace blink { |
| 46 | 47 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 setForm(0); | 79 setForm(0); |
| 79 #endif | 80 #endif |
| 80 } | 81 } |
| 81 | 82 |
| 82 DEFINE_TRACE(HTMLFormControlElement) | 83 DEFINE_TRACE(HTMLFormControlElement) |
| 83 { | 84 { |
| 84 FormAssociatedElement::trace(visitor); | 85 FormAssociatedElement::trace(visitor); |
| 85 LabelableElement::trace(visitor); | 86 LabelableElement::trace(visitor); |
| 86 } | 87 } |
| 87 | 88 |
| 89 String HTMLFormControlElement::formAction() const |
| 90 { |
| 91 const AtomicString& action = fastGetAttribute(formactionAttr); |
| 92 if (action.isEmpty()) |
| 93 return document().url(); |
| 94 return document().completeURL(stripLeadingAndTrailingHTMLSpaces(action)); |
| 95 } |
| 96 |
| 97 void HTMLFormControlElement::setFormAction(const AtomicString& value) |
| 98 { |
| 99 setAttribute(formactionAttr, value); |
| 100 } |
| 101 |
| 88 String HTMLFormControlElement::formEnctype() const | 102 String HTMLFormControlElement::formEnctype() const |
| 89 { | 103 { |
| 90 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr); | 104 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr); |
| 91 if (formEnctypeAttr.isNull()) | 105 if (formEnctypeAttr.isNull()) |
| 92 return emptyString(); | 106 return emptyString(); |
| 93 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr); | 107 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr); |
| 94 } | 108 } |
| 95 | 109 |
| 96 void HTMLFormControlElement::setFormEnctype(const AtomicString& value) | 110 void HTMLFormControlElement::setFormEnctype(const AtomicString& value) |
| 97 { | 111 { |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 dispatchFormControlChangeEvent(); | 662 dispatchFormControlChangeEvent(); |
| 649 } | 663 } |
| 650 | 664 |
| 651 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) | 665 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(const Element
& source) |
| 652 { | 666 { |
| 653 HTMLElement::copyNonAttributePropertiesFromElement(source); | 667 HTMLElement::copyNonAttributePropertiesFromElement(source); |
| 654 setNeedsValidityCheck(); | 668 setNeedsValidityCheck(); |
| 655 } | 669 } |
| 656 | 670 |
| 657 } // namespace blink | 671 } // namespace blink |
| OLD | NEW |