| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 m_options = options; | 64 m_options = options; |
| 65 m_attributeFilter = attributeFilter; | 65 m_attributeFilter = attributeFilter; |
| 66 } | 66 } |
| 67 | 67 |
| 68 void MutationObserverRegistration::observedSubtreeNodeWillDetach(PassRefPtr<Node
> node) | 68 void MutationObserverRegistration::observedSubtreeNodeWillDetach(PassRefPtr<Node
> node) |
| 69 { | 69 { |
| 70 if (!isSubtree()) | 70 if (!isSubtree()) |
| 71 return; | 71 return; |
| 72 | 72 |
| 73 node->registerTransientMutationObserver(this); | 73 node->registerTransientMutationObserver(this); |
| 74 m_observer->setHasTransientRegistration(); |
| 74 | 75 |
| 75 if (!m_transientRegistrationNodes) { | 76 if (!m_transientRegistrationNodes) { |
| 76 m_transientRegistrationNodes = adoptPtr(new NodeHashSet); | 77 m_transientRegistrationNodes = adoptPtr(new NodeHashSet); |
| 77 | 78 |
| 78 ASSERT(!m_registrationNodeKeepAlive); | 79 ASSERT(!m_registrationNodeKeepAlive); |
| 79 m_registrationNodeKeepAlive = m_registrationNode; // Balanced in clearTr
ansientRegistrations. | 80 m_registrationNodeKeepAlive = m_registrationNode; // Balanced in clearTr
ansientRegistrations. |
| 80 } | 81 } |
| 81 m_transientRegistrationNodes->add(node); | 82 m_transientRegistrationNodes->add(node); |
| 82 } | 83 } |
| 83 | 84 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 113 | 114 |
| 114 if (type != WebKitMutationObserver::Attributes || !(m_options & WebKitMutati
onObserver::AttributeFilter)) | 115 if (type != WebKitMutationObserver::Attributes || !(m_options & WebKitMutati
onObserver::AttributeFilter)) |
| 115 return true; | 116 return true; |
| 116 | 117 |
| 117 return m_attributeFilter.contains(attributeName); | 118 return m_attributeFilter.contains(attributeName); |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace WebCore | 121 } // namespace WebCore |
| 121 | 122 |
| 122 #endif // ENABLE(MUTATION_OBSERVERS) | 123 #endif // ENABLE(MUTATION_OBSERVERS) |
| OLD | NEW |