| 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 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 } | 867 } |
| 868 | 868 |
| 869 void RenderBox::applyCachedClipAndScrollOffsetForPaintInvalidation(LayoutRect& p
aintRect) const | 869 void RenderBox::applyCachedClipAndScrollOffsetForPaintInvalidation(LayoutRect& p
aintRect) const |
| 870 { | 870 { |
| 871 ASSERT(hasLayer()); | 871 ASSERT(hasLayer()); |
| 872 ASSERT(hasOverflowClip()); | 872 ASSERT(hasOverflowClip()); |
| 873 | 873 |
| 874 flipForWritingMode(paintRect); | 874 flipForWritingMode(paintRect); |
| 875 paintRect.move(-scrolledContentOffset()); // For overflow:auto/scroll/hidden
. | 875 paintRect.move(-scrolledContentOffset()); // For overflow:auto/scroll/hidden
. |
| 876 | 876 |
| 877 // Do not clip scroll layer contents to reduce the number of paint invalidat
ions while scrolling. | 877 // Do not clip scroll layer contents because the compositor expects the whol
e layer |
| 878 // to be always invalidated in-time. |
| 878 if (usesCompositedScrolling()) { | 879 if (usesCompositedScrolling()) { |
| 879 flipForWritingMode(paintRect); | 880 flipForWritingMode(paintRect); |
| 880 return; | 881 return; |
| 881 } | 882 } |
| 882 | 883 |
| 883 // height() is inaccurate if we're in the middle of a layout of this RenderB
ox, so use the | 884 // height() is inaccurate if we're in the middle of a layout of this RenderB
ox, so use the |
| 884 // layer's size instead. Even if the layer's size is wrong, the layer itself
will issue paint invalidations | 885 // layer's size instead. Even if the layer's size is wrong, the layer itself
will issue paint invalidations |
| 885 // anyway if its size does change. | 886 // anyway if its size does change. |
| 886 LayoutRect clipRect(LayoutPoint(), layer()->size()); | 887 LayoutRect clipRect(LayoutPoint(), layer()->size()); |
| 887 paintRect = intersection(paintRect, clipRect); | 888 paintRect = intersection(paintRect, clipRect); |
| (...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4520 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); | 4521 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); |
| 4521 | 4522 |
| 4522 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) | 4523 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) |
| 4523 return m_rareData->m_previousBorderBoxSize; | 4524 return m_rareData->m_previousBorderBoxSize; |
| 4524 | 4525 |
| 4525 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. | 4526 // We didn't save the old border box size because it was the same as the siz
e of oldBounds. |
| 4526 return previousBoundsSize; | 4527 return previousBoundsSize; |
| 4527 } | 4528 } |
| 4528 | 4529 |
| 4529 } // namespace blink | 4530 } // namespace blink |
| OLD | NEW |