Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 930183002: Move and rename RenderEmbeddedObject and RenderIFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename properly to LayoutIFrame in test expectations. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/layout/LayoutPart.h ('k') | Source/core/layout/compositing/LayerCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 #include "core/frame/RemoteFrame.h" 33 #include "core/frame/RemoteFrame.h"
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/LayoutEmbeddedObject.h"
43 #include "core/layout/LayoutImage.h" 44 #include "core/layout/LayoutImage.h"
44 #include "core/layout/LayoutPart.h" 45 #include "core/layout/LayoutPart.h"
45 #include "core/layout/LayoutVideo.h" 46 #include "core/layout/LayoutVideo.h"
46 #include "core/layout/compositing/LayerCompositor.h" 47 #include "core/layout/compositing/LayerCompositor.h"
47 #include "core/layout/style/KeyframeList.h" 48 #include "core/layout/style/KeyframeList.h"
48 #include "core/page/Chrome.h" 49 #include "core/page/Chrome.h"
49 #include "core/page/ChromeClient.h" 50 #include "core/page/ChromeClient.h"
50 #include "core/page/Page.h" 51 #include "core/page/Page.h"
51 #include "core/page/scrolling/ScrollingCoordinator.h" 52 #include "core/page/scrolling/ScrollingCoordinator.h"
52 #include "core/paint/LayerPainter.h" 53 #include "core/paint/LayerPainter.h"
53 #include "core/paint/ScrollableAreaPainter.h" 54 #include "core/paint/ScrollableAreaPainter.h"
54 #include "core/paint/TransformRecorder.h" 55 #include "core/paint/TransformRecorder.h"
55 #include "core/plugins/PluginView.h" 56 #include "core/plugins/PluginView.h"
56 #include "core/rendering/RenderEmbeddedObject.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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return true; 134 return true;
135 135
136 // Simple background that is contained within the contents rect. 136 // Simple background that is contained within the contents rect.
137 return contentsRect(renderer).contains(backgroundRect(renderer)); 137 return contentsRect(renderer).contains(backgroundRect(renderer));
138 } 138 }
139 139
140 static WebLayer* platformLayerForPlugin(LayoutObject* renderer) 140 static WebLayer* platformLayerForPlugin(LayoutObject* renderer)
141 { 141 {
142 if (!renderer->isEmbeddedObject()) 142 if (!renderer->isEmbeddedObject())
143 return 0; 143 return 0;
144 Widget* widget = toRenderEmbeddedObject(renderer)->widget(); 144 Widget* widget = toLayoutEmbeddedObject(renderer)->widget();
145 if (!widget || !widget->isPluginView()) 145 if (!widget || !widget->isPluginView())
146 return 0; 146 return 0;
147 return toPluginView(widget)->platformLayer(); 147 return toPluginView(widget)->platformLayer();
148 148
149 } 149 }
150 150
151 static inline bool isAcceleratedContents(LayoutObject* renderer) 151 static inline bool isAcceleratedContents(LayoutObject* renderer)
152 { 152 {
153 return isAcceleratedCanvas(renderer) 153 return isAcceleratedCanvas(renderer)
154 || (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->re quiresAcceleratedCompositing()) 154 || (renderer->isEmbeddedObject() && toLayoutEmbeddedObject(renderer)->re quiresAcceleratedCompositing())
155 || renderer->isVideo(); 155 || renderer->isVideo();
156 } 156 }
157 157
158 // Get the scrolling coordinator in a way that works inside CompositedLayerMappi ng's destructor. 158 // Get the scrolling coordinator in a way that works inside CompositedLayerMappi ng's destructor.
159 static ScrollingCoordinator* scrollingCoordinatorFromLayer(Layer& layer) 159 static ScrollingCoordinator* scrollingCoordinatorFromLayer(Layer& layer)
160 { 160 {
161 Page* page = layer.renderer()->frame()->page(); 161 Page* page = layer.renderer()->frame()->page();
162 if (!page) 162 if (!page)
163 return 0; 163 return 0;
164 164
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 return true; 1768 return true;
1769 1769
1770 if (hasVisibleNonCompositingDescendant(&m_owningLayer)) 1770 if (hasVisibleNonCompositingDescendant(&m_owningLayer))
1771 return true; 1771 return true;
1772 1772
1773 return false; 1773 return false;
1774 } 1774 }
1775 1775
1776 static bool isCompositedPlugin(LayoutObject* renderer) 1776 static bool isCompositedPlugin(LayoutObject* renderer)
1777 { 1777 {
1778 return renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->req uiresAcceleratedCompositing(); 1778 return renderer->isEmbeddedObject() && toLayoutEmbeddedObject(renderer)->req uiresAcceleratedCompositing();
1779 } 1779 }
1780 1780
1781 bool CompositedLayerMapping::hasVisibleNonCompositingDescendant(Layer* parent) 1781 bool CompositedLayerMapping::hasVisibleNonCompositingDescendant(Layer* parent)
1782 { 1782 {
1783 if (!parent->hasVisibleDescendant()) 1783 if (!parent->hasVisibleDescendant())
1784 return false; 1784 return false;
1785 1785
1786 // FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. 1786 // FIXME: We shouldn't be called with a stale z-order lists. See bug 85512.
1787 parent->stackingNode()->updateLayerListsIfNeeded(); 1787 parent->stackingNode()->updateLayerListsIfNeeded();
1788 1788
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutPart.h ('k') | Source/core/layout/compositing/LayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698