Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |