Chromium Code Reviews| Index: Source/core/html/HTMLElement.cpp |
| diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp |
| index 1423b5c665a8c4d2c8c4dd5474f33554c50ef157..a18fd136bcf16191d07374dc01c0f9b5df18e8a7 100644 |
| --- a/Source/core/html/HTMLElement.cpp |
| +++ b/Source/core/html/HTMLElement.cpp |
| @@ -317,64 +317,6 @@ void HTMLElement::parseAttribute(const QualifiedName& name, const AtomicString& |
| } |
| } |
| -String HTMLElement::innerHTML() const |
| -{ |
| - return createMarkup(this, ChildrenOnly); |
| -} |
| - |
| -String HTMLElement::outerHTML() const |
| -{ |
| - return createMarkup(this); |
| -} |
| - |
| -void HTMLElement::setInnerHTML(const String& html, ExceptionState& es) |
| -{ |
| - if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, this, AllowScriptingContent, "innerHTML", es)) { |
| - ContainerNode* container = this; |
| - if (hasLocalName(templateTag)) |
| - container = toHTMLTemplateElement(this)->content(); |
|
abarth-chromium
2013/10/29 04:04:42
This check used to be ok because we already knew t
|
| - replaceChildrenWithFragment(container, fragment.release(), es); |
| - } |
| -} |
| - |
| -static void mergeWithNextTextNode(PassRefPtr<Node> node, ExceptionState& es) |
| -{ |
| - ASSERT(node && node->isTextNode()); |
| - Node* next = node->nextSibling(); |
| - if (!next || !next->isTextNode()) |
| - return; |
| - |
| - RefPtr<Text> textNode = toText(node.get()); |
| - RefPtr<Text> textNext = toText(next); |
| - textNode->appendData(textNext->data()); |
| - if (textNext->parentNode()) // Might have been removed by mutation event. |
| - textNext->remove(es); |
| -} |
| - |
| -void HTMLElement::setOuterHTML(const String& html, ExceptionState& es) |
| -{ |
| - Node* p = parentNode(); |
| - if (!p || !p->isHTMLElement()) { |
| - es.throwUninformativeAndGenericDOMException(NoModificationAllowedError); |
| - return; |
| - } |
| - RefPtr<HTMLElement> parent = toHTMLElement(p); |
| - RefPtr<Node> prev = previousSibling(); |
| - RefPtr<Node> next = nextSibling(); |
| - |
| - RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, parent.get(), AllowScriptingContent, "outerHTML", es); |
| - if (es.hadException()) |
| - return; |
| - |
| - parent->replaceChild(fragment.release(), this, es); |
| - RefPtr<Node> node = next ? next->previousSibling() : 0; |
| - if (!es.hadException() && node && node->isTextNode()) |
| - mergeWithNextTextNode(node.release(), es); |
| - |
| - if (!es.hadException() && prev && prev->isTextNode()) |
| - mergeWithNextTextNode(prev.release(), es); |
| -} |
| - |
| PassRefPtr<DocumentFragment> HTMLElement::textToFragment(const String& text, ExceptionState& es) |
| { |
| RefPtr<DocumentFragment> fragment = DocumentFragment::create(document()); |