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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 m_rootNode.setTreeScope(this); | 77 m_rootNode.setTreeScope(this); |
78 } | 78 } |
79 | 79 |
80 TreeScope::~TreeScope() | 80 TreeScope::~TreeScope() |
81 { | 81 { |
82 ASSERT(!m_guardRefCount); | 82 ASSERT(!m_guardRefCount); |
83 m_rootNode.setTreeScope(0); | 83 m_rootNode.setTreeScope(0); |
84 | 84 |
85 if (m_selection) { | 85 if (m_selection) { |
86 m_selection->clearTreeScope(); | 86 m_selection->clearTreeScope(); |
87 m_selection = 0; | 87 m_selection = nullptr; |
88 } | 88 } |
89 | 89 |
90 if (m_parentTreeScope) | 90 if (m_parentTreeScope) |
91 m_parentTreeScope->guardDeref(); | 91 m_parentTreeScope->guardDeref(); |
92 } | 92 } |
93 | 93 |
94 TreeScope* TreeScope::olderShadowRootOrParentTreeScope() const | 94 TreeScope* TreeScope::olderShadowRootOrParentTreeScope() const |
95 { | 95 { |
96 if (rootNode().isShadowRoot()) { | 96 if (rootNode().isShadowRoot()) { |
97 if (ShadowRoot* olderShadowRoot = toShadowRoot(rootNode()).olderShadowRo
ot()) | 97 if (ShadowRoot* olderShadowRoot = toShadowRoot(rootNode()).olderShadowRo
ot()) |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 for (Element* element = ElementTraversal::firstWithin(rootNode()); element;
element = ElementTraversal::nextIncludingPseudo(*element)) { | 493 for (Element* element = ElementTraversal::firstWithin(rootNode()); element;
element = ElementTraversal::nextIncludingPseudo(*element)) { |
494 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root
->olderShadowRoot()) | 494 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root
->olderShadowRoot()) |
495 root->setNeedsStyleRecalcForViewportUnits(); | 495 root->setNeedsStyleRecalcForViewportUnits(); |
496 RenderStyle* style = element->renderStyle(); | 496 RenderStyle* style = element->renderStyle(); |
497 if (style && style->hasViewportUnits()) | 497 if (style && style->hasViewportUnits()) |
498 element->setNeedsStyleRecalc(LocalStyleChange); | 498 element->setNeedsStyleRecalc(LocalStyleChange); |
499 } | 499 } |
500 } | 500 } |
501 | 501 |
502 } // namespace WebCore | 502 } // namespace WebCore |
OLD | NEW |