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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 485 |
486 if (node()) { | 486 if (node()) { |
487 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) | 487 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) |
488 return createPositionWithAffinity(0, DOWNSTREAM); | 488 return createPositionWithAffinity(0, DOWNSTREAM); |
489 return createPositionWithAffinity(1, DOWNSTREAM); | 489 return createPositionWithAffinity(1, DOWNSTREAM); |
490 } | 490 } |
491 | 491 |
492 return RenderBox::positionForPoint(point); | 492 return RenderBox::positionForPoint(point); |
493 } | 493 } |
494 | 494 |
495 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, bool clipToVisibleContent) | 495 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, bool clipToVisibleContent) const |
496 { | 496 { |
497 ASSERT(!needsLayout()); | 497 ASSERT(!needsLayout()); |
498 | 498 |
499 if (!isSelected()) | 499 if (!isSelected()) |
500 return LayoutRect(); | 500 return LayoutRect(); |
501 | 501 |
502 LayoutRect rect = localSelectionRect(); | 502 LayoutRect rect = localSelectionRect(); |
503 if (clipToVisibleContent) | 503 if (clipToVisibleContent) |
504 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); | 504 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); |
505 else | 505 else |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 paint invalidation 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, paintInvali
dationState); | 574 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali
dationState); |
575 return r; | 575 return r; |
576 } | 576 } |
577 | 577 |
578 } | 578 } |
OLD | NEW |