diff options
Diffstat (limited to 'Source/WebCore/html/HTMLFormControlElementWithState.cpp')
-rw-r--r-- | Source/WebCore/html/HTMLFormControlElementWithState.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/Source/WebCore/html/HTMLFormControlElementWithState.cpp b/Source/WebCore/html/HTMLFormControlElementWithState.cpp index d16577f0a..676b27ca4 100644 --- a/Source/WebCore/html/HTMLFormControlElementWithState.cpp +++ b/Source/WebCore/html/HTMLFormControlElementWithState.cpp @@ -25,12 +25,9 @@ #include "config.h" #include "HTMLFormControlElementWithState.h" -#include "Chrome.h" -#include "ChromeClient.h" #include "FormController.h" #include "Frame.h" #include "HTMLFormElement.h" -#include "Page.h" namespace WebCore { @@ -45,14 +42,14 @@ HTMLFormControlElementWithState::~HTMLFormControlElementWithState() Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto(ContainerNode& insertionPoint) { - if (insertionPoint.inDocument() && !containingShadowRoot()) + if (insertionPoint.isConnected() && !containingShadowRoot()) document().formController().registerFormElementWithState(this); return HTMLFormControlElement::insertedInto(insertionPoint); } void HTMLFormControlElementWithState::removedFrom(ContainerNode& insertionPoint) { - if (insertionPoint.inDocument() && !containingShadowRoot() && !insertionPoint.containingShadowRoot()) + if (insertionPoint.isConnected() && !containingShadowRoot() && !insertionPoint.containingShadowRoot()) document().formController().unregisterFormElementWithState(this); HTMLFormControlElement::removedFrom(insertionPoint); } @@ -64,20 +61,10 @@ bool HTMLFormControlElementWithState::shouldAutocomplete() const return form()->shouldAutocomplete(); } -void HTMLFormControlElementWithState::notifyFormStateChanged() -{ - Frame* frame = document().frame(); - if (!frame) - return; - - if (Page* page = frame->page()) - page->chrome().client().formStateDidChange(this); -} - bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() const { // We don't save/restore control state in a form with autocomplete=off. - return inDocument() && shouldAutocomplete(); + return isConnected() && shouldAutocomplete(); } FormControlState HTMLFormControlElementWithState::saveFormControlState() const |