Remove and eliminate redundant, duplicative Custom Element resolution code.

This adds a 'resolve' method to resolve elements that enter the
purview of a Custom Element registration context. Currently that
happens when a custom tag element is created or a type extension is
set.

This change is in anticipation of a third caller, when an element is
adopted into a document that has an active registration context.

BUG=255725

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154381 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Pause SVG animations when the document is detached.

This patch pauses SVG animations if the document is detached or
disposed (matching m_scriptedAnimationController's behavior). SVG 
animations will already reset when the document is re-attached so there
are no additional unpause() calls.

This patch allows us add an assert for document()->frame() in
StyleResolver::styleForElement. No new tests as this functionality is
covered with existing tests and the new assert.

BUG=260966

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154382 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement scoped @keyframes.

Moved @keyframes rules from StyleResolver to ScopedStyleResolver.
This is also useful to avoid reseting all @keyframes when a style in a shadow dom tree is updated.

BUG=229345

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154383 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix: The cached templates in [ClassName]GetTemplate were not separated per world.

BUG=
R=haraken@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154384 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Introduce toSVGInlineFlowBox() and use it

As a step to change static_cast with toSVGXXX, static_cast<SVGInlineFlowBox*> can
be changed with toSVGInlineFlowBox().

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@154385 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Call v8::Debug::SetDebugEventListener2 when removing debug event listener

We used v8::Debug::SetDebugEventListener2 to set event listener but v8::Debug::SetDebugEventListener to remove it.

BUG=None
R=loislo@chromium.org

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

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

To avoid direct use of static_cast, this patch introduces toHTMLFrameElement for code cleanup.

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

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