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

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

Issue 245103004: Remove dead code from childIndex optimization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/Element.cpp » ('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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved.
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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 RenderStyle* computedStyle(PseudoId = NOPSEUDO); 344 RenderStyle* computedStyle(PseudoId = NOPSEUDO);
345 345
346 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.) 346 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.)
347 bool styleAffectedByEmpty() const { return hasElementFlag(StyleAffectedByEmp ty); } 347 bool styleAffectedByEmpty() const { return hasElementFlag(StyleAffectedByEmp ty); }
348 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); } 348 void setStyleAffectedByEmpty() { setElementFlag(StyleAffectedByEmpty); }
349 349
350 void setIsInCanvasSubtree(bool value) { setElementFlag(IsInCanvasSubtree, va lue); } 350 void setIsInCanvasSubtree(bool value) { setElementFlag(IsInCanvasSubtree, va lue); }
351 bool isInCanvasSubtree() const { return hasElementFlag(IsInCanvasSubtree); } 351 bool isInCanvasSubtree() const { return hasElementFlag(IsInCanvasSubtree); }
352 352
353 unsigned childIndex() const { return hasRareData() ? rareDataChildIndex() : 0; }
354 void setChildIndex(unsigned);
355
356 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } 353 bool isUpgradedCustomElement() { return customElementState() == Upgraded; }
357 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor Upgrade; } 354 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor Upgrade; }
358 355
359 AtomicString computeInheritedLanguage() const; 356 AtomicString computeInheritedLanguage() const;
360 Locale& locale() const; 357 Locale& locale() const;
361 358
362 virtual void accessKeyAction(bool /*sendToAnyEvent*/) { } 359 virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
363 360
364 virtual bool isURLAttribute(const Attribute&) const { return false; } 361 virtual bool isURLAttribute(const Attribute&) const { return false; }
365 virtual bool isHTMLContentAttribute(const Attribute&) const { return false; } 362 virtual bool isHTMLContentAttribute(const Attribute&) const { return false; }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 inline void removeCallbackSelectors(); 623 inline void removeCallbackSelectors();
627 inline void addCallbackSelectors(); 624 inline void addCallbackSelectors();
628 625
629 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren 626 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren
630 // are used instead. 627 // are used instead.
631 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE; 628 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE;
632 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); 629 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren();
633 630
634 QualifiedName m_tagName; 631 QualifiedName m_tagName;
635 632
636 unsigned rareDataChildIndex() const;
637
638 SpellcheckAttributeState spellcheckAttributeState() const; 633 SpellcheckAttributeState spellcheckAttributeState() const;
639 634
640 void updateNamedItemRegistration(const AtomicString& oldName, const AtomicSt ring& newName); 635 void updateNamedItemRegistration(const AtomicString& oldName, const AtomicSt ring& newName);
641 void updateExtraNamedItemRegistration(const AtomicString& oldName, const Ato micString& newName); 636 void updateExtraNamedItemRegistration(const AtomicString& oldName, const Ato micString& newName);
642 637
643 void createUniqueElementData(); 638 void createUniqueElementData();
644 639
645 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&); 640 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&);
646 641
647 ElementRareData* elementRareData() const; 642 ElementRareData* elementRareData() const;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 template <> inline bool isElementOfType<const thisType>(const Element& eleme nt) { return element.predicate; } \ 875 template <> inline bool isElementOfType<const thisType>(const Element& eleme nt) { return element.predicate; } \
881 DEFINE_NODE_TYPE_CASTS(thisType, predicate) 876 DEFINE_NODE_TYPE_CASTS(thisType, predicate)
882 877
883 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \ 878 #define DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(thisType) \
884 template <> inline bool isElementOfType<const thisType>(const Element& eleme nt) { return is##thisType(element); } \ 879 template <> inline bool isElementOfType<const thisType>(const Element& eleme nt) { return is##thisType(element); } \
885 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType) 880 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(thisType)
886 881
887 } // namespace 882 } // namespace
888 883
889 #endif 884 #endif
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698