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/glue/webframe_impl.cc | |
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/glue/webframe_impl.cc')
-rw-r--r-- | webkit/glue/webframe_impl.cc | 20 |
1 files changed, 2 insertions, 18 deletions
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(); |