| 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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1494 if (curLayer->image() && image == curLayer->image()->data() && curLayer-
>image()->canRender(*this, style()->effectiveZoom())) { | 1494 if (curLayer->image() && image == curLayer->image()->data() && curLayer-
>image()->canRender(*this, style()->effectiveZoom())) { |
| 1495 layerRenderer->setShouldDoFullPaintInvalidation(true); | 1495 layerRenderer->setShouldDoFullPaintInvalidation(true); |
| 1496 return true; | 1496 return true; |
| 1497 } | 1497 } |
| 1498 } | 1498 } |
| 1499 return false; | 1499 return false; |
| 1500 } | 1500 } |
| 1501 | 1501 |
| 1502 InvalidationReason RenderBox::invalidatePaintIfNeeded(const PaintInvalidationSta
te& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationCo
ntainer) | 1502 InvalidationReason RenderBox::invalidatePaintIfNeeded(const PaintInvalidationSta
te& paintInvalidationState, const RenderLayerModelObject& newPaintInvalidationCo
ntainer) |
| 1503 { | 1503 { |
| 1504 const LayoutRect oldPaintInvalidationRect = previousPaintInvalidationRect(); | |
| 1505 const LayoutPoint oldPositionFromPaintInvalidationContainer = previousPositi
onFromPaintInvalidationContainer(); | |
| 1506 setPreviousPaintInvalidationRect(boundsRectForPaintInvalidation(&newPaintInv
alidationContainer, &paintInvalidationState)); | |
| 1507 setPreviousPositionFromPaintInvalidationContainer(RenderLayer::positionFromP
aintInvalidationContainer(this, &newPaintInvalidationContainer, &paintInvalidati
onState)); | |
| 1508 | |
| 1509 InvalidationReason reason = InvalidationNone; | |
| 1510 | |
| 1511 // If we are set to do a full paint invalidation that means the RenderView w
ill be | 1504 // If we are set to do a full paint invalidation that means the RenderView w
ill be |
| 1512 // issue paint invalidations. We can then skip issuing of paint invalidation
s for the child | 1505 // issue paint invalidations. We can then skip issuing of paint invalidation
s for the child |
| 1513 // renderers as they'll be covered by the RenderView. | 1506 // renderers as they'll be covered by the RenderView. |
| 1514 if (!view()->doingFullPaintInvalidation()) { | 1507 if (!view()->doingFullPaintInvalidation()) { |
| 1515 if ((onlyNeededPositionedMovementLayout() && compositingState() != Paint
sIntoOwnBacking) | 1508 if ((onlyNeededPositionedMovementLayout() && compositingState() != Paint
sIntoOwnBacking) |
| 1516 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() | 1509 || (shouldDoFullPaintInvalidationIfSelfPaintingLayer() |
| 1517 && hasLayer() | 1510 && hasLayer() |
| 1518 && layer()->isSelfPaintingLayer())) { | 1511 && layer()->isSelfPaintingLayer())) { |
| 1519 setShouldDoFullPaintInvalidation(true, MarkOnlyThis); | 1512 setShouldDoFullPaintInvalidation(true, MarkOnlyThis); |
| 1520 } | 1513 } |
| 1514 } |
| 1521 | 1515 |
| 1522 reason = RenderObject::invalidatePaintIfNeeded(newPaintInvalidationConta
iner, oldPaintInvalidationRect, oldPositionFromPaintInvalidationContainer, paint
InvalidationState); | 1516 InvalidationReason reason = RenderBoxModelObject::invalidatePaintIfNeeded(pa
intInvalidationState, newPaintInvalidationContainer); |
| 1517 |
| 1518 if (!view()->doingFullPaintInvalidation()) { |
| 1523 if (reason == InvalidationNone || reason == InvalidationIncremental) | 1519 if (reason == InvalidationNone || reason == InvalidationIncremental) |
| 1524 invalidatePaintForOverflowIfNeeded(); | 1520 invalidatePaintForOverflowIfNeeded(); |
| 1525 | 1521 |
| 1526 // Issue paint invalidations for any scrollbars if there is a scrollable
area for this renderer. | 1522 // Issue paint invalidations for any scrollbars if there is a scrollable
area for this renderer. |
| 1527 if (ScrollableArea* area = scrollableArea()) { | 1523 if (ScrollableArea* area = scrollableArea()) { |
| 1528 if (area->hasVerticalBarDamage()) | 1524 if (area->hasVerticalBarDamage()) |
| 1529 invalidatePaintRectangle(area->verticalBarDamage()); | 1525 invalidatePaintRectangle(area->verticalBarDamage()); |
| 1530 if (area->hasHorizontalBarDamage()) | 1526 if (area->hasHorizontalBarDamage()) |
| 1531 invalidatePaintRectangle(area->horizontalBarDamage()); | 1527 invalidatePaintRectangle(area->horizontalBarDamage()); |
| 1532 } | 1528 } |
| (...skipping 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4735 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 4731 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 4736 { | 4732 { |
| 4737 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); | 4733 backgroundColor = style.visitedDependentColor(CSSPropertyBackgroundColor); |
| 4738 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 4734 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 4739 ASSERT(hasBackground == style.hasBackground()); | 4735 ASSERT(hasBackground == style.hasBackground()); |
| 4740 hasBorder = style.hasBorder(); | 4736 hasBorder = style.hasBorder(); |
| 4741 hasAppearance = style.hasAppearance(); | 4737 hasAppearance = style.hasAppearance(); |
| 4742 } | 4738 } |
| 4743 | 4739 |
| 4744 } // namespace blink | 4740 } // namespace blink |
| OLD | NEW |