Bug 43870 - When two stylesheets are loaded with <link> tag and title attribute, second stylesheet is ignored
Summary: When two stylesheets are loaded with <link> tag and title attribute, second s...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P2 Major
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2010-08-11 12:57 PDT by Dan Wood
Modified: 2010-08-11 13:15 PDT (History)
0 users

See Also:


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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Wood 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...
Comment 1 Mark Rowe (bdash) 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.
Comment 2 Dan Wood 2010-08-11 13:15:00 PDT
Wow, that's subtle -- but, OK!  Thanks for the clarification Mark.