| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer) | 187 void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer) |
| 188 { | 188 { |
| 189 layer.updateDescendantDependentFlags(); | 189 layer.updateDescendantDependentFlags(); |
| 190 | 190 |
| 191 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child-
>nextSibling()) | 191 for (DeprecatedPaintLayer* child = layer.firstChild(); child; child = child-
>nextSibling()) |
| 192 updateDescendantDependentFlagsForEntireSubtree(*child); | 192 updateDescendantDependentFlagsForEntireSubtree(*child); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void DeprecatedPaintLayerCompositor::updateIfNeededRecursive() | 195 void DeprecatedPaintLayerCompositor::updateIfNeededRecursive() |
| 196 { | 196 { |
| 197 FrameView* view = m_layoutView.frameView(); |
| 198 if (view->shouldThrottleStyleLayoutAndCompositingUpdates()) |
| 199 return; |
| 200 |
| 197 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { | 201 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { |
| 198 if (!child->isLocalFrame()) | 202 if (!child->isLocalFrame()) |
| 199 continue; | 203 continue; |
| 200 LocalFrame* localFrame = toLocalFrame(child); | 204 LocalFrame* localFrame = toLocalFrame(child); |
| 201 // It's possible for trusted Pepper plugins to force hit testing in situ
ations where | 205 // It's possible for trusted Pepper plugins to force hit testing in situ
ations where |
| 202 // the frame tree is in an inconsistent state, such as in the middle of
frame detach. | 206 // the frame tree is in an inconsistent state, such as in the middle of
frame detach. |
| 203 // TODO(bbudge) Remove this check when trusted Pepper plugins are gone. | 207 // TODO(bbudge) Remove this check when trusted Pepper plugins are gone. |
| 204 if (localFrame->document()->isActive()) | 208 if (localFrame->document()->isActive()) |
| 205 localFrame->contentLayoutObject()->compositor()->updateIfNeededRecur
sive(); | 209 localFrame->contentLayoutObject()->compositor()->updateIfNeededRecur
sive(); |
| 206 } | 210 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 231 m_layoutView.frameView()->scrollableArea()->updateCompositorScrollAnimations
(); | 235 m_layoutView.frameView()->scrollableArea()->updateCompositorScrollAnimations
(); |
| 232 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV
iew.frameView()->animatingScrollableAreas()) { | 236 if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = m_layoutV
iew.frameView()->animatingScrollableAreas()) { |
| 233 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) | 237 for (ScrollableArea* scrollableArea : *animatingScrollableAreas) |
| 234 scrollableArea->updateCompositorScrollAnimations(); | 238 scrollableArea->updateCompositorScrollAnimations(); |
| 235 } | 239 } |
| 236 | 240 |
| 237 #if ENABLE(ASSERT) | 241 #if ENABLE(ASSERT) |
| 238 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); | 242 ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean); |
| 239 assertNoUnresolvedDirtyBits(); | 243 assertNoUnresolvedDirtyBits(); |
| 240 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { | 244 for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); c
hild; child = child->tree().nextSibling()) { |
| 241 if (child->isLocalFrame()) | 245 if (!child->isLocalFrame()) |
| 242 toLocalFrame(child)->contentLayoutObject()->compositor()->assertNoUn
resolvedDirtyBits(); | 246 continue; |
| 247 LocalFrame* localFrame = toLocalFrame(child); |
| 248 if (localFrame->shouldThrottleStyleLayoutAndCompositingUpdates()) |
| 249 continue; |
| 250 localFrame->contentLayoutObject()->compositor()->assertNoUnresolvedDirty
Bits(); |
| 243 } | 251 } |
| 244 #endif | 252 #endif |
| 245 } | 253 } |
| 246 | 254 |
| 247 void DeprecatedPaintLayerCompositor::setNeedsCompositingUpdate(CompositingUpdate
Type updateType) | 255 void DeprecatedPaintLayerCompositor::setNeedsCompositingUpdate(CompositingUpdate
Type updateType) |
| 248 { | 256 { |
| 249 ASSERT(updateType != CompositingUpdateNone); | 257 ASSERT(updateType != CompositingUpdateNone); |
| 250 m_pendingUpdateType = std::max(m_pendingUpdateType, updateType); | 258 m_pendingUpdateType = std::max(m_pendingUpdateType, updateType); |
| 251 page()->animator().scheduleVisualUpdate(m_layoutView.frame()); | 259 page()->animator().scheduleVisualUpdate(m_layoutView.frame()); |
| 252 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); | 260 lifecycle().ensureStateAtMost(DocumentLifecycle::LayoutClean); |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1208 } else if (graphicsLayer == m_scrollLayer.get()) { | 1216 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 1209 name = "LocalFrame Scrolling Layer"; | 1217 name = "LocalFrame Scrolling Layer"; |
| 1210 } else { | 1218 } else { |
| 1211 ASSERT_NOT_REACHED(); | 1219 ASSERT_NOT_REACHED(); |
| 1212 } | 1220 } |
| 1213 | 1221 |
| 1214 return name; | 1222 return name; |
| 1215 } | 1223 } |
| 1216 | 1224 |
| 1217 } // namespace blink | 1225 } // namespace blink |
| OLD | NEW |