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. | 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 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1728 Element& element = toElement(*node()); | 1728 Element& element = toElement(*node()); |
| 1729 element.setNeedsResizeObserverUpdate(); | 1729 element.setNeedsResizeObserverUpdate(); |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { | 1732 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { |
| 1733 if (shouldClipOverflow()) { | 1733 if (shouldClipOverflow()) { |
| 1734 // The overflow clip paint property depends on the border box rect through | 1734 // The overflow clip paint property depends on the border box rect through |
| 1735 // overflowClipRect(). The border box rect's size equals the frame rect's | 1735 // overflowClipRect(). The border box rect's size equals the frame rect's |
| 1736 // size so we trigger a paint property update when the frame rect changes. | 1736 // size so we trigger a paint property update when the frame rect changes. |
| 1737 setNeedsPaintPropertyUpdate(); | 1737 setNeedsPaintPropertyUpdate(); |
| 1738 } else if (hasClip()) { | |
|
chrishtr
2017/02/28 00:11:18
Is this needed for clip-path as well?
Xianzhu
2017/02/28 00:17:20
We seem not to support clip-path in paint property
trchen
2017/02/28 00:43:28
Thanks for the heads up! Yea, I think this will be
| |
| 1739 // The used value of CSS clip may depend on size of the box, e.g. for | |
| 1740 // clip: rect(auto auto auto -5px). | |
| 1741 setNeedsPaintPropertyUpdate(); | |
| 1738 } else if (styleRef().hasTransform() || styleRef().hasPerspective()) { | 1742 } else if (styleRef().hasTransform() || styleRef().hasPerspective()) { |
| 1739 // Relative lengths (e.g., percentage values) in transform, perspective, | 1743 // Relative lengths (e.g., percentage values) in transform, perspective, |
| 1740 // transform-origin, and perspective-origin can depend on the size of the | 1744 // transform-origin, and perspective-origin can depend on the size of the |
| 1741 // frame rect, so force a property update if it changes. | 1745 // frame rect, so force a property update if it changes. |
| 1742 // TODO(pdr): We only need to update properties if there are relative | 1746 // TODO(pdr): We only need to update properties if there are relative |
| 1743 // lengths. | 1747 // lengths. |
| 1744 setNeedsPaintPropertyUpdate(); | 1748 setNeedsPaintPropertyUpdate(); |
| 1745 } | 1749 } |
| 1746 } | 1750 } |
| 1747 } | 1751 } |
| (...skipping 3982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5730 | 5734 |
| 5731 void LayoutBox::MutableForPainting:: | 5735 void LayoutBox::MutableForPainting:: |
| 5732 savePreviousContentBoxSizeAndLayoutOverflowRect() { | 5736 savePreviousContentBoxSizeAndLayoutOverflowRect() { |
| 5733 auto& rareData = layoutBox().ensureRareData(); | 5737 auto& rareData = layoutBox().ensureRareData(); |
| 5734 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; | 5738 rareData.m_hasPreviousContentBoxSizeAndLayoutOverflowRect = true; |
| 5735 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); | 5739 rareData.m_previousContentBoxSize = layoutBox().contentBoxRect().size(); |
| 5736 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); | 5740 rareData.m_previousLayoutOverflowRect = layoutBox().layoutOverflowRect(); |
| 5737 } | 5741 } |
| 5738 | 5742 |
| 5739 } // namespace blink | 5743 } // namespace blink |
| OLD | NEW |