| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 Element* TreeScope::getElementById(const AtomicString& elementId) const | 162 Element* TreeScope::getElementById(const AtomicString& elementId) const |
| 163 { | 163 { |
| 164 if (elementId.isEmpty()) | 164 if (elementId.isEmpty()) |
| 165 return 0; | 165 return 0; |
| 166 if (!m_elementsById) | 166 if (!m_elementsById) |
| 167 return 0; | 167 return 0; |
| 168 return m_elementsById->getElementById(elementId, this); | 168 return m_elementsById->getElementById(elementId, this); |
| 169 } | 169 } |
| 170 | 170 |
| 171 const WillBeHeapVector<RawPtrWillBeMember<Element> >& TreeScope::getAllElementsB
yId(const AtomicString& elementId) const | 171 const WillBeHeapVector<RawPtrWillBeMember<Element>>& TreeScope::getAllElementsBy
Id(const AtomicString& elementId) const |
| 172 { | 172 { |
| 173 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapVector<RawPtrWillBeMemb
er<Element> > >, emptyVector, (adoptPtrWillBeNoop(new WillBeHeapVector<RawPtrWil
lBeMember<Element> >()))); | 173 DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<WillBeHeapVector<RawPtrWillBeMemb
er<Element>>>, emptyVector, (adoptPtrWillBeNoop(new WillBeHeapVector<RawPtrWillB
eMember<Element>>()))); |
| 174 if (elementId.isEmpty()) | 174 if (elementId.isEmpty()) |
| 175 return *emptyVector; | 175 return *emptyVector; |
| 176 if (!m_elementsById) | 176 if (!m_elementsById) |
| 177 return *emptyVector; | 177 return *emptyVector; |
| 178 return m_elementsById->getAllElementsById(elementId, this); | 178 return m_elementsById->getAllElementsById(elementId, this); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void TreeScope::addElementById(const AtomicString& elementId, Element* element) | 181 void TreeScope::addElementById(const AtomicString& elementId, Element* element) |
| 182 { | 182 { |
| 183 if (!m_elementsById) | 183 if (!m_elementsById) |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 visitor->trace(m_parentTreeScope); | 575 visitor->trace(m_parentTreeScope); |
| 576 visitor->trace(m_idTargetObserverRegistry); | 576 visitor->trace(m_idTargetObserverRegistry); |
| 577 visitor->trace(m_selection); | 577 visitor->trace(m_selection); |
| 578 visitor->trace(m_elementsById); | 578 visitor->trace(m_elementsById); |
| 579 visitor->trace(m_imageMapsByName); | 579 visitor->trace(m_imageMapsByName); |
| 580 visitor->trace(m_labelsByForAttribute); | 580 visitor->trace(m_labelsByForAttribute); |
| 581 visitor->trace(m_scopedStyleResolver); | 581 visitor->trace(m_scopedStyleResolver); |
| 582 } | 582 } |
| 583 | 583 |
| 584 } // namespace blink | 584 } // namespace blink |
| OLD | NEW |