Unreviewed, rolling out r93425.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 21:37:27 +0000 (21:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Aug 2011 21:37:27 +0000 (21:37 +0000)
http://trac.webkit.org/changeset/93425
https://bugs.webkit.org/show_bug.cgi?id=66591

"The newly-added ASSERT is being triggered on several bots"
(Requested by jchaffraix on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-08-19

Source/WebCore:

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabled):
(WebCore::HTMLLinkElement::sheetLoaded):
(WebCore::HTMLLinkElement::disabled):
* html/HTMLLinkElement.h:
(WebCore::HTMLLinkElement::isEnabledViaScript):

LayoutTests:

* fast/css/link-disabled-attr-expected.txt:
* fast/css/stylesheet-enable-first-alternate-expected.txt: Removed.
* fast/css/stylesheet-enable-first-alternate-on-load-expected.txt: Removed.
* fast/css/stylesheet-enable-first-alternate-on-load.html: Removed.
* fast/css/stylesheet-enable-first-alternate.html: Removed.
* fast/css/stylesheet-enable-second-alternate-expected.txt: Removed.
* fast/css/stylesheet-enable-second-alternate-on-load-expected.txt: Removed.
* fast/css/stylesheet-enable-second-alternate-on-load.html: Removed.
* fast/css/stylesheet-enable-second-alternate.html: Removed.
* http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt: Removed.
* http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt: Removed.
* http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html: Removed.
* http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html: Removed.
* http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js: Removed.
* http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js: Removed.
* http/tests/css/resources/slow-loading-sheet-in-error.php: Removed.
* http/tests/css/resources/slow-loading-sheet.php: Removed.

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

21 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/link-disabled-attr-expected.txt
LayoutTests/fast/css/stylesheet-enable-first-alternate-expected.txt [deleted file]
LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-expected.txt [deleted file]
LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load.html [deleted file]
LayoutTests/fast/css/stylesheet-enable-first-alternate.html [deleted file]
LayoutTests/fast/css/stylesheet-enable-second-alternate-expected.txt [deleted file]
LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load-expected.txt [deleted file]
LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load.html [deleted file]
LayoutTests/fast/css/stylesheet-enable-second-alternate.html [deleted file]
LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt [deleted file]
LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt [deleted file]
LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html [deleted file]
LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html [deleted file]
LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js [deleted file]
LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js [deleted file]
LayoutTests/http/tests/css/resources/slow-loading-sheet-in-error.php [deleted file]
LayoutTests/http/tests/css/resources/slow-loading-sheet.php [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLLinkElement.cpp
Source/WebCore/html/HTMLLinkElement.h

index 4ab72dc..c48b734 100644 (file)
@@ -1,3 +1,30 @@
+2011-08-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r93425.
+        http://trac.webkit.org/changeset/93425
+        https://bugs.webkit.org/show_bug.cgi?id=66591
+
+        "The newly-added ASSERT is being triggered on several bots"
+        (Requested by jchaffraix on #webkit).
+
+        * fast/css/link-disabled-attr-expected.txt:
+        * fast/css/stylesheet-enable-first-alternate-expected.txt: Removed.
+        * fast/css/stylesheet-enable-first-alternate-on-load-expected.txt: Removed.
+        * fast/css/stylesheet-enable-first-alternate-on-load.html: Removed.
+        * fast/css/stylesheet-enable-first-alternate.html: Removed.
+        * fast/css/stylesheet-enable-second-alternate-expected.txt: Removed.
+        * fast/css/stylesheet-enable-second-alternate-on-load-expected.txt: Removed.
+        * fast/css/stylesheet-enable-second-alternate-on-load.html: Removed.
+        * fast/css/stylesheet-enable-second-alternate.html: Removed.
+        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt: Removed.
+        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt: Removed.
+        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html: Removed.
+        * http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html: Removed.
+        * http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js: Removed.
+        * http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js: Removed.
+        * http/tests/css/resources/slow-loading-sheet-in-error.php: Removed.
+        * http/tests/css/resources/slow-loading-sheet.php: Removed.
+
 2011-08-19  Victoria Kirst  <vrk@chromium.org>
 
         Tell media player to prepareToPlay() at end of HTMLMediaElement::load()
index f41370a..571acb2 100644 (file)
@@ -15,11 +15,11 @@ PASS getComputedStyle(console).whiteSpace is 'pre-wrap'
 altsheet
 FAIL link.disabled should be true. Was false.
 PASS link.sheet is non-null.
-PASS getComputedStyle(console).backgroundColor is 'rgb(0, 128, 0)'
+FAIL getComputedStyle(console).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0).
 FAIL link.disabled should be true. Was false.
-FAIL getComputedStyle(console).backgroundColor should be rgba(0, 0, 0, 0). Was rgb(0, 128, 0).
+PASS getComputedStyle(console).backgroundColor is originalBG
 PASS link.disabled is false
-PASS getComputedStyle(console).backgroundColor is 'rgb(0, 128, 0)'
+FAIL getComputedStyle(console).backgroundColor should be rgb(0, 128, 0). Was rgba(0, 0, 0, 0).
 PASS getComputedStyle(console).backgroundColor is originalBG
 PASS successfullyParsed is true
 
diff --git a/LayoutTests/fast/css/stylesheet-enable-first-alternate-expected.txt b/LayoutTests/fast/css/stylesheet-enable-first-alternate-expected.txt
deleted file mode 100644 (file)
index c0528fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Test for 65140: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
-
-This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).
-
-PASSED
diff --git a/LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-expected.txt b/LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load-expected.txt
deleted file mode 100644 (file)
index c0528fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Test for 65140: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
-
-This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).
-
-PASSED
diff --git a/LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load.html b/LayoutTests/fast/css/stylesheet-enable-first-alternate-on-load.html
deleted file mode 100755 (executable)
index a295e42..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/red.css" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/green.css" media="all" title="green" type="text/css" />
-<script type="text/javascript">
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-
-    function test() {
-        var red = document.getElementsByTagName("link")[0];
-        red.disabled = true;
-        var green = document.getElementsByTagName("link")[1];
-        green.disabled = true;
-        green.disabled = false;
-
-        var console = document.getElementById("console");
-        if (getComputedStyle(console, null).backgroundColor === "rgb(0, 128, 0)")
-            console.innerHTML = "PASSED";
-        else
-            console.innerHTML = "FAILED, background = " + getComputedStyle(console, null).backgroundColor;
-    }
-    window.addEventListener("load", test, false);
-</script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=65140">65140</a>: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page</p>
-<p>This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).</p>
-<div id="console">FAILED</div>
-</body>
-</html>
diff --git a/LayoutTests/fast/css/stylesheet-enable-first-alternate.html b/LayoutTests/fast/css/stylesheet-enable-first-alternate.html
deleted file mode 100755 (executable)
index f559063..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/red.css" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/green.css" media="all" title="green" type="text/css" />
-<script type="text/javascript">
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-
-    var red = document.getElementsByTagName("link")[0];
-    red.disabled = true;
-    var green = document.getElementsByTagName("link")[1];
-    green.disabled = true;
-    green.disabled = false;
-
-    function test() {
-        var console = document.getElementById("console");
-        if (getComputedStyle(console, null).backgroundColor === "rgb(0, 128, 0)")
-            console.innerHTML = "PASSED";
-        else
-            console.innerHTML = "FAILED, background = " + getComputedStyle(console, null).backgroundColor;
-    }
-    window.addEventListener("load", test, false);
-</script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=65140">65140</a>: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page</p>
-<p>This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).</p>
-<div id="console">FAILED</div>
-</body>
-</html>
diff --git a/LayoutTests/fast/css/stylesheet-enable-second-alternate-expected.txt b/LayoutTests/fast/css/stylesheet-enable-second-alternate-expected.txt
deleted file mode 100644 (file)
index c0528fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Test for 65140: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
-
-This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).
-
-PASSED
diff --git a/LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load-expected.txt b/LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load-expected.txt
deleted file mode 100644 (file)
index c0528fb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Test for 65140: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page
-
-This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).
-
-PASSED
diff --git a/LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load.html b/LayoutTests/fast/css/stylesheet-enable-second-alternate-on-load.html
deleted file mode 100755 (executable)
index cc8086e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/red.css" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/red.css" media="all" title="green" type="text/css" />
-<link rel="alternate stylesheet" href="resources/green.css" media="all" title="green" type="text/css" />
-<script type="text/javascript">
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-
-    function test() {
-        var red = document.getElementsByTagName("link")[0];
-        red.disabled = true;
-        var green = document.getElementsByTagName("link")[2];
-        green.disabled = false;
-
-        var console = document.getElementById("console");
-        if (getComputedStyle(console, null).backgroundColor === "rgb(0, 128, 0)")
-            console.innerHTML = "PASSED";
-        else
-            console.innerHTML = "FAILED, background = " + getComputedStyle(console, null).backgroundColor;
-    }
-    window.addEventListener("load", test, false);
-</script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=65140">65140</a>: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page</p>
-<p>This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).</p>
-<div id="console">FAILED</div>
-</body>
-</html>
diff --git a/LayoutTests/fast/css/stylesheet-enable-second-alternate.html b/LayoutTests/fast/css/stylesheet-enable-second-alternate.html
deleted file mode 100755 (executable)
index 00e5c2c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/red.css" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/red.css" media="all" title="green" type="text/css" />
-<link rel="alternate stylesheet" href="resources/green.css" media="all" title="green" type="text/css" />
-<script type="text/javascript">
-    if (window.layoutTestController)
-        layoutTestController.dumpAsText();
-
-    var red = document.getElementsByTagName("link")[0];
-    red.disabled = true;
-    var green = document.getElementsByTagName("link")[2];
-    green.disabled = false;
-
-    function test() {
-        var console = document.getElementById("console");
-        if (getComputedStyle(console, null).backgroundColor === "rgb(0, 128, 0)")
-            console.innerHTML = "PASSED";
-        else
-            console.innerHTML = "FAILED, background = " + getComputedStyle(console, null).backgroundColor;
-    }
-    window.addEventListener("load", test, false);
-</script>
-</head>
-<body>
-<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=65140">65140</a>: REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page</p>
-<p>This test PASSED if PASSED is written below (alternatively the next line should have a GREEN background).</p>
-<div id="console">FAILED</div>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt b/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-expected.txt
deleted file mode 100644 (file)
index 61400aa..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Test that HTMLLinkElement's disabled attribute is properly cached while set when loading a stylesheet.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Testing value of 'disabled' prior to load just after setting them
-PASS mainSheetLink.sheet is non-null.
-PASS alternateSheetLink.sheet is null
-PASS mainSheetLink.disabled is true
-PASS alternateSheetLink.disabled is false
-Testing the values when the alternate sheet is loaded (as this is the only one that has sheet() === null)
-PASS mainSheetLink.sheet is non-null.
-PASS alternateSheetLink.sheet is non-null.
-PASS mainSheetLink.disabled is true
-PASS alternateSheetLink.disabled is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt b/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error-expected.txt
deleted file mode 100644 (file)
index 61400aa..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Test that HTMLLinkElement's disabled attribute is properly cached while set when loading a stylesheet.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Testing value of 'disabled' prior to load just after setting them
-PASS mainSheetLink.sheet is non-null.
-PASS alternateSheetLink.sheet is null
-PASS mainSheetLink.disabled is true
-PASS alternateSheetLink.disabled is false
-Testing the values when the alternate sheet is loaded (as this is the only one that has sheet() === null)
-PASS mainSheetLink.sheet is non-null.
-PASS alternateSheetLink.sheet is non-null.
-PASS mainSheetLink.disabled is true
-PASS alternateSheetLink.disabled is false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html b/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html
deleted file mode 100755 (executable)
index d16c83d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/slow-loading-sheet.php?color=green" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/slow-loading-sheet.php-in-error" media="all" title="green" type="text/css" />
-<script src="/js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js"></script>
-<script src="/js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html b/LayoutTests/http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html
deleted file mode 100755 (executable)
index 07ff2cc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<link rel="stylesheet" href="resources/slow-loading-sheet.php?color=red" media="all" title="Default Style Sheet" type="text/css" />
-<link rel="alternate stylesheet" href="resources/slow-loading-sheet.php?color=green" media="all" title="green" type="text/css" />
-<script src="/js-test-resources/js-test-pre.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script src="resources/link-css-disabled-value-with-slow-loading-sheet.js"></script>
-<script src="/js-test-resources/js-test-post.js"></script>
-</body>
-</html>
diff --git a/LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js b/LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet-in-error.js
deleted file mode 100644 (file)
index 0589f27..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-description("Test that HTMLLinkElement's disabled attribute is properly cached while set when loading a stylesheet.");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-window.jsTestIsAsync = true;
-
-mainSheetLink = document.getElementsByTagName("link")[0];
-alternateSheetLink = document.getElementsByTagName("link")[1];
-
-mainSheetLink.disabled = true;
-alternateSheetLink.disabled = false;
-
-debug("Testing value of 'disabled' prior to load just after setting them");
-shouldBeNonNull("mainSheetLink.sheet");
-shouldBeNull("alternateSheetLink.sheet");
-shouldBeTrue("mainSheetLink.disabled", true);
-shouldBeFalse("alternateSheetLink.disabled");
-
-debug("Testing the values when the alternate sheet is loaded (as this is the only one that has sheet() === null)");
-
-function onSheetLoaded(f, elem, maxtime) {
-    if (elem.sheet || maxtime <= 0)
-        f();
-    else
-        setTimeout(function () { onSheetLoaded(f, elem, maxtime - 25);}, 25);
-}
-
-function testWhenLoaded() {
-        // Those next 2 lines are a sanity check.
-        // If the second check fails, it is likely that the test timed out and thus
-        // you can discard the rest of results as it is not testing what we want
-        // (namely that the disabled value is passed to the final sheet).
-        shouldBeNonNull("mainSheetLink.sheet");
-        shouldBeNonNull("alternateSheetLink.sheet");
-
-        shouldBeTrue("mainSheetLink.disabled");
-        shouldBeFalse("alternateSheetLink.disabled");
-
-        finishJSTest();
-}
-
-onSheetLoaded(testWhenLoaded, alternateSheetLink, 500);
-
-var successfullyParsed = true;
diff --git a/LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js b/LayoutTests/http/tests/css/resources/link-css-disabled-value-with-slow-loading-sheet.js
deleted file mode 100644 (file)
index 0589f27..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-description("Test that HTMLLinkElement's disabled attribute is properly cached while set when loading a stylesheet.");
-
-if (window.layoutTestController)
-    layoutTestController.waitUntilDone();
-
-window.jsTestIsAsync = true;
-
-mainSheetLink = document.getElementsByTagName("link")[0];
-alternateSheetLink = document.getElementsByTagName("link")[1];
-
-mainSheetLink.disabled = true;
-alternateSheetLink.disabled = false;
-
-debug("Testing value of 'disabled' prior to load just after setting them");
-shouldBeNonNull("mainSheetLink.sheet");
-shouldBeNull("alternateSheetLink.sheet");
-shouldBeTrue("mainSheetLink.disabled", true);
-shouldBeFalse("alternateSheetLink.disabled");
-
-debug("Testing the values when the alternate sheet is loaded (as this is the only one that has sheet() === null)");
-
-function onSheetLoaded(f, elem, maxtime) {
-    if (elem.sheet || maxtime <= 0)
-        f();
-    else
-        setTimeout(function () { onSheetLoaded(f, elem, maxtime - 25);}, 25);
-}
-
-function testWhenLoaded() {
-        // Those next 2 lines are a sanity check.
-        // If the second check fails, it is likely that the test timed out and thus
-        // you can discard the rest of results as it is not testing what we want
-        // (namely that the disabled value is passed to the final sheet).
-        shouldBeNonNull("mainSheetLink.sheet");
-        shouldBeNonNull("alternateSheetLink.sheet");
-
-        shouldBeTrue("mainSheetLink.disabled");
-        shouldBeFalse("alternateSheetLink.disabled");
-
-        finishJSTest();
-}
-
-onSheetLoaded(testWhenLoaded, alternateSheetLink, 500);
-
-var successfullyParsed = true;
diff --git a/LayoutTests/http/tests/css/resources/slow-loading-sheet-in-error.php b/LayoutTests/http/tests/css/resources/slow-loading-sheet-in-error.php
deleted file mode 100644 (file)
index dcd17f7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-// We sleep here so that we are have enough time to test the different attributes before the stylesheet is fully loaded.
-usleep(100);
-
-header("HTTP/1.0 500 Internal Error");
-header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
-header("Cache-Control: no-cache, no-store, must-revalidate");
-header("Pragma: no-cache");
-header("Content-Type: text/css");
-
-ob_flush();
-flush();
-?>
diff --git a/LayoutTests/http/tests/css/resources/slow-loading-sheet.php b/LayoutTests/http/tests/css/resources/slow-loading-sheet.php
deleted file mode 100644 (file)
index 28937d4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-// We sleep here so that we are have enough time to test the different attributes before the stylesheet is fully loaded.
-usleep(100);
-
-header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
-header("Cache-Control: no-cache, no-store, must-revalidate");
-header("Pragma: no-cache");
-header("Content-Type: text/css");
-
-$color = $_GET['color'];
-
-echo "h1 { background-color: $color }\n";
-ob_flush();
-flush();
-?>
index ef7cc4f..0bada79 100644 (file)
@@ -1,3 +1,20 @@
+2011-08-19  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r93425.
+        http://trac.webkit.org/changeset/93425
+        https://bugs.webkit.org/show_bug.cgi?id=66591
+
+        "The newly-added ASSERT is being triggered on several bots"
+        (Requested by jchaffraix on #webkit).
+
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::HTMLLinkElement):
+        (WebCore::HTMLLinkElement::setDisabled):
+        (WebCore::HTMLLinkElement::sheetLoaded):
+        (WebCore::HTMLLinkElement::disabled):
+        * html/HTMLLinkElement.h:
+        (WebCore::HTMLLinkElement::isEnabledViaScript):
+
 2011-08-18  Adrienne Walker  <enne@google.com>
 
         [chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D
index 4fa8346..4bc6e93 100644 (file)
@@ -56,7 +56,7 @@ inline HTMLLinkElement::HTMLLinkElement(const QualifiedName& tagName, Document*
     , m_linkLoader(this)
     , m_sizes(DOMSettableTokenList::create())
     , m_loading(false)
-    , m_scriptState(Unset)
+    , m_isEnabledViaScript(false)
     , m_createdByParser(createdByParser)
     , m_isInShadowTree(false)
     , m_pendingSheetType(None)
@@ -85,20 +85,15 @@ HTMLLinkElement::~HTMLLinkElement()
 
 void HTMLLinkElement::setDisabled(bool disabled)
 {
-    bool wasEnabledViaScript = isEnabledViaScript();
-    setIsEnabledViaScript(!disabled);
-
     if (!m_sheet)
         return;
 
     bool wasDisabled = m_sheet->disabled();
-    if (wasDisabled == disabled) {
-        if (wasEnabledViaScript != isEnabledViaScript())
-            document()->styleSelectorChanged(DeferRecalcStyle);
+    if (wasDisabled == disabled)
         return;
-    }
 
     m_sheet->setDisabled(disabled);
+    m_isEnabledViaScript = !disabled;
 
     // If we change the disabled state while the sheet is still loading, then we have to
     // perform three checks:
@@ -125,8 +120,6 @@ void HTMLLinkElement::setDisabled(bool disabled)
 
     if (!disabled)
         process();
-
-    ASSERT(areDisabledAndScriptStatesConsistent());
 }
 
 StyleSheet* HTMLLinkElement::sheet() const
@@ -366,20 +359,10 @@ void HTMLLinkElement::linkLoadingErrored()
 
 bool HTMLLinkElement::sheetLoaded()
 {
-    // Migrate the disabled information before removePendingSheet is called
-    // as it will start a recalStyleSelector which needs this information.
-    if (m_scriptState != Unset) {
-        ASSERT(!m_loading);
-        // FIXME: We should ASSERT that it was set for stylesheets only, but
-        // currently we allow setDisabled to be called regardless of the <link> rel.
-        setDisabled(m_scriptState == DisabledViaScript);
-    }
-
     if (!isLoading()) {
         removePendingSheet();
         return true;
     }
-
     return false;
 }
 
@@ -462,20 +445,7 @@ void HTMLLinkElement::removePendingSheet()
 
 bool HTMLLinkElement::disabled() const
 {
-    ASSERT(areDisabledAndScriptStatesConsistent());
-
-    if (!m_sheet) {
-        // FF disagrees with the CSS OM spec and always has an associated stylesheet for alternate sheet (regardless of whether
-        // the resource is fetched). As we store the enabled state in m_scriptState while loading, return this information to be
-        // consistent with FF. sheetLoaded() is called at the end of any transfer (whether it was in error or not) so m_scriptState
-        // will be transfered back into our stylesheet and the disabled() value should always be consistent.
-        if (isLoading() && m_scriptState != Unset)
-            return m_scriptState == DisabledViaScript;
-
-        return false;
-    }
-
-    return m_sheet->disabled();
+    return m_sheet && m_sheet->disabled();
 }
 
 DOMSettableTokenList* HTMLLinkElement::sizes() const
@@ -488,23 +458,4 @@ void HTMLLinkElement::setSizes(const String& value)
     m_sizes->setValue(value);
 }
 
-#ifndef NDEBUG
-bool HTMLLinkElement::areDisabledAndScriptStatesConsistent() const
-{
-    if (!m_relAttribute.m_isStyleSheet)
-        return true;
-
-    // During loading, m_scriptState holds the temporary value for sheet()->disabled()
-    // so it can have any values (same for sheet()->disabled()).
-    if (isLoading())
-        return true;
-
-    if (m_scriptState == Unset)
-        return true;
-
-    bool isDisabledViaScript = m_scriptState == DisabledViaScript;
-    return isDisabledViaScript == sheet()->disabled();
-}
-#endif
-
 } // namespace WebCore
