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

Unified Diff: Source/core/paint/InlineTextBoxPainter.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
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/InlineTextBoxPainter.cpp
diff --git a/Source/core/paint/InlineTextBoxPainter.cpp b/Source/core/paint/InlineTextBoxPainter.cpp
index 7a30e8d931ece2f37b4ec446d42c8b5d6c7ab52a..808b98ff2acbecea5203c4944b08016e569bb28c 100644
--- a/Source/core/paint/InlineTextBoxPainter.cpp
+++ b/Source/core/paint/InlineTextBoxPainter.cpp
@@ -253,7 +253,10 @@ bool InlineTextBoxPainter::shouldPaintTextBox(const PaintInfo& paintInfo)
// This code path is only called in PaintPhaseForeground whereas we would
// expect PaintPhaseSelection. The existing haveSelection logic in paint()
// tests for != PaintPhaseTextClip.
- bool paintLineBreaks = RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled();
+ bool paintLineBreaks = RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled()
+ // TODO(wkorman): Remove horizontal and RTL restrictions once operational.
+ && m_inlineTextBox.isHorizontal()
+ && m_inlineTextBox.isLeftToRightDirection();
if ((!paintLineBreaks && m_inlineTextBox.isLineBreak())
|| !paintInfo.shouldPaintWithinRoot(&m_inlineTextBox.layoutObject())
|| m_inlineTextBox.layoutObject().style()->visibility() != VISIBLE
« no previous file with comments | « Source/core/layout/line/InlineTextBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698