| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/dom/shadow/ShadowRoot.h" | 32 #include "core/dom/shadow/ShadowRoot.h" |
| 33 #include "wtf/DoublyLinkedList.h" | 33 #include "wtf/DoublyLinkedList.h" |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
| 36 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
| 37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
| 38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class ElementShadow { | 42 class ElementShadow FINAL { |
| 43 WTF_MAKE_NONCOPYABLE(ElementShadow); WTF_MAKE_FAST_ALLOCATED; | 43 WTF_MAKE_NONCOPYABLE(ElementShadow); WTF_MAKE_FAST_ALLOCATED; |
| 44 public: | 44 public: |
| 45 static PassOwnPtr<ElementShadow> create(); | 45 static PassOwnPtr<ElementShadow> create(); |
| 46 ~ElementShadow(); | 46 ~ElementShadow(); |
| 47 | 47 |
| 48 Element* host() const; | 48 Element* host() const; |
| 49 ShadowRoot* youngestShadowRoot() const { return m_shadowRoots.head(); } | 49 ShadowRoot* youngestShadowRoot() const { return m_shadowRoots.head(); } |
| 50 ShadowRoot* oldestShadowRoot() const { return m_shadowRoots.tail(); } | 50 ShadowRoot* oldestShadowRoot() const { return m_shadowRoots.tail(); } |
| 51 ElementShadow* containingShadow() const; | 51 ElementShadow* containingShadow() const; |
| 52 | 52 |
| 53 ShadowRoot& addShadowRoot(Element& shadowHost, ShadowRoot::ShadowRootType); | 53 ShadowRoot& addShadowRoot(Element& shadowHost, ShadowRoot::ShadowRootType); |
| 54 | 54 |
| 55 bool hasSameStyles(const ElementShadow*) const; | 55 bool hasSameStyles(const ElementShadow*) const; |
| 56 | 56 |
| 57 void attach(const Node::AttachContext&); | 57 void attach(const Node::AttachContext&); |
| 58 void detach(const Node::AttachContext&); | 58 void detach(const Node::AttachContext&); |
| 59 | 59 |
| 60 void didAffectSelector(AffectedSelectorMask); | 60 void didAffectSelector(AffectedSelectorMask); |
| 61 void willAffectSelector(); | 61 void willAffectSelector(); |
| 62 const SelectRuleFeatureSet& ensureSelectFeatureSet(); | 62 const SelectRuleFeatureSet& ensureSelectFeatureSet(); |
| 63 | 63 |
| 64 void distributeIfNeeded(); | 64 void distributeIfNeeded(); |
| 65 void setNeedsDistributionRecalc(); | 65 void setNeedsDistributionRecalc(); |
| 66 | 66 |
| 67 const InsertionPoint* finalDestinationInsertionPointFor(const Node*) const; | 67 const InsertionPoint* finalDestinationInsertionPointFor(const Node*) const; |
| 68 const DestinationInsertionPoints* destinationInsertionPointsFor(const Node*)
const; | 68 const DestinationInsertionPoints* destinationInsertionPointsFor(const Node*)
const; |
| 69 | 69 |
| 70 void didDistributeNode(const Node*, InsertionPoint*); | 70 void didDistributeNode(const Node*, InsertionPoint*); |
| 71 | 71 |
| 72 void trace(Visitor*); |
| 73 |
| 72 private: | 74 private: |
| 73 ElementShadow(); | 75 ElementShadow(); |
| 74 | 76 |
| 75 void removeDetachedShadowRoots(); | 77 void removeDetachedShadowRoots(); |
| 76 | 78 |
| 77 void distribute(); | 79 void distribute(); |
| 78 void clearDistribution(); | 80 void clearDistribution(); |
| 79 | 81 |
| 80 void collectSelectFeatureSetFrom(ShadowRoot&); | 82 void collectSelectFeatureSetFrom(ShadowRoot&); |
| 81 void distributeNodeChildrenTo(InsertionPoint*, ContainerNode*); | 83 void distributeNodeChildrenTo(InsertionPoint*, ContainerNode*); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 inline void ElementShadow::distributeIfNeeded() | 124 inline void ElementShadow::distributeIfNeeded() |
| 123 { | 125 { |
| 124 if (m_needsDistributionRecalc) | 126 if (m_needsDistributionRecalc) |
| 125 distribute(); | 127 distribute(); |
| 126 m_needsDistributionRecalc = false; | 128 m_needsDistributionRecalc = false; |
| 127 } | 129 } |
| 128 | 130 |
| 129 } // namespace | 131 } // namespace |
| 130 | 132 |
| 131 #endif | 133 #endif |
| OLD | NEW |