2008-09-04 Tor Arne Vestbø <tavestbo@trolltech.com>
[WebKit-https.git] / WebCore / page / qt / FrameQt.cpp
index 560fd5bde73dee538af87a2884fc4937935ad521..1bbbff50c1572e81062c9821161414523f9d133d 100644 (file)
@@ -23,6 +23,8 @@
 
 #include "config.h"
 #include "Frame.h"
+#include "FramePrivate.h"
+#include "UserStyleSheetLoader.h"
 
 namespace WebCore {
 
@@ -30,6 +32,22 @@ DragImageRef Frame::dragImageForSelection()
 {
     return 0;
 }
-    
+
+void Frame::setUserStyleSheetLocation(const KURL& url)
+{
+    delete d->m_userStyleSheetLoader;
+    d->m_userStyleSheetLoader = 0;
+    if (d->m_doc && d->m_doc->docLoader())
+        d->m_userStyleSheetLoader = new UserStyleSheetLoader(d->m_doc, url.string());
+}
+
+void Frame::setUserStyleSheet(const String& styleSheet)
+{
+    delete d->m_userStyleSheetLoader;
+    d->m_userStyleSheetLoader = 0;
+    if (d->m_doc)
+        d->m_doc->setUserStyleSheet(styleSheet);
+}
+
 }
 // vim: ts=4 sw=4 et