| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 434 |
| 435 if (node()) { | 435 if (node()) { |
| 436 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) | 436 if (lineDirectionPosition <= logicalLeft() + (logicalWidth() / 2)) |
| 437 return createPositionWithAffinity(0, DOWNSTREAM); | 437 return createPositionWithAffinity(0, DOWNSTREAM); |
| 438 return createPositionWithAffinity(1, DOWNSTREAM); | 438 return createPositionWithAffinity(1, DOWNSTREAM); |
| 439 } | 439 } |
| 440 | 440 |
| 441 return RenderBox::positionForPoint(point); | 441 return RenderBox::positionForPoint(point); |
| 442 } | 442 } |
| 443 | 443 |
| 444 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, bool clipToVisibleContent) | |
| 445 { | |
| 446 ASSERT(!needsLayout()); | |
| 447 | |
| 448 if (!isSelected()) | |
| 449 return LayoutRect(); | |
| 450 | |
| 451 LayoutRect rect = localSelectionRect(); | |
| 452 if (clipToVisibleContent) | |
| 453 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); | |
| 454 else | |
| 455 rect = localToContainerQuad(FloatRect(rect), paintInvalidationContainer)
.enclosingBoundingBox(); | |
| 456 | |
| 457 return rect; | |
| 458 } | |
| 459 | |
| 460 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 444 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 461 { | 445 { |
| 462 if (checkWhetherSelected && !isSelected()) | 446 if (checkWhetherSelected && !isSelected()) |
| 463 return LayoutRect(); | 447 return LayoutRect(); |
| 464 | 448 |
| 465 if (!inlineBoxWrapper()) | 449 if (!inlineBoxWrapper()) |
| 466 // We're a block-level replaced element. Just return our own dimensions
. | 450 // We're a block-level replaced element. Just return our own dimensions
. |
| 467 return LayoutRect(LayoutPoint(), size()); | 451 return LayoutRect(LayoutPoint(), size()); |
| 468 | 452 |
| 469 RootInlineBox& root = inlineBoxWrapper()->root(); | 453 RootInlineBox& root = inlineBoxWrapper()->root(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 500 if (s == SelectionEnd) | 484 if (s == SelectionEnd) |
| 501 return selectionEnd == end; | 485 return selectionEnd == end; |
| 502 if (s == SelectionBoth) | 486 if (s == SelectionBoth) |
| 503 return selectionStart == 0 && selectionEnd == end; | 487 return selectionStart == 0 && selectionEnd == end; |
| 504 | 488 |
| 505 ASSERT(0); | 489 ASSERT(0); |
| 506 return false; | 490 return false; |
| 507 } | 491 } |
| 508 | 492 |
| 509 } | 493 } |
| OLD | NEW |