A page should exit fullscreen mode if it opens a new popup

If a fullscreen page opens a popup, the popup would be hidden and
therefore invisible to the user. To avoid this, exit fullscreen mode
before opening a new window.

Imported from http://trac.webkit.org/changeset/157534

R=abarth@chromium.org
TEST=fullscreen/full-screen-exit-when-popup.html
BUG=304547

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159834 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement cloneNode for Document

When cloning HTMLDocument and SVGDocument we need to ensure that we
create a new HTMLDocument and SVGDocument respectively.

http://dom.spec.whatwg.org/#dom-node-clonenode

BUG=258146

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159835 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DEFINE_CSS_VALUE_TYPE_CASTS starts to use DEFINE_TYPE_CASTS

DEFINE_CSS_VALUE_TYPE_CASTS starts to use DEFINE_TYPE_CASTS so that it is more flexible. Under this change, unusual CSS child values will be able to use the DEFINE_CSS_VALUE_TYPE_CASTS as well.

BUG=N/A

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159836 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Only cast to HTMLInputElement or HTMLTextAreaElement if it's safe.

Removes some FIXMEs.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159837 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make HTMLOutputElement.htmlFor settable

Make HTMLOutputElement.htmlFor settable as per the specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element

Calling HTMLOutputElement.htmlFor="foo" should be equivalent to
HTMLOutputElement.value.htmlFor="foo". This behavior is consistent
with Firefox 23.

BUG=308034

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159838 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[SVG] Invalidate indirect relative-length clients on viewport size change.

Currently, RenderView::layout() notifies its immediate SVG root children
of viewport size changes:

            if (child->isSVGRoot()) {
                ASSERT(child->node());
                ASSERT(child->node()->isSVGElement());
                toSVGElement(child->node())->invalidateRelativeLengthClients(&layoutScope);
            }

But this doesn't work for HTML documents, where the root SVG renderers
are not direct children of RenderView.

This CL introduces an SVGDocumentExtensions-based registry for tracking
SVG root elements with relative length descendants, and updates
RenderView::layout() to dispatch the viewport resize event using this
new mechanism. Indirect relative-length children are now correctly
notified, regardless of the render tree topology.

BUG=307161
R=schenney@chromium.org,pdr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159839 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove RenderLayer::scrollTo* functions

Added RenderBox::scrollToOffset for the accessibility code.

BUG=260899

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159840 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up Document/ExecutionContext lifetime management in html/track/*

Nearly all the classes under html/track previously took ExecutionContext
pointers in their constructors, and stored them as members without any
explanation of how the lifetimes of those pointers were supposed to work.

There were generally two uses for those pointers:
  - To have something to return for EventTarget::executionContext()
  - To treat as a Document for the construction of DOM nodes

In this patch, the main thing you'll notice is a lack of toDocument()
calls. Any class that needs a Document now gets one, either in its
constructor or in the methods that require that Document to do work.

Some of those Documents are later returned from executionContext(),
while in other places I found a different place to get the executionContext
(e.g., from an Element that the class was already holding a reference to).

I tried to avoid holding a member pointer back to the Document where possible,
but in a few cases I had to keep it for now. A future patch will aim to
get rid of more Document pointers, as their lifetimes look questionable
(though I know of no existing bugs with those pointers).

Also done in this patch, but only marginally related to the above:
  - Simplified TrackBase to only provide a type tag and no other functionality
  - Changed TrackBase::Type to include only valid enum values

R=acolwell@chromium.org, vcarbune@chromium.org

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

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

Have HistoryController do all tracking of the current HistoryItem. In the
rest of its uses, have callers talk directly to BackForwardClient, which
now lives directly on Page.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@159842 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [Unforgeable]

Straightforward, same "Remove superfluous default" as with property attributes
(in Perl too), in this case v8::DEFAULT.
Docs:
https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extended-attributes#TOC-Unforgeable-m-a-

BUG=239771

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

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