Bug 43870

Summary: When two stylesheets are loaded with <link> tag and title attribute, second stylesheet is ignored
Product: WebKit Reporter: Dan Wood <dwood>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Major Keywords: HasReduction
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.6   
Attachments:
Description Flags
Reduction test case. HTML file and two stylesheets none

Dan Wood
Reported 2010-08-11 12:57:25 PDT
Created attachment 64151 [details] Reduction test case. HTML file and two stylesheets Summary: If you have two stylesheets loaded like this, each with a title attribute, the second stylesheet is ignored! <link rel="stylesheet" type="text/css" href="first.css" title="ddsmoothmenu" /> <link rel="stylesheet" type="text/css" href="second.css" title="xx" /> To reproduce: 1. Open the reduction test case (attached), problem.html What should happen: You should see a blue background and a note indicating that the second stylesheet loaded. What happens: You see a yellow background, indicating that the first but not the second stylesheet loaded. Regression: This happens on both TOT and the released Safari 4 version of WebKit. You can make this problem go away several ways: * Remove the title attribute from either the first or the second link tag * Load a stylesheet with <style..>@import...
Attachments
Reduction test case. HTML file and two stylesheets (3.47 KB, application/octet-stream)
2010-08-11 12:57 PDT, Dan Wood
no flags
Mark Rowe (bdash)
Comment 1 2010-08-11 13:11:19 PDT
WebKit’s behavior matches both Firefox and Opera on your test case. The title attribute on a link element containing a stylesheet marks the stylesheet as an alternate stylesheet, which are not loaded by default. Firefox allows you to switch to the alternate stylesheet via the View -> Page Style menu.
Dan Wood
Comment 2 2010-08-11 13:15:00 PDT
Wow, that's subtle -- but, OK! Thanks for the clarification Mark.
Note You need to log in before you can comment on or make changes to this bug.