| 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 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. | 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * | 24 * |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/html/HTMLOptionElement.h" | 28 #include "core/html/HTMLOptionElement.h" |
| 29 | 29 |
| 30 #include "HTMLNames.h" | 30 #include "HTMLNames.h" |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/dom/NodeRenderStyle.h" | 32 #include "core/dom/NodeRenderStyle.h" |
| 33 #include "core/dom/NodeTraversal.h" | 33 #include "core/dom/NodeTraversal.h" |
| 34 #include "core/dom/ScriptElement.h" | 34 #include "core/dom/ScriptLoader.h" |
| 35 #include "core/dom/Text.h" | 35 #include "core/dom/Text.h" |
| 36 #include "core/html/HTMLDataListElement.h" | 36 #include "core/html/HTMLDataListElement.h" |
| 37 #include "core/html/HTMLSelectElement.h" | 37 #include "core/html/HTMLSelectElement.h" |
| 38 #include "core/html/parser/HTMLParserIdioms.h" | 38 #include "core/html/parser/HTMLParserIdioms.h" |
| 39 #include "core/rendering/RenderTheme.h" | 39 #include "core/rendering/RenderTheme.h" |
| 40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
| 41 #include "wtf/text/StringBuilder.h" | 41 #include "wtf/text/StringBuilder.h" |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 return HTMLElement::insertedInto(insertionPoint); | 363 return HTMLElement::insertedInto(insertionPoint); |
| 364 } | 364 } |
| 365 | 365 |
| 366 String HTMLOptionElement::collectOptionInnerText() const | 366 String HTMLOptionElement::collectOptionInnerText() const |
| 367 { | 367 { |
| 368 StringBuilder text; | 368 StringBuilder text; |
| 369 for (Node* node = firstChild(); node; ) { | 369 for (Node* node = firstChild(); node; ) { |
| 370 if (node->isTextNode()) | 370 if (node->isTextNode()) |
| 371 text.append(node->nodeValue()); | 371 text.append(node->nodeValue()); |
| 372 // Text nodes inside script elements are not part of the option text. | 372 // Text nodes inside script elements are not part of the option text. |
| 373 if (node->isElementNode() && toScriptElementIfPossible(toElement(node))) | 373 if (node->isElementNode() && toScriptLoaderIfPossible(toElement(node))) |
| 374 node = NodeTraversal::nextSkippingChildren(node, this); | 374 node = NodeTraversal::nextSkippingChildren(node, this); |
| 375 else | 375 else |
| 376 node = NodeTraversal::next(node, this); | 376 node = NodeTraversal::next(node, this); |
| 377 } | 377 } |
| 378 return text.toString(); | 378 return text.toString(); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace WebCore | 381 } // namespace WebCore |
| OLD | NEW |