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

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

Issue 14626005: Upgrade elements that are created before a custom element definition is registered (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Feedback+test Created 7 years, 7 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
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 872
873 if (shouldInvalidateStyle) 873 if (shouldInvalidateStyle)
874 setNeedsStyleRecalc(); 874 setNeedsStyleRecalc();
875 875
876 if (AXObjectCache* cache = document()->existingAXObjectCache()) 876 if (AXObjectCache* cache = document()->existingAXObjectCache())
877 cache->handleAttributeChanged(name, this); 877 cache->handleAttributeChanged(name, this);
878 } 878 }
879 879
880 inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason) 880 inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason)
881 { 881 {
882 if (name == isAttr) { 882 if (RuntimeEnabledFeatures::customDOMElementsEnabled() && name == isAttr) {
883 if (CustomElementRegistry* registry = document()->registry()) 883 document()->ensureCustomElementRegistry()->didGiveTypeExtension(this, ne wValue);
884 registry->didGiveTypeExtension(this);
885 } 884 }
886 attributeChanged(name, newValue, reason); 885 attributeChanged(name, newValue, reason);
887 } 886 }
888 887
889 template <typename CharacterType> 888 template <typename CharacterType>
890 static inline bool classStringHasClassName(const CharacterType* characters, unsi gned length) 889 static inline bool classStringHasClassName(const CharacterType* characters, unsi gned length)
891 { 890 {
892 ASSERT(length > 0); 891 ASSERT(length > 0);
893 892
894 unsigned i = 0; 893 unsigned i = 0;
(...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 return 0; 3114 return 0;
3116 } 3115 }
3117 3116
3118 Attribute* UniqueElementData::attributeItem(unsigned index) 3117 Attribute* UniqueElementData::attributeItem(unsigned index)
3119 { 3118 {
3120 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3119 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3121 return &m_attributeVector.at(index); 3120 return &m_attributeVector.at(index);
3122 } 3121 }
3123 3122
3124 } // namespace WebCore 3123 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/scripts/make_names.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698