| 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 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
| 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 case ETextAlign::kStart: | 787 case ETextAlign::kStart: |
| 788 rightAligned = !cbStyle.isLeftToRightDirection(); | 788 rightAligned = !cbStyle.isLeftToRightDirection(); |
| 789 break; | 789 break; |
| 790 case ETextAlign::kEnd: | 790 case ETextAlign::kEnd: |
| 791 rightAligned = cbStyle.isLeftToRightDirection(); | 791 rightAligned = cbStyle.isLeftToRightDirection(); |
| 792 break; | 792 break; |
| 793 } | 793 } |
| 794 | 794 |
| 795 // for unicode-bidi: plaintext, use inlineBoxBidiLevel() to test the correct | 795 // for unicode-bidi: plaintext, use inlineBoxBidiLevel() to test the correct |
| 796 // direction for the cursor. | 796 // direction for the cursor. |
| 797 if (rightAligned && style()->unicodeBidi() == Plaintext) { | 797 if (rightAligned && style()->unicodeBidi() == EUnicodeBidi::kPlaintext) { |
| 798 if (inlineBox->bidiLevel() % 2 != 1) | 798 if (inlineBox->bidiLevel() % 2 != 1) |
| 799 rightAligned = false; | 799 rightAligned = false; |
| 800 } | 800 } |
| 801 | 801 |
| 802 if (rightAligned) { | 802 if (rightAligned) { |
| 803 left = std::max(left, leftEdge); | 803 left = std::max(left, leftEdge); |
| 804 left = std::min(left, rootRight - caretWidth()); | 804 left = std::min(left, rootRight - caretWidth()); |
| 805 } else { | 805 } else { |
| 806 left = std::min(left, rightEdge - caretWidthRightOfOffset); | 806 left = std::min(left, rightEdge - caretWidthRightOfOffset); |
| 807 left = std::max(left, rootLeft); | 807 left = std::max(left, rootLeft); |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 LayoutRect rect = LayoutRect( | 1993 LayoutRect rect = LayoutRect( |
| 1994 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 1994 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
| 1995 LayoutBlock* block = containingBlock(); | 1995 LayoutBlock* block = containingBlock(); |
| 1996 if (block && hasTextBoxes()) | 1996 if (block && hasTextBoxes()) |
| 1997 block->adjustChildDebugRect(rect); | 1997 block->adjustChildDebugRect(rect); |
| 1998 | 1998 |
| 1999 return rect; | 1999 return rect; |
| 2000 } | 2000 } |
| 2001 | 2001 |
| 2002 } // namespace blink | 2002 } // namespace blink |
| OLD | NEW |