Bug 61400

Summary: REGRESSION(84329): Stylesheets on some pages do not load
Product: WebKit Reporter: Nico Weber <thakis>
Component: CSSAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, ddkilzer, jamesr, jchaffraix, mikelawther, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://www.tbray.org/ongoing/When/201x/2011/05/23/Intimations
Bug Depends on:    
Bug Blocks: 65140    
Attachments:
Description Flags
Proposed fix: Use a unified way of keeping the disabled information none

Description Nico Weber 2011-05-24 15:17:25 PDT
Repro:
1. Go to http://www.tbray.org/ongoing/When/201x/2011/05/23/Intimations

The page should render like it does in other browsers. Instead, it shows up without stylesheets.

I bisected, and this is caused by r84329

(This is also http://crbug.com/83786)
Comment 1 Nico Weber 2011-05-24 15:21:31 PDT
Clicky: http://trac.webkit.org/changeset/84329
Comment 2 Alexey Proskuryakov 2011-05-24 16:04:09 PDT
function setActiveStyleSheet(title) {
    var i, a, main;
    for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {
	if (a.getAttribute("rel") &&
            a.getAttribute("rel").indexOf("style") != -1 &&
            a.getAttribute("title")) {
	    a.disabled = true;
	    if(a.getAttribute("title") == title) a.disabled = false;
	}
    }
}
Comment 3 Nico Weber 2011-05-25 13:03:18 PDT
ap: Do you mean this bug should be closed WontFix?
Comment 4 Julien Chaffraix 2011-05-25 13:19:12 PDT
> ap: Do you mean this bug should be closed WontFix?

FYI, the page works fine on other browsers.

Also if you click on the 'Sans Sherif' link, this calls the function ap mentioned but the style is applied correctly. It is only the 'Sherif' style sheet (the default one) that is not applied properly. I think this should be investigated before closing.
Comment 5 Alexey Proskuryakov 2011-05-25 13:59:58 PDT
> ap: Do you mean this bug should be closed WontFix?

No, definitely not. This snippet looks correct.
Comment 6 James Robinson 2011-05-25 16:44:26 PDT
Does that mean that http://trac.webkit.org/changeset/84329 incorrectly implemented what HTML5 says to do, or that the behavior that HTML5 specifies is inconsistent with what other browsers do and incompatible with the web?
Comment 7 Julien Chaffraix 2011-05-25 19:17:43 PDT
(In reply to comment #6)
> Does that mean that http://trac.webkit.org/changeset/84329 incorrectly implemented what HTML5 says to do, or that the behavior that HTML5 specifies is inconsistent with what other browsers do and incompatible with the web?

I am still investigating the issue but I lean towards an incorrect implementation in this case.
Comment 8 Julien Chaffraix 2011-06-01 16:45:23 PDT
Created attachment 95686 [details]
Proposed fix: Use a unified way of keeping the disabled information
Comment 9 Antti Koivisto 2011-06-09 13:11:36 PDT
Comment on attachment 95686 [details]
Proposed fix: Use a unified way of keeping the disabled information

r=me
Comment 10 WebKit Review Bot 2011-06-09 13:33:31 PDT
Comment on attachment 95686 [details]
Proposed fix: Use a unified way of keeping the disabled information

Clearing flags on attachment: 95686

Committed r88479: <http://trac.webkit.org/changeset/88479>
Comment 11 WebKit Review Bot 2011-06-09 13:33:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Julien Chaffraix 2011-06-09 15:14:17 PDT
Filed bug 62407 to track the 2 failures in the new test case.
Comment 13 David Kilzer (:ddkilzer) 2011-07-26 09:18:12 PDT
<rdar://problem/9567255>