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

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: 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 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 and RTL restrictions once operationa l.
193 && isHorizontal()
194 && isLeftToRightDirection()
192 && (root().lastSelectedBox() == this) 195 && (root().lastSelectedBox() == this)
193 && (state == SelectionStart || state == SelectionInside); 196 && (state == SelectionStart || state == SelectionInside);
194 } 197 }
195 198
196 float InlineTextBox::newlineSpaceWidth() const 199 float InlineTextBox::newlineSpaceWidth() const
197 { 200 {
198 const ComputedStyle& styleToUse = lineLayoutItem().styleRef(isFirstLineStyle ()); 201 const ComputedStyle& styleToUse = lineLayoutItem().styleRef(isFirstLineStyle ());
199 return styleToUse.font().spaceWidth(); 202 return styleToUse.font().spaceWidth();
200 } 203 }
201 204
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( )); 606 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer( ));
604 const int layoutObjectCharacterOffset = 75; 607 const int layoutObjectCharacterOffset = 75;
605 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) 608 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++)
606 fputc(' ', stderr); 609 fputc(' ', stderr);
607 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 610 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
608 } 611 }
609 612
610 #endif 613 #endif
611 614
612 } // namespace blink 615 } // 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