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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 { | 343 { |
344 if (!box().isMarquee()) { | 344 if (!box().isMarquee()) { |
345 // Ensure that the dimensions will be computed if they need to be (for o
verflow:hidden blocks). | 345 // Ensure that the dimensions will be computed if they need to be (for o
verflow:hidden blocks). |
346 if (m_scrollDimensionsDirty) | 346 if (m_scrollDimensionsDirty) |
347 computeScrollDimensions(); | 347 computeScrollDimensions(); |
348 } | 348 } |
349 | 349 |
350 if (scrollOffset() == toIntSize(newScrollOffset)) | 350 if (scrollOffset() == toIntSize(newScrollOffset)) |
351 return; | 351 return; |
352 | 352 |
| 353 layer()->renderer()->setMayNeedInvalidation(true); |
| 354 |
353 setScrollOffset(toIntSize(newScrollOffset)); | 355 setScrollOffset(toIntSize(newScrollOffset)); |
354 | 356 |
355 LocalFrame* frame = box().frame(); | 357 LocalFrame* frame = box().frame(); |
356 ASSERT(frame); | 358 ASSERT(frame); |
357 | 359 |
358 RefPtr<FrameView> frameView = box().frameView(); | 360 RefPtr<FrameView> frameView = box().frameView(); |
359 | 361 |
360 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer",
"data", InspectorScrollLayerEvent::data(&box())); | 362 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer",
"data", InspectorScrollLayerEvent::data(&box())); |
361 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 363 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
362 InspectorInstrumentation::willScrollLayer(&box()); | 364 InspectorInstrumentation::willScrollLayer(&box()); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 if (newScrollOffset != adjustedScrollOffset()) | 585 if (newScrollOffset != adjustedScrollOffset()) |
584 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); | 586 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); |
585 } | 587 } |
586 | 588 |
587 void RenderLayerScrollableArea::updateAfterLayout() | 589 void RenderLayerScrollableArea::updateAfterLayout() |
588 { | 590 { |
589 // List box parts handle the scrollbars by themselves so we have nothing to
do. | 591 // List box parts handle the scrollbars by themselves so we have nothing to
do. |
590 if (box().style()->appearance() == ListboxPart) | 592 if (box().style()->appearance() == ListboxPart) |
591 return; | 593 return; |
592 | 594 |
| 595 box().setMayNeedInvalidation(true); |
| 596 |
593 m_scrollDimensionsDirty = true; | 597 m_scrollDimensionsDirty = true; |
594 IntSize originalScrollOffset = adjustedScrollOffset(); | 598 IntSize originalScrollOffset = adjustedScrollOffset(); |
595 | 599 |
596 computeScrollDimensions(); | 600 computeScrollDimensions(); |
597 | 601 |
598 if (!box().isMarquee()) { | 602 if (!box().isMarquee()) { |
599 // Layout may cause us to be at an invalid scroll position. In this case
we need | 603 // Layout may cause us to be at an invalid scroll position. In this case
we need |
600 // to pull our scroll offsets back to the max (or push them up to the mi
n). | 604 // to pull our scroll offsets back to the max (or push them up to the mi
n). |
601 IntSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset()); | 605 IntSize clampedScrollOffset = clampScrollOffset(adjustedScrollOffset()); |
602 if (clampedScrollOffset != adjustedScrollOffset()) | 606 if (clampedScrollOffset != adjustedScrollOffset()) |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1551 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) | 1555 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo
sitedScrollingMode mode) |
1552 { | 1556 { |
1553 if (m_forceNeedsCompositedScrolling == mode) | 1557 if (m_forceNeedsCompositedScrolling == mode) |
1554 return; | 1558 return; |
1555 | 1559 |
1556 m_forceNeedsCompositedScrolling = mode; | 1560 m_forceNeedsCompositedScrolling = mode; |
1557 layer()->didUpdateNeedsCompositedScrolling(); | 1561 layer()->didUpdateNeedsCompositedScrolling(); |
1558 } | 1562 } |
1559 | 1563 |
1560 } // Namespace WebCore | 1564 } // Namespace WebCore |
OLD | NEW |