| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 { | 188 { |
| 189 // TODO(wkorman): We shouldn't need layout at this point and it should | 189 // TODO(wkorman): We shouldn't need layout at this point and it should |
| 190 // be enforced by DocumentLifecycle. http://crbug.com/537821 | 190 // be enforced by DocumentLifecycle. http://crbug.com/537821 |
| 191 // Bail out as currently looking up selection state can cause the editing | 191 // Bail out as currently looking up selection state can cause the editing |
| 192 // code can force a re-layout while scrutinizing the editing position, and | 192 // code can force a re-layout while scrutinizing the editing position, and |
| 193 // InlineTextBox instances are not guaranteed to survive a re-layout. | 193 // InlineTextBox instances are not guaranteed to survive a re-layout. |
| 194 if (lineLayoutItem().needsLayout()) | 194 if (lineLayoutItem().needsLayout()) |
| 195 return false; | 195 return false; |
| 196 | 196 |
| 197 SelectionState state = selectionState(); | 197 SelectionState state = selectionState(); |
| 198 return RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled(
) | 198 return (state == SelectionStart || state == SelectionInside) |
| 199 && (state == SelectionStart || state == SelectionInside) | |
| 200 // Checking last leaf child can be slow, so we make sure to do this only | 199 // Checking last leaf child can be slow, so we make sure to do this only |
| 201 // after the other simple conditionals. | 200 // after the other simple conditionals. |
| 202 && (root().lastLeafChild() == this) | 201 && (root().lastLeafChild() == this) |
| 203 // It's possible to have mixed LTR/RTL on a single line, and we only | 202 // It's possible to have mixed LTR/RTL on a single line, and we only |
| 204 // want to paint a newline when we're the last leaf child and we make | 203 // want to paint a newline when we're the last leaf child and we make |
| 205 // sure there isn't a differently-directioned box following us. | 204 // sure there isn't a differently-directioned box following us. |
| 206 && ((!isLeftToRightDirection() && root().firstSelectedBox() == this) | 205 && ((!isLeftToRightDirection() && root().firstSelectedBox() == this) |
| 207 || (isLeftToRightDirection() && root().lastSelectedBox() == this)); | 206 || (isLeftToRightDirection() && root().lastSelectedBox() == this)); |
| 208 } | 207 } |
| 209 | 208 |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); | 626 printedCharacters = fprintf(stderr, "\t%s %p", obj.name(), obj.debugPointer(
)); |
| 628 const int layoutObjectCharacterOffset = 75; | 627 const int layoutObjectCharacterOffset = 75; |
| 629 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) | 628 for (; printedCharacters < layoutObjectCharacterOffset; printedCharacters++) |
| 630 fputc(' ', stderr); | 629 fputc(' ', stderr); |
| 631 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); | 630 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d
ata()); |
| 632 } | 631 } |
| 633 | 632 |
| 634 #endif | 633 #endif |
| 635 | 634 |
| 636 } // namespace blink | 635 } // namespace blink |
| OLD | NEW |