Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Unified Diff: Source/core/xml/XMLErrors.cpp

Issue 26390004: Rework SVG sizing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix mishap during rebase in svg.css Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/xml/XMLErrors.cpp
diff --git a/Source/core/xml/XMLErrors.cpp b/Source/core/xml/XMLErrors.cpp
index 3cf9bd0d9f88d0c4ebae3a094295b30d27a77ab4..0cc366e73a453e51d414c57f97052832ca747072 100644
--- a/Source/core/xml/XMLErrors.cpp
+++ b/Source/core/xml/XMLErrors.cpp
@@ -126,6 +126,12 @@ void XMLErrors::insertErrorMessageBlock()
documentElement = body.get();
} else if (documentElement->namespaceURI() == SVGNames::svgNamespaceURI) {
RefPtr<Element> rootElement = m_document->createElement(htmlTag, true);
+ RefPtr<Element> head = m_document->createElement(headTag, true);
+ RefPtr<Element> style = m_document->createElement(styleTag, true);
+ head->parserAppendChild(style);
+ style->parserAppendChild(m_document->createTextNode("html, body { height: 100% } parsererror + svg { width: 100%; height: 100% }"));
+ style->finishParsingChildren();
+ rootElement->parserAppendChild(head);
RefPtr<Element> body = m_document->createElement(bodyTag, true);
rootElement->parserAppendChild(body);

Powered by Google App Engine
This is Rietveld 408576698