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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1562 RenderObject::invalidateTreeIfNeeded(childTreeWalkState); | 1562 RenderObject::invalidateTreeIfNeeded(childTreeWalkState); |
1563 } | 1563 } |
1564 | 1564 |
1565 void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval idationState, const RenderLayerModelObject& newPaintInvalidationContainer) | 1565 void RenderBox::invalidatePaintIfNeeded(const PaintInvalidationState& paintInval idationState, const RenderLayerModelObject& newPaintInvalidationContainer) |
1566 { | 1566 { |
1567 const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); | 1567 const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); |
1568 const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositi onFromPaintInvalidationContainer(); | 1568 const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositi onFromPaintInvalidationContainer(); |
1569 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInv alidationContainer, &paintInvalidationState)); | 1569 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInv alidationContainer, &paintInvalidationState)); |
1570 setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromP aintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidati onState)); | 1570 setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromP aintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidati onState)); |
1571 | 1571 |
1572 // Issue paint invalidations for any scrollbars if there is a scrollable are a for this renderer. | |
1573 if (enclosingLayer()) { | |
1574 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { | |
1575 if (!view()->doingFullRepaint()) { | |
dsinclair
2014/07/22 19:55:22
This is really confusing. I wonder if the resetScr
Xianzhu
2014/07/23 00:18:13
Done.
| |
1576 if (area->hasVerticalBarDamage()) | |
1577 invalidatePaintRectangle(area->verticalBarDamage()); | |
1578 if (area->hasHorizontalBarDamage()) | |
1579 invalidatePaintRectangle(area->horizontalBarDamage()); | |
1580 } | |
1581 area->resetScrollbarDamage(); | |
1582 } | |
1583 } | |
1584 | |
1572 // If we are set to do a full paint invalidation that means the RenderView w ill be | 1585 // If we are set to do a full paint invalidation that means the RenderView w ill be |
1573 // issue paint invalidations. We can then skip issuing of paint invalidation s for the child | 1586 // issue paint invalidations. We can then skip issuing of paint invalidation s for the child |
1574 // renderers as they'll be covered by the RenderView. | 1587 // renderers as they'll be covered by the RenderView. |
1575 if (view()->doingFullRepaint()) | 1588 if (view()->doingFullRepaint()) |
1576 return; | 1589 return; |
1577 | 1590 |
1578 if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsInt oOwnBacking) | 1591 if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsInt oOwnBacking) |
1579 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() | 1592 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
1580 && hasLayer() | 1593 && hasLayer() |
1581 && layer()->isSelfPaintingLayer())) { | 1594 && layer()->isSelfPaintingLayer())) { |
1582 setShouldDoFullPaintInvalidation(true); | 1595 setShouldDoFullPaintInvalidation(true); |
1583 } | 1596 } |
1584 | 1597 |
1585 if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, ol dPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalida tionState)) | 1598 if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, ol dPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalida tionState)) |
1586 invalidatePaintForOverflowIfNeeded(); | 1599 invalidatePaintForOverflowIfNeeded(); |
1587 | 1600 |
1588 // Issue paint invalidations for any scrollbars if there is a scrollable are a for this renderer. | |
1589 if (enclosingLayer()) { | |
1590 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { | |
1591 if (area->hasVerticalBarDamage()) | |
1592 invalidatePaintRectangle(area->verticalBarDamage()); | |
1593 if (area->hasHorizontalBarDamage()) | |
1594 invalidatePaintRectangle(area->horizontalBarDamage()); | |
1595 area->resetScrollbarDamage(); | |
1596 } | |
1597 } | |
1598 } | 1601 } |
1599 | 1602 |
1600 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu latedOffset, ContentsClipBehavior contentsClipBehavior) | 1603 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu latedOffset, ContentsClipBehavior contentsClipBehavior) |
1601 { | 1604 { |
1602 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) | 1605 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) |
1603 return false; | 1606 return false; |
1604 | 1607 |
1605 bool isControlClip = hasControlClip(); | 1608 bool isControlClip = hasControlClip(); |
1606 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); | 1609 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); |
1607 | 1610 |
(...skipping 3057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4665 | 4668 |
4666 // We need the old border box size only when the box has background or b ox decorations. | 4669 // We need the old border box size only when the box has background or b ox decorations. |
4667 if (!style()->hasBackground() && !style()->hasBoxDecorations()) | 4670 if (!style()->hasBackground() && !style()->hasBoxDecorations()) |
4668 return; | 4671 return; |
4669 } | 4672 } |
4670 | 4673 |
4671 ensureRareData().m_previousBorderBoxSize = size(); | 4674 ensureRareData().m_previousBorderBoxSize = size(); |
4672 } | 4675 } |
4673 | 4676 |
4674 } // namespace blink | 4677 } // namespace blink |
OLD | NEW |