Inhibit title updates when removing children before setting new value

In <https://codereview.chromium.org/107513013> children to <title>
were removed before setting the new title child. This caused one extra
title change notification to the empty string before the new value was
set.

Avoid the extra notification by ignoring title updates when children
of HTMLTitleElement change until the final appendChild with the new
text node.

Also make sure to add a child list mutation scope for the update so
that both the removal and addition ends up in the same mutation. Add
test for this.

BUG=331351

Review URL: https://codereview.chromium.org/128603002

git-svn-id: svn://svn.chromium.org/blink/trunk@164789 bbb929c8-8fbe-4397-9dbb-9b2b20218538
8 files changed
tree: 2a9e2b14eb8275821701642eb4175d886441da6e
  1. third_party/