[Resource Timing] XMLHttpRequests should have initiator type 'xmlhttprequest'
https://bugs.webkit.org/show_bug.cgi?id=106409

Reviewed by Nate Chapin.

Source/WebCore:

The initiator is passed through ThreadableLoaderOptions to the CachedResourceRequest. This is
optional, so other users of ThreadableLoader will have the default initiator of 'request'. Note
that synchronous XHRs don't show up in the Resource Timing buffer yet.

Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/ThreadableLoader.h:
(ThreadableLoaderOptions):
* loader/cache/CachedResourceRequestInitiators.cpp:
(WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
* loader/cache/CachedResourceRequestInitiators.h:
(CachedResourceRequestInitiators):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):

LayoutTests:

* http/tests/w3c/webperf/resources/all_resource_types.htm:
* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types-expected.txt:
* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html:


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