[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
antti at apple.com
antti at apple.com
Fri Jan 21 15:14:55 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 7d58d6ea59ab5c5da153ca40d926584852dd84f3
Author: antti at apple.com <antti at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 10 18:32:58 2011 +0000
Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=52044
REGRESSION(r74807): No-store is ignored within a document
Reviewed by Alexey Proskuryakov.
Don't use cached resources with Cache-control: no-store (unless cache policy is CachePolicyHistoryBuffer).
This matches a behavior that got lost in r74807.
Test: http/tests/misc/script-no-store.html
(by Alexey Proskuryakov)
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=52044
REGRESSION(r74807): No-store is ignored within a document
Reviewed by Alexey Proskuryakov.
* http/tests/misc/script-no-store-expected.txt: Added.
* http/tests/misc/script-no-store.html: Added.
* http/tests/misc/resources/random-no-store.php: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75384 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index a9084f8..3d7c17c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-10 Antti Koivisto <antti at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=52044
+ REGRESSION(r74807): No-store is ignored within a document
+
+ * http/tests/misc/script-no-store-expected.txt: Added.
+ * http/tests/misc/script-no-store.html: Added.
+ * http/tests/misc/resources/random-no-store.php: Added.
+
2011-01-10 Alejandro G. Castro <alex at igalia.com>
Reviewed by Martin Robinson.
diff --git a/LayoutTests/http/tests/misc/resources/random-no-store.php b/LayoutTests/http/tests/misc/resources/random-no-store.php
new file mode 100644
index 0000000..4b24786
--- /dev/null
+++ b/LayoutTests/http/tests/misc/resources/random-no-store.php
@@ -0,0 +1,9 @@
+<?php
+ header("Cache-Control: no-store");
+?>
+var p = document.createElement("p");
+p.appendChild(document.createTextNode("<?php
+ print rand();
+?>
+"));
+document.body.appendChild(p);
diff --git a/LayoutTests/fast/blockflow/overhanging-float-legend-crash-expected.txt b/LayoutTests/http/tests/misc/script-no-store-expected.txt
similarity index 100%
copy from LayoutTests/fast/blockflow/overhanging-float-legend-crash-expected.txt
copy to LayoutTests/http/tests/misc/script-no-store-expected.txt
diff --git a/LayoutTests/http/tests/misc/script-no-store.html b/LayoutTests/http/tests/misc/script-no-store.html
new file mode 100644
index 0000000..fdbedf3
--- /dev/null
+++ b/LayoutTests/http/tests/misc/script-no-store.html
@@ -0,0 +1,30 @@
+<body>
+<script>
+var count = 0;
+
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+
+function addRandom()
+{
+ var script = document.createElement("script");
+ script.setAttribute("src", "resources/random-no-store.php");
+ document.body.appendChild(script);
+}
+++count;
+addRandom();
+
+setInterval(function() {
+ if (count == 1 && document.getElementsByTagName("p").length == 1) {
+ ++count;
+ addRandom();
+ } else if (document.getElementsByTagName("p").length == 2) {
+ document.write(document.getElementsByTagName("p")[0].innerHTML == document.getElementsByTagName("p")[1].innerHTML ?
+ "FAIL<br>" : "PASS<br>");
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+}, 10);
+</script>
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 470898f..8870ba7 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-10 Antti Koivisto <antti at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ https://bugs.webkit.org/show_bug.cgi?id=52044
+ REGRESSION(r74807): No-store is ignored within a document
+
+ Don't use cached resources with Cache-control: no-store (unless cache policy is CachePolicyHistoryBuffer).
+ This matches a behavior that got lost in r74807.
+
+ Test: http/tests/misc/script-no-store.html
+ (by Alexey Proskuryakov)
+
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::determineRevalidationPolicy):
+
2011-01-10 Patrick Gansterer <paroga at webkit.org>
Reviewed by Laszlo Gombos.
diff --git a/Source/WebCore/loader/cache/CachedResourceLoader.cpp b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
index b7060a8..4087622 100644
--- a/Source/WebCore/loader/cache/CachedResourceLoader.cpp
+++ b/Source/WebCore/loader/cache/CachedResourceLoader.cpp
@@ -402,6 +402,16 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
if (existingResource->isPreloaded())
return Use;
+ // CachePolicyHistoryBuffer uses the cache no matter what.
+ if (cachePolicy() == CachePolicyHistoryBuffer)
+ return Use;
+
+ // Don't reuse resources with Cache-control: no-store.
+ if (existingResource->response().cacheControlContainsNoStore()) {
+ LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicy reloading due to Cache-control: no-store.");
+ return Reload;
+ }
+
// Avoid loading the same resource multiple times for a single document, even if the cache policies would tell us to.
if (m_validatedURLs.contains(existingResource->url()))
return Use;
@@ -412,10 +422,6 @@ CachedResourceLoader::RevalidationPolicy CachedResourceLoader::determineRevalida
return Reload;
}
- // CachePolicyHistoryBuffer uses the cache no matter what.
- if (cachePolicy() == CachePolicyHistoryBuffer)
- return Use;
-
// We'll try to reload the resource if it failed last time.
if (existingResource->errorOccurred()) {
LOG(ResourceLoading, "CachedResourceLoader::determineRevalidationPolicye reloading due to resource being in the error state");
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list