| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 const ScopeContentDistribution* scopeDistribution() const { return m_scopeDi
stribution.get(); } | 90 const ScopeContentDistribution* scopeDistribution() const { return m_scopeDi
stribution.get(); } |
| 91 ScopeContentDistribution* ensureScopeDistribution(); | 91 ScopeContentDistribution* ensureScopeDistribution(); |
| 92 | 92 |
| 93 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } | 93 ShadowRootType type() const { return static_cast<ShadowRootType>(m_type); } |
| 94 | 94 |
| 95 PassRefPtr<Node> cloneNode(bool, ExceptionCode&); | 95 PassRefPtr<Node> cloneNode(bool, ExceptionCode&); |
| 96 | 96 |
| 97 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 97 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
| 98 | 98 |
| 99 virtual void visitWith(Visitor*) const; | 99 virtual void visitWith(Visitor*) const; |
| 100 virtual void acceptHeapVisitor(Visitor*) const; | 100 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE; |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 ShadowRoot(Handle<Document>, ShadowRootType); | 103 ShadowRoot(Handle<Document>, ShadowRootType); |
| 104 virtual ~ShadowRoot(); | 104 virtual ~ShadowRoot(); |
| 105 | 105 |
| 106 virtual bool childTypeAllowed(NodeType) const OVERRIDE; | 106 virtual bool childTypeAllowed(NodeType) const OVERRIDE; |
| 107 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node*
afterChange, int childCountDelta) OVERRIDE; | 107 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node*
afterChange, int childCountDelta) OVERRIDE; |
| 108 | 108 |
| 109 // ShadowRoots should never be cloned. | 109 // ShadowRoots should never be cloned. |
| 110 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return 0; } | 110 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return 0; } |
| 111 | 111 |
| 112 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 | 112 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888
34 |
| 113 bool isOrphan() const { return !host(); } | 113 bool isOrphan() const { return !host(); } |
| 114 | 114 |
| 115 // FIXME(oilpan): Change these to Members. We will need to modify DoublyLink
ListNode. |
| 115 ShadowRoot* m_prev; | 116 ShadowRoot* m_prev; |
| 116 ShadowRoot* m_next; | 117 ShadowRoot* m_next; |
| 117 OwnPtr<ScopeContentDistribution> m_scopeDistribution; | 118 OwnPtr<ScopeContentDistribution> m_scopeDistribution; |
| 118 unsigned m_numberOfStyles : 28; | 119 unsigned m_numberOfStyles : 28; |
| 119 unsigned m_applyAuthorStyles : 1; | 120 unsigned m_applyAuthorStyles : 1; |
| 120 unsigned m_resetStyleInheritance : 1; | 121 unsigned m_resetStyleInheritance : 1; |
| 121 unsigned m_type : 1; | 122 unsigned m_type : 1; |
| 122 unsigned m_registeredWithParentShadowRoot : 1; | 123 unsigned m_registeredWithParentShadowRoot : 1; |
| 123 }; | 124 }; |
| 124 | 125 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 136 } | 137 } |
| 137 | 138 |
| 138 inline ShadowRoot* toShadowRoot(Node* node) | 139 inline ShadowRoot* toShadowRoot(Node* node) |
| 139 { | 140 { |
| 140 return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const Node*>(node)))
; | 141 return const_cast<ShadowRoot*>(toShadowRoot(static_cast<const Node*>(node)))
; |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace | 144 } // namespace |
| 144 | 145 |
| 145 #endif | 146 #endif |
| OLD | NEW |