Closed
Bug 6903
Opened 25 years ago
Closed 25 years ago
setting style elements with title attribute as non-selected first alternate
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: dbaron, Assigned: troy)
References
()
Details
There's a style element with a title in the above page. You're treating it as
alternate. It should, I think, either be preferred or persistent (the spec is
vague). I see no reason that it should not be enabled when the page loads.
If this works, the above page,
http://www.fas.harvard.edu/~dbaron/css/fonts/aspect_dom , will act just like the
page http://www.fas.harvard.edu/~dbaron/css/fonts/aspect .
Comment 1•25 years ago
|
||
This is semi-intentional behaviour. Peter and I are currently discussing it.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 2•25 years ago
|
||
The intent here is for that sheet to become preferred. The content sink isn't
doing that right for style element (I have it fixed, it'll be checked in right
after M6).
The outstanding question is: is the title attribute of the style element
significant? Right now, the code treats it just like the title on a link
element, ie: it sets the title of the stylesheet. Therefore, any sheet with a
title is either preferred or alternate (depending on the title and the possibly
previously set default style).
The HTML spec is silent on this issue. It explicitly mentions the title
attribute of the style element, but doesn't say whether or not it sets the sheet
title or just the element's title. Letting it set the sheet title enables the
only current way of creating alternate or preferred inline sheets.
Comment 3•25 years ago
|
||
Yes, the title attribute of the style element is significant.
The spec says as much about the LINK element's title in the section on the LINK
element as it does about the STYLE element's title in the section on the STYLE
element. Both attributes are tagged as "advisory title".
In another chapter, the spec uses LINK as an _example_ of how to link
stylesheets. It doesn't say that it is the only way to make persistent/
preferred/alternate sheets. It mentions the "title" attribute, but it does not
say that _only_ the LINK element's title attribute will do.
The "title" attribute on LINK currently has exactly three uses:
1. Displaying as a tooltip in the unlikely case of someone like me doing a
display:block with generated content,
2. Getting around bugs in DOM implementations,
3. Setting persistent/preferred/alternate stylesheets.
Since STYLE's title attribute is documented in exactly the same way, why exclude
option 3 from its roles?
Comment 4•25 years ago
|
||
This is currently blowing up in reflow code during load. But the title attribute
is fixed.
Updated•25 years ago
|
Assignee: peterl → troy
Status: ASSIGNED → NEW
Component: Style System → Layout
The problem is that the root frame code was never changed to handle the
StyleChanged reflow command, and so we're ending up incorrectly processing the
reflow command and that's why we hit the assert in the absolute containing block
code
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Changed Reflow() to handle reflow commands of type StyleChanged
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 7•25 years ago
|
||
Verified fixed.
Comment 8•22 years ago
|
||
I think this is a bug.
see http://www.w3.org/TR/html401/struct/global.html#h-7.4.3
The title attribute has an additional role _when used with the LINK element_ to
designate an _external_ style sheet. Please consult the section on links and
style sheets for details.
Comment 9•22 years ago
|
||
Re comment 8: I agree with you, but the Style System drivers do not. See bug
188131 for details.
You need to log in
before you can comment on or make changes to this bug.
Description
•