| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); | 202 void recalcStyle(StyleRecalcChange, Text* nextTextSibling = 0); |
| 203 void setAnimationStyleChange(bool); | 203 void setAnimationStyleChange(bool); |
| 204 void setNeedsAnimationStyleRecalc(); | 204 void setNeedsAnimationStyleRecalc(); |
| 205 | 205 |
| 206 void setNeedsCompositingUpdate(); | 206 void setNeedsCompositingUpdate(); |
| 207 | 207 |
| 208 bool supportsStyleSharing() const; | 208 bool supportsStyleSharing() const; |
| 209 | 209 |
| 210 ElementShadow* shadow() const; | 210 ElementShadow* shadow() const; |
| 211 ElementShadow& ensureShadow(); | 211 ElementShadow& ensureShadow(); |
| 212 PassRefPtr<ShadowRoot> createShadowRoot(ExceptionState&); | 212 PassRefPtr<ShadowRoot> ensureShadowRoot(ExceptionState&); |
| 213 ShadowRoot* shadowRoot() const; | 213 ShadowRoot* shadowRoot() const; |
| 214 ShadowRoot* youngestShadowRoot() const; | |
| 215 | 214 |
| 216 bool hasAuthorShadowRoot() const { return shadowRoot(); } | 215 bool hasAuthorShadowRoot() const { return shadowRoot(); } |
| 217 | 216 |
| 218 RenderStyle* computedStyle(PseudoId = NOPSEUDO); | 217 RenderStyle* computedStyle(PseudoId = NOPSEUDO); |
| 219 | 218 |
| 220 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } | 219 bool isUpgradedCustomElement() { return customElementState() == Upgraded; } |
| 221 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor
Upgrade; } | 220 bool isUnresolvedCustomElement() { return customElementState() == WaitingFor
Upgrade; } |
| 222 | 221 |
| 223 AtomicString computeInheritedLanguage() const; | 222 AtomicString computeInheritedLanguage() const; |
| 224 | 223 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 | 539 |
| 541 inline void Node::removedFrom(ContainerNode* insertionPoint) | 540 inline void Node::removedFrom(ContainerNode* insertionPoint) |
| 542 { | 541 { |
| 543 ASSERT(insertionPoint->inDocument() || isContainerNode()); | 542 ASSERT(insertionPoint->inDocument() || isContainerNode()); |
| 544 if (insertionPoint->inDocument()) | 543 if (insertionPoint->inDocument()) |
| 545 clearFlag(InDocumentFlag); | 544 clearFlag(InDocumentFlag); |
| 546 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) | 545 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) |
| 547 clearFlag(IsInShadowTreeFlag); | 546 clearFlag(IsInShadowTreeFlag); |
| 548 } | 547 } |
| 549 | 548 |
| 549 inline ShadowRoot* Node::shadowRoot() const |
| 550 { |
| 551 if (!isElementNode()) |
| 552 return 0; |
| 553 return toElement(this)->shadowRoot(); |
| 554 } |
| 555 |
| 550 inline void Element::invalidateStyleAttribute() | 556 inline void Element::invalidateStyleAttribute() |
| 551 { | 557 { |
| 552 ASSERT(elementData()); | 558 ASSERT(elementData()); |
| 553 elementData()->m_styleAttributeIsDirty = true; | 559 elementData()->m_styleAttributeIsDirty = true; |
| 554 } | 560 } |
| 555 | 561 |
| 556 inline bool isShadowHost(const Node* node) | 562 inline bool isShadowHost(const Node* node) |
| 557 { | 563 { |
| 558 return node && node->isElementNode() && toElement(node)->shadow(); | 564 return node && node->isElementNode() && toElement(node)->shadow(); |
| 559 } | 565 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 585 static PassRefPtr<T> create(const QualifiedName&, Document&) | 591 static PassRefPtr<T> create(const QualifiedName&, Document&) |
| 586 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ | 592 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ |
| 587 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ | 593 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ |
| 588 { \ | 594 { \ |
| 589 return adoptRef(new T(tagName, document)); \ | 595 return adoptRef(new T(tagName, document)); \ |
| 590 } | 596 } |
| 591 | 597 |
| 592 } // namespace | 598 } // namespace |
| 593 | 599 |
| 594 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ | 600 #endif // SKY_ENGINE_CORE_DOM_ELEMENT_H_ |
| OLD | NEW |