OLD | NEW |
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match
es(tagName); } | 352 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match
es(tagName); } |
353 | 353 |
354 // A fast function for checking the local name against another atomic string
. | 354 // A fast function for checking the local name against another atomic string
. |
355 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } | 355 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } |
356 bool hasLocalName(const QualifiedName& other) const { return m_tagName.local
Name() == other.localName(); } | 356 bool hasLocalName(const QualifiedName& other) const { return m_tagName.local
Name() == other.localName(); } |
357 | 357 |
358 const AtomicString& localName() const { return m_tagName.localName(); } | 358 const AtomicString& localName() const { return m_tagName.localName(); } |
359 const AtomicString& prefix() const { return m_tagName.prefix(); } | 359 const AtomicString& prefix() const { return m_tagName.prefix(); } |
360 const AtomicString& namespaceURI() const { return m_tagName.namespaceURI();
} | 360 const AtomicString& namespaceURI() const { return m_tagName.namespaceURI();
} |
361 | 361 |
362 virtual KURL baseURI() const; | 362 virtual KURL baseURI() const OVERRIDE FINAL; |
363 | 363 |
364 virtual String nodeName() const; | 364 virtual String nodeName() const; |
365 | 365 |
366 PassRefPtr<Element> cloneElementWithChildren(); | 366 PassRefPtr<Element> cloneElementWithChildren(); |
367 PassRefPtr<Element> cloneElementWithoutChildren(); | 367 PassRefPtr<Element> cloneElementWithoutChildren(); |
368 | 368 |
369 void normalizeAttributes(); | 369 void normalizeAttributes(); |
370 String nodeNamePreservingCase() const; | 370 String nodeNamePreservingCase() const; |
371 | 371 |
372 void setBooleanAttribute(const QualifiedName& name, bool); | 372 void setBooleanAttribute(const QualifiedName& name, bool); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 // Use Document::registerForMediaVolumeCallbacks() to subscribe to this | 487 // Use Document::registerForMediaVolumeCallbacks() to subscribe to this |
488 virtual void mediaVolumeDidChange() { } | 488 virtual void mediaVolumeDidChange() { } |
489 | 489 |
490 virtual void didBecomeFullscreenElement() { } | 490 virtual void didBecomeFullscreenElement() { } |
491 virtual void willStopBeingFullscreenElement() { } | 491 virtual void willStopBeingFullscreenElement() { } |
492 | 492 |
493 virtual void captionPreferencesChanged() { } | 493 virtual void captionPreferencesChanged() { } |
494 | 494 |
495 bool isFinishedParsingChildren() const { return isParsingChildrenFinished();
} | 495 bool isFinishedParsingChildren() const { return isParsingChildrenFinished();
} |
496 virtual void finishParsingChildren(); | 496 virtual void finishParsingChildren(); |
497 virtual void beginParsingChildren(); | 497 virtual void beginParsingChildren() OVERRIDE FINAL; |
498 | 498 |
499 bool hasPseudoElements() const; | 499 bool hasPseudoElements() const; |
500 PseudoElement* pseudoElement(PseudoId) const; | 500 PseudoElement* pseudoElement(PseudoId) const; |
501 RenderObject* pseudoElementRenderer(PseudoId) const; | 501 RenderObject* pseudoElementRenderer(PseudoId) const; |
502 bool childNeedsShadowWalker() const; | 502 bool childNeedsShadowWalker() const; |
503 void didShadowTreeAwareChildrenChange(); | 503 void didShadowTreeAwareChildrenChange(); |
504 | 504 |
505 // ElementTraversal API | 505 // ElementTraversal API |
506 Element* firstElementChild() const; | 506 Element* firstElementChild() const; |
507 Element* lastElementChild() const; | 507 Element* lastElementChild() const; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 protected: | 608 protected: |
609 Element(const QualifiedName& tagName, Document* document, ConstructionType t
ype) | 609 Element(const QualifiedName& tagName, Document* document, ConstructionType t
ype) |
610 : ContainerNode(document, type) | 610 : ContainerNode(document, type) |
611 , m_tagName(tagName) | 611 , m_tagName(tagName) |
612 { | 612 { |
613 ScriptWrappable::init(this); | 613 ScriptWrappable::init(this); |
614 } | 614 } |
615 | 615 |
616 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 616 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
617 virtual void removedFrom(ContainerNode*) OVERRIDE; | 617 virtual void removedFrom(ContainerNode*) OVERRIDE; |
618 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 618 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
619 virtual void removeAllEventListeners() OVERRIDE; | 619 virtual void removeAllEventListeners() OVERRIDE FINAL; |
620 | 620 |
621 virtual bool willRecalcStyle(StyleChange); | 621 virtual bool willRecalcStyle(StyleChange); |
622 virtual void didRecalcStyle(StyleChange); | 622 virtual void didRecalcStyle(StyleChange); |
623 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); | 623 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); |
624 | 624 |
625 virtual bool shouldRegisterAsNamedItem() const { return false; } | 625 virtual bool shouldRegisterAsNamedItem() const { return false; } |
626 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } | 626 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } |
627 | 627 |
628 void clearTabIndexExplicitlyIfNeeded(); | 628 void clearTabIndexExplicitlyIfNeeded(); |
629 void setTabIndexExplicitly(short); | 629 void setTabIndexExplicitly(short); |
(...skipping 30 matching lines...) Expand all Loading... |
660 void synchronizeAttribute(const QualifiedName&) const; | 660 void synchronizeAttribute(const QualifiedName&) const; |
661 void synchronizeAttribute(const AtomicString& localName) const; | 661 void synchronizeAttribute(const AtomicString& localName) const; |
662 | 662 |
663 void updateId(const AtomicString& oldId, const AtomicString& newId); | 663 void updateId(const AtomicString& oldId, const AtomicString& newId); |
664 void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& new
Id); | 664 void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& new
Id); |
665 void updateName(const AtomicString& oldName, const AtomicString& newName); | 665 void updateName(const AtomicString& oldName, const AtomicString& newName); |
666 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const
AtomicString& newForAttributeValue); | 666 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const
AtomicString& newForAttributeValue); |
667 | 667 |
668 void scrollByUnits(int units, ScrollGranularity); | 668 void scrollByUnits(int units, ScrollGranularity); |
669 | 669 |
670 virtual void setPrefix(const AtomicString&, ExceptionCode&); | 670 virtual void setPrefix(const AtomicString&, ExceptionCode&) OVERRIDE FINAL; |
671 virtual NodeType nodeType() const; | 671 virtual NodeType nodeType() const OVERRIDE FINAL; |
672 virtual bool childTypeAllowed(NodeType) const; | 672 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; |
673 | 673 |
674 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); | 674 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); |
675 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S
ynchronizationOfLazyAttribute); | 675 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S
ynchronizationOfLazyAttribute); |
676 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); | 676 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); |
677 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); | 677 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); |
678 | 678 |
679 #ifndef NDEBUG | 679 #ifndef NDEBUG |
680 virtual void formatForDebugger(char* buffer, unsigned length) const; | 680 virtual void formatForDebugger(char* buffer, unsigned length) const; |
681 #endif | 681 #endif |
682 | 682 |
683 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle*
newStyle); | 683 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle*
newStyle); |
684 | 684 |
685 void cancelFocusAppearanceUpdate(); | 685 void cancelFocusAppearanceUpdate(); |
686 | 686 |
687 virtual const AtomicString& virtualPrefix() const { return prefix(); } | 687 virtual const AtomicString& virtualPrefix() const OVERRIDE FINAL { return pr
efix(); } |
688 virtual const AtomicString& virtualLocalName() const { return localName(); } | 688 virtual const AtomicString& virtualLocalName() const OVERRIDE FINAL { return
localName(); } |
689 virtual const AtomicString& virtualNamespaceURI() const { return namespaceUR
I(); } | 689 virtual const AtomicString& virtualNamespaceURI() const OVERRIDE FINAL { ret
urn namespaceURI(); } |
690 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) { return computedStyle(pseudoElementSpecifier); } | 690 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) { return computedStyle(pseudoElementSpecifier); } |
691 | 691 |
692 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren | 692 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren |
693 // are used instead. | 693 // are used instead. |
694 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE; | 694 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE; |
695 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); | 695 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); |
696 | 696 |
697 QualifiedName m_tagName; | 697 QualifiedName m_tagName; |
698 bool rareDataStyleAffectedByEmpty() const; | 698 bool rareDataStyleAffectedByEmpty() const; |
699 bool rareDataChildrenAffectedByHover() const; | 699 bool rareDataChildrenAffectedByHover() const; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 | 1007 |
1008 inline const Attribute* ElementData::attributeItem(unsigned index) const | 1008 inline const Attribute* ElementData::attributeItem(unsigned index) const |
1009 { | 1009 { |
1010 RELEASE_ASSERT(index < length()); | 1010 RELEASE_ASSERT(index < length()); |
1011 return attributeBase() + index; | 1011 return attributeBase() + index; |
1012 } | 1012 } |
1013 | 1013 |
1014 } // namespace | 1014 } // namespace |
1015 | 1015 |
1016 #endif | 1016 #endif |
OLD | NEW |