| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 } | 525 } |
| 526 | 526 |
| 527 void RenderReplaced::setSelectionState(SelectionState state) | 527 void RenderReplaced::setSelectionState(SelectionState state) |
| 528 { | 528 { |
| 529 // The selection state for our containing block hierarchy is updated by the
base class call. | 529 // The selection state for our containing block hierarchy is updated by the
base class call. |
| 530 RenderBox::setSelectionState(state); | 530 RenderBox::setSelectionState(state); |
| 531 | 531 |
| 532 if (!inlineBoxWrapper()) | 532 if (!inlineBoxWrapper()) |
| 533 return; | 533 return; |
| 534 | 534 |
| 535 // We only include the space below the baseline in our layer's cached repain
t rect if the | 535 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
| 536 // image is selected. Since the selection state has changed update the rect. | 536 // image is selected. Since the selection state has changed update the rect. |
| 537 if (hasLayer()) | 537 if (hasLayer()) |
| 538 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 538 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
| 539 | 539 |
| 540 if (canUpdateSelectionOnRootLineBoxes()) | 540 if (canUpdateSelectionOnRootLineBoxes()) |
| 541 inlineBoxWrapper()->root().setHasSelectedChildren(isSelected()); | 541 inlineBoxWrapper()->root().setHasSelectedChildren(isSelected()); |
| 542 } | 542 } |
| 543 | 543 |
| 544 bool RenderReplaced::isSelected() const | 544 bool RenderReplaced::isSelected() const |
| 545 { | 545 { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 562 | 562 |
| 563 ASSERT(0); | 563 ASSERT(0); |
| 564 return false; | 564 return false; |
| 565 } | 565 } |
| 566 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const | 566 LayoutRect RenderReplaced::clippedOverflowRectForPaintInvalidation(const RenderL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const |
| 567 { | 567 { |
| 568 if (style()->visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent
()) | 568 if (style()->visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent
()) |
| 569 return LayoutRect(); | 569 return LayoutRect(); |
| 570 | 570 |
| 571 // The selectionRect can project outside of the overflowRect, so take their
union | 571 // The selectionRect can project outside of the overflowRect, so take their
union |
| 572 // for repainting to avoid selection painting glitches. | 572 // for paint invalidation to avoid selection painting glitches. |
| 573 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 573 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 574 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, false /* fi
xed */, paintInvalidationState); | 574 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, false /* fi
xed */, paintInvalidationState); |
| 575 return r; | 575 return r; |
| 576 } | 576 } |
| 577 | 577 |
| 578 } | 578 } |
| OLD | NEW |