[Resource Timing] Allow detailed timing on same origin sites
authorsimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 05:08:25 +0000 (05:08 +0000)
committersimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Dec 2012 05:08:25 +0000 (05:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104328

Reviewed by Tony Gentilcore.

Source/WebCore:

This block was lost when I moved it to PerformanceResourceTiming.cpp.

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

* page/PerformanceResourceTiming.cpp:
(WebCore::passesTimingAllowCheck):

LayoutTests:

* platform/chromium/TestExpectations: This was mismarked as an iframe failure.

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

LayoutTests/ChangeLog
LayoutTests/platform/chromium/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/PerformanceResourceTiming.cpp

index 2332296..e2af8b8 100644 (file)
@@ -1,3 +1,12 @@
+2012-12-06  James Simonsen  <simonjam@chromium.org>
+
+        [Resource Timing] Allow detailed timing on same origin sites
+        https://bugs.webkit.org/show_bug.cgi?id=104328
+
+        Reviewed by Tony Gentilcore.
+
+        * platform/chromium/TestExpectations: This was mismarked as an iframe failure.
+
 2012-12-06  Rick Byers  <rbyers@chromium.org>
 
         CSS cursor property should support webkit-image-set
index cf62464..6d6f60b 100644 (file)
@@ -4166,7 +4166,6 @@ webkit.org/b/102542 [ Linux Mac Win ] compositing/checkerboard.html [ ImageOnlyF
 
 webkit.org/b/102724 svg/carto.net/colourpicker.svg [ ImageOnlyFailure ]
 
-webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html [ Text ]
 webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_dynamic_insertion.html [ Text ]
 webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_frame_initiator_type.html [ Text ]
 webkit.org/b/103927 http/tests/w3c/webperf/submission/resource-timing/html/test_resource_initiator_types.html [ Text ]
index c7757b2..c09862b 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-06  James Simonsen  <simonjam@chromium.org>
+
+        [Resource Timing] Allow detailed timing on same origin sites
+        https://bugs.webkit.org/show_bug.cgi?id=104328
+
+        Reviewed by Tony Gentilcore.
+
+        This block was lost when I moved it to PerformanceResourceTiming.cpp.
+
+        Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
+
+        * page/PerformanceResourceTiming.cpp:
+        (WebCore::passesTimingAllowCheck):
+
 2012-12-06  Rick Byers  <rbyers@chromium.org>
 
         CSS cursor property should support webkit-image-set
index 9ac7635..bd77252 100644 (file)
@@ -55,6 +55,10 @@ static bool passesTimingAllowCheck(const ResourceResponse& response, Document* r
 {
     AtomicallyInitializedStatic(AtomicString&, timingAllowOrigin = *new AtomicString("timing-allow-origin"));
 
+    RefPtr<SecurityOrigin> resourceOrigin = SecurityOrigin::create(response.url());
+    if (resourceOrigin->isSameSchemeHostPort(requestingDocument->securityOrigin()))
+        return true;
+
     const String& timingAllowOriginString = response.httpHeaderField(timingAllowOrigin);
     if (timingAllowOriginString.isEmpty() || equalIgnoringCase(timingAllowOriginString, "null"))
         return false;