HTML Imports: Stop overly recreating CEMicrotaskImportStep

The fix r174141 let re-create the step object for all "normalized"
HTMLImportChild-ren, but re-created steps go into wrong position
in the queue. This is incorrect.

Think about following mircostep queue:

- [ResolutionStep(Ra), ImportStep(Ia), ResolutioStep(Rb)]

If we invalidate |Ia| in the middle and recreate one,
the updated queue will look like this:

- [ResolutionStep(Ra), ResolutionStep(Rb), ImportStep(Ib, recreated)]

Then recreated |Ib| doesn't block |Rb|, which results wrong resolution
order.

The recreation was done because normalize() can break an invariant
that prohibits cycles in nested mirotask step queues. The recreation
was done as a simple way to revalidate this invariant.
This change instead checks the possible invariant violation in normalize(),
and kill steps that violate the invariant.

Note that added tests don't use existing testing harness because
loading external resources interfares the behavior.

BUG=395686
R=dglazkov@chromium.org
TEST=import-normalize-resolve-*.html

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

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

The Android framework does not require a user gesture to begin media playback.
The web shouldn't have that restriction either.

BUG=178297

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178731 bbb929c8-8fbe-4397-9dbb-9b2b20218538
We need a protecting RefPtr in MediaQueryList::stop()

m_listeners.clear() can drop the last reference to MediaQueryListener, so we need to protect it before calling m_listeners.clear().

BUG=395409
R=cbiesinger@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178732 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[DevTools] Move device mode button to AdvancedApp and add shortcut.

BUG=395512

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

git-svn-id: svn://svn.chromium.org/blink/trunk@178733 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement a way to invoke a private script from C++

Blink-in-JS needs a way to invoke a private script from C++. This CL implements it. The design is as follows:

If you write:

  // X.idl
  interface X {
    [ImplementedInPrivateScript] foo();
    [ImplementedInPrivateScript, OnlyExposedToPrivateScript] bar();
  };

then:

- V8X::fooMethodImplementedInPrivateScript() and V8X::barMethodImplementedInPrivateScript() are exposed to C++ as static methods of V8X. Blink can use these static methods to invoke a private script from C++.

- X.foo is exposed to both user's JS and private scripts, but X.bar is exposed only to private scripts. (X.bar is not exposed to user's JS.) This is useful to add a way to invoke a private script from C++ without exposing the method/attribute to user's JS. For example, HTMLMarqueeElement.createdCallback/attachedCallback/detachedCallback/attributeChangedCallback needs this mechanism.

In this CL, I haven't yet implemented the part of exposing [OnlyExposedToPrivateScript] attributes/methods to window objects of private scripts. This CL just exposes a way to invoke those attributes/methods from C++.

BUG=341031
TEST=PrivateScriptTestTest
NOTRY=true

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

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