Don't expose DocumentWriter to embedding layer

Currently, several classes that need to build up a fake frame do so by getting direct access to a DocumentWriter and sending the document contents directly into the parsing system. This works, but it looks like a terrible layering violation, particularly since it involves reusing whatever DocumentLoader happens to be the committed DocumentLoader (generally the DocumentLoader for the initial empty document).

This patch re-routes these cases to use SubstituteData and go through the normal FrameLoader::load() codepath. This involves re-introducing the concept of a SubstituteData load that is forced to be synchronous, but that seems like less of a hack than the current system.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164624 bbb929c8-8fbe-4397-9dbb-9b2b20218538
We should unify various forms of tree traversal in DOM

Unifies tree-traversal methods in newer WTF::TreeNode class to reduce code
copying and ensure that traversals are as fast as possible.  This is hopefully
a first step towards unifying the data structures and traversal algorithms for
Node/ContainerNode and RenderObject/RenderObjectChildList.

The plan is to eventually merge NodeTraversal.h into TreeNode.h and replace all
usage of the former with the latter.  This first step is more modest in scope,
replacing only those methods that are templated and/or are copy pasted copies
between the current user of TreeNode.h -- HTMLImport -- and NodeTraversal.h.

BUG=331880

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164625 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add HEAP_EXPORT to ThreadHeap::outOfLineAllocate to fix linker errors on GCC/component build

TBR=ager@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164627 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix some problems reported by clang static analyzer

These changes fix code paths where variable writes are done that have no effect later on, or code paths that do nothing.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164628 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Ensure that if FrameView::isScrollable() is false, the assoc WebLayer is, too.

Currently, we ignore main thread scrolling reasons when
FrameView::isScrollable() returns false. Unfortunately, this can be the case
even if the main frame would indeed respond to scrolls on the impl thread.
This can happen when the main frame is overflow: hidden. This should never be.
This CL builds on the existing machinery in ScrollingCoordinator to detect when
the main frame's scrollability is dirty to ensure that its associated WebLayer's
scrollability is correct.

R=shawnsingh@chromium.org
BUG=328672

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164629 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IndexedDB: Ensure IDBRequest and IDBCursor wrapper lifetimes are bound

As long as script holds onto an IDBCursor wrapper the IDBRequest
wrapper that produced it must be retained so that event listeners will
still fire. Conversely, as long as the IDBRequest wrapper is held by
script the IDBCursor wrapper should be retained even if script has no
references.

Note: Normally this sort of thing would be done via the
ActiveDOMObject::hasPendingActivity() method but in this case the
IDBRequest has dispatched events and will not do anything unless the
cursor is poked by script. Returning "true" from hasPendingActivity()
would retain the request and cursor until the end of the transaction
even when the script dropped references.

[PERF SHERIFFS: May regress some recent optimizations.]

R=dgrogan,alecflett,haraken
BUG=329471

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164630 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove DOMSelection::setPosition

This method shares the same implementation as DOMSelection::collapse, so make
the bindings use that one instead.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164631 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Create a WebP Encoder and Decoder watchlist

BUG=
R=jzern@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164632 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "Add HEAP_EXPORT to ThreadHeap::outOfLineAllocate to fix linker errors on GCC/component build"

This reverts commit 325f4fd338d6ef04ce44f67edb72266c3af5807c.

This build fix for GCC is a build breakage on Windows, see a
previous attempt at the same fix at:

https://codereview.chromium.org/123813003/

TBR=vegorov@chromium.org

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

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