зеркало из https://github.com/mozilla/pjs.git
Bug 95336 "position CSS not recognized without units when element not in document". Set the parser in quirks mode when necessary in nsDOMCSSAttributeDeclaration::ParseDeclaration(). r=ianh/sr=jst/a=dbaron.
This commit is contained in:
Родитель
48c8e1a750
Коммит
771befb59a
|
@ -332,6 +332,21 @@ nsDOMCSSAttributeDeclaration::ParseDeclaration(const nsAReadableString& aDecl,
|
|||
decl->RemoveProperty(prop, val);
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
mContent->GetNodeInfo(*getter_AddRefs(nodeInfo));
|
||||
if (nodeInfo) {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nodeInfo->GetDocument(*getter_AddRefs(doc));
|
||||
if (doc) {
|
||||
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(doc));
|
||||
if (htmlDoc) {
|
||||
nsDTDMode mode;
|
||||
htmlDoc->GetDTDMode(mode);
|
||||
cssParser->SetQuirkMode(eDTDMode_strict != mode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = cssParser->ParseAndAppendDeclaration(aDecl, baseURI, decl,
|
||||
aParseOnlyOneDecl, &hint);
|
||||
|
|
Загрузка…
Ссылка в новой задаче