Bug 976616 - Part 1: Call ProcessViewportInfo when meta viewport is changed. r=bholley
This commit is contained in:
@@ -56,6 +56,13 @@ HTMLMetaElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
|
||||
if (aNameSpaceID == kNameSpaceID_None) {
|
||||
if (aName == nsGkAtoms::content) {
|
||||
nsIDocument *document = GetUncomposedDoc();
|
||||
if (document && AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
|
||||
nsGkAtoms::viewport, eIgnoreCase)) {
|
||||
nsAutoString content;
|
||||
nsresult rv = GetContent(content);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsContentUtils::ProcessViewportInfo(document, content);
|
||||
}
|
||||
CreateAndDispatchEvent(document, NS_LITERAL_STRING("DOMMetaChanged"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user