Bug 160730 - Optimization in Node.replaceChild() is not spec-compliant
Summary: Optimization in Node.replaceChild() is not spec-compliant
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-08-09 21:45 PDT by Chris Dumez
Modified: 2016-08-09 22:46 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.67 KB, patch)
2016-08-09 21:59 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-08-09 21:45:24 PDT
We have an optimization in Node.replaceChild() to avoid doing any work when the reference child and the new child are the same node. This optimization is not spec-compliant:
- https://dom.spec.whatwg.org/#concept-node-replace

This is an issue because it is observable via Mutation observers / listeners or DOM ranges.
Comment 1 Chris Dumez 2016-08-09 21:59:34 PDT
Created attachment 285713 [details]
Patch
Comment 2 WebKit Commit Bot 2016-08-09 22:46:00 PDT
Comment on attachment 285713 [details]
Patch

Clearing flags on attachment: 285713

Committed r204326: <http://trac.webkit.org/changeset/204326>
Comment 3 WebKit Commit Bot 2016-08-09 22:46:06 PDT
All reviewed patches have been landed.  Closing bug.