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

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, 5 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
« no previous file with comments | « Source/core/dom/NodeRenderStyle.h ('k') | Source/core/html/HTMLOptGroupElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 115eaaa5f4954acee9cbae91f9d080c818c22a46..237be633f465f43ffbf38c30fd277f150584de8e 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -905,6 +905,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;
+
// 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))
« no previous file with comments | « Source/core/dom/NodeRenderStyle.h ('k') | Source/core/html/HTMLOptGroupElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698