| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 x += textIndentOffset; | 812 x += textIndentOffset; |
| 813 break; | 813 break; |
| 814 case AlignCenter: | 814 case AlignCenter: |
| 815 x = (x + maxX) / 2; | 815 x = (x + maxX) / 2; |
| 816 if (currentStyle.isLeftToRightDirection()) | 816 if (currentStyle.isLeftToRightDirection()) |
| 817 x += textIndentOffset / 2; | 817 x += textIndentOffset / 2; |
| 818 else | 818 else |
| 819 x -= textIndentOffset / 2; | 819 x -= textIndentOffset / 2; |
| 820 break; | 820 break; |
| 821 case AlignRight: | 821 case AlignRight: |
| 822 x = maxX - caretWidth; | 822 x = maxX - caretWidth(); |
| 823 if (!currentStyle.isLeftToRightDirection()) | 823 if (!currentStyle.isLeftToRightDirection()) |
| 824 x -= textIndentOffset; | 824 x -= textIndentOffset; |
| 825 break; | 825 break; |
| 826 } | 826 } |
| 827 x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth, 0)); | 827 x = std::min(x, std::max<LayoutUnit>(maxX - caretWidth(), 0)); |
| 828 | 828 |
| 829 LayoutUnit height = style()->fontMetrics().height(); | 829 LayoutUnit height = style()->fontMetrics().height(); |
| 830 LayoutUnit verticalSpace = lineHeight(true, currentStyle.isHorizontalWriting
Mode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes) - height; | 830 LayoutUnit verticalSpace = lineHeight(true, currentStyle.isHorizontalWriting
Mode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes) - height; |
| 831 LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2); | 831 LayoutUnit y = paddingTop() + borderTop() + (verticalSpace / 2); |
| 832 return currentStyle.isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth,
height) : LayoutRect(y, x, height, caretWidth); | 832 return currentStyle.isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth(
), height) : LayoutRect(y, x, height, caretWidth()); |
| 833 } | 833 } |
| 834 | 834 |
| 835 void LayoutBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, Tra
nsformState& transformState) const | 835 void LayoutBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, Tra
nsformState& transformState) const |
| 836 { | 836 { |
| 837 LayoutObject* o = container(); | 837 LayoutObject* o = container(); |
| 838 if (!o) | 838 if (!o) |
| 839 return; | 839 return; |
| 840 | 840 |
| 841 o->mapAbsoluteToLocalPoint(mode, transformState); | 841 o->mapAbsoluteToLocalPoint(mode, transformState); |
| 842 | 842 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 938 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 939 for (LayoutObject* child = startChild; child && child != endChild; ) { | 939 for (LayoutObject* child = startChild; child && child != endChild; ) { |
| 940 // Save our next sibling as moveChildTo will clear it. | 940 // Save our next sibling as moveChildTo will clear it. |
| 941 LayoutObject* nextSibling = child->nextSibling(); | 941 LayoutObject* nextSibling = child->nextSibling(); |
| 942 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 942 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 943 child = nextSibling; | 943 child = nextSibling; |
| 944 } | 944 } |
| 945 } | 945 } |
| 946 | 946 |
| 947 } // namespace blink | 947 } // namespace blink |
| OLD | NEW |