Revert "Refactoring: Simplify DocumentWriter by reorganizing its lifetime."

This reverts commit 5adb71bcfa08a062b72a176c7ab5ff5a11fd598c.

NOTRY=True
TBR=morrita@chromium.org,abarth@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153124 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactoring: Simplify DocumentWriter by reorganizing its lifetime.

This change simplifies DocumentWriter by

1. Letting its lifetime match to the actual "writing" process:
   It is now created when actual data is arrived to be parsed,
   and is discarded once all the data is loaded.
   Then we no longer neeed DocumentWriter::m_state.

2. Moving most of its Frame dependency to DocumentLoader.
   DocumentWriter::begin() is factored to DocumentLoader::createWriter(), and
   DocumentWriter::replaceDocument is factored to DocumentLoader::replaceDocument()
   and DocumentWriter::appendReplacingData(). DocumentWriter::m_frame is now
   able to be replaced by DocumentWriter::m_documnet. This narrows the dependency surface.
   (Also it makes more sense because it is "document" writer after all.)

3. Making TextResourceDecoderBuilder an immutable object by stripping
   its setters out.

Note that (2) and (3) become possible because of (1).

Key observations here are that

- DocumentWriter had longer lifetime just because it stored mimetype and encoding.
  However, these can be computed on the fly in DocumentLoader when it starts
  actual writing. See ensureWriter() callsites.

- Some of extra states in DocumentWriter was needed because it had to "reset" itself.
  Once its lifetime aligns the single loading/parsing, we no longer need such reset thing.

- The main reason of dependency from DocumentWriter to Frame was DocumentWriter::begin(),
  which did connect the fresh, to-be-built Document and given Frame. This should be part
  of the DocumentWriter creation process and doesn't need to be in DocumentWriter itself.
  This change factors such setup into DocumentLoader::createWriter factory method.

BUG=none
TEST=none
R=abarth

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

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153125 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Move sources panel search bar closer to the editor

R=pfeldman@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153126 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fixed an assertion failure which should've been a part of r153126.

TBR=abarth
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153127 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rebaselining results after commit 153119
http://src.chromium.org/viewvc/blink?view=rev&revision=153119

TBR=kouhei@chromium.org
NOTRY=False
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153128 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rebaseline after r

BUG=116481
TBR=tkent

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

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