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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool value = false; | 104 bool value = false; |
105 if (optionsDictionary.get(booleanOptions[i].name, value) && value) | 105 if (optionsDictionary.get(booleanOptions[i].name, value) && value) |
106 options |= booleanOptions[i].value; | 106 options |= booleanOptions[i].value; |
107 } | 107 } |
108 | 108 |
109 HashSet<AtomicString> attributeFilter; | 109 HashSet<AtomicString> attributeFilter; |
110 if (optionsDictionary.get("attributeFilter", attributeFilter)) | 110 if (optionsDictionary.get("attributeFilter", attributeFilter)) |
111 options |= AttributeFilter; | 111 options |= AttributeFilter; |
112 | 112 |
113 if (!validateOptions(options)) { | 113 if (!validateOptions(options)) { |
114 ec = SYNTAX_ERR; | 114 ec = SyntaxError; |
115 return; | 115 return; |
116 } | 116 } |
117 | 117 |
118 node->registerMutationObserver(this, options, attributeFilter); | 118 node->registerMutationObserver(this, options, attributeFilter); |
119 } | 119 } |
120 | 120 |
121 Vector<RefPtr<MutationRecord> > MutationObserver::takeRecords() | 121 Vector<RefPtr<MutationRecord> > MutationObserver::takeRecords() |
122 { | 122 { |
123 Vector<RefPtr<MutationRecord> > records; | 123 Vector<RefPtr<MutationRecord> > records; |
124 records.swap(m_records); | 124 records.swap(m_records); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 observers[i]->deliver(); | 238 observers[i]->deliver(); |
239 else | 239 else |
240 suspendedMutationObservers().add(observers[i]); | 240 suspendedMutationObservers().add(observers[i]); |
241 } | 241 } |
242 } | 242 } |
243 | 243 |
244 deliveryInProgress = false; | 244 deliveryInProgress = false; |
245 } | 245 } |
246 | 246 |
247 } // namespace WebCore | 247 } // namespace WebCore |
OLD | NEW |