index ac518d2..8fede02 100644 (file)
@@ -57,7 +57,7 @@ public:
 
     // FIXME: This should be renamed isStyleSheetLoading as this is only used for stylesheets.
     bool isLoading() const;
-    bool isEnabledViaScript() const { return m_scriptState == EnabledViaScript; }
+    bool isEnabledViaScript() const { return m_isEnabledViaScript; }
     bool disabled() const;
     void setDisabled(bool);
     void setSizes(const String&);
@@ -85,6 +85,7 @@ private:
     
     virtual bool isURLAttribute(Attribute*) const;
 
+private:
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
 
     virtual void finishParsingChildren();
@@ -96,11 +97,6 @@ private:
 private:
     HTMLLinkElement(const QualifiedName&, Document*, bool createdByParser);
 
-    void setIsEnabledViaScript(bool enabled) { m_scriptState = enabled ? EnabledViaScript : DisabledViaScript; }
-#ifndef NDEBUG
-    bool areDisabledAndScriptStatesConsistent() const;
-#endif
-
     LinkLoader m_linkLoader;
     CachedResourceHandle<CachedCSSStyleSheet> m_cachedSheet;
     RefPtr<CSSStyleSheet> m_sheet;
@@ -110,11 +106,10 @@ private:
     RefPtr<DOMSettableTokenList> m_sizes;
     LinkRelAttribute m_relAttribute;
     bool m_loading;
-    enum EnabledViaScriptState { Unset, EnabledViaScript, DisabledViaScript };
-    EnabledViaScriptState m_scriptState;
+    bool m_isEnabledViaScript;
     bool m_createdByParser;
     bool m_isInShadowTree;
-
+    
     PendingSheetType m_pendingSheetType;
 };