Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Unified Diff: Source/core/editing/TextIterator.cpp

Issue 347773002: Implement select listbox using shadow DOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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))

Powered by Google App Engine
This is Rietveld 408576698