diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-31 15:50:41 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:35:23 +0000 |
commit | 7b2ffa587235a47d4094787d72f38102089f402a (patch) | |
tree | 30e82af9cbab08a7fa028bb18f4f2987a3f74dfa /chromium/third_party/blink/renderer/core/html/forms/form_controller.cc | |
parent | d94af01c90575348c4e81a418257f254b6f8d225 (diff) | |
download | qtwebengine-chromium-7b2ffa587235a47d4094787d72f38102089f402a.tar.gz |
BASELINE: Update Chromium to 76.0.3809.94
Change-Id: I321c3f5f929c105aec0f98c5091ef6108822e647
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/forms/form_controller.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/html/forms/form_controller.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/forms/form_controller.cc b/chromium/third_party/blink/renderer/core/html/forms/form_controller.cc index 80b67e5502a..485a82a4931 100644 --- a/chromium/third_party/blink/renderer/core/html/forms/form_controller.cc +++ b/chromium/third_party/blink/renderer/core/html/forms/form_controller.cc @@ -48,8 +48,8 @@ inline HTMLFormElement* OwnerFormForState(const ListedElement& control) { // Assume controls with form attribute have no owners because we restore // state during parsing and form owners of such controls might be // indeterminate. - return ToHTMLElement(control).FastHasAttribute(kFormAttr) ? nullptr - : control.Form(); + return control.ToHTMLElement().FastHasAttribute(kFormAttr) ? nullptr + : control.Form(); } const AtomicString& ControlType(const ListedElement& control) { @@ -347,6 +347,12 @@ static inline void RecordFormStructure(const HTMLFormElement& form, ListedElement& control = *controls[i]; if (!control.ClassSupportsStateRestore()) continue; + // The resultant string will be fragile if it contains a name of a + // form-associated custom element. It's associated to the |form| only if its + // custom element definition is available. It's not associated if the + // definition is unavailable though the element structure is identical. + if (control.IsElementInternals()) + continue; if (!OwnerFormForState(control)) continue; AtomicString name = control.GetName(); @@ -359,7 +365,7 @@ static inline void RecordFormStructure(const HTMLFormElement& form, builder.Append(']'); } -static inline String FormSignature(const HTMLFormElement& form) { +String FormSignature(const HTMLFormElement& form) { KURL action_url = form.GetURLAttribute(kActionAttr); // Remove the query part because it might contain volatile parameters such // as a session key. @@ -444,7 +450,7 @@ Vector<String> DocumentState::ToStateVector() { std::unique_ptr<SavedFormStateMap> state_map = base::WrapUnique(new SavedFormStateMap); for (auto& control : form_controls_) { - DCHECK(ToHTMLElement(control)->isConnected()); + DCHECK(control->ToHTMLElement().isConnected()); if (!control->ShouldSaveAndRestoreFormControlState()) continue; SavedFormStateMap::AddResult result = |