OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 lifecycle().advanceTo(DocumentLifecycle::CompositingClean); | 246 lifecycle().advanceTo(DocumentLifecycle::CompositingClean); |
247 | 247 |
248 DocumentAnimations::updateCompositorAnimations(m_layoutView.document()); | 248 DocumentAnimations::updateCompositorAnimations(m_layoutView.document()); |
249 | 249 |
250 m_layoutView.frameView()->getScrollableArea()->updateCompositorScrollAnimati
ons(); | 250 m_layoutView.frameView()->getScrollableArea()->updateCompositorScrollAnimati
ons(); |
251 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV
iew.frameView()->animatingScrollableAreas()) { | 251 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV
iew.frameView()->animatingScrollableAreas()) { |
252 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) | 252 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) |
253 scrollableArea->updateCompositorScrollAnimations(); | 253 scrollableArea->updateCompositorScrollAnimations(); |
254 } | 254 } |
255 | 255 |
256 m_layoutView.document().rootScrollerController()->didUpdateCompositing(); | |
257 #if ENABLE(ASSERT) | 256 #if ENABLE(ASSERT) |
258 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); | 257 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); |
259 assertNoUnresolvedDirtyBits(); | 258 assertNoUnresolvedDirtyBits(); |
260 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { | 259 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { |
261 if (!child->isLocalFrame()) | 260 if (!child->isLocalFrame()) |
262 continue; | 261 continue; |
263 LocalFrame* localFrame = toLocalFrame(child); | 262 LocalFrame* localFrame = toLocalFrame(child); |
264 if (localFrame->shouldThrottleRendering() || localFrame->contentLayoutIt
em().isNull()) | 263 if (localFrame->shouldThrottleRendering() || localFrame->contentLayoutIt
em().isNull()) |
265 continue; | 264 continue; |
266 localFrame->contentLayoutItem().compositor()->assertNoUnresolvedDirtyBit
s(); | 265 localFrame->contentLayoutItem().compositor()->assertNoUnresolvedDirtyBit
s(); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 void PaintLayerCompositor::updateClippingOnCompositorLayers() | 467 void PaintLayerCompositor::updateClippingOnCompositorLayers() |
469 { | 468 { |
470 bool shouldClip = !rootLayer()->hasRootScrollerAsDescendant(); | 469 bool shouldClip = !rootLayer()->hasRootScrollerAsDescendant(); |
471 if (m_rootContentLayer) { | 470 if (m_rootContentLayer) { |
472 // FIXME: with rootLayerScrolls, we probably don't even need | 471 // FIXME: with rootLayerScrolls, we probably don't even need |
473 // m_rootContentLayer? | 472 // m_rootContentLayer? |
474 m_rootContentLayer->setMasksToBounds( | 473 m_rootContentLayer->setMasksToBounds( |
475 !RuntimeEnabledFeatures::rootLayerScrollingEnabled() && shouldClip); | 474 !RuntimeEnabledFeatures::rootLayerScrollingEnabled() && shouldClip); |
476 } | 475 } |
477 | 476 |
478 // TODO(bokan): Temporary hack-cast to TDRSC until the follow-up patch | 477 const TopDocumentRootScrollerController& globalRootScrollerController = |
479 // lands and we can get a pointer to a TopDocumentRootScrollerController | 478 m_layoutView.document().frameHost()->globalRootScrollerController(); |
480 // legitimately. | |
481 TopDocumentRootScrollerController* globalRootScrollerController = | |
482 (TopDocumentRootScrollerController*)m_layoutView.document().topDocument(
).rootScrollerController(); | |
483 | 479 |
484 Element* documentElement = m_layoutView.document().documentElement(); | 480 Element* documentElement = m_layoutView.document().documentElement(); |
485 bool frameIsRootScroller = documentElement && documentElement->isSameNode( | 481 bool frameIsRootScroller = documentElement && documentElement->isSameNode( |
486 globalRootScrollerController->globalRootScroller()); | 482 globalRootScrollerController.globalRootScroller()); |
487 | 483 |
488 // We normally clip iframes' (but not the root frame) overflow controls | 484 // We normally clip iframes' (but not the root frame) overflow controls |
489 // host and container layers but if the root scroller is the iframe itself | 485 // host and container layers but if the root scroller is the iframe itself |
490 // we want it to behave like the root frame. | 486 // we want it to behave like the root frame. |
491 shouldClip &= !frameIsRootScroller && !m_layoutView.frame()->isLocalRoot(); | 487 shouldClip &= !frameIsRootScroller && !m_layoutView.frame()->isLocalRoot(); |
492 | 488 |
493 if (m_containerLayer) | 489 if (m_containerLayer) |
494 m_containerLayer->setMasksToBounds(shouldClip); | 490 m_containerLayer->setMasksToBounds(shouldClip); |
495 if (m_overflowControlsHostLayer) | 491 if (m_overflowControlsHostLayer) |
496 m_overflowControlsHostLayer->setMasksToBounds(shouldClip); | 492 m_overflowControlsHostLayer->setMasksToBounds(shouldClip); |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 } else if (graphicsLayer == m_scrollLayer.get()) { | 1266 } else if (graphicsLayer == m_scrollLayer.get()) { |
1271 name = "Frame Scrolling Layer"; | 1267 name = "Frame Scrolling Layer"; |
1272 } else { | 1268 } else { |
1273 ASSERT_NOT_REACHED(); | 1269 ASSERT_NOT_REACHED(); |
1274 } | 1270 } |
1275 | 1271 |
1276 return name; | 1272 return name; |
1277 } | 1273 } |
1278 | 1274 |
1279 } // namespace blink | 1275 } // namespace blink |
OLD | NEW |