| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 return static_cast<blink::RetainedObjectInfo*>(other)->GetEquivalenceClass()
== this->GetEquivalenceClass(); | 71 return static_cast<blink::RetainedObjectInfo*>(other)->GetEquivalenceClass()
== this->GetEquivalenceClass(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 intptr_t RetainedDOMInfo::GetHash() | 74 intptr_t RetainedDOMInfo::GetHash() |
| 75 { | 75 { |
| 76 return PtrHash<void>::hash(m_root); | 76 return PtrHash<void>::hash(m_root); |
| 77 } | 77 } |
| 78 | 78 |
| 79 const char* RetainedDOMInfo::GetGroupLabel() | 79 const char* RetainedDOMInfo::GetGroupLabel() |
| 80 { | 80 { |
| 81 return m_root->inShadowIncludingDocument() ? "(Document DOM trees)" : "(Deta
ched DOM trees)"; | 81 return m_root->isConnected() ? "(Document DOM trees)" : "(Detached DOM trees
)"; |
| 82 } | 82 } |
| 83 | 83 |
| 84 const char* RetainedDOMInfo::GetLabel() | 84 const char* RetainedDOMInfo::GetLabel() |
| 85 { | 85 { |
| 86 return m_root->inShadowIncludingDocument() ? "Document DOM tree" : "Detached
DOM tree"; | 86 return m_root->isConnected() ? "Document DOM tree" : "Detached DOM tree"; |
| 87 } | 87 } |
| 88 | 88 |
| 89 intptr_t RetainedDOMInfo::GetElementCount() | 89 intptr_t RetainedDOMInfo::GetElementCount() |
| 90 { | 90 { |
| 91 intptr_t count = 1; | 91 intptr_t count = 1; |
| 92 for (Node& current : NodeTraversal::descendantsOf(*m_root)) { | 92 for (Node& current : NodeTraversal::descendantsOf(*m_root)) { |
| 93 ALLOW_UNUSED_LOCAL(current); | 93 ALLOW_UNUSED_LOCAL(current); |
| 94 ++count; | 94 ++count; |
| 95 } | 95 } |
| 96 return count; | 96 return count; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 { | 139 { |
| 140 return m_numberOfObjectsWithPendingActivity; | 140 return m_numberOfObjectsWithPendingActivity; |
| 141 } | 141 } |
| 142 | 142 |
| 143 intptr_t ActiveDOMObjectsInfo::GetEquivalenceClass() | 143 intptr_t ActiveDOMObjectsInfo::GetEquivalenceClass() |
| 144 { | 144 { |
| 145 return reinterpret_cast<intptr_t>(this); | 145 return reinterpret_cast<intptr_t>(this); |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace blink | 148 } // namespace blink |
| OLD | NEW |