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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 */ | 42 */ |
43 | 43 |
44 #include "config.h" | 44 #include "config.h" |
45 #include "core/rendering/RenderLayer.h" | 45 #include "core/rendering/RenderLayer.h" |
46 | 46 |
47 #include "core/accessibility/AXObjectCache.h" | 47 #include "core/accessibility/AXObjectCache.h" |
48 #include "core/css/PseudoStyleRequest.h" | 48 #include "core/css/PseudoStyleRequest.h" |
49 #include "core/dom/Node.h" | 49 #include "core/dom/Node.h" |
50 #include "core/dom/shadow/ShadowRoot.h" | 50 #include "core/dom/shadow/ShadowRoot.h" |
51 #include "core/editing/FrameSelection.h" | 51 #include "core/editing/FrameSelection.h" |
| 52 #include "core/frame/FrameProtector.h" |
52 #include "core/frame/FrameView.h" | 53 #include "core/frame/FrameView.h" |
53 #include "core/frame/LocalFrame.h" | 54 #include "core/frame/LocalFrame.h" |
54 #include "core/html/HTMLFrameOwnerElement.h" | 55 #include "core/html/HTMLFrameOwnerElement.h" |
55 #include "core/inspector/InspectorInstrumentation.h" | 56 #include "core/inspector/InspectorInstrumentation.h" |
56 #include "core/inspector/InspectorTraceEvents.h" | 57 #include "core/inspector/InspectorTraceEvents.h" |
57 #include "core/page/Chrome.h" | 58 #include "core/page/Chrome.h" |
58 #include "core/page/EventHandler.h" | 59 #include "core/page/EventHandler.h" |
59 #include "core/page/FocusController.h" | 60 #include "core/page/FocusController.h" |
60 #include "core/page/Page.h" | 61 #include "core/page/Page.h" |
61 #include "core/page/scrolling/ScrollingCoordinator.h" | 62 #include "core/page/scrolling/ScrollingCoordinator.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 } | 352 } |
352 | 353 |
353 if (scrollOffset() == toIntSize(newScrollOffset)) | 354 if (scrollOffset() == toIntSize(newScrollOffset)) |
354 return; | 355 return; |
355 | 356 |
356 setScrollOffset(toIntSize(newScrollOffset)); | 357 setScrollOffset(toIntSize(newScrollOffset)); |
357 | 358 |
358 LocalFrame* frame = box().frame(); | 359 LocalFrame* frame = box().frame(); |
359 ASSERT(frame); | 360 ASSERT(frame); |
360 | 361 |
361 RefPtr<FrameView> frameView = box().frameView(); | 362 FrameView* frameView = box().frameView(); |
| 363 FrameViewProtector protect(frameView); |
362 | 364 |
363 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer",
"data", InspectorScrollLayerEvent::data(&box())); | 365 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "ScrollLayer",
"data", InspectorScrollLayerEvent::data(&box())); |
364 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. | 366 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli
ne migrates to tracing. |
365 InspectorInstrumentation::willScrollLayer(&box()); | 367 InspectorInstrumentation::willScrollLayer(&box()); |
366 | 368 |
367 const RenderLayerModelObject* paintInvalidationContainer = box().containerFo
rPaintInvalidation(); | 369 const RenderLayerModelObject* paintInvalidationContainer = box().containerFo
rPaintInvalidation(); |
368 | 370 |
369 // Update the positions of our child layers (if needed as only fixed layers
should be impacted by a scroll). | 371 // Update the positions of our child layers (if needed as only fixed layers
should be impacted by a scroll). |
370 // We don't update compositing layers, because we need to do a deep update f
rom the compositing ancestor. | 372 // We don't update compositing layers, because we need to do a deep update f
rom the compositing ancestor. |
371 if (!frameView->isInPerformLayout()) { | 373 if (!frameView->isInPerformLayout()) { |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1475 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
1474 { | 1476 { |
1475 // We only want to track the topmost scroll child for scrollable areas with | 1477 // We only want to track the topmost scroll child for scrollable areas with |
1476 // overlay scrollbars. | 1478 // overlay scrollbars. |
1477 if (!hasOverlayScrollbars()) | 1479 if (!hasOverlayScrollbars()) |
1478 return; | 1480 return; |
1479 m_nextTopmostScrollChild = scrollChild; | 1481 m_nextTopmostScrollChild = scrollChild; |
1480 } | 1482 } |
1481 | 1483 |
1482 } // namespace blink | 1484 } // namespace blink |
OLD | NEW |