Add status events on <link rel=prerender> elements.
https://bugs.webkit.org/show_bug.cgi?id=96474

Reviewed by Adam Barth.

The new PrerenderStatusEvent is sent to link elements when
prerenders are started by the embedder, and also sent when they
are stopped. Pages using this feature can now serialize launching
prerenders, and track timing performance.

Source/Platform:

* chromium/public/WebPrerender.h:
(WebKit::WebPrerender::WebPrerender):
(WebKit::WebPrerender::operator=):
(WebPrerender):

Source/WebCore:

Tested in a new WebKitUnitTest for the chromium port.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
(WebCore):
* html/HTMLLinkElement.cpp:
(WebCore):
(WebCore::HTMLLinkElement::didStartLinkPrerender):
(WebCore::HTMLLinkElement::didStopLinkPrerender):
(WebCore::HTMLLinkElement::didSendLoadForLinkPrerender):
(WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender):
* html/HTMLLinkElement.h:
(HTMLLinkElement):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::didStartPrerender):
(WebCore):
(WebCore::LinkLoader::didStopPrerender):
(WebCore::LinkLoader::didSendLoadForPrerender):
(WebCore::LinkLoader::didSendDOMContentLoadedForPrerender):
(WebCore::LinkLoader::loadLink):
* loader/LinkLoader.h:
(LinkLoader):
* loader/LinkLoaderClient.h:
(LinkLoaderClient):
* loader/Prerenderer.cpp:
(WebCore::Prerenderer::render):
* loader/Prerenderer.h:
(WebCore):
(Prerenderer):
* platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h.
(WebCore):
(PrerenderClient):
(WebCore::PrerenderClient::~PrerenderClient):
* platform/PrerenderHandle.h:
(WebCore):
(PrerenderHandle):
* platform/chromium/Prerender.cpp:
(WebCore::Prerender::Prerender):
(WebCore::Prerender::removeClient):
(WebCore):
(WebCore::Prerender::add):
(WebCore::Prerender::cancel):
(WebCore::Prerender::abandon):
(WebCore::Prerender::didStartPrerender):
(WebCore::Prerender::didStopPrerender):
(WebCore::Prerender::didSendLoadForPrerender):
(WebCore::Prerender::didSendDOMContentLoadedForPrerender):
* platform/chromium/Prerender.h:
(WebKit):
(WebCore):
(Prerender):
* platform/chromium/PrerenderHandle.cpp:
(WebCore::PrerenderHandle::create):
(WebCore::PrerenderHandle::PrerenderHandle):
(WebCore::PrerenderHandle::~PrerenderHandle):
(WebCore::PrerenderHandle::removeClient):
(WebCore):
* platform/chromium/support/WebPrerender.cpp:
(WebKit::WebPrerender::toPrerender):
(WebKit):
(WebKit::WebPrerender::assign):
(WebKit::WebPrerender::isNull):
(WebKit::WebPrerender::didStartPrerender):
(WebKit::WebPrerender::didStopPrerender):
(WebKit::WebPrerender::didSendLoadForPrerender):
(WebKit::WebPrerender::didSendDOMContentLoadedForPrerender):

Source/WebKit/chromium:

* WebKit.gyp:
* WebKit.gypi:
* tests/FrameTestHelpers.cpp:
(WebKit::FrameTestHelpers::createWebView):
(FrameTestHelpers):
(WebKit::FrameTestHelpers::createWebViewAndLoad):
* tests/FrameTestHelpers.h:
(FrameTestHelpers):
* tests/PrerenderingTest.cpp: Added.
* tests/data/prerender/multiple_prerenders.html: Added.
* tests/data/prerender/single_prerender.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137045 268f45cc-cd09-0410-ab3c-d52691b4dbfc