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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 if (!layoutObject.style()->hasBackground()) | 142 if (!layoutObject.style()->hasBackground()) |
143 return true; | 143 return true; |
144 | 144 |
145 // Simple background that is contained within the contents rect. | 145 // Simple background that is contained within the contents rect. |
146 return contentsRect(layoutObject).contains(backgroundRect(layoutObject)); | 146 return contentsRect(layoutObject).contains(backgroundRect(layoutObject)); |
147 } | 147 } |
148 | 148 |
149 static WebLayer* platformLayerForPlugin(LayoutObject& layoutObject) { | 149 static WebLayer* platformLayerForPlugin(LayoutObject& layoutObject) { |
150 if (!layoutObject.isEmbeddedObject()) | 150 if (!layoutObject.isEmbeddedObject()) |
151 return nullptr; | 151 return nullptr; |
152 FrameViewBase* frameViewBase = | 152 PluginView* plugin = toLayoutEmbeddedObject(layoutObject).plugin(); |
153 toLayoutEmbeddedObject(layoutObject).frameViewBase(); | 153 return plugin ? plugin->platformLayer() : nullptr; |
154 if (!frameViewBase || !frameViewBase->isPluginView()) | |
155 return nullptr; | |
156 return toPluginView(frameViewBase)->platformLayer(); | |
157 } | 154 } |
158 | 155 |
159 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { | 156 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { |
160 return isAcceleratedCanvas(layoutObject) || | 157 return isAcceleratedCanvas(layoutObject) || |
161 (layoutObject.isEmbeddedObject() && | 158 (layoutObject.isEmbeddedObject() && |
162 toLayoutEmbeddedObject(layoutObject) | 159 toLayoutEmbeddedObject(layoutObject) |
163 .requiresAcceleratedCompositing()) || | 160 .requiresAcceleratedCompositing()) || |
164 layoutObject.isVideo(); | 161 layoutObject.isVideo(); |
165 } | 162 } |
166 | 163 |
(...skipping 3365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3532 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3529 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
3533 name = "Decoration Layer"; | 3530 name = "Decoration Layer"; |
3534 } else { | 3531 } else { |
3535 NOTREACHED(); | 3532 NOTREACHED(); |
3536 } | 3533 } |
3537 | 3534 |
3538 return name; | 3535 return name; |
3539 } | 3536 } |
3540 | 3537 |
3541 } // namespace blink | 3538 } // namespace blink |
OLD | NEW |