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

Unified Diff: Source/core/layout/line/InlineTextBox.cpp

Issue 1355913004: Disable newline selection highlighting for vertical and RTL text. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@474759_invalidate_br_and_horiz_only
Patch Set: Merge changes. Created 5 years, 3 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/layout/line/InlineTextBox.cpp
diff --git a/Source/core/layout/line/InlineTextBox.cpp b/Source/core/layout/line/InlineTextBox.cpp
index 72aa246d7db6e70a1b19d03c0b2e407ea6a7243e..6982a9762753cb380e7fa9ec1e1b7ac70e1b7430 100644
--- a/Source/core/layout/line/InlineTextBox.cpp
+++ b/Source/core/layout/line/InlineTextBox.cpp
@@ -189,6 +189,9 @@ bool InlineTextBox::hasWrappedSelectionNewline() const
{
SelectionState state = selectionState();
return RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()
+ // TODO(wkorman): Remove horizontal and RTL restrictions once operational.
+ && isHorizontal()
+ && isLeftToRightDirection()
&& (root().lastSelectedBox() == this)
&& (state == SelectionStart || state == SelectionInside);
}
« no previous file with comments | « LayoutTests/paint/selection/text-selection-newline-vertical.html ('k') | Source/core/paint/InlineTextBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698