| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All |
| 5 * rights reserved. | 5 * rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 ContainerNode::kTextChanged, this, previousSibling(), nextSibling(), | 206 ContainerNode::kTextChanged, this, previousSibling(), nextSibling(), |
| 207 ContainerNode::kChildrenChangeSourceAPI}; | 207 ContainerNode::kChildrenChangeSourceAPI}; |
| 208 parentNode()->ChildrenChanged(change); | 208 parentNode()->ChildrenChanged(change); |
| 209 } | 209 } |
| 210 | 210 |
| 211 // Skip DOM mutation events if the modification is from parser. | 211 // Skip DOM mutation events if the modification is from parser. |
| 212 // Note that mutation observer events will still fire. | 212 // Note that mutation observer events will still fire. |
| 213 // Spec: https://html.spec.whatwg.org/multipage/syntax.html#insert-a-character | 213 // Spec: https://html.spec.whatwg.org/multipage/syntax.html#insert-a-character |
| 214 if (source != kUpdateFromParser && !IsInShadowTree()) { | 214 if (source != kUpdateFromParser && !IsInShadowTree()) { |
| 215 if (GetDocument().HasListenerType( | 215 if (GetDocument().HasListenerType( |
| 216 Document::DOMCHARACTERDATAMODIFIED_LISTENER)) | 216 Document::kDOMCharacterDataModifiedListener)) |
| 217 DispatchScopedEvent( | 217 DispatchScopedEvent( |
| 218 MutationEvent::Create(EventTypeNames::DOMCharacterDataModified, true, | 218 MutationEvent::Create(EventTypeNames::DOMCharacterDataModified, true, |
| 219 nullptr, old_data, data_)); | 219 nullptr, old_data, data_)); |
| 220 DispatchSubtreeModifiedEvent(); | 220 DispatchSubtreeModifiedEvent(); |
| 221 } | 221 } |
| 222 probe::characterDataModified(this); | 222 probe::characterDataModified(this); |
| 223 } | 223 } |
| 224 | 224 |
| 225 int CharacterData::MaxCharacterOffset() const { | 225 int CharacterData::MaxCharacterOffset() const { |
| 226 return static_cast<int>(length()); | 226 return static_cast<int>(length()); |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace blink | 229 } // namespace blink |
| OLD | NEW |