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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 RefPtr<Node> node = next ? next->previousSibling() : 0; | 364 RefPtr<Node> node = next ? next->previousSibling() : 0; |
365 if (!es.hadException() && node && node->isTextNode()) | 365 if (!es.hadException() && node && node->isTextNode()) |
366 mergeWithNextTextNode(node.release(), es); | 366 mergeWithNextTextNode(node.release(), es); |
367 | 367 |
368 if (!es.hadException() && prev && prev->isTextNode()) | 368 if (!es.hadException() && prev && prev->isTextNode()) |
369 mergeWithNextTextNode(prev.release(), es); | 369 mergeWithNextTextNode(prev.release(), es); |
370 } | 370 } |
371 | 371 |
372 PassRefPtr<DocumentFragment> HTMLElement::textToFragment(const String& text, Exc
eptionState& es) | 372 PassRefPtr<DocumentFragment> HTMLElement::textToFragment(const String& text, Exc
eptionState& es) |
373 { | 373 { |
374 RefPtr<DocumentFragment> fragment = DocumentFragment::create(&document()); | 374 RefPtr<DocumentFragment> fragment = DocumentFragment::create(document()); |
375 unsigned int i, length = text.length(); | 375 unsigned int i, length = text.length(); |
376 UChar c = 0; | 376 UChar c = 0; |
377 for (unsigned int start = 0; start < length; ) { | 377 for (unsigned int start = 0; start < length; ) { |
378 | 378 |
379 // Find next line break. | 379 // Find next line break. |
380 for (i = start; i < length; i++) { | 380 for (i = start; i < length; i++) { |
381 c = text[i]; | 381 c = text[i]; |
382 if (c == '\r' || c == '\n') | 382 if (c == '\r' || c == '\n') |
383 break; | 383 break; |
384 } | 384 } |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 #ifndef NDEBUG | 1102 #ifndef NDEBUG |
1103 | 1103 |
1104 // For use in the debugger | 1104 // For use in the debugger |
1105 void dumpInnerHTML(WebCore::HTMLElement*); | 1105 void dumpInnerHTML(WebCore::HTMLElement*); |
1106 | 1106 |
1107 void dumpInnerHTML(WebCore::HTMLElement* element) | 1107 void dumpInnerHTML(WebCore::HTMLElement* element) |
1108 { | 1108 { |
1109 printf("%s\n", element->innerHTML().ascii().data()); | 1109 printf("%s\n", element->innerHTML().ascii().data()); |
1110 } | 1110 } |
1111 #endif | 1111 #endif |
OLD | NEW |