OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1420 if (fullInvalidationReason == PaintInvalidationDelayedFull) { | 1420 if (fullInvalidationReason == PaintInvalidationDelayedFull) { |
1421 if (!intersectsVisibleViewport()) | 1421 if (!intersectsVisibleViewport()) |
1422 return PaintInvalidationDelayedFull; | 1422 return PaintInvalidationDelayedFull; |
1423 | 1423 |
1424 // Reset state back to regular full paint invalidation if the object is
onscreen. | 1424 // Reset state back to regular full paint invalidation if the object is
onscreen. |
1425 setShouldDoFullPaintInvalidation(PaintInvalidationFull); | 1425 setShouldDoFullPaintInvalidation(PaintInvalidationFull); |
1426 } | 1426 } |
1427 | 1427 |
1428 PaintInvalidationReason reason = LayoutBoxModelObject::invalidatePaintIfNeed
ed(paintInvalidationState, newPaintInvalidationContainer); | 1428 PaintInvalidationReason reason = LayoutBoxModelObject::invalidatePaintIfNeed
ed(paintInvalidationState, newPaintInvalidationContainer); |
1429 | 1429 |
1430 // If we are set to do a full paint invalidation that means the LayoutView w
ill be | 1430 bool willDoFullInvalidation = view()->doingFullPaintInvalidation() || isFull
PaintInvalidationReason(reason); |
1431 // issue paint invalidations. We can then skip issuing of paint invalidation
s for the child | 1431 if (!willDoFullInvalidation) |
1432 // layoutObjects as they'll be covered by the LayoutView. | |
1433 if (!view()->doingFullPaintInvalidation() && !isFullPaintInvalidationReason(
reason)) { | |
1434 invalidatePaintForOverflowIfNeeded(); | 1432 invalidatePaintForOverflowIfNeeded(); |
1435 | 1433 |
1436 // Issue paint invalidations for any scrollbars if there is a scrollable
area for this layoutObject. | 1434 // Issue paint invalidations for any scrollbars if there is a scrollable are
a for this layoutObject. |
1437 if (ScrollableArea* area = scrollableArea()) { | 1435 if (ScrollableArea* area = scrollableArea()) { |
1438 // In slimming paint mode, we already invalidated the display item c
lients of the scrollbars | 1436 if (area->hasVerticalBarDamage()) { |
1439 // during PaintLayerScrollableArea::invalidateScrollbarRect(). Howev
er, for now we still need to | 1437 if (!willDoFullInvalidation) |
1440 // invalidate the rectangles to trigger repaints. | |
1441 if (area->hasVerticalBarDamage()) | |
1442 invalidatePaintRectangleNotInvalidatingDisplayItemClients(Layout
Rect(area->verticalBarDamage())); | 1438 invalidatePaintRectangleNotInvalidatingDisplayItemClients(Layout
Rect(area->verticalBarDamage())); |
1443 if (area->hasHorizontalBarDamage()) | 1439 // TODO(wangxianzhu): Pass current bounds of the scrollbar to PaintC
ontroller. crbug.com/547119. |
| 1440 if (Scrollbar* verticalScrollbar = area->verticalScrollbar()) |
| 1441 invalidateDisplayItemClient(*verticalScrollbar); |
| 1442 } |
| 1443 if (area->hasHorizontalBarDamage()) { |
| 1444 if (!willDoFullInvalidation) |
1444 invalidatePaintRectangleNotInvalidatingDisplayItemClients(Layout
Rect(area->horizontalBarDamage())); | 1445 invalidatePaintRectangleNotInvalidatingDisplayItemClients(Layout
Rect(area->horizontalBarDamage())); |
| 1446 // TODO(wangxianzhu): Pass current bounds of the scrollbar to PaintC
ontroller. crbug.com/547119. |
| 1447 if (Scrollbar* horizontalScrollbar = area->horizontalScrollbar()) |
| 1448 invalidateDisplayItemClient(*horizontalScrollbar); |
1445 } | 1449 } |
1446 } | 1450 } |
1447 | 1451 |
1448 // This is for the next invalidatePaintIfNeeded so must be at the end. | 1452 // This is for the next invalidatePaintIfNeeded so must be at the end. |
1449 savePreviousBoxSizesIfNeeded(); | 1453 savePreviousBoxSizesIfNeeded(); |
1450 return reason; | 1454 return reason; |
1451 } | 1455 } |
1452 | 1456 |
1453 void LayoutBox::clearPaintInvalidationState(const PaintInvalidationState& paintI
nvalidationState) | 1457 void LayoutBox::clearPaintInvalidationState(const PaintInvalidationState& paintI
nvalidationState) |
1454 { | 1458 { |
(...skipping 3381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4836 StyleImage* borderImage = style()->borderImage().image(); | 4840 StyleImage* borderImage = style()->borderImage().image(); |
4837 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); | 4841 return borderImage && borderImage->canRender(*this, style()->effectiveZoom()
) && borderImage->isLoaded(); |
4838 } | 4842 } |
4839 | 4843 |
4840 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const | 4844 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const |
4841 { | 4845 { |
4842 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; | 4846 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this)
: nullptr; |
4843 } | 4847 } |
4844 | 4848 |
4845 } // namespace blink | 4849 } // namespace blink |
OLD | NEW |