From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../WebCore/html/HTMLFormControlElementWithState.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'Source/WebCore/html/HTMLFormControlElementWithState.cpp') 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 -- cgit v1.2.1