| 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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 } | 420 } |
| 421 | 421 |
| 422 return value.toString(); | 422 return value.toString(); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void HTMLTextAreaElement::setDefaultValue(const String& defaultValue) | 425 void HTMLTextAreaElement::setDefaultValue(const String& defaultValue) |
| 426 { | 426 { |
| 427 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); | 427 RefPtrWillBeRawPtr<Node> protectFromMutationEvents(this); |
| 428 | 428 |
| 429 // To preserve comments, remove only the text nodes, then add a single text
node. | 429 // To preserve comments, remove only the text nodes, then add a single text
node. |
| 430 WillBeHeapVector<RefPtrWillBeMember<Node> > textNodes; | 430 WillBeHeapVector<RefPtrWillBeMember<Node>> textNodes; |
| 431 for (Node* n = firstChild(); n; n = n->nextSibling()) { | 431 for (Node* n = firstChild(); n; n = n->nextSibling()) { |
| 432 if (n->isTextNode()) | 432 if (n->isTextNode()) |
| 433 textNodes.append(n); | 433 textNodes.append(n); |
| 434 } | 434 } |
| 435 size_t size = textNodes.size(); | 435 size_t size = textNodes.size(); |
| 436 for (size_t i = 0; i < size; ++i) | 436 for (size_t i = 0; i < size; ++i) |
| 437 removeChild(textNodes[i].get(), IGNORE_EXCEPTION); | 437 removeChild(textNodes[i].get(), IGNORE_EXCEPTION); |
| 438 | 438 |
| 439 // Normalize line endings. | 439 // Normalize line endings. |
| 440 String value = defaultValue; | 440 String value = defaultValue; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 { | 626 { |
| 627 return true; | 627 return true; |
| 628 } | 628 } |
| 629 | 629 |
| 630 bool HTMLTextAreaElement::supportsAutofocus() const | 630 bool HTMLTextAreaElement::supportsAutofocus() const |
| 631 { | 631 { |
| 632 return true; | 632 return true; |
| 633 } | 633 } |
| 634 | 634 |
| 635 } | 635 } |
| OLD | NEW |