summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLFormControlElementWithState.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLFormControlElementWithState.cpp
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/HTMLFormControlElementWithState.cpp')
-rw-r--r--Source/WebCore/html/HTMLFormControlElementWithState.cpp19
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