| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 return element; | 571 return element; |
| 572 ec = SYNTAX_ERR; | 572 ec = SYNTAX_ERR; |
| 573 return 0; | 573 return 0; |
| 574 } | 574 } |
| 575 | 575 |
| 576 void HTMLElement::insertAdjacentHTML(const String& where, const String& markup,
ExceptionCode& ec) | 576 void HTMLElement::insertAdjacentHTML(const String& where, const String& markup,
ExceptionCode& ec) |
| 577 { | 577 { |
| 578 Element* contextElement = contextElementForInsertion(where, this, ec); | 578 Element* contextElement = contextElementForInsertion(where, this, ec); |
| 579 if (!contextElement) | 579 if (!contextElement) |
| 580 return; | 580 return; |
| 581 RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup,
this, AllowScriptingContent, ec); | 581 RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup,
contextElement, AllowScriptingContent, ec); |
| 582 if (!fragment) | 582 if (!fragment) |
| 583 return; | 583 return; |
| 584 insertAdjacent(where, fragment.get(), ec); | 584 insertAdjacent(where, fragment.get(), ec); |
| 585 } | 585 } |
| 586 | 586 |
| 587 void HTMLElement::insertAdjacentText(const String& where, const String& text, Ex
ceptionCode& ec) | 587 void HTMLElement::insertAdjacentText(const String& where, const String& text, Ex
ceptionCode& ec) |
| 588 { | 588 { |
| 589 RefPtr<Text> textNode = document()->createTextNode(text); | 589 RefPtr<Text> textNode = document()->createTextNode(text); |
| 590 insertAdjacent(where, textNode.get(), ec); | 590 insertAdjacent(where, textNode.get(), ec); |
| 591 } | 591 } |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 #ifndef NDEBUG | 1105 #ifndef NDEBUG |
| 1106 | 1106 |
| 1107 // For use in the debugger | 1107 // For use in the debugger |
| 1108 void dumpInnerHTML(WebCore::HTMLElement*); | 1108 void dumpInnerHTML(WebCore::HTMLElement*); |
| 1109 | 1109 |
| 1110 void dumpInnerHTML(WebCore::HTMLElement* element) | 1110 void dumpInnerHTML(WebCore::HTMLElement* element) |
| 1111 { | 1111 { |
| 1112 printf("%s\n", element->innerHTML().ascii().data()); | 1112 printf("%s\n", element->innerHTML().ascii().data()); |
| 1113 } | 1113 } |
| 1114 #endif | 1114 #endif |
| OLD | NEW |