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

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

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 months 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 resetFormAttributeTargetObserver(); 88 resetFormAttributeTargetObserver();
89 } 89 }
90 90
91 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint) { 91 void FormAssociatedElement::removedFrom(ContainerNode* insertionPoint) {
92 HTMLElement* element = toHTMLElement(this); 92 HTMLElement* element = toHTMLElement(this);
93 if (insertionPoint->isConnected() && element->fastHasAttribute(formAttr)) { 93 if (insertionPoint->isConnected() && element->fastHasAttribute(formAttr)) {
94 setFormAttributeTargetObserver(nullptr); 94 setFormAttributeTargetObserver(nullptr);
95 resetFormOwner(); 95 resetFormOwner();
96 return; 96 return;
97 } 97 }
98 // If the form and element are both in the same tree, preserve the connection to the form. 98 // If the form and element are both in the same tree, preserve the connection
99 // Otherwise, null out our form and remove ourselves from the form's list of e lements. 99 // to the form. Otherwise, null out our form and remove ourselves from the
100 // form's list of elements.
100 if (m_form && 101 if (m_form &&
101 NodeTraversal::highestAncestorOrSelf(*element) != 102 NodeTraversal::highestAncestorOrSelf(*element) !=
102 NodeTraversal::highestAncestorOrSelf(*m_form.get())) 103 NodeTraversal::highestAncestorOrSelf(*m_form.get()))
103 resetFormOwner(); 104 resetFormOwner();
104 } 105 }
105 106
106 HTMLFormElement* FormAssociatedElement::findAssociatedForm( 107 HTMLFormElement* FormAssociatedElement::findAssociatedForm(
107 const HTMLElement* element) { 108 const HTMLElement* element) {
108 const AtomicString& formId(element->fastGetAttribute(formAttr)); 109 const AtomicString& formId(element->fastGetAttribute(formAttr));
109 // 3. If the element is reassociateable, has a form content attribute, and 110 // 3. If the element is reassociateable, has a form content attribute, and
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 DEFINE_TRACE(FormAttributeTargetObserver) { 320 DEFINE_TRACE(FormAttributeTargetObserver) {
320 visitor->trace(m_element); 321 visitor->trace(m_element);
321 IdTargetObserver::trace(visitor); 322 IdTargetObserver::trace(visitor);
322 } 323 }
323 324
324 void FormAttributeTargetObserver::idTargetChanged() { 325 void FormAttributeTargetObserver::idTargetChanged() {
325 m_element->formAttributeTargetChanged(); 326 m_element->formAttributeTargetChanged();
326 } 327 }
327 328
328 } // namespace blink 329 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/FormAssociatedElement.h ('k') | third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698