| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 149 ScopedStyleResolver& TreeScope::ensureScopedStyleResolver() | 149 ScopedStyleResolver& TreeScope::ensureScopedStyleResolver() | 
| 150 { | 150 { | 
| 151     RELEASE_ASSERT(this); | 151     RELEASE_ASSERT(this); | 
| 152     if (!m_scopedStyleResolver) | 152     if (!m_scopedStyleResolver) | 
| 153         m_scopedStyleResolver = ScopedStyleResolver::create(*this); | 153         m_scopedStyleResolver = ScopedStyleResolver::create(*this); | 
| 154     return *m_scopedStyleResolver; | 154     return *m_scopedStyleResolver; | 
| 155 } | 155 } | 
| 156 | 156 | 
| 157 void TreeScope::clearScopedStyleResolver() | 157 void TreeScope::clearScopedStyleResolver() | 
| 158 { | 158 { | 
|  | 159 #if ENABLE(OILPAN) | 
|  | 160     if (m_scopedStyleResolver) { | 
|  | 161         // See StyleEngine::clearResolver() for the motivation for | 
|  | 162         // this explicit disposal step. Same applies for ScopedStyleResolvers. | 
|  | 163         m_scopedStyleResolver->dispose(); | 
|  | 164     } | 
|  | 165 #endif | 
| 159     m_scopedStyleResolver.clear(); | 166     m_scopedStyleResolver.clear(); | 
| 160 } | 167 } | 
| 161 | 168 | 
| 162 Element* TreeScope::getElementById(const AtomicString& elementId) const | 169 Element* TreeScope::getElementById(const AtomicString& elementId) const | 
| 163 { | 170 { | 
| 164     if (elementId.isEmpty()) | 171     if (elementId.isEmpty()) | 
| 165         return 0; | 172         return 0; | 
| 166     if (!m_elementsById) | 173     if (!m_elementsById) | 
| 167         return 0; | 174         return 0; | 
| 168     return m_elementsById->getElementById(elementId, this); | 175     return m_elementsById->getElementById(elementId, this); | 
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 580     visitor->trace(m_parentTreeScope); | 587     visitor->trace(m_parentTreeScope); | 
| 581     visitor->trace(m_idTargetObserverRegistry); | 588     visitor->trace(m_idTargetObserverRegistry); | 
| 582     visitor->trace(m_selection); | 589     visitor->trace(m_selection); | 
| 583     visitor->trace(m_elementsById); | 590     visitor->trace(m_elementsById); | 
| 584     visitor->trace(m_imageMapsByName); | 591     visitor->trace(m_imageMapsByName); | 
| 585     visitor->trace(m_labelsByForAttribute); | 592     visitor->trace(m_labelsByForAttribute); | 
| 586     visitor->trace(m_scopedStyleResolver); | 593     visitor->trace(m_scopedStyleResolver); | 
| 587 } | 594 } | 
| 588 | 595 | 
| 589 } // namespace blink | 596 } // namespace blink | 
| OLD | NEW | 
|---|