Closed
Bug 290018
Opened 20 years ago
Closed 16 years ago
when you document.write() a stylesheet @import rules are ignored when you use local file://s
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jepsar, Assigned: bzbarsky)
References
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
(deleted),
application/zip
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050410 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050410 Firefox/1.0+
might be a problem with missing mime types for the css @import files
Reproducible: Always
Reporter | ||
Comment 1•20 years ago
|
||
I'm working on a testcase. There are more factors involved than just the
document.write(). I've got a fairly complex page with a lot of CSS and
Javascript. I have to strip it down and isolate the problem.
Reporter | ||
Comment 2•20 years ago
|
||
I don't have a webserver to test this at home. I think it works.. it's a
stripped down version of a date picker I created at work. When viewed on a
server the imported CSS works for the popup, when viewed directly from disc it
doesn't.
Comment 3•20 years ago
|
||
(In reply to comment #0)
> might be a problem with missing mime types for the css @import files
I suspect it too because local only problem.
(When remote, extention->mime type conversion is done by Apache according to
addtype directive setting.)
Is "Content Type" of HKEY_CLASSES_ROOT\.css set as "text/css" in Windows registry?
Go "Command Prompt" then enter "regedit".
Reporter | ||
Comment 4•20 years ago
|
||
(In reply to comment #3)
> Is "Content Type" of HKEY_CLASSES_ROOT\.css set as "text/css" in Windows registry?
It is. The PercievedType (don't know what that is) value is 'text'.
Comment 5•20 years ago
|
||
Check View/Page Info/Privacy/External Loaded Documents.
The @import'ed css file is listed in it?
(Please check both local and remote case.)
Comment 6•20 years ago
|
||
(In reply to comment #4)
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_perceived_types.asp
for PerceivedType.
(Was not "PercievedType", though some hits with this. Google is a very kind
spell checker for Japanese :-) )
Reporter | ||
Comment 7•20 years ago
|
||
(In reply to comment #5)
> Check View/Page Info/Privacy/External Loaded Documents.
> The @import'ed css file is listed in it?
> (Please check both local and remote case.)
Is there a way to check this in Firefox? The Mozilla Suite isn't downloadable as
a .zip and I can't install software at work.
Comment 8•20 years ago
|
||
If problem on CSS file on server, viewing HTTP header log using "Live HTTP
Headers" is a way to check whether CSS file is read or not.
( http://livehttpheaders.mozdev.org/index.html )
But this is local CSS file case...
Can you check what happens when you delete the should-be-@imported'ed CSS file?
If "tried to read but not found", I think some error messages will be issued on
JavaScript Console.
Then check JavaScript console again when @import'ed CSS file exists.
Comment 9•20 years ago
|
||
If should-be-@import'ed CSS file is read, check "CSS Style Rules" and "Computed
Style" of elements using DOM Inspector.
Please note that DOM Inspector is included only when "custom" is choosed on
installation if installer build.
Reporter | ||
Updated•20 years ago
|
Attachment #180825 -
Attachment description: testcase → css files were not included
Attachment #180825 -
Attachment is obsolete: true
Reporter | ||
Comment 10•20 years ago
|
||
Reporter | ||
Comment 11•20 years ago
|
||
"Live HTTP Headers" doesn't work for files. I've collected some information from
the "Web Developer Toolbar"
(http://chrispederick.com/work/firefox/webdeveloper/) when I view this testcase
from a file server.
Web Developer Toolbar, View CSS:
------------------
CSS - wyciwyg://10/file:///P:/public_htdocs/290018/index.html
file:///P:/public_htdocs/290018/index.html
file:///P:/public_htdocs/290018/screen.css
@import url("import.css");
body {
background: #ffc;
}
file:///P:/public_htdocs/290018/import.css
body {
color: red;
}
------------------
Dom Inspector, Computed style for the body: rgb(0, 0, 0)
When I test my larger, more complex style sheet from a file server
Web Developer Toolbar, View CSS:
------------------
CSS - wyciwyg://12/file:///P:/public_htdocs/page/index.html
file:///P:/public_htdocs/page/index.html
file:///P:/public_htdocs/page/_css/screen.css
@import url("screen_menu.css");
@import url("screen_crumb.css");
@import url("screen_datepicker.css");
@import url("screen_form.css");
@import url("screen_table.css");
@import url("screen_tabset.css");
* {
padding: 0;
margin: 0;
font-family: "Verdana";
font-size: 11px;
line-height: 16px;
background-repeat: no-repeat;
}
.. cut ..
file:///P:/public_htdocs/page/_css/screen_menu.css
#menu {
position: fixed;
top: 0;
left: 0;
width: 100%;
min-width: 600px;
z-index: 2;
}
.. cut (screen_menu.css was completely available to the Web Developer Toolbar) ..
------------------
When I remove the "screen_menu.css", clear the cache and reopen the popup
Web Developer Toolbar, View CSS:
------------------
CSS - wyciwyg://12/file:///P:/public_htdocs/page/index.html
file:///P:/public_htdocs/page/index.html
file:///P:/public_htdocs/page/_css/screen.css
@import url("screen_menu.css");
@import url("screen_crumb.css");
@import url("screen_datepicker.css");
@import url("screen_form.css");
@import url("screen_table.css");
@import url("screen_tabset.css");
* {
padding: 0;
margin: 0;
font-family: "Verdana";
font-size: 11px;
line-height: 16px;
background-repeat: no-repeat;
}
.. cut (main sheet loads but no other sheets were available to the Web Developer
Toolbar) ..
------------------
Assignee | ||
Comment 12•20 years ago
|
||
Fixing bug 183348 should fix this; the problem is that the first sheet load gets
canceled when you clobber its <link> and the second sheet load gets a broken
cloned sheet.
Comment 13•17 years ago
|
||
Since there is a test case and a dependency changing to NEW
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 14•16 years ago
|
||
Fixed by checkin for bug 183348.
Assignee: general → bzbarsky
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•