When detaching insertion points we should reattach the distribution

When an InsertionPoint is detached we should reattach all the distributed nodes
instead of just detaching them since that would leave detached nodes in the tree
which prevents the distribution process from reattaching them later.

BUG=274676

Review URL: https://chromiumcodereview.appspot.com/22980013

git-svn-id: svn://svn.chromium.org/blink/trunk@156454 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Temporarily disable benign ASSERT in Document::didRemoveTouchEventHandler

This ASSERT fires whenever an iframe containing a plugin has it's source changed,
but the result is harmless (just indicates incomplete tracking of what has already
been cleaned up elsewhere).  I will fix this properly but need to track down a
perf regression.  Disabling the assert temporarily since this is blocking
people working with PNaCL.

BUG=254203

Review URL: https://chromiumcodereview.appspot.com/22967010

git-svn-id: svn://svn.chromium.org/blink/trunk@156455 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix XMLHttpRequest leak document when send() is called multiple times.

XMLHttpRequest creates a ThreadableLoader which may call XHR async, so it setPendingActivity() to avoid being destroyed. However, before this patch, unsetPendingActivity() was called asynchronously after ThreadableLoader was destroyed, so it lead to multiple problems:
a) When next m_loader was set in send() with pending unsetPendingActivity(), the pendingActivity may be dropped even when there exists new m_loader need protection.
b) pendingActivity may be set multiple times from pending unsetPendingActivity(), but dropProtectionSoon() only decrements m_pendingActivityCount by one, leading to a leak.

This patch fix the above problems by unsetPendingActivity() synchronously with m_loader destruction where possible. XMLHttpRequest::stop() still uses asynchronous unsetPendingActivity() to workaround issues mentioned in r152266.

The file "leak-check.js" was moved from fast/dom to fast/js to enable access from http tests.

BUG=270000

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=156078

Review URL: https://chromiumcodereview.appspot.com/23005006

git-svn-id: svn://svn.chromium.org/blink/trunk@156456 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactoring: Page::progress() should return a reference.

It is never null.

BUG=none
TEST=none; no behavior changes.

Review URL: https://chromiumcodereview.appspot.com/23253007

git-svn-id: svn://svn.chromium.org/blink/trunk@156457 bbb929c8-8fbe-4397-9dbb-9b2b20218538