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 * (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 (hasLayer()) { |
|
Julien - ping for review
2014/08/01 19:05:02
Better even:
if (RenderLayer* layer = this->layer(
Xianzhu
2014/08/01 22:07:23
Just found we already have RenderLayerModelObject:
| |
| 1601 if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea() ) { | 1601 if (RenderLayerScrollableArea* area = layer()->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 (hasLayer()) { | |
|
Julien - ping for review
2014/08/01 19:05:02
Ditto.
Xianzhu
2014/08/01 22:07:23
Done.
| |
| 1615 if (RenderLayerScrollableArea* area = layer()->scrollableArea()) | |
| 1616 area->resetScrollbarDamage(); | |
| 1617 } | |
| 1618 } | |
| 1619 | |
| 1620 #if ENABLE(ASSERT) | |
| 1621 bool RenderBox::paintInvalidationStateIsDirty() const | |
| 1622 { | |
| 1623 if (hasLayer()) { | |
|
Julien - ping for review
2014/08/01 19:05:02
Ditto.
Xianzhu
2014/08/01 22:07:23
Done.
| |
| 1624 if (RenderLayerScrollableArea* area = layer()->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 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4706 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4728 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 4707 { | 4729 { |
| 4708 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4730 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
| 4709 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4731 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 4710 ASSERT(hasBackground == style.hasBackground()); | 4732 ASSERT(hasBackground == style.hasBackground()); |
| 4711 hasBorder = style.hasBorder(); | 4733 hasBorder = style.hasBorder(); |
| 4712 hasAppearance = style.hasAppearance(); | 4734 hasAppearance = style.hasAppearance(); |
| 4713 } | 4735 } |
| 4714 | 4736 |
| 4715 } // namespace blink | 4737 } // namespace blink |
| OLD | NEW |