| 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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 491 } |
| 492 | 492 |
| 493 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer) const | 493 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer) const |
| 494 { | 494 { |
| 495 ASSERT(!needsLayout()); | 495 ASSERT(!needsLayout()); |
| 496 | 496 |
| 497 if (!isSelected()) | 497 if (!isSelected()) |
| 498 return LayoutRect(); | 498 return LayoutRect(); |
| 499 | 499 |
| 500 LayoutRect rect = localSelectionRect(); | 500 LayoutRect rect = localSelectionRect(); |
| 501 return localToContainerQuad(FloatRect(rect), paintInvalidationContainer).enc
losingBoundingBox(); | 501 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); |
| 502 return rect; |
| 502 } | 503 } |
| 503 | 504 |
| 504 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 505 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 505 { | 506 { |
| 506 if (checkWhetherSelected && !isSelected()) | 507 if (checkWhetherSelected && !isSelected()) |
| 507 return LayoutRect(); | 508 return LayoutRect(); |
| 508 | 509 |
| 509 if (!inlineBoxWrapper()) | 510 if (!inlineBoxWrapper()) |
| 510 // We're a block-level replaced element. Just return our own dimensions
. | 511 // We're a block-level replaced element. Just return our own dimensions
. |
| 511 return LayoutRect(LayoutPoint(), size()); | 512 return LayoutRect(LayoutPoint(), size()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 return LayoutRect(); | 563 return LayoutRect(); |
| 563 | 564 |
| 564 // The selectionRect can project outside of the overflowRect, so take their
union | 565 // The selectionRect can project outside of the overflowRect, so take their
union |
| 565 // for paint invalidation to avoid selection painting glitches. | 566 // for paint invalidation to avoid selection painting glitches. |
| 566 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 567 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 567 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | 568 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
| 568 return r; | 569 return r; |
| 569 } | 570 } |
| 570 | 571 |
| 571 } | 572 } |
| OLD | NEW |