| 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. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 | 1639 |
| 1640 void LayoutBox::imageChanged(WrappedImagePtr image, const IntRect*) { | 1640 void LayoutBox::imageChanged(WrappedImagePtr image, const IntRect*) { |
| 1641 // TODO(chrishtr): support PaintInvalidationDelayedFull for animated border | 1641 // TODO(chrishtr): support PaintInvalidationDelayedFull for animated border |
| 1642 // images. | 1642 // images. |
| 1643 if ((styleRef().borderImage().image() && | 1643 if ((styleRef().borderImage().image() && |
| 1644 styleRef().borderImage().image()->data() == image) || | 1644 styleRef().borderImage().image()->data() == image) || |
| 1645 (styleRef().maskBoxImage().image() && | 1645 (styleRef().maskBoxImage().image() && |
| 1646 styleRef().maskBoxImage().image()->data() == image) || | 1646 styleRef().maskBoxImage().image()->data() == image) || |
| 1647 (styleRef().boxReflect() && styleRef().boxReflect()->mask().image() && | 1647 (styleRef().boxReflect() && styleRef().boxReflect()->mask().image() && |
| 1648 styleRef().boxReflect()->mask().image()->data() == image)) { | 1648 styleRef().boxReflect()->mask().image()->data() == image)) { |
| 1649 setShouldDoFullPaintInvalidationWithoutGeometryChange(); | 1649 setShouldDoFullPaintInvalidation(); |
| 1650 } else { | 1650 } else { |
| 1651 for (const FillLayer* layer = &styleRef().maskLayers(); layer; | 1651 for (const FillLayer* layer = &styleRef().maskLayers(); layer; |
| 1652 layer = layer->next()) { | 1652 layer = layer->next()) { |
| 1653 if (layer->image() && image == layer->image()->data()) { | 1653 if (layer->image() && image == layer->image()->data()) { |
| 1654 setShouldDoFullPaintInvalidationWithoutGeometryChange(); | 1654 setShouldDoFullPaintInvalidation(); |
| 1655 break; | 1655 break; |
| 1656 } | 1656 } |
| 1657 } | 1657 } |
| 1658 } | 1658 } |
| 1659 | 1659 |
| 1660 if (!isDocumentElement() && !backgroundStolenForBeingBody()) { | 1660 if (!isDocumentElement() && !backgroundStolenForBeingBody()) { |
| 1661 for (const FillLayer* layer = &styleRef().backgroundLayers(); layer; | 1661 for (const FillLayer* layer = &styleRef().backgroundLayers(); layer; |
| 1662 layer = layer->next()) { | 1662 layer = layer->next()) { |
| 1663 if (layer->image() && image == layer->image()->data()) { | 1663 if (layer->image() && image == layer->image()->data()) { |
| 1664 invalidateBackgroundObscurationStatus(); | 1664 invalidateBackgroundObscurationStatus(); |
| 1665 bool maybeAnimated = | 1665 bool maybeAnimated = |
| 1666 layer->image()->cachedImage() && | 1666 layer->image()->cachedImage() && |
| 1667 layer->image()->cachedImage()->getImage() && | 1667 layer->image()->cachedImage()->getImage() && |
| 1668 layer->image()->cachedImage()->getImage()->maybeAnimated(); | 1668 layer->image()->cachedImage()->getImage()->maybeAnimated(); |
| 1669 if (maybeAnimated) { | 1669 if (maybeAnimated) { |
| 1670 setMayNeedPaintInvalidationAnimatedBackgroundImage(); | 1670 setMayNeedPaintInvalidationAnimatedBackgroundImage(); |
| 1671 } else { | 1671 } else { |
| 1672 setShouldDoFullPaintInvalidationWithoutGeometryChange(); | 1672 setShouldDoFullPaintInvalidation(); |
| 1673 setBackgroundChangedSinceLastPaintInvalidation(); | 1673 setBackgroundChangedSinceLastPaintInvalidation(); |
| 1674 } | 1674 } |
| 1675 break; | 1675 break; |
| 1676 } | 1676 } |
| 1677 } | 1677 } |
| 1678 } | 1678 } |
| 1679 | 1679 |
| 1680 ShapeValue* shapeOutsideValue = style()->shapeOutside(); | 1680 ShapeValue* shapeOutsideValue = style()->shapeOutside(); |
| 1681 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue && | 1681 if (!frameView()->isInPerformLayout() && isFloating() && shapeOutsideValue && |
| 1682 shapeOutsideValue->image() && | 1682 shapeOutsideValue->image() && |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 ->view(); | 1743 ->view(); |
| 1744 mapToVisualRectInAncestorSpace(layoutView, rect); | 1744 mapToVisualRectInAncestorSpace(layoutView, rect); |
| 1745 return rect.intersects(LayoutRect( | 1745 return rect.intersects(LayoutRect( |
| 1746 layoutView->frameView()->getScrollableArea()->visibleContentRect())); | 1746 layoutView->frameView()->getScrollableArea()->visibleContentRect())); |
| 1747 } | 1747 } |
| 1748 | 1748 |
| 1749 void LayoutBox::ensureIsReadyForPaintInvalidation() { | 1749 void LayoutBox::ensureIsReadyForPaintInvalidation() { |
| 1750 LayoutBoxModelObject::ensureIsReadyForPaintInvalidation(); | 1750 LayoutBoxModelObject::ensureIsReadyForPaintInvalidation(); |
| 1751 | 1751 |
| 1752 if (mayNeedPaintInvalidationAnimatedBackgroundImage() && | 1752 if (mayNeedPaintInvalidationAnimatedBackgroundImage() && |
| 1753 !backgroundIsKnownToBeObscured()) { | 1753 !backgroundIsKnownToBeObscured()) |
| 1754 setShouldDoFullPaintInvalidationWithoutGeometryChange( | 1754 setShouldDoFullPaintInvalidation(PaintInvalidationDelayedFull); |
| 1755 PaintInvalidationDelayedFull); | |
| 1756 } | |
| 1757 | 1755 |
| 1758 if (fullPaintInvalidationReason() != PaintInvalidationDelayedFull || | 1756 if (fullPaintInvalidationReason() != PaintInvalidationDelayedFull || |
| 1759 !intersectsVisibleViewport()) | 1757 !intersectsVisibleViewport()) |
| 1760 return; | 1758 return; |
| 1761 | 1759 |
| 1762 // Do regular full paint invalidation if the object with | 1760 // Do regular full paint invalidation if the object with |
| 1763 // PaintInvalidationDelayedFull is onscreen. | 1761 // PaintInvalidationDelayedFull is onscreen. |
| 1764 if (intersectsVisibleViewport()) { | 1762 if (intersectsVisibleViewport()) { |
| 1765 // Conservatively assume the delayed paint invalidation was caused by | 1763 // Conservatively assume the delayed paint invalidation was caused by |
| 1766 // background image change. | 1764 // background image change. |
| 1767 setBackgroundChangedSinceLastPaintInvalidation(); | 1765 setBackgroundChangedSinceLastPaintInvalidation(); |
| 1768 setShouldDoFullPaintInvalidationWithoutGeometryChange( | 1766 setShouldDoFullPaintInvalidation(PaintInvalidationFull); |
| 1769 PaintInvalidationFull); | |
| 1770 } | 1767 } |
| 1771 } | 1768 } |
| 1772 | 1769 |
| 1773 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded( | 1770 PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded( |
| 1774 const PaintInvalidationState& paintInvalidationState) { | 1771 const PaintInvalidationState& paintInvalidationState) { |
| 1775 if (hasBoxDecorationBackground() | 1772 if (hasBoxDecorationBackground() |
| 1776 // We also paint overflow controls in background phase. | 1773 // We also paint overflow controls in background phase. |
| 1777 || (hasOverflowClip() && getScrollableArea()->hasOverflowControls())) { | 1774 || (hasOverflowClip() && getScrollableArea()->hasOverflowControls())) { |
| 1778 PaintLayer& layer = paintInvalidationState.paintingLayer(); | 1775 PaintLayer& layer = paintInvalidationState.paintingLayer(); |
| 1779 if (&layer.layoutObject() != this) | 1776 if (&layer.layoutObject() != this) |
| (...skipping 3973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5753 | 5750 |
| 5754 void LayoutBox::MutableForPainting:: | 5751 void LayoutBox::MutableForPainting:: |
| 5755 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5752 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5756 auto& rareData = layoutBox().ensureRareData(); | 5753 auto& rareData = layoutBox().ensureRareData(); |
| 5757 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5754 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5758 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5755 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5759 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5756 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5760 } | 5757 } |
| 5761 | 5758 |
| 5762 } // namespace blink | 5759 } // namespace blink |
| OLD | NEW |