| 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 LayoutBlock* cb = containingBlock(); | 756 LayoutBlock* cb = containingBlock(); |
| 757 const ComputedStyle& cbStyle = cb->styleRef(); | 757 const ComputedStyle& cbStyle = cb->styleRef(); |
| 758 | 758 |
| 759 LayoutUnit leftEdge; | 759 LayoutUnit leftEdge; |
| 760 LayoutUnit rightEdge; | 760 LayoutUnit rightEdge; |
| 761 leftEdge = std::min(LayoutUnit(), rootLeft); | 761 leftEdge = std::min(LayoutUnit(), rootLeft); |
| 762 rightEdge = std::max(cb->logicalWidth(), rootRight); | 762 rightEdge = std::max(cb->logicalWidth(), rootRight); |
| 763 | 763 |
| 764 bool rightAligned = false; | 764 bool rightAligned = false; |
| 765 switch (cbStyle.textAlign()) { | 765 switch (cbStyle.textAlign()) { |
| 766 case RIGHT: | 766 case ETextAlign::Right: |
| 767 case WEBKIT_RIGHT: | 767 case ETextAlign::WebkitRight: |
| 768 rightAligned = true; | 768 rightAligned = true; |
| 769 break; | 769 break; |
| 770 case LEFT: | 770 case ETextAlign::Left: |
| 771 case WEBKIT_LEFT: | 771 case ETextAlign::WebkitLeft: |
| 772 case CENTER: | 772 case ETextAlign::Center: |
| 773 case WEBKIT_CENTER: | 773 case ETextAlign::WebkitCenter: |
| 774 break; | 774 break; |
| 775 case JUSTIFY: | 775 case ETextAlign::Justify: |
| 776 case TASTART: | 776 case ETextAlign::Start: |
| 777 rightAligned = !cbStyle.isLeftToRightDirection(); | 777 rightAligned = !cbStyle.isLeftToRightDirection(); |
| 778 break; | 778 break; |
| 779 case TAEND: | 779 case ETextAlign::End: |
| 780 rightAligned = cbStyle.isLeftToRightDirection(); | 780 rightAligned = cbStyle.isLeftToRightDirection(); |
| 781 break; | 781 break; |
| 782 } | 782 } |
| 783 | 783 |
| 784 // for unicode-bidi: plaintext, use inlineBoxBidiLevel() to test the correct | 784 // for unicode-bidi: plaintext, use inlineBoxBidiLevel() to test the correct |
| 785 // direction for the cursor. | 785 // direction for the cursor. |
| 786 if (rightAligned && style()->unicodeBidi() == Plaintext) { | 786 if (rightAligned && style()->unicodeBidi() == Plaintext) { |
| 787 if (inlineBox->bidiLevel() % 2 != 1) | 787 if (inlineBox->bidiLevel() % 2 != 1) |
| 788 rightAligned = false; | 788 rightAligned = false; |
| 789 } | 789 } |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1973 LayoutRect rect = LayoutRect( | 1973 LayoutRect rect = LayoutRect( |
| 1974 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); | 1974 IntRect(firstRunX(), firstRunY(), linesBox.width(), linesBox.height())); |
| 1975 LayoutBlock* block = containingBlock(); | 1975 LayoutBlock* block = containingBlock(); |
| 1976 if (block && hasTextBoxes()) | 1976 if (block && hasTextBoxes()) |
| 1977 block->adjustChildDebugRect(rect); | 1977 block->adjustChildDebugRect(rect); |
| 1978 | 1978 |
| 1979 return rect; | 1979 return rect; |
| 1980 } | 1980 } |
| 1981 | 1981 |
| 1982 } // namespace blink | 1982 } // namespace blink |
| OLD | NEW |