| 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 } | 427 } |
| 428 | 428 |
| 429 LayoutRect LayoutReplaced::selectionRectForPaintInvalidation(const LayoutBoxMode
lObject* paintInvalidationContainer) const | 429 LayoutRect LayoutReplaced::selectionRectForPaintInvalidation(const LayoutBoxMode
lObject* paintInvalidationContainer) const |
| 430 { | 430 { |
| 431 ASSERT(!needsLayout()); | 431 ASSERT(!needsLayout()); |
| 432 | 432 |
| 433 LayoutRect rect = localSelectionRect(); | 433 LayoutRect rect = localSelectionRect(); |
| 434 if (rect.isEmpty()) | 434 if (rect.isEmpty()) |
| 435 return rect; | 435 return rect; |
| 436 | 436 |
| 437 mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, 0); | 437 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, 0); |
| 438 // FIXME: groupedMapping() leaks the squashing abstraction. | 438 // FIXME: groupedMapping() leaks the squashing abstraction. |
| 439 if (paintInvalidationContainer->layer()->groupedMapping()) | 439 if (paintInvalidationContainer->layer()->groupedMapping()) |
| 440 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); | 440 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); |
| 441 return rect; | 441 return rect; |
| 442 } | 442 } |
| 443 | 443 |
| 444 LayoutRect LayoutReplaced::localSelectionRect() const | 444 LayoutRect LayoutReplaced::localSelectionRect() const |
| 445 { | 445 { |
| 446 if (selectionState() == SelectionNone) | 446 if (selectionState() == SelectionNone) |
| 447 return LayoutRect(); | 447 return LayoutRect(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 469 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the | 469 // We only include the space below the baseline in our layer's cached paint
invalidation rect if the |
| 470 // image is selected. Since the selection state has changed update the rect. | 470 // image is selected. Since the selection state has changed update the rect. |
| 471 if (hasLayer()) | 471 if (hasLayer()) |
| 472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); | 472 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(containe
rForPaintInvalidation())); |
| 473 | 473 |
| 474 if (canUpdateSelectionOnRootLineBoxes()) | 474 if (canUpdateSelectionOnRootLineBoxes()) |
| 475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); | 475 inlineBoxWrapper()->root().setHasSelectedChildren(state != SelectionNone
); |
| 476 } | 476 } |
| 477 | 477 |
| 478 } | 478 } |
| OLD | NEW |