| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 if (parentNode()) | 129 if (parentNode()) |
| 130 document().didSplitTextNode(*this); | 130 document().didSplitTextNode(*this); |
| 131 | 131 |
| 132 return newText.release(); | 132 return newText.release(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 static const Text* earliestLogicallyAdjacentTextNode(const Text* t) | 135 static const Text* earliestLogicallyAdjacentTextNode(const Text* t) |
| 136 { | 136 { |
| 137 for (const Node* n = t->previousSibling(); n; n = n->previousSibling()) { | 137 for (const Node* n = t->previousSibling(); n; n = n->previousSibling()) { |
| 138 Node::NodeType type = n->nodeType(); | 138 Node::NodeType type = n->nodeType(); |
| 139 if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) { | 139 if (type == Node::TEXT_NODE) { |
| 140 t = toText(n); | 140 t = toText(n); |
| 141 continue; | 141 continue; |
| 142 } | 142 } |
| 143 | 143 |
| 144 break; | 144 break; |
| 145 } | 145 } |
| 146 return t; | 146 return t; |
| 147 } | 147 } |
| 148 | 148 |
| 149 static const Text* latestLogicallyAdjacentTextNode(const Text* t) | 149 static const Text* latestLogicallyAdjacentTextNode(const Text* t) |
| 150 { | 150 { |
| 151 for (const Node* n = t->nextSibling(); n; n = n->nextSibling()) { | 151 for (const Node* n = t->nextSibling(); n; n = n->nextSibling()) { |
| 152 Node::NodeType type = n->nodeType(); | 152 Node::NodeType type = n->nodeType(); |
| 153 if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) { | 153 if (type == Node::TEXT_NODE) { |
| 154 t = toText(n); | 154 t = toText(n); |
| 155 continue; | 155 continue; |
| 156 } | 156 } |
| 157 | 157 |
| 158 break; | 158 break; |
| 159 } | 159 } |
| 160 return t; | 160 return t; |
| 161 } | 161 } |
| 162 | 162 |
| 163 String Text::wholeText() const | 163 String Text::wholeText() const |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 result.appendLiteral("; "); | 422 result.appendLiteral("; "); |
| 423 result.appendLiteral("value="); | 423 result.appendLiteral("value="); |
| 424 result.append(s); | 424 result.append(s); |
| 425 } | 425 } |
| 426 | 426 |
| 427 strncpy(buffer, result.toString().utf8().data(), length - 1); | 427 strncpy(buffer, result.toString().utf8().data(), length - 1); |
| 428 } | 428 } |
| 429 #endif | 429 #endif |
| 430 | 430 |
| 431 } // namespace blink | 431 } // namespace blink |
| OLD | NEW |