| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) | 3 * Copyright (C) 2000 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 | 719 |
| 720 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0); | 720 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0); |
| 721 // FIXME: groupedMapping() leaks the squashing abstraction. | 721 // FIXME: groupedMapping() leaks the squashing abstraction. |
| 722 if (paintInvalidationContainer->layer()->groupedMapping()) | 722 if (paintInvalidationContainer->layer()->groupedMapping()) |
| 723 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); | 723 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); |
| 724 return rect; | 724 return rect; |
| 725 } | 725 } |
| 726 | 726 |
| 727 LayoutRect LayoutReplaced::localSelectionRect() const | 727 LayoutRect LayoutReplaced::localSelectionRect() const |
| 728 { | 728 { |
| 729 if (selectionState() == SelectionNone) | 729 if (getSelectionState() == SelectionNone) |
| 730 return LayoutRect(); | 730 return LayoutRect(); |
| 731 | 731 |
| 732 if (!inlineBoxWrapper()) { | 732 if (!inlineBoxWrapper()) { |
| 733 // We're a block-level replaced element. Just return our own dimensions
. | 733 // We're a block-level replaced element. Just return our own dimensions
. |
| 734 return LayoutRect(LayoutPoint(), size()); | 734 return LayoutRect(LayoutPoint(), size()); |
| 735 } | 735 } |
| 736 | 736 |
| 737 RootInlineBox& root = inlineBoxWrapper()->root(); | 737 RootInlineBox& root = inlineBoxWrapper()->root(); |
| 738 LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode(
) ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectio
nTop() - inlineBoxWrapper()->logicalTop(); | 738 LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode(
) ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectio
nTop() - inlineBoxWrapper()->logicalTop(); |
| 739 if (root.block().style()->isHorizontalWritingMode()) | 739 if (root.block().style()->isHorizontalWritingMode()) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 752 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the | 752 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
| 753 // image is selected. Since the selection state has changed update the rect. | 753 // image is selected. Since the selection state has changed update the rect. |
| 754 if (hasLayer()) | 754 if (hasLayer()) |
| 755 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 755 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
| 756 | 756 |
| 757 if (canUpdateSelectionOnRootLineBoxes()) | 757 if (canUpdateSelectionOnRootLineBoxes()) |
| 758 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 758 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
| 759 } | 759 } |
| 760 | 760 |
| 761 } // namespace blink | 761 } // namespace blink |
| OLD | NEW |