Chromium Code Reviews| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 virtual bool rendererIsNeeded(const NodeRenderingContext&); | 410 virtual bool rendererIsNeeded(const NodeRenderingContext&); |
| 411 void recalcStyle(StyleChange = NoChange); | 411 void recalcStyle(StyleChange = NoChange); |
| 412 void didAffectSelector(AffectedSelectorMask); | 412 void didAffectSelector(AffectedSelectorMask); |
| 413 | 413 |
| 414 ElementShadow* shadow() const; | 414 ElementShadow* shadow() const; |
| 415 ElementShadow* ensureShadow(); | 415 ElementShadow* ensureShadow(); |
| 416 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionCode&); | 416 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionCode&); |
| 417 ShadowRoot* shadowRoot() const; | 417 ShadowRoot* shadowRoot() const; |
| 418 | 418 |
| 419 bool hasAuthorShadowRoot() const { return shadowRoot(); } | 419 bool hasAuthorShadowRoot() const { return shadowRoot(); } |
| 420 virtual void willAddAuthorShadowRoot() { } | |
|
eseidel
2013/04/29 20:57:21
Why is this OK to remove?
esprehn
2013/04/29 22:02:55
Nothing seems to call this now. Weird, I wonder wh
| |
| 421 | 420 |
| 422 ShadowRoot* userAgentShadowRoot() const; | 421 ShadowRoot* userAgentShadowRoot() const; |
| 423 ShadowRoot* ensureUserAgentShadowRoot(); | 422 ShadowRoot* ensureUserAgentShadowRoot(); |
| 424 | 423 |
| 425 virtual const AtomicString& shadowPseudoId() const; | 424 virtual const AtomicString& shadowPseudoId() const; |
| 426 | 425 |
| 427 RenderStyle* computedStyle(PseudoId = NOPSEUDO); | 426 RenderStyle* computedStyle(PseudoId = NOPSEUDO); |
| 428 | 427 |
| 429 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.) | 428 // Methods for indicating the style is affected by dynamic updates (e.g., ch ildren changing, our position changing in our sibling list, etc.) |
| 430 bool styleAffectedByEmpty() const { return hasRareData() && rareDataStyleAff ectedByEmpty(); } | 429 bool styleAffectedByEmpty() const { return hasRareData() && rareDataStyleAff ectedByEmpty(); } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 // Use Document::registerForMediaVolumeCallbacks() to subscribe to this | 486 // Use Document::registerForMediaVolumeCallbacks() to subscribe to this |
| 488 virtual void mediaVolumeDidChange() { } | 487 virtual void mediaVolumeDidChange() { } |
| 489 | 488 |
| 490 virtual void didBecomeFullscreenElement() { } | 489 virtual void didBecomeFullscreenElement() { } |
| 491 virtual void willStopBeingFullscreenElement() { } | 490 virtual void willStopBeingFullscreenElement() { } |
| 492 | 491 |
| 493 virtual void captionPreferencesChanged() { } | 492 virtual void captionPreferencesChanged() { } |
| 494 | 493 |
| 495 bool isFinishedParsingChildren() const { return isParsingChildrenFinished(); } | 494 bool isFinishedParsingChildren() const { return isParsingChildrenFinished(); } |
| 496 virtual void finishParsingChildren(); | 495 virtual void finishParsingChildren(); |
| 497 virtual void beginParsingChildren(); | 496 virtual void beginParsingChildren() OVERRIDE FINAL; |
| 498 | 497 |
| 499 bool hasPseudoElements() const; | 498 bool hasPseudoElements() const; |
| 500 PseudoElement* pseudoElement(PseudoId) const; | 499 PseudoElement* pseudoElement(PseudoId) const; |
| 501 RenderObject* pseudoElementRenderer(PseudoId) const; | 500 RenderObject* pseudoElementRenderer(PseudoId) const; |
| 502 bool childNeedsShadowWalker() const; | 501 bool childNeedsShadowWalker() const; |
| 503 void didShadowTreeAwareChildrenChange(); | 502 void didShadowTreeAwareChildrenChange(); |
| 504 | 503 |
| 505 // ElementTraversal API | 504 // ElementTraversal API |
| 506 Element* firstElementChild() const; | 505 Element* firstElementChild() const; |
| 507 Element* lastElementChild() const; | 506 Element* lastElementChild() const; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 567 void clearHasPendingResources(); | 566 void clearHasPendingResources(); |
| 568 virtual void buildPendingResource() { }; | 567 virtual void buildPendingResource() { }; |
| 569 #endif | 568 #endif |
| 570 | 569 |
| 571 enum { | 570 enum { |
| 572 ALLOW_KEYBOARD_INPUT = 1 << 0, | 571 ALLOW_KEYBOARD_INPUT = 1 << 0, |
| 573 LEGACY_MOZILLA_REQUEST = 1 << 1, | 572 LEGACY_MOZILLA_REQUEST = 1 << 1, |
| 574 }; | 573 }; |
| 575 | 574 |
| 576 void webkitRequestFullScreen(unsigned short flags); | 575 void webkitRequestFullScreen(unsigned short flags); |
| 577 virtual bool containsFullScreenElement() const; | 576 bool containsFullScreenElement() const; |
|
eseidel
2013/04/29 20:57:21
I would rather you separated changes like this out
esprehn
2013/04/29 22:02:55
Ditto. It's clear that these don't need to be virt
| |
| 578 virtual void setContainsFullScreenElement(bool); | 577 void setContainsFullScreenElement(bool); |
| 579 virtual void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries( bool); | 578 void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool); |
| 580 | 579 |
| 581 // W3C API | 580 // W3C API |
| 582 void webkitRequestFullscreen(); | 581 void webkitRequestFullscreen(); |
| 583 | 582 |
| 584 bool isInTopLayer() const; | 583 bool isInTopLayer() const; |
| 585 void setIsInTopLayer(bool); | 584 void setIsInTopLayer(bool); |
| 586 | 585 |
| 587 void webkitRequestPointerLock(); | 586 void webkitRequestPointerLock(); |
| 588 | 587 |
| 589 virtual bool isSpellCheckingEnabled() const; | 588 bool isSpellCheckingEnabled() const; |
|
eseidel
2013/04/29 20:57:21
Same question. It's not that I don't believe you,
| |
| 590 | 589 |
| 591 PassRefPtr<RenderStyle> styleForRenderer(); | 590 PassRefPtr<RenderStyle> styleForRenderer(); |
| 592 | 591 |
| 593 RenderRegion* renderRegion() const; | 592 RenderRegion* renderRegion() const; |
| 594 #if ENABLE(CSS_REGIONS) | 593 #if ENABLE(CSS_REGIONS) |
| 595 const AtomicString& webkitRegionOverset() const; | 594 const AtomicString& webkitRegionOverset() const; |
| 596 Vector<RefPtr<Range> > webkitGetRegionFlowRanges() const; | 595 Vector<RefPtr<Range> > webkitGetRegionFlowRanges() const; |
| 597 #endif | 596 #endif |
| 598 | 597 |
| 599 bool hasID() const; | 598 bool hasID() const; |
| 600 bool hasClass() const; | 599 bool hasClass() const; |
| 601 const SpaceSplitString& classNames() const; | 600 const SpaceSplitString& classNames() const; |
| 602 | 601 |
| 603 IntSize savedLayerScrollOffset() const; | 602 IntSize savedLayerScrollOffset() const; |
| 604 void setSavedLayerScrollOffset(const IntSize&); | 603 void setSavedLayerScrollOffset(const IntSize&); |
| 605 | 604 |
| 606 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 605 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
| 607 | 606 |
| 608 protected: | 607 protected: |
| 609 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype) | 608 Element(const QualifiedName& tagName, Document* document, ConstructionType t ype) |
| 610 : ContainerNode(document, type) | 609 : ContainerNode(document, type) |
| 611 , m_tagName(tagName) | 610 , m_tagName(tagName) |
| 612 { | 611 { |
| 613 ScriptWrappable::init(this); | 612 ScriptWrappable::init(this); |
| 614 } | 613 } |
| 615 | 614 |
| 616 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 615 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 617 virtual void removedFrom(ContainerNode*) OVERRIDE; | 616 virtual void removedFrom(ContainerNode*) OVERRIDE; |
| 618 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0); | 617 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
| 619 virtual void removeAllEventListeners() OVERRIDE; | 618 virtual void removeAllEventListeners() OVERRIDE FINAL; |
| 620 | 619 |
| 621 virtual bool willRecalcStyle(StyleChange); | 620 virtual bool willRecalcStyle(StyleChange); |
| 622 virtual void didRecalcStyle(StyleChange); | 621 virtual void didRecalcStyle(StyleChange); |
| 623 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); | 622 virtual PassRefPtr<RenderStyle> customStyleForRenderer(); |
| 624 | 623 |
| 625 virtual bool shouldRegisterAsNamedItem() const { return false; } | 624 virtual bool shouldRegisterAsNamedItem() const { return false; } |
| 626 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } | 625 virtual bool shouldRegisterAsExtraNamedItem() const { return false; } |
| 627 | 626 |
| 628 void clearTabIndexExplicitlyIfNeeded(); | 627 void clearTabIndexExplicitlyIfNeeded(); |
| 629 void setTabIndexExplicitly(short); | 628 void setTabIndexExplicitly(short); |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 660 void synchronizeAttribute(const QualifiedName&) const; | 659 void synchronizeAttribute(const QualifiedName&) const; |
| 661 void synchronizeAttribute(const AtomicString& localName) const; | 660 void synchronizeAttribute(const AtomicString& localName) const; |
| 662 | 661 |
| 663 void updateId(const AtomicString& oldId, const AtomicString& newId); | 662 void updateId(const AtomicString& oldId, const AtomicString& newId); |
| 664 void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& new Id); | 663 void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& new Id); |
| 665 void updateName(const AtomicString& oldName, const AtomicString& newName); | 664 void updateName(const AtomicString& oldName, const AtomicString& newName); |
| 666 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue); | 665 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue); |
| 667 | 666 |
| 668 void scrollByUnits(int units, ScrollGranularity); | 667 void scrollByUnits(int units, ScrollGranularity); |
| 669 | 668 |
| 670 virtual void setPrefix(const AtomicString&, ExceptionCode&); | 669 virtual void setPrefix(const AtomicString&, ExceptionCode&) OVERRIDE FINAL; |
| 671 virtual NodeType nodeType() const; | 670 virtual NodeType nodeType() const OVERRIDE FINAL; |
| 672 virtual bool childTypeAllowed(NodeType) const; | 671 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; |
| 673 | 672 |
| 674 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute); | 673 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute); |
| 675 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute); | 674 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute); |
| 676 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); | 675 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); |
| 677 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi cString&, AttributeModificationReason); | 676 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi cString&, AttributeModificationReason); |
| 678 | 677 |
| 679 #ifndef NDEBUG | 678 #ifndef NDEBUG |
| 680 virtual void formatForDebugger(char* buffer, unsigned length) const; | 679 virtual void formatForDebugger(char* buffer, unsigned length) const; |
| 681 #endif | 680 #endif |
| 682 | 681 |
| 683 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle); | 682 bool pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle); |
| 684 | 683 |
| 685 void cancelFocusAppearanceUpdate(); | 684 void cancelFocusAppearanceUpdate(); |
| 686 | 685 |
| 687 virtual const AtomicString& virtualPrefix() const { return prefix(); } | 686 virtual const AtomicString& virtualPrefix() const OVERRIDE FINAL { return pr efix(); } |
| 688 virtual const AtomicString& virtualLocalName() const { return localName(); } | 687 virtual const AtomicString& virtualLocalName() const OVERRIDE FINAL { return localName(); } |
| 689 virtual const AtomicString& virtualNamespaceURI() const { return namespaceUR I(); } | 688 virtual const AtomicString& virtualNamespaceURI() const OVERRIDE FINAL { ret urn namespaceURI(); } |
| 690 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return computedStyle(pseudoElementSpecifier); } | 689 virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return computedStyle(pseudoElementSpecifier); } |
| 691 | 690 |
| 692 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren | 691 // cloneNode is private so that non-virtual cloneElementWithChildren and clo neElementWithoutChildren |
| 693 // are used instead. | 692 // are used instead. |
| 694 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE; | 693 virtual PassRefPtr<Node> cloneNode(bool deep) OVERRIDE; |
| 695 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); | 694 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren(); |
| 696 | 695 |
| 697 QualifiedName m_tagName; | 696 QualifiedName m_tagName; |
| 698 bool rareDataStyleAffectedByEmpty() const; | 697 bool rareDataStyleAffectedByEmpty() const; |
| 699 bool rareDataChildrenAffectedByHover() const; | 698 bool rareDataChildrenAffectedByHover() const; |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1007 | 1006 |
| 1008 inline const Attribute* ElementData::attributeItem(unsigned index) const | 1007 inline const Attribute* ElementData::attributeItem(unsigned index) const |
| 1009 { | 1008 { |
| 1010 RELEASE_ASSERT(index < length()); | 1009 RELEASE_ASSERT(index < length()); |
| 1011 return attributeBase() + index; | 1010 return attributeBase() + index; |
| 1012 } | 1011 } |
| 1013 | 1012 |
| 1014 } // namespace | 1013 } // namespace |
| 1015 | 1014 |
| 1016 #endif | 1015 #endif |
| OLD | NEW |