Remove the wrong optimization in replacing a text node with innerHTML
Replacing a single text node with innerHTML optimizes its behavior; it does not
use a normal DOM mutation function. See `replaceChildrenWithFragment()` in
Serialization.cpp for details.
This optimization is wrong:
<div>original</div>
var originalText = div.firstChild;
div.innerHTML = 'updated';
console.log(originalText.data);
// It should show "original", but shows "updated".
In addition to this wrong behavior, this optimization also:
- Prevents a slotchange event from being fired because it skips the check.
- Prevents a mutation observer from being notified.
BUG=
658605
Committed:
https://crrev.com/946f30141fad7e002a44d3545a7d9f45e3cdcbf3
Cr-Commit-Position: refs/heads/master@{#435908}