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

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

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXME comments. Created 6 years, 3 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/StyleSheet.idl ('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-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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 void synchronizeAttribute(const AtomicString& localName) const; 493 void synchronizeAttribute(const AtomicString& localName) const;
494 494
495 MutableStylePropertySet& ensureMutableInlineStyle(); 495 MutableStylePropertySet& ensureMutableInlineStyle();
496 void clearMutableInlineStyleIfEmpty(); 496 void clearMutableInlineStyleIfEmpty();
497 497
498 void setTabIndex(int); 498 void setTabIndex(int);
499 virtual short tabIndex() const OVERRIDE; 499 virtual short tabIndex() const OVERRIDE;
500 500
501 virtual void trace(Visitor*) OVERRIDE; 501 virtual void trace(Visitor*) OVERRIDE;
502 502
503 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*) OVERRIDE;
504
503 protected: 505 protected:
504 Element(const QualifiedName& tagName, Document*, ConstructionType); 506 Element(const QualifiedName& tagName, Document*, ConstructionType);
505 507
506 const ElementData* elementData() const { return m_elementData.get(); } 508 const ElementData* elementData() const { return m_elementData.get(); }
507 UniqueElementData& ensureUniqueElementData(); 509 UniqueElementData& ensureUniqueElementData();
508 510
509 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier); 511 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, CSSValueID identifier);
510 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType); 512 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, double value, CSSPrimitiveValue::UnitType);
511 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value); 513 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr opertyID, const String& value);
512 514
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 ElementRareData& ensureElementRareData(); 638 ElementRareData& ensureElementRareData();
637 639
638 WillBeHeapVector<RefPtrWillBeMember<Attr> >& ensureAttrNodeList(); 640 WillBeHeapVector<RefPtrWillBeMember<Attr> >& ensureAttrNodeList();
639 void removeAttrNodeList(); 641 void removeAttrNodeList();
640 void detachAllAttrNodesFromElement(); 642 void detachAllAttrNodesFromElement();
641 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); 643 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value);
642 void detachAttrNodeAtIndex(Attr*, size_t index); 644 void detachAttrNodeAtIndex(Attr*, size_t index);
643 645
644 bool isJavaScriptURLAttribute(const Attribute&) const; 646 bool isJavaScriptURLAttribute(const Attribute&) const;
645 647
648 v8::Handle<v8::Object> wrapCustomElement(v8::Handle<v8::Object> creationCont ext, v8::Isolate*);
649
646 RefPtrWillBeMember<ElementData> m_elementData; 650 RefPtrWillBeMember<ElementData> m_elementData;
647 }; 651 };
648 652
649 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); 653 DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
650 template <typename T> bool isElementOfType(const Node&); 654 template <typename T> bool isElementOfType(const Node&);
651 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } 655 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); }
652 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } 656 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); }
653 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } 657 template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
654 658
655 // Type casting. 659 // Type casting.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 869 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
866 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 870 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
867 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 871 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
868 { \ 872 { \
869 return adoptRefWillBeNoop(new T(tagName, document)); \ 873 return adoptRefWillBeNoop(new T(tagName, document)); \
870 } 874 }
871 875
872 } // namespace 876 } // namespace
873 877
874 #endif // Element_h 878 #endif // Element_h
OLDNEW
« no previous file with comments | « Source/core/css/StyleSheet.idl ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698