| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class TreeScope; | 34 class TreeScope; |
| 35 | 35 |
| 36 class TreeScopeAdopter { | 36 class TreeScopeAdopter { |
| 37 STACK_ALLOCATED(); | 37 STACK_ALLOCATED(); |
| 38 | 38 |
| 39 public: | 39 public: |
| 40 TreeScopeAdopter(Node& toAdopt, TreeScope& newScope); | 40 TreeScopeAdopter(Node& toAdopt, TreeScope& newScope); |
| 41 | 41 |
| 42 void execute() const { moveTreeToNewScope(*m_toAdopt); } | 42 void execute() const; |
| 43 bool needsScopeChange() const { return m_oldScope != m_newScope; } | 43 bool needsScopeChange() const { return m_oldScope != m_newScope; } |
| 44 | 44 |
| 45 #if DCHECK_IS_ON() | 45 #if DCHECK_IS_ON() |
| 46 static void ensureDidMoveToNewDocumentWasCalled(Document&); | 46 static void ensureDidMoveToNewDocumentWasCalled(Document&); |
| 47 #else | 47 #else |
| 48 static void ensureDidMoveToNewDocumentWasCalled(Document&) {} | 48 static void ensureDidMoveToNewDocumentWasCalled(Document&) {} |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 void updateTreeScope(Node&) const; | 52 void updateTreeScope(Node&) const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 inline TreeScopeAdopter::TreeScopeAdopter(Node& toAdopt, TreeScope& newScope) | 68 inline TreeScopeAdopter::TreeScopeAdopter(Node& toAdopt, TreeScope& newScope) |
| 69 : m_toAdopt(toAdopt), | 69 : m_toAdopt(toAdopt), |
| 70 m_newScope(newScope), | 70 m_newScope(newScope), |
| 71 m_oldScope(toAdopt.treeScope()) {} | 71 m_oldScope(toAdopt.treeScope()) {} |
| 72 | 72 |
| 73 } // namespace blink | 73 } // namespace blink |
| 74 | 74 |
| 75 #endif | 75 #endif |
| OLD | NEW |