OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 return; | 213 return; |
214 | 214 |
215 if (scrollbar == verticalScrollbar()) | 215 if (scrollbar == verticalScrollbar()) |
216 scrollRect.move(verticalScrollbarStart(0, box().size().width()), box().b orderTop()); | 216 scrollRect.move(verticalScrollbarStart(0, box().size().width()), box().b orderTop()); |
217 else | 217 else |
218 scrollRect.move(horizontalScrollbarStart(0), box().size().height() - box ().borderBottom() - scrollbar->height()); | 218 scrollRect.move(horizontalScrollbarStart(0), box().size().height() - box ().borderBottom() - scrollbar->height()); |
219 | 219 |
220 if (scrollRect.isEmpty()) | 220 if (scrollRect.isEmpty()) |
221 return; | 221 return; |
222 | 222 |
223 box().invalidateDisplayItemClient(*scrollbar); | |
224 | |
225 LayoutRect paintInvalidationRect = LayoutRect(scrollRect); | 223 LayoutRect paintInvalidationRect = LayoutRect(scrollRect); |
226 box().flipForWritingMode(paintInvalidationRect); | 224 box().flipForWritingMode(paintInvalidationRect); |
227 | 225 |
228 IntRect intRect = pixelSnappedIntRect(paintInvalidationRect); | 226 IntRect intRect = pixelSnappedIntRect(paintInvalidationRect); |
229 | 227 |
230 if (box().frameView()->isInPerformLayout()) { | 228 if (box().frameView()->isInPerformLayout()) { |
229 box().invalidateDisplayItemClient(*scrollbar); | |
chrishtr
2015/10/22 00:02:41
Why this change?
Xianzhu
2015/10/22 01:17:04
See the comment for old code line 237.
| |
231 addScrollbarDamage(scrollbar, intRect); | 230 addScrollbarDamage(scrollbar, intRect); |
232 } else { | 231 } else { |
233 // FIXME: We should not allow paint invalidation out of paint invalidati on state. crbug.com/457415 | 232 // FIXME: We should not allow paint invalidation out of paint invalidati on state. crbug.com/457415 |
234 DisablePaintInvalidationStateAsserts disabler; | 233 DisablePaintInvalidationStateAsserts disabler; |
235 // We have invalidated the displayItemClient of the scrollbar, but for n ow we still need to | 234 box().invalidatePaintRectangleForDisplayItemClient(*scrollbar, LayoutRec t(intRect)); |
236 // invalidate the rectangles to trigger repaints. | |
237 box().invalidatePaintRectangleNotInvalidatingDisplayItemClients(LayoutRe ct(intRect)); | |
chrishtr
2015/10/22 00:02:41
Why did the old code avoid invalidating display it
Xianzhu
2015/10/22 01:17:04
Because we had invalidated display item clients ab
| |
238 } | 235 } |
239 } | 236 } |
240 | 237 |
241 void PaintLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) | 238 void PaintLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) |
242 { | 239 { |
243 ASSERT(!layerForScrollCorner()); | 240 ASSERT(!layerForScrollCorner()); |
244 | 241 |
245 if (m_scrollCorner) { | 242 if (m_scrollCorner) { |
246 // FIXME: We should not allow paint invalidation out of paint invalidati on state. crbug.com/457415 | 243 // FIXME: We should not allow paint invalidation out of paint invalidati on state. crbug.com/457415 |
247 DisablePaintInvalidationStateAsserts disabler; | 244 DisablePaintInvalidationStateAsserts disabler; |
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1578 } | 1575 } |
1579 | 1576 |
1580 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1577 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
1581 { | 1578 { |
1582 visitor->trace(m_scrollableArea); | 1579 visitor->trace(m_scrollableArea); |
1583 visitor->trace(m_hBar); | 1580 visitor->trace(m_hBar); |
1584 visitor->trace(m_vBar); | 1581 visitor->trace(m_vBar); |
1585 } | 1582 } |
1586 | 1583 |
1587 } // namespace blink | 1584 } // namespace blink |
OLD | NEW |