Revert^4 "Move V8 shutdown code to WebKit::shutdown and shut it down properly"

This reverts commit 0aba149efd11d448ddc61671b9474f67c31c66b4.

Adapt the code to work with unit tests. There are still enough assertions left
that we'll crash if mixing the with and withoutV8 methods.

BUG=258327
R=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153922 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Document::setContentLanguage should not call styleResolverChanged

Document::setContentLanguage was calling styleResolverChanged just to update the root
style so we'll go through StyleResolver::styleForDocument which does not appear to be needed.
We only need to Force a recalc on the whole document so all the lang and locale related styles
are picked correctly.

This code came from https://bugs.webkit.org/show_bug.cgi?id=76701 where it was originally
recalcStyle(Force) in the patch and then through a series of review confusions it ended up as
a call to update the entire style resolver instead of just scheduling a forced style recalc.

R=eae@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153923 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up SVGCSSStyleSelector.cpp in preparation for folding it into StyleResolver::applyProperty

This separation dates to many many years ago when SVG was a second-class citizen
in WebKit.  Now SVG is on by default (and part of HTML5) and so there is no
reason for us to keep this separate switch statement.  Moving this back into
StyleResolver will let us further simplify StyleResolver::applyProperty.

While I was preparing this code for moving I also got rid of some
copy/past code by adding a couple helper functions.

BUG=237268
R=eae@chromium.org, esprehn@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153924 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove constant pointers from auto-generated CSS tables.

This patch modifies the scripts that auto-generate the CSSValues.cpp and
CSSPropertyNames.cpp files under gen/webkit/ to remove the arrays of
pointers to strings contained in these files.

This has the following consequences:

- Slightly speed up startup, by removing relocations needed at load
  time (especially on cold boot).

- Move all tables to the shareable read-only portion of the shared
  library. On Android, this saves a little bit of RAM in each
  process, since there is no Chromium Zygote to fork from.

- Unfortunately, it is not possible to reuse gperf's string pool
  because the items are reordered semi-randomly. As such, each
  value/property name will be duplicated in the generated table.

  Despite that, overall binary size is reduced by > 53000 bytes
  in the linux-x86_64 build of Chromium.

BUG=249747
R=abarth@chromium.org, pliard@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@153925 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Have Window inherit EventTarget interface

Have Window inherit EventTarget interface to match the specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-window-object

The implementation of addEventListener() / removeEventListener() needs
an additional security check for the Window object so we leverage
EventTarget::toDOMWindow() virtual method to make the check at run
time.

BUG=257583

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

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