Chromium Code Reviews| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 430 | 430 |
| 431 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo delObject* paintInvalidationContainer) const | 431 LayoutRect RenderReplaced::selectionRectForPaintInvalidation(const RenderLayerMo delObject* paintInvalidationContainer) const |
| 432 { | 432 { |
| 433 ASSERT(!needsLayout()); | 433 ASSERT(!needsLayout()); |
| 434 | 434 |
| 435 if (!isSelected()) | 435 if (!isSelected()) |
| 436 return LayoutRect(); | 436 return LayoutRect(); |
| 437 | 437 |
| 438 LayoutRect rect = localSelectionRect(); | 438 LayoutRect rect = localSelectionRect(); |
| 439 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); | 439 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); |
| 440 // FIXME: groupedMapping() leaks the squashing abstraction. | |
|
leviw_travelin_and_unemployed
2014/11/12 23:41:43
*sigh*... this continually makes me sad.
chrishtr
2014/11/13 00:22:36
I think you should be able to just call RenderLaye
Julien - ping for review
2014/11/13 01:09:32
This change is a refactoring so it should just mov
| |
| 441 if (paintInvalidationContainer->layer()->groupedMapping()) | |
| 442 RenderLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer , rect); | |
| 440 return rect; | 443 return rect; |
| 441 } | 444 } |
| 442 | 445 |
| 443 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const | 446 LayoutRect RenderReplaced::localSelectionRect(bool checkWhetherSelected) const |
| 444 { | 447 { |
| 445 if (checkWhetherSelected && !isSelected()) | 448 if (checkWhetherSelected && !isSelected()) |
| 446 return LayoutRect(); | 449 return LayoutRect(); |
| 447 | 450 |
| 448 if (!inlineBoxWrapper()) | 451 if (!inlineBoxWrapper()) |
| 449 // We're a block-level replaced element. Just return our own dimensions . | 452 // We're a block-level replaced element. Just return our own dimensions . |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 501 return LayoutRect(); | 504 return LayoutRect(); |
| 502 | 505 |
| 503 // The selectionRect can project outside of the overflowRect, so take their union | 506 // The selectionRect can project outside of the overflowRect, so take their union |
| 504 // for paint invalidation to avoid selection painting glitches. | 507 // for paint invalidation to avoid selection painting glitches. |
| 505 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); | 508 LayoutRect r = isSelected() ? localSelectionRect() : visualOverflowRect(); |
| 506 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState); | 509 mapRectToPaintInvalidationBacking(paintInvalidationContainer, r, paintInvali dationState); |
| 507 return r; | 510 return r; |
| 508 } | 511 } |
| 509 | 512 |
| 510 } | 513 } |
| OLD | NEW |