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

Side by Side Diff: sky/engine/core/dom/Element.h

Issue 880593003: Move the CustomElementDefinition from ElementRareData to Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix compile assert Created 5 years, 11 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
« no previous file with comments | « no previous file | sky/engine/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-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 SpellcheckAttributeState spellcheckAttributeState() const; 367 SpellcheckAttributeState spellcheckAttributeState() const;
368 368
369 void createUniqueElementData(); 369 void createUniqueElementData();
370 370
371 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&); 371 bool shouldInvalidateDistributionWhenAttributeChanged(ElementShadow*, const QualifiedName&, const AtomicString&);
372 372
373 ElementRareData* elementRareData() const; 373 ElementRareData* elementRareData() const;
374 ElementRareData& ensureElementRareData(); 374 ElementRareData& ensureElementRareData();
375 375
376 RefPtr<ElementData> m_elementData; 376 RefPtr<ElementData> m_elementData;
377 RefPtr<CustomElementDefinition> m_customElementDefinition;
377 }; 378 };
378 379
379 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); 380 DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
380 template <typename T> bool isElementOfType(const Node&); 381 template <typename T> bool isElementOfType(const Node&);
381 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } 382 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); }
382 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } 383 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); }
383 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } 384 template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
384 385
385 // Type casting. 386 // Type casting.
386 template<typename T> inline T& toElement(Node& node) 387 template<typename T> inline T& toElement(Node& node)
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 static PassRefPtr<T> create(const QualifiedName&, Document&) 585 static PassRefPtr<T> create(const QualifiedName&, Document&)
585 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 586 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
586 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 587 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \
587 { \ 588 { \
588 return adoptRef(new T(tagName, document)); \ 589 return adoptRef(new T(tagName, document)); \
589 } 590 }
590 591
591 } // namespace 592 } // namespace
592 593
593 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ 594 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698