Make removeChild, parserRemoveChild and removeChildren more consistent.
This makes the order of operations inside the various DOM mutation methods
consistent so events, disabler scopes, and side effects are all sequenced the same.
It also introduces a SubframeLoadingDisabler, ScriptForbiddenScope and
EventDispatchForbiddenScope around more code that should have those effects.
This makes the DOM API more consistent, for example by preventing iframe loading
in the same place in all remove paths, and also fixes potential UXSS bugs in
cases where a frame is loaded inside the removal logic.
Finally I added lots of comments to explain what's going on and what steps are
Total comments: 6
Total comments: 7
Total messages: 31 (19 generated)