Revert of Rewrite platform headers in public/web/ to public/platform/... (https://codereview.chromium.org/189703002/)

Reason for revert:
Broke Windows, Mac, and ChromeOS build.


Original issue's description:
> Rewrite platform headers in public/web/ to public/platform/...
> 
> Includes of this style are more consistent with the rest of the project and
> easier to verify with DEPS. For consistency, includes in public/web/ of other
> headers in public/web/ are rewritten to list the public/web/ portion as well.
> 
> BUG=350097
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169597

TBR=abarth@chromium.org,jamesr@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=350097

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169600 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify EventTarget bindings generation (2)

This further simplifies EventTarget bindings generation.

The goal (for now) is to only have a special case for the
{{hidden_dependency_action}}; everything else should be pretty easy
to eliminate (except maybe the ListenerFindOnly case).

The main change in this CL is making the argument handling regular.
(Also correctly handles EventListener as a callback interface.)

This also breaks up the big custom generation into smaller pieces,
so each piece can be eliminated separately.

Followup to:
Simplify EventTarget bindings generation
https://codereview.chromium.org/201603002/

R=haraken
BUG=345503

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169601 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add more checks to prevent crashes when accessing name/opener properties

Getting/setting these properties can depend on FrameLoaderClient, which
will be null if the frame containing the DOMWindow has already been
detached.

BUG=349956,352048

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169602 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move didChangeSelection to WebFrameClient.

BUG=304341

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169603 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't call hb_buffer_set_unicode_funcs in HarfBuzzShaper

Harfbuzz-ng 0.9.27 introduced a HAVE_ICU_BUILTIN define which makes the
hb_buffer_set_unicode_funcs call redundant. Also call
hb_buffer_clear_content instead of hb_buffer_reset which is faster now
that we no longer explicitly set the unicode functions.

BUG=354117
R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169604 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Invalidation not taking glyph bounds into account on HarfBuzz path

Implement support for computing and populating the GlyphOverflow
structure for the harfbuzz code path. The current implementation is a
straight copy of the current Mac implementation with minor
modifications to use the corresponding harfbuzz APIs.

R=dglazkov@chromium.org,behdad@chromium.org
BUG=354165
TEST=fast/text/international/repaint-glyph-bounds.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169605 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove dead code for dragging MediaControlPanelElement

Because setCanBeDragged(true) is never called, all the rest of the
dragging code becomes unreachable. The feature as such looks useful, but
it would require fixing and above all testing to interact well with text
track rendering.

BUG=341813
TEST=LayoutTests/media/ still passes, i.e. there were none!

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169606 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Web Animations API: Load resources referenced in element.animate()

This patch fixes a bug where resources in element.animate() calls were
not being fetched. This resulted in StylePendingImages leaking out of
the style resolving stage and into rendering which causes a crash.

This patch fixes the bug by ensuring StylePendingImages introduced in
applyAnimatedProperties() will be resolved as non-pending StyleImages
through an additional call to loadPendingResources().
This patch also modifies AnimatableImage to be a wrapper of CSSValues
instead of StyleImages in order to follow the same resource caching
logic as typical CSS image values.
This patch also updates EffectInput::convert() to pass the document's
StyleSheetContents to MutableStylePropertySet::setProperty() so that
relative URLs are correctly resolved to absolute URLs.

This is a reland of https://codereview.chromium.org/196573030/ with
AnimatableImage::create() rewritten to not require an ASSERT.

BUG=353385

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169607 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Re-land of issue 200623006: Set geometry dirty bits on composited layer mappings w/squashing

Adds test expectation fix.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169608 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move custom element definitions into ElementRareData

Instead of keeping a separate hash map we should just store this
information in the ElementRareData. This simplifies the implementation and
in practice will likely reduce memory usage since almost all custom elements
we've seen so far touch something that ends up making them use rare data like
childNodes, attributes, tabIndex, classList or dataset.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169609 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move inline stylesheet cache decision making from StyleSheetContents to StyleEngine

This separates the decisions about caching StyleSheetContents for <style> elements
from those related to <link> elements. This makes the code clearer as there are
fewer conditions that could cause uncacheability (for example, the StyleSheetContents
for <style> elements could never be for an @import rule).

And since the <style> cache is per-StyleEngine (and thus per-Document), the
<style> case can now safely cache stylesheets that include @media rules.
This speeds up the included performance test from ~90ms on my Z620 to ~50ms,
and improves the biggest block of chromestatus.com load performance by ~20%.

This patch also cleans up StyleSheetContents a bit, collapsing the maybeCacheable()
method into isCacheable() and making appropriate accessors const.

BUG=342507

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169610 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix promise resolution of FontFaceSet#load()

This patch changes the promise resolution logic of FontFaceSet#load()
to match the spec [1], in the following ways:

1. Rejects the promise with SyntaxError if the font argument fails to
   parse.
2. Otherwise, the promise should be resolved in the same way as
   Promise.all() called with all of the results of FontFace#load() of
   the matching font faces, i.e.
2.1. Resolves the promise with an array of the matching font faces when
     all the fonts are loaded, or
2.2. Rejects the promise with the rejection value of the first failed
     font face.

The new ScriptPromiseResolver Vector overloads need NoInline version of
v8Array, since existing v8Array() uses toV8 inside and hence requires
generated headers (see crbug.com/321569 for details of a similar issue).

[1] http://dev.w3.org/csswg/css-font-loading/#font-face-set-load

TEST=fast/css/fontfaceset-load.html
BUG=53213

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169611 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rewrite the fast/css/css2-system-fonts.html test

This patch makes the fast/css/css2-system-fonts.html explicit about the
font styles expected on each platform instead of just Mac.
It also converts the test to be text only as the style information is
now displayed in text format.

This change is in preparation for a refactor of system font handling.

BUG=353932

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169612 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Refactor interface dependency resolution

This refactors simplifies dependency resolution, and makes it easier to
extend.

Specifically:
* Move file handling into idl_reader
* Move actual definition and interface merging to methods on IdlDefinitions
  and IdlInterface (in idl_definitions)

This also clarifies exactly what's going on specially:
* we tack on some extended attributes to members
* we merge implemented interfaces to the main one

Other changes:
* use next() instead of looping over a one-element list
* remove useless exceptions (specific exception classes are only useful
  if we catch them, otherwise it's no better than a string)

This is to support a separate CL:
Bindings: inherit enums and callbacks from partial interface files.
https://codereview.chromium.org/203193015/

TBR=haraken
BUG=345137

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

git-svn-id: svn://svn.chromium.org/blink/trunk@169613 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Replace nextSiblingChildren() with simpler nextSibling() when equivalent

This makes the code more readable as it makes it clear we are only traversing
children. This is also a bit more efficient as nextSiblingChildren() tries to
traverse the ancestors siblings when done with the current siblings.

R=esprehn, adamk

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

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