Call insertedInto or removedFrom before childrenChanged

We must notify nodes that they were removed before calling childrenChanged
because childrenChanged could run script. If don't then the script can remove
the parent and then Element::removedFrom doesn't think the parent is
inTreeScope or inDocument so it'll fail to clean up the TreeScope hash maps
like the id map.

I tried this once before for a different reason in:
https://src.chromium.org/viewvc/blink?revision=175732&view=revision
but that got rolled out because it caused crashes http://crbug.com/382160

By looking at the code it appears that the reason for this is that
m_element in the WebPluginContainerImpl is a raw ptr, and so nothing is
keeping the element alive inside the UpdateSuspendScope. In this patch
I didn't remove the NodeVector, a future patch will attempt to do that.

Unfortunately even when I did remove the NodeVector I couldn't reproduce
the crashes mentioned in the bug, but by code inspection and the crash
stacks it appears to be the situation I described.

BUG=387389

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178976 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r178952

http://src.chromium.org/viewvc/blink?view=revision&revision=178952

BUG=394833
TBR=wangxianzhu@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178977 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Change EME WebIDL to use ArrayBuffer/ArrayBufferView.

Now that the spec specifies that data should be passed using
ArrayBuffer/ArrayBufferView, change the IDL to match.

BUG=358271
TEST=Updated EME layouts tests pass

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178978 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IndexedDB: Enable Blob/File/FileList structured clone tests

These test cases should have been enabled when Blob support landed, but
were missed.

BUG=108012
R=cmumford@chromium.org,dgrogan@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178979 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Overlay scrollbars must respect ancestor clip

The current reparenting logic for overlay scrollbars for compositor-
driven scrollable areas does not account for ancestor clips. The result
is that the scrollbars can escape clips that need to affect them.

Consider the following stacking tree. (The '-' characters in the
following trees should be ignored. I've only added them so that
my indenting doesn't get stripped).

+ stacking-context
- + overflow-hidden-clipper
- + overflow-scroller
- + fixed-positioned-descendant-of-the-scroller
- + relative-positioned-descendant-of-the-scroller

Where, in tree order, these are arranged like this
+ stacking-context
- + overflow-hidden-clipper
--- + overflow-scroller
----- + fixed-positioned-descendant-of-the-scroller
----- + relative-positioned-descendant-of-the-scroller

Since overflow-scroller is clipped by overflow-hidden-clipper, a layer
that is not an ancestor in the stacking tree, it gets an ancestor
clipping layer. If the overflow controls are parented under
overflow-scroller's m_graphicsLayer, everything works fine: the
controls inherit the clip from the ancestor clipping layer.

Unfortunately, if we are using overlay scrollbars, we can't hang
the scrollbars under m_graphicsLayer because they'd stack behind
fixed-positioned-descendant-of-the-scroller and
relative-positioned-descendant-of-the-scroller. In order to get things
stacking correctly, we have to reparent the overflow controls like
this:

+ stacking-context
- + overflow-hidden-clipper
- + overflow-scroller
- + fixed-positioned-descendant-of-the-scroller
- + relative-positioned-descendant-of-the-scroller
- + <overflow controls for overflow-scroller>

If we reparent the controls like this in the graphics layer tree,
the overflow controls will no longer be a descendant of the
ancestor clipping layer that applies the clip for m_graphicsLayer,
unfortunately. In order to get the overflow controls clipped
correctly, we need to ensure that they have a clipping layer
above them. This CL adds m_overflowControlsClippingLayer for this
purpose.

BUG=393926

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178980 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r178901

http://src.chromium.org/viewvc/blink?view=revision&revision=178901

BUG=388780,377445
TBR=h.joshi@samsung.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178981 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r178796

http://src.chromium.org/viewvc/blink?view=revision&revision=178796

BUG=23476,243732,243248
TBR=pkasting@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178982 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r178873

http://src.chromium.org/viewvc/blink?view=revision&revision=178873

BUG=108833,178745,248065
TBR=pkasting@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178983 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r178888

http://src.chromium.org/viewvc/blink?view=revision&revision=178888

BUG=259547
TBR=pkasting@chromium.org

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

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