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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1596 if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, ol dPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalida tionState)) | 1596 if (!RenderObject::invalidatePaintIfNeeded(newPaintInvalidationContainer, ol dPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paintInvalida tionState)) |
1597 invalidatePaintForOverflowIfNeeded(); | 1597 invalidatePaintForOverflowIfNeeded(); |
1598 | 1598 |
1599 // Issue paint invalidations for any scrollbars if there is a scrollable are a for this renderer. | 1599 // Issue paint invalidations for any scrollbars if there is a scrollable are a for this renderer. |
1600 if (enclosingLayer()) { | 1600 if (enclosingLayer()) { |
1601 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { | 1601 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { |
1602 if (area->hasVerticalBarDamage()) | 1602 if (area->hasVerticalBarDamage()) |
1603 invalidatePaintRectangle(area->verticalBarDamage()); | 1603 invalidatePaintRectangle(area->verticalBarDamage()); |
1604 if (area->hasHorizontalBarDamage()) | 1604 if (area->hasHorizontalBarDamage()) |
1605 invalidatePaintRectangle(area->horizontalBarDamage()); | 1605 invalidatePaintRectangle(area->horizontalBarDamage()); |
1606 area->resetScrollbarDamage(); | |
1607 } | 1606 } |
1608 } | 1607 } |
1609 } | 1608 } |
1610 | 1609 |
1610 void RenderBox::clearPaintInvalidationState() | |
1611 { | |
1612 RenderBoxModelObject::clearPaintInvalidationState(); | |
1613 | |
1614 if (enclosingLayer()) { | |
Julien - ping for review
2014/08/01 18:13:45
I missed this in our current code: we will end up
Xianzhu
2014/08/01 18:20:01
Thanks for catching this. I think we should use ha
| |
1615 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) | |
1616 area->resetScrollbarDamage(); | |
1617 } | |
1618 } | |
1619 | |
1620 #if ENABLE(ASSERT) | |
1621 bool RenderBox::paintInvalidationStateIsDirty() const | |
1622 { | |
1623 if (enclosingLayer()) { | |
1624 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { | |
1625 if (area->hasVerticalBarDamage() || area->hasHorizontalBarDamage()) | |
1626 return true; | |
1627 } | |
1628 } | |
1629 return RenderBoxModelObject::paintInvalidationStateIsDirty(); | |
1630 } | |
1631 #endif | |
1632 | |
1611 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu latedOffset, ContentsClipBehavior contentsClipBehavior) | 1633 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu latedOffset, ContentsClipBehavior contentsClipBehavior) |
1612 { | 1634 { |
1613 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) | 1635 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) |
1614 return false; | 1636 return false; |
1615 | 1637 |
1616 bool isControlClip = hasControlClip(); | 1638 bool isControlClip = hasControlClip(); |
1617 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); | 1639 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); |
1618 | 1640 |
1619 if (!isControlClip && !isOverflowClip) | 1641 if (!isControlClip && !isOverflowClip) |
1620 return false; | 1642 return false; |
(...skipping 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4679 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4701 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
4680 { | 4702 { |
4681 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4703 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
4682 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4704 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
4683 ASSERT(hasBackground == style.hasBackground()); | 4705 ASSERT(hasBackground == style.hasBackground()); |
4684 hasBorder = style.hasBorder(); | 4706 hasBorder = style.hasBorder(); |
4685 hasAppearance = style.hasAppearance(); | 4707 hasAppearance = style.hasAppearance(); |
4686 } | 4708 } |
4687 | 4709 |
4688 } // namespace blink | 4710 } // namespace blink |
OLD | NEW |