Summary: | CharacterData.data setter optimization is not spec-compliant and is observable | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, commit-queue, esprehn+autocc, kangil.han, rniwa | ||||||||
Priority: | P2 | Keywords: | WebExposed | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
URL: | https://dom.spec.whatwg.org/#dom-characterdata-data | ||||||||||
Attachments: |
|
Description
Chris Dumez
2016-08-09 15:33:34 PDT
Created attachment 285682 [details]
Patch
Comment on attachment 285682 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=285682&action=review > Source/WebCore/dom/CharacterData.cpp:44 > + auto& document = node.document(); > + return !document.hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER) && !document.hasMutationObserversOfType(MutationObserver::CharacterData); We also need to check subtreemodified event. > Source/WebCore/dom/CharacterData.cpp:53 > + document().textRemoved(this, 0, oldLength); We also need to call document().frame()->selection().textWasReplaced to be consistent. Created attachment 285685 [details]
Patch
Created attachment 285689 [details]
Patch
Comment on attachment 285689 [details] Patch Clearing flags on attachment: 285689 Committed r204316: <http://trac.webkit.org/changeset/204316> All reviewed patches have been landed. Closing bug. |