Changeset 63786 in webkit
- Timestamp:
- Jul 20, 2010 4:23:28 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63782 r63786 1 2010-07-16 James Hawkins <jhawkins@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Expose the form submission trigger on the HTMLFormElement object. This 6 is used to verify that the user submitted the form instead of JS when 7 saving form data in Chrome AutoFill. 8 https://bugs.webkit.org/show_bug.cgi?id=42479 9 10 No new tests as this is only used by the Chromium WebKit API. 11 12 * html/HTMLFormElement.cpp: 13 (WebCore::HTMLFormElement::HTMLFormElement): 14 (WebCore::HTMLFormElement::submit): 15 (WebCore::HTMLFormElement::reset): 16 (WebCore::HTMLFormElement::submissionTrigger): 17 * html/HTMLFormElement.h: 18 1 19 2010-07-20 Adam Barth <abarth@webkit.org> 2 20 -
trunk/WebCore/html/HTMLFormElement.cpp
r61959 r63786 75 75 HTMLFormElement::HTMLFormElement(const QualifiedName& tagName, Document* document) 76 76 : HTMLElement(tagName, document) 77 , m_submissionTrigger(NotSubmittedByJavaScript) 77 78 , m_autocomplete(true) 78 79 , m_insubmit(false) … … 371 372 372 373 m_insubmit = true; 374 m_submissionTrigger = formSubmissionTrigger; 373 375 374 376 HTMLFormControlElement* firstSuccessfulSubmitButton = 0; … … 560 562 } 561 563 564 FormSubmissionTrigger HTMLFormElement::submissionTrigger() const 565 { 566 return m_submissionTrigger; 567 } 568 562 569 HTMLFormControlElement* HTMLFormElement::defaultButton() const 563 570 { -
trunk/WebCore/html/HTMLFormElement.h
r61960 r63786 99 99 virtual String target() const; 100 100 101 FormSubmissionTrigger submissionTrigger() const; 102 101 103 HTMLFormControlElement* defaultButton() const; 102 104 … … 154 156 Vector<HTMLImageElement*> m_imageElements; 155 157 158 FormSubmissionTrigger m_submissionTrigger; 159 156 160 bool m_autocomplete : 1; 157 161 bool m_insubmit : 1; -
trunk/WebKit/chromium/ChangeLog
r63780 r63786 1 2010-07-16 James Hawkins <jhawkins@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [Chromium] Implement WebFormElement::wasUserSubmitted(). This is used to 6 verify that the user submitted the form instead of JS when saving form 7 data in AutoFill. 8 https://bugs.webkit.org/show_bug.cgi?id=42479 9 10 * public/WebFormElement.h: 11 * src/WebFormElement.cpp: 12 (WebKit::WebFormElement::wasUserSubmitted): 13 1 14 2010-07-20 Daniel Erat <derat@chromium.org> 2 15 -
trunk/WebKit/chromium/public/WebFormElement.h
r58839 r63786 64 64 WEBKIT_API WebString name() const; 65 65 WEBKIT_API WebString method() const; 66 WEBKIT_API bool wasUserSubmitted() const; 66 67 WEBKIT_API void submit(); 67 68 // FIXME: Deprecate and replace with WebVector<WebElement>. -
trunk/WebKit/chromium/src/WebFormElement.cpp
r60419 r63786 32 32 #include "WebFormElement.h" 33 33 34 #include "FormState.h" 34 35 #include "HTMLFormControlElement.h" 35 36 #include "HTMLFormElement.h" … … 56 57 } 57 58 58 WebString WebFormElement::name() const 59 WebString WebFormElement::name() const 59 60 { 60 61 return constUnwrap<HTMLFormElement>()->name(); 61 62 } 62 63 63 WebString WebFormElement::method() const 64 WebString WebFormElement::method() const 64 65 { 65 66 return constUnwrap<HTMLFormElement>()->method(); 66 67 } 67 68 69 bool WebFormElement::wasUserSubmitted() const 70 { 71 return constUnwrap<HTMLFormElement>()->submissionTrigger() == NotSubmittedByJavaScript; 72 } 73 68 74 void WebFormElement::submit() 69 75 { … … 78 84 result.assign(tempVector); 79 85 } 80 86 81 87 void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& result) const 82 88 {
Note: See TracChangeset
for help on using the changeset viewer.