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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 } 183 }
184 184
185 return state; 185 return state;
186 } 186 }
187 187
188 bool InlineTextBox::hasWrappedSelectionNewline() const 188 bool InlineTextBox::hasWrappedSelectionNewline() const
189 { 189 {
190 SelectionState state = selectionState(); 190 SelectionState state = selectionState();
191 return RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled( ) 191 return RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled( )
192 // TODO(wkorman): Remove horizontal restriction once vertical text is op erational.
193 && isHorizontal()
chrishtr 2015/09/18 21:34:28 Only for left-to-right writing mode. RTL is also b
wkorman 2015/09/18 22:15:11 Done.
192 && (root().lastSelectedBox() == this) 194 && (root().lastSelectedBox() == this)
193 && (state == SelectionStart || state == SelectionInside); 195 && (state == SelectionStart || state == SelectionInside);
194 } 196 }
195 197
196 float InlineTextBox::newlineSpaceWidth() const 198 float InlineTextBox::newlineSpaceWidth() const
197 { 199 {
198 const ComputedStyle& styleToUse = lineLayoutItem().styleRef(isFirstLineStyle ()); 200 const ComputedStyle& styleToUse = lineLayoutItem().styleRef(isFirstLineStyle ());
199 return styleToUse.font().spaceWidth(); 201 return styleToUse.font().spaceWidth();
200 } 202 }
201 203
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( )); 605 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( ));
604 const int layoutObjectCharacterOffset = 75; 606 const int layoutObjectCharacterOffset = 75;
605 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) 607 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++)
606 fputc(' ', stderr); 608 fputc(' ', stderr);
607 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 609 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
608 } 610 }
609 611
610 #endif 612 #endif
611 613
612 } // namespace blink 614 } // namespace blink
OLDNEW
« 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