| 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-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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 virtual int scrollHeight(); | 188 virtual int scrollHeight(); |
| 189 | 189 |
| 190 IntRect boundsInRootViewSpace(); | 190 IntRect boundsInRootViewSpace(); |
| 191 | 191 |
| 192 PassRefPtrWillBeRawPtr<ClientRectList> getClientRects(); | 192 PassRefPtrWillBeRawPtr<ClientRectList> getClientRects(); |
| 193 PassRefPtrWillBeRawPtr<ClientRect> getBoundingClientRect(); | 193 PassRefPtrWillBeRawPtr<ClientRect> getBoundingClientRect(); |
| 194 | 194 |
| 195 // Returns the absolute bounding box translated into screen coordinates: | 195 // Returns the absolute bounding box translated into screen coordinates: |
| 196 IntRect screenRect() const; | 196 IntRect screenRect() const; |
| 197 | 197 |
| 198 virtual void didMoveToNewDocument(Document&) OVERRIDE; | 198 virtual void didMoveToNewDocument(Document&) override; |
| 199 | 199 |
| 200 void removeAttribute(const AtomicString& name); | 200 void removeAttribute(const AtomicString& name); |
| 201 void removeAttributeNS(const AtomicString& namespaceURI, const AtomicString&
localName); | 201 void removeAttributeNS(const AtomicString& namespaceURI, const AtomicString&
localName); |
| 202 | 202 |
| 203 PassRefPtrWillBeRawPtr<Attr> detachAttribute(size_t index); | 203 PassRefPtrWillBeRawPtr<Attr> detachAttribute(size_t index); |
| 204 | 204 |
| 205 PassRefPtrWillBeRawPtr<Attr> getAttributeNode(const AtomicString& name); | 205 PassRefPtrWillBeRawPtr<Attr> getAttributeNode(const AtomicString& name); |
| 206 PassRefPtrWillBeRawPtr<Attr> getAttributeNodeNS(const AtomicString& namespac
eURI, const AtomicString& localName); | 206 PassRefPtrWillBeRawPtr<Attr> getAttributeNodeNS(const AtomicString& namespac
eURI, const AtomicString& localName); |
| 207 PassRefPtrWillBeRawPtr<Attr> setAttributeNode(Attr*, ExceptionState&); | 207 PassRefPtrWillBeRawPtr<Attr> setAttributeNode(Attr*, ExceptionState&); |
| 208 PassRefPtrWillBeRawPtr<Attr> setAttributeNodeNS(Attr*, ExceptionState&); | 208 PassRefPtrWillBeRawPtr<Attr> setAttributeNodeNS(Attr*, ExceptionState&); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 221 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match
es(tagName); } | 221 bool hasTagName(const QualifiedName& tagName) const { return m_tagName.match
es(tagName); } |
| 222 bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNo
de::hasTagName(tagName); } | 222 bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNo
de::hasTagName(tagName); } |
| 223 bool hasTagName(const SVGQualifiedName& tagName) const { return ContainerNod
e::hasTagName(tagName); } | 223 bool hasTagName(const SVGQualifiedName& tagName) const { return ContainerNod
e::hasTagName(tagName); } |
| 224 | 224 |
| 225 // Should be called only by Document::createElementNS to fix up m_tagName im
mediately after construction. | 225 // Should be called only by Document::createElementNS to fix up m_tagName im
mediately after construction. |
| 226 void setTagNameForCreateElementNS(const QualifiedName&); | 226 void setTagNameForCreateElementNS(const QualifiedName&); |
| 227 | 227 |
| 228 // A fast function for checking the local name against another atomic string
. | 228 // A fast function for checking the local name against another atomic string
. |
| 229 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } | 229 bool hasLocalName(const AtomicString& other) const { return m_tagName.localN
ame() == other; } |
| 230 | 230 |
| 231 virtual const AtomicString& localName() const OVERRIDE FINAL { return m_tagN
ame.localName(); } | 231 virtual const AtomicString& localName() const override final { return m_tagN
ame.localName(); } |
| 232 const AtomicString& prefix() const { return m_tagName.prefix(); } | 232 const AtomicString& prefix() const { return m_tagName.prefix(); } |
| 233 virtual const AtomicString& namespaceURI() const OVERRIDE FINAL { return m_t
agName.namespaceURI(); } | 233 virtual const AtomicString& namespaceURI() const override final { return m_t
agName.namespaceURI(); } |
| 234 | 234 |
| 235 const AtomicString& locateNamespacePrefix(const AtomicString& namespaceURI)
const; | 235 const AtomicString& locateNamespacePrefix(const AtomicString& namespaceURI)
const; |
| 236 | 236 |
| 237 virtual KURL baseURI() const OVERRIDE FINAL; | 237 virtual KURL baseURI() const override final; |
| 238 | 238 |
| 239 virtual String nodeName() const OVERRIDE; | 239 virtual String nodeName() const override; |
| 240 | 240 |
| 241 PassRefPtrWillBeRawPtr<Element> cloneElementWithChildren(); | 241 PassRefPtrWillBeRawPtr<Element> cloneElementWithChildren(); |
| 242 PassRefPtrWillBeRawPtr<Element> cloneElementWithoutChildren(); | 242 PassRefPtrWillBeRawPtr<Element> cloneElementWithoutChildren(); |
| 243 | 243 |
| 244 void scheduleSVGFilterLayerUpdateHack(); | 244 void scheduleSVGFilterLayerUpdateHack(); |
| 245 | 245 |
| 246 void normalizeAttributes(); | 246 void normalizeAttributes(); |
| 247 | 247 |
| 248 void setBooleanAttribute(const QualifiedName& name, bool); | 248 void setBooleanAttribute(const QualifiedName& name, bool); |
| 249 | 249 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 // Clones attributes only. | 291 // Clones attributes only. |
| 292 void cloneAttributesFromElement(const Element&); | 292 void cloneAttributesFromElement(const Element&); |
| 293 | 293 |
| 294 // Clones all attribute-derived data, including subclass specifics (through
copyNonAttributeProperties.) | 294 // Clones all attribute-derived data, including subclass specifics (through
copyNonAttributeProperties.) |
| 295 void cloneDataFromElement(const Element&); | 295 void cloneDataFromElement(const Element&); |
| 296 | 296 |
| 297 bool hasEquivalentAttributes(const Element* other) const; | 297 bool hasEquivalentAttributes(const Element* other) const; |
| 298 | 298 |
| 299 virtual void copyNonAttributePropertiesFromElement(const Element&) { } | 299 virtual void copyNonAttributePropertiesFromElement(const Element&) { } |
| 300 | 300 |
| 301 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 301 virtual void attach(const AttachContext& = AttachContext()) override; |
| 302 virtual void detach(const AttachContext& = AttachContext()) OVERRIDE; | 302 virtual void detach(const AttachContext& = AttachContext()) override; |
| 303 virtual RenderObject* createRenderer(RenderStyle*); | 303 virtual RenderObject* createRenderer(RenderStyle*); |
| 304 virtual bool rendererIsNeeded(const RenderStyle&); | 304 virtual bool rendererIsNeeded(const RenderStyle&); |
| 305 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); | 305 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); |
| 306 void pseudoStateChanged(CSSSelector::PseudoType); | 306 void pseudoStateChanged(CSSSelector::PseudoType); |
| 307 void setAnimationStyleChange(bool); | 307 void setAnimationStyleChange(bool); |
| 308 void setNeedsAnimationStyleRecalc(); | 308 void setNeedsAnimationStyleRecalc(); |
| 309 | 309 |
| 310 void setNeedsCompositingUpdate(); | 310 void setNeedsCompositingUpdate(); |
| 311 | 311 |
| 312 bool supportsStyleSharing() const; | 312 bool supportsStyleSharing() const; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 virtual bool isTextFormControl() const { return false; } | 427 virtual bool isTextFormControl() const { return false; } |
| 428 virtual bool isOptionalFormControl() const { return false; } | 428 virtual bool isOptionalFormControl() const { return false; } |
| 429 virtual bool isRequiredFormControl() const { return false; } | 429 virtual bool isRequiredFormControl() const { return false; } |
| 430 virtual bool isDefaultButtonForForm() const { return false; } | 430 virtual bool isDefaultButtonForForm() const { return false; } |
| 431 virtual bool willValidate() const { return false; } | 431 virtual bool willValidate() const { return false; } |
| 432 virtual bool isValidFormControlElement() { return false; } | 432 virtual bool isValidFormControlElement() { return false; } |
| 433 virtual bool isInRange() const { return false; } | 433 virtual bool isInRange() const { return false; } |
| 434 virtual bool isOutOfRange() const { return false; } | 434 virtual bool isOutOfRange() const { return false; } |
| 435 virtual bool isClearButtonElement() const { return false; } | 435 virtual bool isClearButtonElement() const { return false; } |
| 436 | 436 |
| 437 virtual bool canContainRangeEndPoint() const OVERRIDE { return true; } | 437 virtual bool canContainRangeEndPoint() const override { return true; } |
| 438 | 438 |
| 439 // Used for disabled form elements; if true, prevents mouse events from bein
g dispatched | 439 // Used for disabled form elements; if true, prevents mouse events from bein
g dispatched |
| 440 // to event listeners, and prevents DOMActivate events from being sent at al
l. | 440 // to event listeners, and prevents DOMActivate events from being sent at al
l. |
| 441 virtual bool isDisabledFormControl() const { return false; } | 441 virtual bool isDisabledFormControl() const { return false; } |
| 442 | 442 |
| 443 bool hasPendingResources() const { return hasElementFlag(HasPendingResources
); } | 443 bool hasPendingResources() const { return hasElementFlag(HasPendingResources
); } |
| 444 void setHasPendingResources() { setElementFlag(HasPendingResources); } | 444 void setHasPendingResources() { setElementFlag(HasPendingResources); } |
| 445 void clearHasPendingResources() { clearElementFlag(HasPendingResources); } | 445 void clearHasPendingResources() { clearElementFlag(HasPendingResources); } |
| 446 virtual void buildPendingResource() { }; | 446 virtual void buildPendingResource() { }; |
| 447 | 447 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 477 bool hasInputMethodContext() const; | 477 bool hasInputMethodContext() const; |
| 478 | 478 |
| 479 void setPrefix(const AtomicString&, ExceptionState&); | 479 void setPrefix(const AtomicString&, ExceptionState&); |
| 480 | 480 |
| 481 void synchronizeAttribute(const AtomicString& localName) const; | 481 void synchronizeAttribute(const AtomicString& localName) const; |
| 482 | 482 |
| 483 MutableStylePropertySet& ensureMutableInlineStyle(); | 483 MutableStylePropertySet& ensureMutableInlineStyle(); |
| 484 void clearMutableInlineStyleIfEmpty(); | 484 void clearMutableInlineStyleIfEmpty(); |
| 485 | 485 |
| 486 void setTabIndex(int); | 486 void setTabIndex(int); |
| 487 virtual short tabIndex() const OVERRIDE; | 487 virtual short tabIndex() const override; |
| 488 | 488 |
| 489 virtual void trace(Visitor*) OVERRIDE; | 489 virtual void trace(Visitor*) override; |
| 490 | 490 |
| 491 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) OVERRIDE; | 491 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) override; |
| 492 | 492 |
| 493 protected: | 493 protected: |
| 494 Element(const QualifiedName& tagName, Document*, ConstructionType); | 494 Element(const QualifiedName& tagName, Document*, ConstructionType); |
| 495 | 495 |
| 496 const ElementData* elementData() const { return m_elementData.get(); } | 496 const ElementData* elementData() const { return m_elementData.get(); } |
| 497 UniqueElementData& ensureUniqueElementData(); | 497 UniqueElementData& ensureUniqueElementData(); |
| 498 | 498 |
| 499 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); | 499 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); |
| 500 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); | 500 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitType); |
| 501 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); | 501 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); |
| 502 | 502 |
| 503 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 503 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; |
| 504 virtual void removedFrom(ContainerNode*) OVERRIDE; | 504 virtual void removedFrom(ContainerNode*) override; |
| 505 virtual void childrenChanged(const ChildrenChange&) OVERRIDE; | 505 virtual void childrenChanged(const ChildrenChange&) override; |
| 506 | 506 |
| 507 virtual void willRecalcStyle(StyleRecalcChange); | 507 virtual void willRecalcStyle(StyleRecalcChange); |
| 508 virtual void didRecalcStyle(StyleRecalcChange); | 508 virtual void didRecalcStyle(StyleRecalcChange); |
| 509 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); | 509 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); |
| 510 | 510 |
| 511 virtual bool shouldRegisterAsNamedItem() const { return false; } | 511 virtual bool shouldRegisterAsNamedItem() const { return false; } |
| 512 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } | 512 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } |
| 513 | 513 |
| 514 bool supportsSpatialNavigationFocus() const; | 514 bool supportsSpatialNavigationFocus() const; |
| 515 | 515 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 void didModifyAttribute(const QualifiedName&, const AtomicString&); | 572 void didModifyAttribute(const QualifiedName&, const AtomicString&); |
| 573 void didRemoveAttribute(const QualifiedName&); | 573 void didRemoveAttribute(const QualifiedName&); |
| 574 | 574 |
| 575 void synchronizeAllAttributes() const; | 575 void synchronizeAllAttributes() const; |
| 576 void synchronizeAttribute(const QualifiedName&) const; | 576 void synchronizeAttribute(const QualifiedName&) const; |
| 577 | 577 |
| 578 void updateId(const AtomicString& oldId, const AtomicString& newId); | 578 void updateId(const AtomicString& oldId, const AtomicString& newId); |
| 579 void updateId(TreeScope&, const AtomicString& oldId, const AtomicString& new
Id); | 579 void updateId(TreeScope&, const AtomicString& oldId, const AtomicString& new
Id); |
| 580 void updateName(const AtomicString& oldName, const AtomicString& newName); | 580 void updateName(const AtomicString& oldName, const AtomicString& newName); |
| 581 | 581 |
| 582 virtual NodeType nodeType() const OVERRIDE FINAL; | 582 virtual NodeType nodeType() const override final; |
| 583 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; | 583 virtual bool childTypeAllowed(NodeType) const override final; |
| 584 | 584 |
| 585 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); | 585 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt
ring& value, SynchronizationOfLazyAttribute); |
| 586 void appendAttributeInternal(const QualifiedName&, const AtomicString& value
, SynchronizationOfLazyAttribute); | 586 void appendAttributeInternal(const QualifiedName&, const AtomicString& value
, SynchronizationOfLazyAttribute); |
| 587 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); | 587 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); |
| 588 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); | 588 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi
cString&, AttributeModificationReason); |
| 589 | 589 |
| 590 #ifndef NDEBUG | 590 #ifndef NDEBUG |
| 591 virtual void formatForDebugger(char* buffer, unsigned length) const OVERRIDE
; | 591 virtual void formatForDebugger(char* buffer, unsigned length) const override
; |
| 592 #endif | 592 #endif |
| 593 | 593 |
| 594 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle*
newStyle); | 594 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle*
newStyle); |
| 595 | 595 |
| 596 void cancelFocusAppearanceUpdate(); | 596 void cancelFocusAppearanceUpdate(); |
| 597 | 597 |
| 598 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) OVERRIDE { return computedStyle(pseudoElementSpecifier); } | 598 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier =
NOPSEUDO) override { return computedStyle(pseudoElementSpecifier); } |
| 599 | 599 |
| 600 inline void updateCallbackSelectors(RenderStyle* oldStyle, RenderStyle* newS
tyle); | 600 inline void updateCallbackSelectors(RenderStyle* oldStyle, RenderStyle* newS
tyle); |
| 601 inline void removeCallbackSelectors(); | 601 inline void removeCallbackSelectors(); |
| 602 inline void addCallbackSelectors(); | 602 inline void addCallbackSelectors(); |
| 603 | 603 |
| 604 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren | 604 // cloneNode is private so that non-virtual cloneElementWithChildren and clo
neElementWithoutChildren |
| 605 // are used instead. | 605 // are used instead. |
| 606 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) OVERRIDE; | 606 virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override; |
| 607 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren(); | 607 virtual PassRefPtrWillBeRawPtr<Element> cloneElementWithoutAttributesAndChil
dren(); |
| 608 | 608 |
| 609 QualifiedName m_tagName; | 609 QualifiedName m_tagName; |
| 610 | 610 |
| 611 SpellcheckAttributeState spellcheckAttributeState() const; | 611 SpellcheckAttributeState spellcheckAttributeState() const; |
| 612 | 612 |
| 613 void updateNamedItemRegistration(const AtomicString& oldName, const AtomicSt
ring& newName); | 613 void updateNamedItemRegistration(const AtomicString& oldName, const AtomicSt
ring& newName); |
| 614 void updateExtraNamedItemRegistration(const AtomicString& oldName, const Ato
micString& newName); | 614 void updateExtraNamedItemRegistration(const AtomicString& oldName, const Ato
micString& newName); |
| 615 | 615 |
| 616 void createUniqueElementData(); | 616 void createUniqueElementData(); |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) | 852 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) |
| 853 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 853 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 854 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ | 854 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document&
document) \ |
| 855 { \ | 855 { \ |
| 856 return adoptRefWillBeNoop(new T(tagName, document)); \ | 856 return adoptRefWillBeNoop(new T(tagName, document)); \ |
| 857 } | 857 } |
| 858 | 858 |
| 859 } // namespace | 859 } // namespace |
| 860 | 860 |
| 861 #endif // Element_h | 861 #endif // Element_h |
| OLD | NEW |