| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 438 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 439 { | 439 { |
| 440 if (checkWhetherSelected && !isSelected()) | 440 if (checkWhetherSelected && !isSelected()) |
| 441 return LayoutRect(); | 441 return LayoutRect(); |
| 442 | 442 |
| 443 if (!inlineBoxWrapper()) | 443 if (!inlineBoxWrapper()) |
| 444 // We're a block-level replaced element. Just return our own dimensions
. | 444 // We're a block-level replaced element. Just return our own dimensions
. |
| 445 return LayoutRect(LayoutPoint(), size()); | 445 return LayoutRect(LayoutPoint(), size()); |
| 446 | 446 |
| 447 RootInlineBox& root = inlineBoxWrapper()->root(); | 447 RootInlineBox& root = inlineBoxWrapper()->root(); |
| 448 LayoutUnit newLogicalTop = root.block().style()->isFlippedBlocksWritingMode(
) ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.selectio
nTop() - inlineBoxWrapper()->logicalTop(); | 448 LayoutUnit newLogicalTop = root.block().style()->slowIsFlippedBlocksWritingM
ode() ? inlineBoxWrapper()->logicalBottom() - root.selectionBottom() : root.sele
ctionTop() - inlineBoxWrapper()->logicalTop(); |
| 449 if (root.block().style()->isHorizontalWritingMode()) | 449 if (root.block().style()->isHorizontalWritingMode()) |
| 450 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight()); | 450 return LayoutRect(0, newLogicalTop, width(), root.selectionHeight()); |
| 451 return LayoutRect(newLogicalTop, 0, root.selectionHeight(), height()); | 451 return LayoutRect(newLogicalTop, 0, root.selectionHeight(), height()); |
| 452 } | 452 } |
| 453 | 453 |
| 454 void RenderReplaced::setSelectionState(SelectionState state) | 454 void RenderReplaced::setSelectionState(SelectionState state) |
| 455 { | 455 { |
| 456 // The selection state for our containing block hierarchy is updated by the
base class call. | 456 // The selection state for our containing block hierarchy is updated by the
base class call. |
| 457 RenderBox::setSelectionState(state); | 457 RenderBox::setSelectionState(state); |
| 458 | 458 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 return LayoutRect(); | 496 return LayoutRect(); |
| 497 | 497 |
| 498 // The selectionRect can project outside of the overflowRect, so take their
union | 498 // The selectionRect can project outside of the overflowRect, so take their
union |
| 499 // for paint invalidation to avoid selection painting glitches. | 499 // for paint invalidation to avoid selection painting glitches. |
| 500 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 500 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 501 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | 501 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
| 502 return r; | 502 return r; |
| 503 } | 503 } |
| 504 | 504 |
| 505 } | 505 } |
| OLD | NEW |