Remove unneccessary include of Deque.h from Document.h

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157833 bbb929c8-8fbe-4397-9dbb-9b2b20218538
This CL adds a small cache (capped at 256 elements, evicts entries using lru) to hold the shaping results of previous HarfBuzzRuns. This avoids calls to hb_shape, which makes up the majority of time spent in profiles of pages with complex script (such as amarchoti from tough_layout_cases).

On my z620, this is a ~35% gain for amarchoti on linux, and more than 40% on a nexus 7.


Without patch:
*RESULT times: page_load_time= [45972,43913,44008,43318,43044,43399,43074,43503,42807,42366] ms
Avg times: 43540.400000ms
Sd  times: 984.437030ms


With patch:
*RESULT times: page_load_time= [27737,25984,24754,24705,24304,24904,24236,24313,24995,24726] ms
Avg times: 25065.800000ms
Sd  times: 1063.958416ms


BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157835 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename StyleSheetCollections to StyleEngine.

This will be the new state/controller for everything related to style resolution.

BUG=291287
R=abarth, eae, eseidel

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157837 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Merge Vector's clearBufferPointer with restoreInlineBufferIfNeeded.

This is possible now that deallocateBuffer was simplified. This leads to
simpler and maybe slightly faster code.

Also rename clearBufferPointer to resetBufferPointer to be clearer.

I believe this might also fix a bug in Deque that I recently introduced,
relating to leaving the buffer pointer NULL for a Deque with inline
storage.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157840 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Comment fixes to Vector.

Actions missed feedback from https://chromiumcodereview.appspot.com/23601026/

R=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@157843 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove flaky line for test that always passes.

TBR=abarth@chromium.org

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

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