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