| 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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "core/svg/SVGForeignObjectElement.h" | 39 #include "core/svg/SVGForeignObjectElement.h" |
| 40 #include "wtf/text/CString.h" | 40 #include "wtf/text/CString.h" |
| 41 #include "wtf/text/StringBuilder.h" | 41 #include "wtf/text/StringBuilder.h" |
| 42 | 42 |
| 43 using namespace std; | 43 using namespace std; |
| 44 | 44 |
| 45 namespace WebCore { | 45 namespace WebCore { |
| 46 | 46 |
| 47 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data
) | 47 PassRefPtrWillBeRawPtr<Text> Text::create(Document& document, const String& data
) |
| 48 { | 48 { |
| 49 return adoptRefWillBeRefCountedGarbageCollected(new Text(document, data, Cre
ateText)); | 49 return adoptRefWillBeNoop(new Text(document, data, CreateText)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PassRefPtrWillBeRawPtr<Text> Text::createEditingText(Document& document, const S
tring& data) | 52 PassRefPtrWillBeRawPtr<Text> Text::createEditingText(Document& document, const S
tring& data) |
| 53 { | 53 { |
| 54 return adoptRefWillBeRefCountedGarbageCollected(new Text(document, data, Cre
ateEditingText)); | 54 return adoptRefWillBeNoop(new Text(document, data, CreateEditingText)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 PassRefPtrWillBeRawPtr<Node> Text::mergeNextSiblingNodesIfPossible() | 57 PassRefPtrWillBeRawPtr<Node> Text::mergeNextSiblingNodesIfPossible() |
| 58 { | 58 { |
| 59 RefPtrWillBeRawPtr<Node> protect(this); | 59 RefPtrWillBeRawPtr<Node> protect(this); |
| 60 | 60 |
| 61 // Remove empty text nodes. | 61 // Remove empty text nodes. |
| 62 if (!length()) { | 62 if (!length()) { |
| 63 // Care must be taken to get the next node before removing the current n
ode. | 63 // Care must be taken to get the next node before removing the current n
ode. |
| 64 RefPtrWillBeRawPtr<Node> nextNode(NodeTraversal::nextPostOrder(*this)); | 64 RefPtrWillBeRawPtr<Node> nextNode(NodeTraversal::nextPostOrder(*this)); |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 result.appendLiteral("; "); | 370 result.appendLiteral("; "); |
| 371 result.appendLiteral("value="); | 371 result.appendLiteral("value="); |
| 372 result.append(s); | 372 result.append(s); |
| 373 } | 373 } |
| 374 | 374 |
| 375 strncpy(buffer, result.toString().utf8().data(), length - 1); | 375 strncpy(buffer, result.toString().utf8().data(), length - 1); |
| 376 } | 376 } |
| 377 #endif | 377 #endif |
| 378 | 378 |
| 379 } // namespace WebCore | 379 } // namespace WebCore |
| OLD | NEW |