| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 HashSet<AtomicString> attributeFilter; | 77 HashSet<AtomicString> attributeFilter; |
| 78 if (observerInit.hasAttributeFilter()) { | 78 if (observerInit.hasAttributeFilter()) { |
| 79 for (const auto& name : observerInit.attributeFilter()) | 79 for (const auto& name : observerInit.attributeFilter()) |
| 80 attributeFilter.insert(AtomicString(name)); | 80 attributeFilter.insert(AtomicString(name)); |
| 81 options |= AttributeFilter; | 81 options |= AttributeFilter; |
| 82 } | 82 } |
| 83 | 83 |
| 84 bool attributes = observerInit.hasAttributes() && observerInit.attributes(); | 84 bool attributes = observerInit.hasAttributes() && observerInit.attributes(); |
| 85 if (attributes || | 85 if (attributes || |
| 86 (!observerInit.hasAttributes() && (observerInit.hasAttributeOldValue() || | 86 (!observerInit.hasAttributes() && |
| 87 observerInit.hasAttributeFilter()))) | 87 (observerInit.hasAttributeOldValue() || |
| 88 observerInit.hasAttributeFilter()))) |
| 88 options |= Attributes; | 89 options |= Attributes; |
| 89 | 90 |
| 90 if (observerInit.hasCharacterDataOldValue() && | 91 if (observerInit.hasCharacterDataOldValue() && |
| 91 observerInit.characterDataOldValue()) | 92 observerInit.characterDataOldValue()) |
| 92 options |= CharacterDataOldValue; | 93 options |= CharacterDataOldValue; |
| 93 | 94 |
| 94 bool characterData = | 95 bool characterData = |
| 95 observerInit.hasCharacterData() && observerInit.characterData(); | 96 observerInit.hasCharacterData() && observerInit.characterData(); |
| 96 if (characterData || (!observerInit.hasCharacterData() && | 97 if (characterData || |
| 97 observerInit.hasCharacterDataOldValue())) | 98 (!observerInit.hasCharacterData() && |
| 99 observerInit.hasCharacterDataOldValue())) |
| 98 options |= CharacterData; | 100 options |= CharacterData; |
| 99 | 101 |
| 100 if (observerInit.childList()) | 102 if (observerInit.childList()) |
| 101 options |= ChildList; | 103 options |= ChildList; |
| 102 | 104 |
| 103 if (observerInit.subtree()) | 105 if (observerInit.subtree()) |
| 104 options |= Subtree; | 106 options |= Subtree; |
| 105 | 107 |
| 106 if (!(options & Attributes)) { | 108 if (!(options & Attributes)) { |
| 107 if (options & AttributeOldValue) { | 109 if (options & AttributeOldValue) { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 } | 314 } |
| 313 | 315 |
| 314 DEFINE_TRACE(MutationObserver) { | 316 DEFINE_TRACE(MutationObserver) { |
| 315 visitor->trace(m_callback); | 317 visitor->trace(m_callback); |
| 316 visitor->trace(m_records); | 318 visitor->trace(m_records); |
| 317 visitor->trace(m_registrations); | 319 visitor->trace(m_registrations); |
| 318 visitor->trace(m_callback); | 320 visitor->trace(m_callback); |
| 319 } | 321 } |
| 320 | 322 |
| 321 } // namespace blink | 323 } // namespace blink |
| OLD | NEW |