OK. If you put that data: URI in the href attribute of a link
element in an HTML document, do those styles apply to the relevant
classes?
I’m not sure I understand. You mean this:
<LINK href="data:text/css, .my-style-id-00000006 { chapter4.html ...">
to put it into document?
yes, with rel="stylesheet"
Question is where I should place that element into document?
Can I just append it as last child (due to simplicity I get rid off
error checking from sample bellow)?
nsresult AddLinkSheet(nsString& dataUriStylesheet, nsIDOMDocument* domDoc)
{
nsCOMPtr<nsIDOMElement> elementLink;
nsString elName = NS_LITERAL_STRING("link");
nsresult rv = domDoc->CreateElement( elName, getter_AddRefs(elementLink));
rv = elementLink->SetAttribute(NS_LITERAL_STRING("rel"),
NS_LITERAL_STRING("stylesheet"));
rv = elementLink->SetAttribute(NS_LITERAL_STRING("href"),
dataUriStylesheet);
nsCOMPtr<nsIDOMNode> dnode = do_QueryInterface(elementLink, &rv);
nsCOMPtr<nsIDOMNode> newNode;
rv = domDoc->AppendChild(dnode, getter_AddRefs(newNode));
return rv;
}
Did you try applying styles other than list-style-image and see what
happens?
colors?
no applied
backgrounds?
no applied
Font sizes?
this is applied correctly
Does DOM Inspector show the rules for the nodes in question, or no?
You mean this?
http://img139.imageshack.us/img139/6465/dominspectorqh5.png
Yes, that. Looks like the styles are being applied just fine, then. The
only question is why they're not having an effect on those nodes,
right? That might be more productively asked in .xul or even .firefox...
You mean mozilla.dev.tech.xul or
mozilla.dev.apps.firefox or
mozilla.dev.apps.thunderbird ?
Palo
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout