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

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

Issue 943153002: Make it possible for sky-element to register any tag name (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 enum SpellcheckAttributeState { 59 enum SpellcheckAttributeState {
60 SpellcheckAttributeTrue, 60 SpellcheckAttributeTrue,
61 SpellcheckAttributeFalse, 61 SpellcheckAttributeFalse,
62 SpellcheckAttributeDefault 62 SpellcheckAttributeDefault
63 }; 63 };
64 64
65 class Element : public ContainerNode { 65 class Element : public ContainerNode {
66 DEFINE_WRAPPERTYPEINFO(); 66 DEFINE_WRAPPERTYPEINFO();
67 public: 67 public:
68 // Used for custom elements.
69 static PassRefPtr<Element> create(Document& document, const AtomicString& ta gName);
70
71 static PassRefPtr<Element> create(const QualifiedName&, Document*); 68 static PassRefPtr<Element> create(const QualifiedName&, Document*);
72 virtual ~Element(); 69 virtual ~Element();
73 70
74 bool hasAttribute(const QualifiedName&) const; 71 bool hasAttribute(const QualifiedName&) const;
75 const AtomicString& getAttribute(const QualifiedName&) const; 72 const AtomicString& getAttribute(const QualifiedName&) const;
76 Vector<RefPtr<Attr>> getAttributes(); 73 Vector<RefPtr<Attr>> getAttributes();
77 bool hasAttributes() const; 74 bool hasAttributes() const;
78 bool hasAttribute(const AtomicString& name) const; 75 bool hasAttribute(const AtomicString& name) const;
79 const AtomicString& getAttribute(const AtomicString& name) const; 76 const AtomicString& getAttribute(const AtomicString& name) const;
80 void setAttribute(const AtomicString& name, const AtomicString& value, Excep tionState&); 77 void setAttribute(const AtomicString& name, const AtomicString& value, Excep tionState&);
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 static PassRefPtr<T> create(const QualifiedName&, Document&) 553 static PassRefPtr<T> create(const QualifiedName&, Document&)
557 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 554 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
558 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 555 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \
559 { \ 556 { \
560 return adoptRef(new T(tagName, document)); \ 557 return adoptRef(new T(tagName, document)); \
561 } 558 }
562 559
563 } // namespace 560 } // namespace
564 561
565 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ 562 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/bindings/scripts/templates/interface_dart.template ('k') | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698