mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fix bug 369828 - html/svg:style sheets don't work in XUL documents(the fix is to special-case these elements in nsXULDocument::ResumeWalkand manually call UpdateStylesheet on them after the element and its subtreeis fully constructed and inserted into the document)r=bz, sr=peterv
This commit is contained in:
parent
b8c797ca40
commit
bde08ec16b
@ -2868,6 +2868,19 @@ nsXULDocument::ResumeWalk()
|
||||
// resolved.)
|
||||
if (mState == eState_Master) {
|
||||
AddElementToDocumentPost(element);
|
||||
|
||||
if (element->NodeInfo()->Equals(nsGkAtoms::style,
|
||||
kNameSpaceID_XHTML) ||
|
||||
element->NodeInfo()->Equals(nsGkAtoms::style,
|
||||
kNameSpaceID_SVG)) {
|
||||
// XXX sucks that we have to do this -
|
||||
// see bug 370111
|
||||
nsCOMPtr<nsIStyleSheetLinkingElement> ssle =
|
||||
do_QueryInterface(element);
|
||||
NS_ASSERTION(ssle, "<html:style> doesn't implement "
|
||||
"nsIStyleSheetLinkingElement?");
|
||||
ssle->UpdateStyleSheet(nsnull, nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_XTF
|
||||
|
@ -59,3 +59,5 @@ test020: Same as #018 for <?xml-stylesheet ?>
|
||||
|
||||
test021: (bug 363419) Non-XUL elements directly underneath <overlay> should
|
||||
be merged correctly into the base document.
|
||||
|
||||
test022: (bug 369828) <html:style> works in XUL documents
|
||||
|
@ -19,3 +19,4 @@
|
||||
== test019.xul reference-green-window.xul
|
||||
== test020.xul reference-green-window.xul
|
||||
== test021.xul reference-green-window.xul
|
||||
== test022.xul reference-green-window.xul
|
||||
|
14
layout/reftests/xul-document-load/test022.xul
Normal file
14
layout/reftests/xul-document-load/test022.xul
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<window title="Testcase for bug 369828 - html:style doesn't work in XUL documents"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
style="background-color: red">
|
||||
|
||||
<html:style type="text/css">
|
||||
window {
|
||||
background-color: green !important;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
</window>
|
Loading…
Reference in New Issue
Block a user