OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 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 23 matching lines...) Expand all Loading... |
34 #include "core/html/HTMLCanvasElement.h" | 34 #include "core/html/HTMLCanvasElement.h" |
35 #include "core/html/HTMLIFrameElement.h" | 35 #include "core/html/HTMLIFrameElement.h" |
36 #include "core/html/HTMLMediaElement.h" | 36 #include "core/html/HTMLMediaElement.h" |
37 #include "core/html/HTMLVideoElement.h" | 37 #include "core/html/HTMLVideoElement.h" |
38 #include "core/html/canvas/CanvasRenderingContext.h" | 38 #include "core/html/canvas/CanvasRenderingContext.h" |
39 #include "core/inspector/InspectorInstrumentation.h" | 39 #include "core/inspector/InspectorInstrumentation.h" |
40 #include "core/inspector/InspectorNodeIds.h" | 40 #include "core/inspector/InspectorNodeIds.h" |
41 #include "core/layout/FilterEffectRenderer.h" | 41 #include "core/layout/FilterEffectRenderer.h" |
42 #include "core/layout/LayerStackingNodeIterator.h" | 42 #include "core/layout/LayerStackingNodeIterator.h" |
43 #include "core/layout/LayoutImage.h" | 43 #include "core/layout/LayoutImage.h" |
| 44 #include "core/layout/LayoutPart.h" |
44 #include "core/layout/LayoutVideo.h" | 45 #include "core/layout/LayoutVideo.h" |
45 #include "core/layout/compositing/LayerCompositor.h" | 46 #include "core/layout/compositing/LayerCompositor.h" |
46 #include "core/layout/style/KeyframeList.h" | 47 #include "core/layout/style/KeyframeList.h" |
47 #include "core/page/Chrome.h" | 48 #include "core/page/Chrome.h" |
48 #include "core/page/ChromeClient.h" | 49 #include "core/page/ChromeClient.h" |
49 #include "core/page/Page.h" | 50 #include "core/page/Page.h" |
50 #include "core/page/scrolling/ScrollingCoordinator.h" | 51 #include "core/page/scrolling/ScrollingCoordinator.h" |
51 #include "core/paint/LayerPainter.h" | 52 #include "core/paint/LayerPainter.h" |
52 #include "core/paint/ScrollableAreaPainter.h" | 53 #include "core/paint/ScrollableAreaPainter.h" |
53 #include "core/paint/TransformRecorder.h" | 54 #include "core/paint/TransformRecorder.h" |
54 #include "core/plugins/PluginView.h" | 55 #include "core/plugins/PluginView.h" |
55 #include "core/rendering/RenderEmbeddedObject.h" | 56 #include "core/rendering/RenderEmbeddedObject.h" |
56 #include "core/rendering/RenderPart.h" | |
57 #include "core/rendering/RenderView.h" | 57 #include "core/rendering/RenderView.h" |
58 #include "platform/LengthFunctions.h" | 58 #include "platform/LengthFunctions.h" |
59 #include "platform/RuntimeEnabledFeatures.h" | 59 #include "platform/RuntimeEnabledFeatures.h" |
60 #include "platform/fonts/FontCache.h" | 60 #include "platform/fonts/FontCache.h" |
61 #include "platform/geometry/TransformState.h" | 61 #include "platform/geometry/TransformState.h" |
62 #include "platform/graphics/GraphicsContext.h" | 62 #include "platform/graphics/GraphicsContext.h" |
63 #include "platform/graphics/paint/ClipDisplayItem.h" | 63 #include "platform/graphics/paint/ClipDisplayItem.h" |
64 #include "platform/graphics/paint/DisplayItemList.h" | 64 #include "platform/graphics/paint/DisplayItemList.h" |
65 #include "platform/graphics/paint/TransformDisplayItem.h" | 65 #include "platform/graphics/paint/TransformDisplayItem.h" |
66 #include "wtf/CurrentTime.h" | 66 #include "wtf/CurrentTime.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 void CompositedLayerMapping::updateCompositedBounds() | 334 void CompositedLayerMapping::updateCompositedBounds() |
335 { | 335 { |
336 ASSERT(m_owningLayer.compositor()->lifecycle().state() == DocumentLifecycle:
:InCompositingUpdate); | 336 ASSERT(m_owningLayer.compositor()->lifecycle().state() == DocumentLifecycle:
:InCompositingUpdate); |
337 // FIXME: if this is really needed for performance, it would be better to st
ore it on Layer. | 337 // FIXME: if this is really needed for performance, it would be better to st
ore it on Layer. |
338 m_compositedBounds = m_owningLayer.boundingBoxForCompositing(); | 338 m_compositedBounds = m_owningLayer.boundingBoxForCompositing(); |
339 m_contentOffsetInCompositingLayerDirty = true; | 339 m_contentOffsetInCompositingLayerDirty = true; |
340 } | 340 } |
341 | 341 |
342 void CompositedLayerMapping::updateAfterPartResize() | 342 void CompositedLayerMapping::updateAfterPartResize() |
343 { | 343 { |
344 if (renderer()->isRenderPart()) { | 344 if (renderer()->isLayoutPart()) { |
345 if (LayerCompositor* innerCompositor = LayerCompositor::frameContentsCom
positor(toRenderPart(renderer()))) { | 345 if (LayerCompositor* innerCompositor = LayerCompositor::frameContentsCom
positor(toLayoutPart(renderer()))) { |
346 innerCompositor->frameViewDidChangeSize(); | 346 innerCompositor->frameViewDidChangeSize(); |
347 // We can floor this point because our frameviews are always aligned
to pixel boundaries. | 347 // We can floor this point because our frameviews are always aligned
to pixel boundaries. |
348 ASSERT(m_compositedBounds.location() == flooredIntPoint(m_composited
Bounds.location())); | 348 ASSERT(m_compositedBounds.location() == flooredIntPoint(m_composited
Bounds.location())); |
349 innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contents
Box().location())); | 349 innerCompositor->frameViewDidChangeLocation(flooredIntPoint(contents
Box().location())); |
350 } | 350 } |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
354 void CompositedLayerMapping::updateCompositingReasons() | 354 void CompositedLayerMapping::updateCompositingReasons() |
355 { | 355 { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 } | 527 } |
528 } else if (renderer->isVideo()) { | 528 } else if (renderer->isVideo()) { |
529 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); | 529 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); |
530 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(
)); | 530 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(
)); |
531 } else if (isAcceleratedCanvas(renderer)) { | 531 } else if (isAcceleratedCanvas(renderer)) { |
532 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); | 532 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); |
533 if (CanvasRenderingContext* context = canvas->renderingContext()) | 533 if (CanvasRenderingContext* context = canvas->renderingContext()) |
534 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer()
); | 534 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer()
); |
535 layerConfigChanged = true; | 535 layerConfigChanged = true; |
536 } | 536 } |
537 if (renderer->isRenderPart()) | 537 if (renderer->isLayoutPart()) |
538 layerConfigChanged = LayerCompositor::parentFrameContentLayers(toRenderP
art(renderer)); | 538 layerConfigChanged = LayerCompositor::parentFrameContentLayers(toLayoutP
art(renderer)); |
539 | 539 |
540 // Changes to either the internal hierarchy or the mask layer have an impact | 540 // Changes to either the internal hierarchy or the mask layer have an impact |
541 // on painting phases, so we need to update when either are updated. | 541 // on painting phases, so we need to update when either are updated. |
542 if (layerConfigChanged || maskLayerChanged) | 542 if (layerConfigChanged || maskLayerChanged) |
543 updatePaintingPhases(); | 543 updatePaintingPhases(); |
544 | 544 |
545 return layerConfigChanged; | 545 return layerConfigChanged; |
546 } | 546 } |
547 | 547 |
548 static IntRect clipBox(RenderBox* renderer) | 548 static IntRect clipBox(RenderBox* renderer) |
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2356 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2357 name = "Scrolling Block Selection Layer"; | 2357 name = "Scrolling Block Selection Layer"; |
2358 } else { | 2358 } else { |
2359 ASSERT_NOT_REACHED(); | 2359 ASSERT_NOT_REACHED(); |
2360 } | 2360 } |
2361 | 2361 |
2362 return name; | 2362 return name; |
2363 } | 2363 } |
2364 | 2364 |
2365 } // namespace blink | 2365 } // namespace blink |
OLD | NEW |