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

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

Issue 1177733002: Merge page serializers [11/12] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moar issues Created 5 years, 6 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } 347 bool isUpgradedCustomElement() { return customElementState() == Upgraded; }
348 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor Upgrade; } 348 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor Upgrade; }
349 349
350 AtomicString computeInheritedLanguage() const; 350 AtomicString computeInheritedLanguage() const;
351 Locale& locale() const; 351 Locale& locale() const;
352 352
353 virtual void accessKeyAction(bool /*sendToAnyEvent*/) { } 353 virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
354 354
355 virtual bool isURLAttribute(const Attribute&) const { return false; } 355 virtual bool isURLAttribute(const Attribute&) const { return false; }
356 bool isJavaScriptURLAttribute(const Attribute&) const;
356 virtual bool isHTMLContentAttribute(const Attribute&) const { return false; } 357 virtual bool isHTMLContentAttribute(const Attribute&) const { return false; }
357 358
358 virtual bool isLiveLink() const { return false; } 359 virtual bool isLiveLink() const { return false; }
359 KURL hrefURL() const; 360 KURL hrefURL() const;
360 361
361 KURL getURLAttribute(const QualifiedName&) const; 362 KURL getURLAttribute(const QualifiedName&) const;
362 KURL getNonEmptyURLAttribute(const QualifiedName&) const; 363 KURL getNonEmptyURLAttribute(const QualifiedName&) const;
363 364
364 virtual const AtomicString imageSourceURL() const; 365 virtual const AtomicString imageSourceURL() const;
365 virtual Image* imageContents() { return nullptr; } 366 virtual Image* imageContents() { return nullptr; }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 635
635 ElementRareData* elementRareData() const; 636 ElementRareData* elementRareData() const;
636 ElementRareData& ensureElementRareData(); 637 ElementRareData& ensureElementRareData();
637 638
638 AttrNodeList& ensureAttrNodeList(); 639 AttrNodeList& ensureAttrNodeList();
639 void removeAttrNodeList(); 640 void removeAttrNodeList();
640 void detachAllAttrNodesFromElement(); 641 void detachAllAttrNodesFromElement();
641 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value); 642 void detachAttrNodeFromElementWithValue(Attr*, const AtomicString& value);
642 void detachAttrNodeAtIndex(Attr*, size_t index); 643 void detachAttrNodeAtIndex(Attr*, size_t index);
643 644
644 bool isJavaScriptURLAttribute(const Attribute&) const;
645
646 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext); 645 v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext);
647 646
648 RefPtrWillBeMember<ElementData> m_elementData; 647 RefPtrWillBeMember<ElementData> m_elementData;
649 }; 648 };
650 649
651 DEFINE_NODE_TYPE_CASTS(Element, isElementNode()); 650 DEFINE_NODE_TYPE_CASTS(Element, isElementNode());
652 template <typename T> bool isElementOfType(const Node&); 651 template <typename T> bool isElementOfType(const Node&);
653 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); } 652 template <> inline bool isElementOfType<const Element>(const Node& node) { retur n node.isElementNode(); }
654 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); } 653 template <typename T> inline bool isElementOfType(const Element& element) { retu rn isElementOfType<T>(static_cast<const Node&>(element)); }
655 template <> inline bool isElementOfType<const Element>(const Element&) { return true; } 654 template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 874 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
876 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 875 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
877 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 876 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
878 { \ 877 { \
879 return adoptRefWillBeNoop(new T(tagName, document)); \ 878 return adoptRefWillBeNoop(new T(tagName, document)); \
880 } 879 }
881 880
882 } // namespace 881 } // namespace
883 882
884 #endif // Element_h 883 #endif // Element_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/MarkupAccumulator.h » ('j') | Source/core/page/PageSerializer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698