Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: third_party/WebKit/Source/core/html/FormAssociatedElement.cpp

Issue 1511523002: Align HTMLImageElement relevant mutations to spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix removal issue when a text node is between <source> and <img> Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 resetFormOwner(); 89 resetFormOwner();
90 90
91 if (!insertionPoint->inDocument()) 91 if (!insertionPoint->inDocument())
92 return; 92 return;
93 93
94 HTMLElement* element = toHTMLElement(this); 94 HTMLElement* element = toHTMLElement(this);
95 if (element->fastHasAttribute(formAttr)) 95 if (element->fastHasAttribute(formAttr))
96 resetFormAttributeTargetObserver(); 96 resetFormAttributeTargetObserver();
97 } 97 }
98 98
99 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint) 99 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint, Node* nex t)
100 { 100 {
101 HTMLElement* element = toHTMLElement(this); 101 HTMLElement* element = toHTMLElement(this);
102 if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr)) { 102 if (insertionPoint->inDocument() && element->fastHasAttribute(formAttr)) {
103 setFormAttributeTargetObserver(nullptr); 103 setFormAttributeTargetObserver(nullptr);
104 resetFormOwner(); 104 resetFormOwner();
105 return; 105 return;
106 } 106 }
107 // If the form and element are both in the same tree, preserve the connectio n to the form. 107 // If the form and element are both in the same tree, preserve the connectio n to the form.
108 // Otherwise, null out our form and remove ourselves from the form's list of elements. 108 // Otherwise, null out our form and remove ourselves from the form's list of elements.
109 if (m_form && NodeTraversal::highestAncestorOrSelf(*element) != NodeTraversa l::highestAncestorOrSelf(*m_form.get())) 109 if (m_form && NodeTraversal::highestAncestorOrSelf(*element) != NodeTraversa l::highestAncestorOrSelf(*m_form.get()))
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 visitor->trace(m_element); 349 visitor->trace(m_element);
350 IdTargetObserver::trace(visitor); 350 IdTargetObserver::trace(visitor);
351 } 351 }
352 352
353 void FormAttributeTargetObserver::idTargetChanged() 353 void FormAttributeTargetObserver::idTargetChanged()
354 { 354 {
355 m_element->formAttributeTargetChanged(); 355 m_element->formAttributeTargetChanged();
356 } 356 }
357 357
358 } // namespace blink 358 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698