зеркало из https://github.com/mozilla/pjs.git
bug 615617 - GetDocumentMetadata does not return data from META elements added by scripts (breaks jQuery Mobile) r=bz a=blocking-fennec
This commit is contained in:
Родитель
c6cbf85e2c
Коммит
ba611cf54c
|
@ -852,15 +852,6 @@ nsContentSink::ProcessMETATag(nsIContent* aContent)
|
|||
}
|
||||
}
|
||||
|
||||
/* Look for the viewport meta tag. If we find it, process it and put the
|
||||
* data into the document header. */
|
||||
if (aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
|
||||
nsGkAtoms::viewport, eIgnoreCase)) {
|
||||
nsAutoString value;
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::content, value);
|
||||
rv = nsContentUtils::ProcessViewportInfo(mDocument, value);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,6 +121,13 @@ nsHTMLMetaElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
aBindingParent,
|
||||
aCompileEventHandlers);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (aDocument &&
|
||||
AttrValueIs(kNameSpaceID_None, nsGkAtoms::name, nsGkAtoms::viewport, eIgnoreCase)) {
|
||||
nsAutoString content;
|
||||
rv = GetContent(content);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsContentUtils::ProcessViewportInfo(aDocument, content);
|
||||
}
|
||||
CreateAndDispatchEvent(aDocument, NS_LITERAL_STRING("DOMMetaAdded"));
|
||||
return rv;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче