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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 23009004: Process Custom Elements in post-order. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 if (shouldInvalidateStyle) 946 if (shouldInvalidateStyle)
947 setNeedsStyleRecalc(); 947 setNeedsStyleRecalc();
948 948
949 if (AXObjectCache* cache = document()->existingAXObjectCache()) 949 if (AXObjectCache* cache = document()->existingAXObjectCache())
950 cache->handleAttributeChanged(name, this); 950 cache->handleAttributeChanged(name, this);
951 } 951 }
952 952
953 inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason) 953 inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason)
954 { 954 {
955 if (name == isAttr) 955 if (name == isAttr)
956 CustomElementRegistrationContext::setTypeExtension(this, newValue); 956 CustomElementRegistrationContext::setTypeExtension(this, newValue, reaso n == ModifiedDirectly ? CustomElementRegistrationContext::CreatedByParser : Cust omElementRegistrationContext::CreatedByCloning);
957 attributeChanged(name, newValue, reason); 957 attributeChanged(name, newValue, reason);
958 } 958 }
959 959
960 template <typename CharacterType> 960 template <typename CharacterType>
961 static inline bool classStringHasClassName(const CharacterType* characters, unsi gned length) 961 static inline bool classStringHasClassName(const CharacterType* characters, unsi gned length)
962 { 962 {
963 ASSERT(length > 0); 963 ASSERT(length > 0);
964 964
965 unsigned i = 0; 965 unsigned i = 0;
966 do { 966 do {
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 styleResolver->pushParentElement(this); 1763 styleResolver->pushParentElement(this);
1764 } 1764 }
1765 1765
1766 void Element::finishParsingChildren() 1766 void Element::finishParsingChildren()
1767 { 1767 {
1768 ContainerNode::finishParsingChildren(); 1768 ContainerNode::finishParsingChildren();
1769 setIsParsingChildrenFinished(); 1769 setIsParsingChildrenFinished();
1770 checkForSiblingStyleChanges(this, renderStyle(), true, lastChild(), 0, 0); 1770 checkForSiblingStyleChanges(this, renderStyle(), true, lastChild(), 0, 0);
1771 if (StyleResolver* styleResolver = document()->styleResolverIfExists()) 1771 if (StyleResolver* styleResolver = document()->styleResolverIfExists())
1772 styleResolver->popParentElement(this); 1772 styleResolver->popParentElement(this);
1773 if (isCustomElement())
1774 CustomElement::finishedParsingChildren(this);
1773 } 1775 }
1774 1776
1775 #ifndef NDEBUG 1777 #ifndef NDEBUG
1776 void Element::formatForDebugger(char* buffer, unsigned length) const 1778 void Element::formatForDebugger(char* buffer, unsigned length) const
1777 { 1779 {
1778 StringBuilder result; 1780 StringBuilder result;
1779 String s; 1781 String s;
1780 1782
1781 result.append(nodeName()); 1783 result.append(nodeName());
1782 1784
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
3631 return 0; 3633 return 0;
3632 } 3634 }
3633 3635
3634 Attribute* UniqueElementData::attributeItem(unsigned index) 3636 Attribute* UniqueElementData::attributeItem(unsigned index)
3635 { 3637 {
3636 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3638 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3637 return &m_attributeVector.at(index); 3639 return &m_attributeVector.at(index);
3638 } 3640 }
3639 3641
3640 } // namespace WebCore 3642 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698