Revert "Avoid N^2 walk placing renderers when building the render tree"

Reverting r154053. This resulted in a big perf hit :(

BUG=245478,259926
R=ojan@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154161 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clear StyleResolverState after each resolve.

This makes sure RenderStyles aren't kept alive unnecessarily by the
two RefPtr<RenderStyles> inside there.  However, it's not enough to
make sure that *all* RenderStyles are destroyed eagerly.

BUG=172011
R=eseidel@chromium.org, esprehn@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154162 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix off-by-one error in text*Access

The textPinIndex function expects its second argument to be a "limit" (largest
allowed value) rather than a length (which is one beyond the largest allowed
value). It's sadness that this code mixed lengths and limits. I've corrected
the off-by-one error by subtracting one from the length to compute the limit.

Caught by an ASSERT in editing/selection/move-by-word-visually-crash-test-5.html

R=eseidel@chromium.org

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

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