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

Unified Diff: sky/engine/web/WebViewImpl.cpp

Issue 696413002: Remove HTMLLinkElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/web/WebViewImpl.cpp
diff --git a/sky/engine/web/WebViewImpl.cpp b/sky/engine/web/WebViewImpl.cpp
index b28e54ed7139bca3028fa597aedab0d93e9025eb..e683f066f82b95a69e878f343a5234af5cd2cb2f 100644
--- a/sky/engine/web/WebViewImpl.cpp
+++ b/sky/engine/web/WebViewImpl.cpp
@@ -50,7 +50,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
-#include "core/html/HTMLLinkElement.h"
+#include "core/html/HTMLImportElement.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/ime/InputMethodContext.h"
#include "core/loader/FrameLoader.h"
@@ -1660,12 +1660,11 @@ WebFrame* WebViewImpl::focusedFrame()
void WebViewImpl::injectModule(const WebString& path)
{
RefPtr<Document> document = m_page->mainFrame()->document();
- RefPtr<HTMLLinkElement> link = HTMLLinkElement::create(*document, false);
- link->setAttribute(HTMLNames::relAttr, "import");
- link->setAttribute(HTMLNames::hrefAttr, path);
+ RefPtr<HTMLImportElement> import = HTMLImportElement::create(*document);
+ import->setAttribute(HTMLNames::srcAttr, path);
if (!document->documentElement())
return;
- document->documentElement()->appendChild(link.release());
+ document->documentElement()->appendChild(import.release());
}
void WebViewImpl::setFocusedFrame(WebFrame* frame)
« no previous file with comments | « sky/engine/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698