| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 486 |
| 487 if (node()) { | 487 if (node()) { |
| 488 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) | 488 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) |
| 489 return createPositionWithAffinity(0, DOWNSTREAM); | 489 return createPositionWithAffinity(0, DOWNSTREAM); |
| 490 return createPositionWithAffinity(1, DOWNSTREAM); | 490 return createPositionWithAffinity(1, DOWNSTREAM); |
| 491 } | 491 } |
| 492 | 492 |
| 493 return RenderBox::positionForPoint(point); | 493 return RenderBox::positionForPoint(point); |
| 494 } | 494 } |
| 495 | 495 |
| 496 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, bool clipToVisibleContent) const | 496 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer) const |
| 497 { | 497 { |
| 498 ASSERT(!needsLayout()); | 498 ASSERT(!needsLayout()); |
| 499 | 499 |
| 500 if (!isSelected()) | 500 if (!isSelected()) |
| 501 return LayoutRect(); | 501 return LayoutRect(); |
| 502 | 502 |
| 503 LayoutRect rect = localSelectionRect(); | 503 LayoutRect rect = localSelectionRect(); |
| 504 if (clipToVisibleContent) | 504 return localToContainerQuad(FloatRect(rect), paintInvalidationContainer).enc
losingBoundingBox(); |
| 505 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); | |
| 506 else | |
| 507 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer)
.enclosingBoundingBox(); | |
| 508 | |
| 509 return rect; | |
| 510 } | 505 } |
| 511 | 506 |
| 512 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 507 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 513 { | 508 { |
| 514 if (checkWhetherSelected && !isSelected()) | 509 if (checkWhetherSelected && !isSelected()) |
| 515 return LayoutRect(); | 510 return LayoutRect(); |
| 516 | 511 |
| 517 if (!inlineBoxWrapper()) | 512 if (!inlineBoxWrapper()) |
| 518 // We're a block-level replaced element. Just return our own dimensions
. | 513 // We're a block-level replaced element. Just return our own dimensions
. |
| 519 return LayoutRect(LayoutPoint(), size()); | 514 return LayoutRect(LayoutPoint(), size()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return LayoutRect(); | 565 return LayoutRect(); |
| 571 | 566 |
| 572 // The selectionRect can project outside of the overflowRect, so take their
union | 567 // The selectionRect can project outside of the overflowRect, so take their
union |
| 573 // for paint invalidation to avoid selection painting glitches. | 568 // for paint invalidation to avoid selection painting glitches. |
| 574 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 569 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 575 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); | 570 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
| 576 return r; | 571 return r; |
| 577 } | 572 } |
| 578 | 573 |
| 579 } | 574 } |
| OLD | NEW |