Changeset 25064 in webkit
- Timestamp:
- Aug 13, 2007, 6:52:01 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r25063 r25064 1 2007-08-13 Adele Peterson <adele@apple.com> 2 3 Reviewed by Brady. 4 5 Fix for http://bugs.webkit.org/show_bug.cgi?id=14746 6 <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field 7 8 * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Restore our old behavior that will save form state for secure forms. 9 This will also match Firefox behavior. 10 11 * dom/Document.cpp: Removed secureFormAdded(), secureFormRemoved(), hasSecureForm() which are no longer used. 12 * dom/Document.h: 13 * html/HTMLFormElement.cpp: 14 (WebCore::HTMLFormElement::attach): 15 (WebCore::HTMLFormElement::parseMappedAttribute): 16 1 17 2007-08-13 Oliver Hunt <oliver@apple.com> 2 18 -
trunk/WebCore/dom/Document.cpp
r25002 r25064 2738 2738 } 2739 2739 2740 void Document::secureFormAdded()2741 {2742 m_secureForms++;2743 }2744 2745 void Document::secureFormRemoved()2746 {2747 ASSERT(m_secureForms > 0);2748 m_secureForms--;2749 }2750 2751 bool Document::hasSecureForm() const2752 {2753 return m_secureForms > 0;2754 }2755 2756 2740 void Document::setShouldCreateRenderers(bool f) 2757 2741 { -
trunk/WebCore/dom/Document.h
r25002 r25064 798 798 void didRestoreFromCache(); 799 799 800 void secureFormAdded();801 void secureFormRemoved();802 bool hasSecureForm() const;803 804 800 void setShouldCreateRenderers(bool); 805 801 bool shouldCreateRenderers(); -
trunk/WebCore/html/HTMLFormElement.cpp
r24541 r25064 86 86 { 87 87 HTMLElement::attach(); 88 89 // note we don't deal with calling secureFormRemoved() on detach, because the timing90 // was such that it cleared our state too early91 if (formWouldHaveSecureSubmission(m_url))92 document()->secureFormAdded();93 88 } 94 89 … … 494 489 void HTMLFormElement::parseMappedAttribute(MappedAttribute *attr) 495 490 { 496 if (attr->name() == actionAttr) { 497 bool oldURLWasSecure = formWouldHaveSecureSubmission(m_url); 491 if (attr->name() == actionAttr) 498 492 m_url = parseURL(attr->value()); 499 bool newURLIsSecure = formWouldHaveSecureSubmission(m_url);500 501 if (m_attached && (oldURLWasSecure != newURLIsSecure))502 if (newURLIsSecure)503 document()->secureFormAdded();504 else505 document()->secureFormRemoved();506 }507 493 else if (attr->name() == targetAttr) 508 494 m_target = attr->value(); -
trunk/WebCore/loader/FrameLoader.cpp
r24934 r25064 3835 3835 return; 3836 3836 3837 // Do not save doc state if the page has a form that would be submitted via https.3838 Document* document = m_frame->document();3839 ASSERT(document);3840 3841 if (document->hasSecureForm())3842 return;3843 3844 3837 // For a standard page load, we will have a previous item set, which will be used to 3845 3838 // store the form state. However, in some cases we will have no previous item, and … … 3856 3849 if (!item) 3857 3850 return; 3858 3851 3852 Document* document = m_frame->document(); 3853 ASSERT(document); 3854 3859 3855 if (document && item->isCurrentDocument(document)) { 3860 3856 LOG(Loading, "WebCoreLoading %s: saving form state to %p", m_frame->tree()->name().domString().utf8().data(), item);
Note:
See TracChangeset
for help on using the changeset viewer.