diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 00:23:34 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 00:23:34 +0000 |
commit | a1f42985d74de36d1fc4fc173b9f2f7da4391d12 (patch) | |
tree | 140ad42c9d736bdd3002fe3df7fe507df63af262 /webkit | |
parent | fc2d3fced2e685464564407b14e57077cad3250e (diff) | |
download | chromium_src-a1f42985d74de36d1fc4fc173b9f2f7da4391d12.zip chromium_src-a1f42985d74de36d1fc4fc173b9f2f7da4391d12.tar.gz chromium_src-a1f42985d74de36d1fc4fc173b9f2f7da4391d12.tar.bz2 |
Revert change 26184, 26181 and 26178 to fix
the compile error on the toolkit builder.
TBR:finnur
Review URL: http://codereview.chromium.org/203064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/api/public/WebFrame.h | 7 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 20 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 3 |
3 files changed, 5 insertions, 25 deletions
diff --git a/webkit/api/public/WebFrame.h b/webkit/api/public/WebFrame.h index b5840ba..50b50b3 100644 --- a/webkit/api/public/WebFrame.h +++ b/webkit/api/public/WebFrame.h @@ -215,11 +215,8 @@ namespace WebKit { // Styling ------------------------------------------------------------- // Insert the given text as a STYLE element at the beginning of the - // document. |elementId| can be empty, but if specified then it is used - // as the id for the newly inserted element (replacing an existing one - // with the same id, if any). - virtual bool insertStyleText(const WebString& styleText, - const WebString& elementId) = 0; + // document. + virtual bool insertStyleText(const WebString&) = 0; // Navigation ---------------------------------------------------------- diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index dfdb7b3..36affe7 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -701,8 +701,7 @@ v8::Local<v8::Context> WebFrameImpl::mainWorldScriptContext() const { } #endif -bool WebFrameImpl::insertStyleText( - const WebString& css, const WebString& id) { +bool WebFrameImpl::insertStyleText(const WebString& css) { Document* document = frame()->document(); if (!document) return false; @@ -710,24 +709,9 @@ bool WebFrameImpl::insertStyleText( if (!document_element) return false; - ExceptionCode err = 0; - - if (!id.isEmpty()) { - WebCore::Element* old_element = - document->getElementById(webkit_glue::WebStringToString(id)); - if (old_element) { - Node* parent = old_element->parent(); - if (!parent) - return false; - parent->removeChild(old_element, err); - } - } - RefPtr<WebCore::Element> stylesheet = document->createElement( WebCore::HTMLNames::styleTag, false); - if (!id.isEmpty()) - stylesheet->setAttribute(WebCore::HTMLNames::idAttr, - webkit_glue::WebStringToString(id)); + ExceptionCode err = 0; stylesheet->setTextContent(webkit_glue::WebStringToString(css), err); DCHECK(!err) << "Failed to set style element content"; WebCore::Node* first = document_element->firstChild(); diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index ea22900..1b5c410 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -107,8 +107,7 @@ class WebFrameImpl : public WebKit::WebFrame, #if WEBKIT_USING_V8 virtual v8::Local<v8::Context> mainWorldScriptContext() const; #endif - virtual bool insertStyleText( - const WebKit::WebString& css, const WebKit::WebString& id); + virtual bool insertStyleText(const WebKit::WebString& style_text); virtual void reload(); virtual void loadRequest(const WebKit::WebURLRequest& request); virtual void loadHistoryItem(const WebKit::WebHistoryItem& history_item); |