| 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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 565 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 566 { | 566 { |
| 567 if (checkWhetherSelected && !isSelected()) | 567 if (checkWhetherSelected && !isSelected()) |
| 568 return LayoutRect(); | 568 return LayoutRect(); |
| 569 | 569 |
| 570 if (!inlineBoxWrapper()) | 570 if (!inlineBoxWrapper()) |
| 571 // We're a block-level replaced element. Just return our own dimensions
. | 571 // We're a block-level replaced element. Just return our own dimensions
. |
| 572 return LayoutRect(LayoutPoint(), size()); | 572 return LayoutRect(LayoutPoint(), size()); |
| 573 | 573 |
| 574 RootInlineBox* root = inlineBoxWrapper()->root(); | 574 RootInlineBox* root = inlineBoxWrapper()->root(); |
| 575 LayoutUnit newLogicalTop = root->block()->style()->isFlippedBlocksWritingMod
e() ? inlineBoxWrapper()->logicalBottom() - root->selectionBottom() : root->sele
ctionTop() - inlineBoxWrapper()->logicalTop(); | 575 LayoutUnit newLogicalTop = root->block().style()->isFlippedBlocksWritingMode
() ? inlineBoxWrapper()->logicalBottom() - root->selectionBottom() : root->selec
tionTop() - inlineBoxWrapper()->logicalTop(); |
| 576 if (root->block()->style()->isHorizontalWritingMode()) | 576 if (root->block().style()->isHorizontalWritingMode()) |
| 577 return LayoutRect(0, newLogicalTop, width(), root->selectionHeight()); | 577 return LayoutRect(0, newLogicalTop, width(), root->selectionHeight()); |
| 578 return LayoutRect(newLogicalTop, 0, root->selectionHeight(), height()); | 578 return LayoutRect(newLogicalTop, 0, root->selectionHeight(), height()); |
| 579 } | 579 } |
| 580 | 580 |
| 581 void RenderReplaced::setSelectionState(SelectionState state) | 581 void RenderReplaced::setSelectionState(SelectionState state) |
| 582 { | 582 { |
| 583 // The selection state for our containing block hierarchy is updated by the
base class call. | 583 // The selection state for our containing block hierarchy is updated by the
base class call. |
| 584 RenderBox::setSelectionState(state); | 584 RenderBox::setSelectionState(state); |
| 585 | 585 |
| 586 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes()) | 586 if (inlineBoxWrapper() && canUpdateSelectionOnRootLineBoxes()) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 629 |
| 630 if (style()) { | 630 if (style()) { |
| 631 if (v) | 631 if (v) |
| 632 r.inflate(style()->outlineSize()); | 632 r.inflate(style()->outlineSize()); |
| 633 } | 633 } |
| 634 computeRectForRepaint(repaintContainer, r); | 634 computeRectForRepaint(repaintContainer, r); |
| 635 return r; | 635 return r; |
| 636 } | 636 } |
| 637 | 637 |
| 638 } | 638 } |
| OLD | NEW |