| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 TreeScope::TreeScope(Document& document) | 68 TreeScope::TreeScope(Document& document) |
| 69 : m_rootNode(document), | 69 : m_rootNode(document), |
| 70 m_document(&document), | 70 m_document(&document), |
| 71 m_parentTreeScope(nullptr), | 71 m_parentTreeScope(nullptr), |
| 72 m_idTargetObserverRegistry(IdTargetObserverRegistry::create()) { | 72 m_idTargetObserverRegistry(IdTargetObserverRegistry::create()) { |
| 73 m_rootNode->setTreeScope(this); | 73 m_rootNode->setTreeScope(this); |
| 74 } | 74 } |
| 75 | 75 |
| 76 TreeScope::~TreeScope() {} | 76 TreeScope::~TreeScope() {} |
| 77 | 77 |
| 78 void TreeScope::resetTreeScope() { |
| 79 m_selection = nullptr; |
| 80 } |
| 81 |
| 78 TreeScope* TreeScope::olderShadowRootOrParentTreeScope() const { | 82 TreeScope* TreeScope::olderShadowRootOrParentTreeScope() const { |
| 79 if (rootNode().isShadowRoot()) { | 83 if (rootNode().isShadowRoot()) { |
| 80 if (ShadowRoot* olderShadowRoot = | 84 if (ShadowRoot* olderShadowRoot = |
| 81 toShadowRoot(rootNode()).olderShadowRoot()) | 85 toShadowRoot(rootNode()).olderShadowRoot()) |
| 82 return olderShadowRoot; | 86 return olderShadowRoot; |
| 83 } | 87 } |
| 84 return parentTreeScope(); | 88 return parentTreeScope(); |
| 85 } | 89 } |
| 86 | 90 |
| 87 bool TreeScope::isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( | 91 bool TreeScope::isInclusiveOlderSiblingShadowRootOrAncestorTreeScopeOf( |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 visitor->trace(m_idTargetObserverRegistry); | 533 visitor->trace(m_idTargetObserverRegistry); |
| 530 visitor->trace(m_selection); | 534 visitor->trace(m_selection); |
| 531 visitor->trace(m_elementsById); | 535 visitor->trace(m_elementsById); |
| 532 visitor->trace(m_imageMapsByName); | 536 visitor->trace(m_imageMapsByName); |
| 533 visitor->trace(m_scopedStyleResolver); | 537 visitor->trace(m_scopedStyleResolver); |
| 534 visitor->trace(m_radioButtonGroupScope); | 538 visitor->trace(m_radioButtonGroupScope); |
| 535 visitor->trace(m_svgTreeScopedResources); | 539 visitor->trace(m_svgTreeScopedResources); |
| 536 } | 540 } |
| 537 | 541 |
| 538 } // namespace blink | 542 } // namespace blink |
| OLD | NEW |