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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
376 } | 376 } |
377 HTMLElement::removedFrom(insertionPoint); | 377 HTMLElement::removedFrom(insertionPoint); |
378 } | 378 } |
379 | 379 |
380 String HTMLOptionElement::collectOptionInnerText() const { | 380 String HTMLOptionElement::collectOptionInnerText() const { |
381 StringBuilder text; | 381 StringBuilder text; |
382 for (Node* node = firstChild(); node;) { | 382 for (Node* node = firstChild(); node;) { |
383 if (node->isTextNode()) | 383 if (node->isTextNode()) |
384 text.append(node->nodeValue()); | 384 text.append(node->nodeValue()); |
385 // Text nodes inside script elements are not part of the option text. | 385 // Text nodes inside script elements are not part of the option text. |
386 if (node->isElementNode() && toScriptLoaderIfPossible(toElement(node))) | 386 if (node->isElementNode() && |
387 ScriptLoaderClient::fromElementIfPossible((toElement(node)))) { | |
hiroshige
2017/03/01 00:58:14
The purpose of this code looks like to determining
Nate Chapin
2017/03/01 21:34:59
Done.
| |
387 node = NodeTraversal::nextSkippingChildren(*node, this); | 388 node = NodeTraversal::nextSkippingChildren(*node, this); |
388 else | 389 } else { |
389 node = NodeTraversal::next(*node, this); | 390 node = NodeTraversal::next(*node, this); |
391 } | |
390 } | 392 } |
391 return text.toString(); | 393 return text.toString(); |
392 } | 394 } |
393 | 395 |
394 HTMLFormElement* HTMLOptionElement::form() const { | 396 HTMLFormElement* HTMLOptionElement::form() const { |
395 if (HTMLSelectElement* selectElement = ownerSelectElement()) | 397 if (HTMLSelectElement* selectElement = ownerSelectElement()) |
396 return selectElement->formOwner(); | 398 return selectElement->formOwner(); |
397 | 399 |
398 return nullptr; | 400 return nullptr; |
399 } | 401 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
438 } | 440 } |
439 | 441 |
440 String HTMLOptionElement::innerText() { | 442 String HTMLOptionElement::innerText() { |
441 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but | 443 // A workaround for crbug.com/424578. We add ShadowRoot to an OPTION, but |
442 // innerText behavior for Shadow DOM is unclear. We just return the same | 444 // innerText behavior for Shadow DOM is unclear. We just return the same |
443 // string before adding ShadowRoot. | 445 // string before adding ShadowRoot. |
444 return textContent(); | 446 return textContent(); |
445 } | 447 } |
446 | 448 |
447 } // namespace blink | 449 } // namespace blink |
OLD | NEW |