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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if (!layoutObject.style()->hasBackground()) | 144 if (!layoutObject.style()->hasBackground()) |
145 return true; | 145 return true; |
146 | 146 |
147 // Simple background that is contained within the contents rect. | 147 // Simple background that is contained within the contents rect. |
148 return contentsRect(layoutObject).contains(backgroundRect(layoutObject)); | 148 return contentsRect(layoutObject).contains(backgroundRect(layoutObject)); |
149 } | 149 } |
150 | 150 |
151 static WebLayer* platformLayerForPlugin(LayoutObject& layoutObject) { | 151 static WebLayer* platformLayerForPlugin(LayoutObject& layoutObject) { |
152 if (!layoutObject.isEmbeddedObject()) | 152 if (!layoutObject.isEmbeddedObject()) |
153 return nullptr; | 153 return nullptr; |
154 FrameViewBase* frameViewBase = | 154 PluginView* plugin = toLayoutEmbeddedObject(layoutObject).plugin(); |
155 toLayoutEmbeddedObject(layoutObject).frameViewBase(); | 155 return plugin ? plugin->platformLayer() : nullptr; |
156 if (!frameViewBase || !frameViewBase->isPluginView()) | |
157 return nullptr; | |
158 return toPluginView(frameViewBase)->platformLayer(); | |
159 } | 156 } |
160 | 157 |
161 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { | 158 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { |
162 return isAcceleratedCanvas(layoutObject) || | 159 return isAcceleratedCanvas(layoutObject) || |
163 (layoutObject.isEmbeddedObject() && | 160 (layoutObject.isEmbeddedObject() && |
164 toLayoutEmbeddedObject(layoutObject) | 161 toLayoutEmbeddedObject(layoutObject) |
165 .requiresAcceleratedCompositing()) || | 162 .requiresAcceleratedCompositing()) || |
166 layoutObject.isVideo(); | 163 layoutObject.isVideo(); |
167 } | 164 } |
168 | 165 |
(...skipping 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3498 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3495 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
3499 name = "Decoration Layer"; | 3496 name = "Decoration Layer"; |
3500 } else { | 3497 } else { |
3501 ASSERT_NOT_REACHED(); | 3498 ASSERT_NOT_REACHED(); |
3502 } | 3499 } |
3503 | 3500 |
3504 return name; | 3501 return name; |
3505 } | 3502 } |
3506 | 3503 |
3507 } // namespace blink | 3504 } // namespace blink |
OLD | NEW |