Index: Source/core/html/ImageDocument.cpp |
diff --git a/Source/core/html/ImageDocument.cpp b/Source/core/html/ImageDocument.cpp |
index eb594be11f70d34d54a0741142c7a7222f1e1ae9..743b3b6943c624666335cd211a89273c1cc10053 100644 |
--- a/Source/core/html/ImageDocument.cpp |
+++ b/Source/core/html/ImageDocument.cpp |
@@ -191,7 +191,15 @@ void ImageDocument::createDocumentStructure() |
if (frame() && frame()->loader()) |
frame()->loader()->dispatchDocumentElementAvailable(); |
- |
+ |
+ RefPtr<Element> head = document()->createElement(headTag, false); |
+ rootElement->appendChild(head, IGNORE_EXCEPTION); |
+ |
+ RefPtr<Element> meta = document()->createElement(metaTag, false); |
+ meta->setAttribute(nameAttr, "viewport"); |
+ meta->setAttribute(contentAttr, "width=device-width"); |
+ head->appendChild(meta, IGNORE_EXCEPTION); |
+ |
RefPtr<Element> body = Document::createElement(bodyTag, false); |
body->setAttribute(styleAttr, "margin: 0px;"); |