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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // because of lazy evaluation. 601 // because of lazy evaluation.
602 const FormAssociatedElement::List& HTMLFormElement::associatedElements() const 602 const FormAssociatedElement::List& HTMLFormElement::associatedElements() const
603 { 603 {
604 if (!m_associatedElementsAreDirty) 604 if (!m_associatedElementsAreDirty)
605 return m_associatedElements; 605 return m_associatedElements;
606 HTMLFormElement* mutableThis = const_cast<HTMLFormElement*>(this); 606 HTMLFormElement* mutableThis = const_cast<HTMLFormElement*>(this);
607 Node* scope = mutableThis; 607 Node* scope = mutableThis;
608 if (m_hasElementsAssociatedByParser) 608 if (m_hasElementsAssociatedByParser)
609 scope = &NodeTraversal::highestAncestorOrSelf(*mutableThis); 609 scope = &NodeTraversal::highestAncestorOrSelf(*mutableThis);
610 if (inShadowIncludingDocument() && m_hasElementsAssociatedByFormAttribute) 610 if (inShadowIncludingDocument() && m_hasElementsAssociatedByFormAttribute)
611 scope = &treeScope().rootNode(); 611 scope = &treeScopeOrDocument().rootNode();
612 ASSERT(scope); 612 ASSERT(scope);
613 collectAssociatedElements(*scope, mutableThis->m_associatedElements); 613 collectAssociatedElements(*scope, mutableThis->m_associatedElements);
614 mutableThis->m_associatedElementsAreDirty = false; 614 mutableThis->m_associatedElementsAreDirty = false;
615 return m_associatedElements; 615 return m_associatedElements;
616 } 616 }
617 617
618 void HTMLFormElement::collectImageElements(Node& root, HeapVector<Member<HTMLIma geElement>>& elements) 618 void HTMLFormElement::collectImageElements(Node& root, HeapVector<Member<HTMLIma geElement>>& elements)
619 { 619 {
620 elements.clear(); 620 elements.clear();
621 for (HTMLImageElement& image : Traversal<HTMLImageElement>::startsAfter(root )) { 621 for (HTMLImageElement& image : Traversal<HTMLImageElement>::startsAfter(root )) {
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 { 833 {
834 for (const auto& control : associatedElements()) { 834 for (const auto& control : associatedElements()) {
835 if (!control->isFormControlElement()) 835 if (!control->isFormControlElement())
836 continue; 836 continue;
837 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton()) 837 if (toHTMLFormControlElement(control)->canBeSuccessfulSubmitButton())
838 toHTMLFormControlElement(control)->pseudoStateChanged(CSSSelector::P seudoDefault); 838 toHTMLFormControlElement(control)->pseudoStateChanged(CSSSelector::P seudoDefault);
839 } 839 }
840 } 840 }
841 841
842 } // namespace blink 842 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698