Title: [137677] trunk
- Revision
- 137677
- Author
- [email protected]
- Date
- 2012-12-13 16:13:21 -0800 (Thu, 13 Dec 2012)
Log Message
[Resource Timing] Don't report resources with data: urls
https://bugs.webkit.org/show_bug.cgi?id=104868
Reviewed by Tony Gentilcore.
Source/WebCore:
Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadDone):
LayoutTests:
* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url-expected.txt: Added.
* http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (137676 => 137677)
--- trunk/LayoutTests/ChangeLog 2012-12-14 00:06:20 UTC (rev 137676)
+++ trunk/LayoutTests/ChangeLog 2012-12-14 00:13:21 UTC (rev 137677)
@@ -1,3 +1,13 @@
+2012-12-13 James Simonsen <[email protected]>
+
+ [Resource Timing] Don't report resources with data: urls
+ https://bugs.webkit.org/show_bug.cgi?id=104868
+
+ Reviewed by Tony Gentilcore.
+
+ * http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url-expected.txt: Added.
+ * http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html: Added.
+
2012-12-13 Beth Dakin <[email protected]>
Rubber-stamped by Tim Horton.
Added: trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url-expected.txt (0 => 137677)
--- trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url-expected.txt 2012-12-14 00:13:21 UTC (rev 137677)
@@ -0,0 +1,8 @@
+Description
+
+This test validates that resources with data: URIs aren't present in the Resource Timing buffer.
+
+
+
+PASS entries.length == 0
+
Added: trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html (0 => 137677)
--- trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html (rev 0)
+++ trunk/LayoutTests/http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html 2012-12-14 00:13:21 UTC (rev 137677)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8" />
+<title>Resource Timing ignores requests for data: URIs</title>
+<link rel="author" title="Google" href="" />
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<script>
+var iframe;
+function setup_iframe() {
+ var iframe_content = '<img src=""
+ iframe = document.getElementById('frameContext');
+ iframe.contentWindow.document.write(iframe_content);
+}
+function onload_test() {
+ var entries = iframe.contentWindow.performance.webkitGetEntries();
+ test_true(entries.length == 0, "entries.length == 0");
+}
+window.setup_iframe = setup_iframe;
+</script>
+</head>
+<body>
+<h1>Description</h1>
+<p>This test validates that resources with data: URIs aren't present in the Resource Timing buffer.</p>
+<div id="log"></div>
+<iframe id="frameContext" _onload_="onload_test();" src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (137676 => 137677)
--- trunk/Source/WebCore/ChangeLog 2012-12-14 00:06:20 UTC (rev 137676)
+++ trunk/Source/WebCore/ChangeLog 2012-12-14 00:13:21 UTC (rev 137677)
@@ -1,3 +1,15 @@
+2012-12-13 James Simonsen <[email protected]>
+
+ [Resource Timing] Don't report resources with data: urls
+ https://bugs.webkit.org/show_bug.cgi?id=104868
+
+ Reviewed by Tony Gentilcore.
+
+ Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html
+
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::loadDone):
+
2012-12-13 Ian Vollick <[email protected]>
Add a missing nullity check in RenderObject::containingBlock
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (137676 => 137677)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2012-12-14 00:06:20 UTC (rev 137676)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2012-12-14 00:13:21 UTC (rev 137677)
@@ -704,7 +704,7 @@
#if ENABLE(RESOURCE_TIMING)
// FIXME: Add resource timing support for main resources.
- if (resource && resource->type() != CachedResource::MainResource && !resource->errorOccurred() && !resource->wasCanceled()) {
+ if (resource && resource->type() != CachedResource::MainResource && !resource->errorOccurred() && !resource->wasCanceled() && resource->response().isHTTP()) {
HashMap<CachedResource*, InitiatorInfo>::iterator initiatorIt = m_initiatorMap.find(resource);
if (initiatorIt != m_initiatorMap.end()) {
ASSERT(document());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes