Chromium Code Reviews| Index: Source/core/editing/TextIterator.cpp |
| diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
| index 45a5f213b3a52a91642d61b585c07bc17b29ca7a..f60a7138437db40b16ba4d5849d5a34cb6b2b8b6 100644 |
| --- a/Source/core/editing/TextIterator.cpp |
| +++ b/Source/core/editing/TextIterator.cpp |
| @@ -891,6 +891,11 @@ static bool shouldEmitNewlinesBeforeAndAfterNode(Node& node) |
| || node.hasTagName(ulTag)); |
| } |
| + // Need to make an exception for option and optgroup, because we want to |
| + // keep the legacy behavior before we added renderers to them. |
| + if (isHTMLOptionElement(&node) || isHTMLOptGroupElement(&node)) |
| + return false; |
|
keishi
2014/06/22 11:59:55
select.innerText becomes "\n" unless we do this, i
|
| + |
| // Need to make an exception for table cells, because they are blocks, but we |
| // want them tab-delimited rather than having newlines before and after. |
| if (isTableCell(&node)) |