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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() | 1590 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
1591 && hasLayer() | 1591 && hasLayer() |
1592 && layer()->isSelfPaintingLayer())) { | 1592 && layer()->isSelfPaintingLayer())) { |
1593 setShouldDoFullPaintInvalidation(true, MarkOnlyThis); | 1593 setShouldDoFullPaintInvalidation(true, MarkOnlyThis); |
1594 } | 1594 } |
1595 | 1595 |
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 (ScrollableArea* area = scrollableArea()) { |
1601 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()
) { | 1601 if (area->hasVerticalBarDamage()) |
1602 if (area->hasVerticalBarDamage()) | 1602 invalidatePaintRectangle(area->verticalBarDamage()); |
1603 invalidatePaintRectangle(area->verticalBarDamage()); | 1603 if (area->hasHorizontalBarDamage()) |
1604 if (area->hasHorizontalBarDamage()) | 1604 invalidatePaintRectangle(area->horizontalBarDamage()); |
1605 invalidatePaintRectangle(area->horizontalBarDamage()); | |
1606 area->resetScrollbarDamage(); | |
1607 } | |
1608 } | 1605 } |
1609 } | 1606 } |
1610 | 1607 |
| 1608 void RenderBox::clearPaintInvalidationState() |
| 1609 { |
| 1610 RenderBoxModelObject::clearPaintInvalidationState(); |
| 1611 |
| 1612 if (ScrollableArea* area = scrollableArea()) |
| 1613 area->resetScrollbarDamage(); |
| 1614 } |
| 1615 |
| 1616 #if ENABLE(ASSERT) |
| 1617 bool RenderBox::paintInvalidationStateIsDirty() const |
| 1618 { |
| 1619 if (ScrollableArea* area = scrollableArea()) { |
| 1620 if (area->hasVerticalBarDamage() || area->hasHorizontalBarDamage()) |
| 1621 return true; |
| 1622 } |
| 1623 return RenderBoxModelObject::paintInvalidationStateIsDirty(); |
| 1624 } |
| 1625 #endif |
| 1626 |
1611 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu
latedOffset, ContentsClipBehavior contentsClipBehavior) | 1627 bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumu
latedOffset, ContentsClipBehavior contentsClipBehavior) |
1612 { | 1628 { |
1613 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint
PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) | 1629 if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == Paint
PhaseSelfOutline || paintInfo.phase == PaintPhaseMask) |
1614 return false; | 1630 return false; |
1615 | 1631 |
1616 bool isControlClip = hasControlClip(); | 1632 bool isControlClip = hasControlClip(); |
1617 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); | 1633 bool isOverflowClip = hasOverflowClip() && !layer()->isSelfPaintingLayer(); |
1618 | 1634 |
1619 if (!isControlClip && !isOverflowClip) | 1635 if (!isControlClip && !isOverflowClip) |
1620 return false; | 1636 return false; |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4706 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4722 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
4707 { | 4723 { |
4708 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4724 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
4709 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4725 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
4710 ASSERT(hasBackground == style.hasBackground()); | 4726 ASSERT(hasBackground == style.hasBackground()); |
4711 hasBorder = style.hasBorder(); | 4727 hasBorder = style.hasBorder(); |
4712 hasAppearance = style.hasAppearance(); | 4728 hasAppearance = style.hasAppearance(); |
4713 } | 4729 } |
4714 | 4730 |
4715 } // namespace blink | 4731 } // namespace blink |
OLD | NEW |