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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 340213002: Move addStylesheetByURL from WebFrame to WebLocalFrame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 55a2de14e016a97b880825cff2767081799e7554..0a98edbb582289f0d3b332e9d210c2c71219820f 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1323,17 +1323,6 @@ void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
frame()->inputMethodController().extendSelectionAndDelete(before, after);
}
-void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url)
-{
- RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElement(HTMLNames::linkTag, false);
-
- styleElement->setAttribute(HTMLNames::typeAttr, "text/css");
- styleElement->setAttribute(HTMLNames::relAttr, "stylesheet");
- styleElement->setAttribute(HTMLNames::hrefAttr, url);
-
- frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCEPTION);
-}
-
void WebLocalFrameImpl::setCaretVisible(bool visible)
{
frame()->selection().setCaretVisible(visible);
@@ -1890,6 +1879,17 @@ void WebLocalFrameImpl::loadJavaScriptURL(const KURL& url)
frame()->document()->loader()->replaceDocument(scriptResult, ownerDocument.get());
}
+void WebLocalFrameImpl::addStyleSheetByURL(const WebString& url)
+{
+ RefPtrWillBeRawPtr<Element> styleElement = frame()->document()->createElement(HTMLNames::linkTag, false);
+
+ styleElement->setAttribute(HTMLNames::typeAttr, "text/css");
+ styleElement->setAttribute(HTMLNames::relAttr, "stylesheet");
+ styleElement->setAttribute(HTMLNames::hrefAttr, url);
+
+ frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCEPTION);
+}
+
void WebLocalFrameImpl::willDetachParent()
{
// Do not expect string scoping results from any frames that got detached
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698