| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // If there is no background, there is nothing to support. | 113 // If there is no background, there is nothing to support. |
| 114 if (!renderer->style()->hasBackground()) | 114 if (!renderer->style()->hasBackground()) |
| 115 return true; | 115 return true; |
| 116 | 116 |
| 117 // Simple background that is contained within the contents rect. | 117 // Simple background that is contained within the contents rect. |
| 118 return contentsRect(renderer).contains(backgroundRect(renderer)); | 118 return contentsRect(renderer).contains(backgroundRect(renderer)); |
| 119 } | 119 } |
| 120 | 120 |
| 121 static inline bool isAcceleratedContents(RenderObject* renderer) | 121 static inline bool isAcceleratedContents(RenderObject* renderer) |
| 122 { | 122 { |
| 123 return isAcceleratedCanvas(renderer) | 123 return isAcceleratedCanvas(renderer); |
| 124 || renderer->isVideo(); | |
| 125 } | 124 } |
| 126 | 125 |
| 127 // Get the scrolling coordinator in a way that works inside CompositedLayerMappi
ng's destructor. | 126 // Get the scrolling coordinator in a way that works inside CompositedLayerMappi
ng's destructor. |
| 128 static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer& layer) | 127 static ScrollingCoordinator* scrollingCoordinatorFromLayer(RenderLayer& layer) |
| 129 { | 128 { |
| 130 Page* page = layer.renderer()->frame()->page(); | 129 Page* page = layer.renderer()->frame()->page(); |
| 131 if (!page) | 130 if (!page) |
| 132 return 0; | 131 return 0; |
| 133 | 132 |
| 134 return page->scrollingCoordinator(); | 133 return page->scrollingCoordinator(); |
| (...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2198 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2200 name = "Scrolling Block Selection Layer"; | 2199 name = "Scrolling Block Selection Layer"; |
| 2201 } else { | 2200 } else { |
| 2202 ASSERT_NOT_REACHED(); | 2201 ASSERT_NOT_REACHED(); |
| 2203 } | 2202 } |
| 2204 | 2203 |
| 2205 return name; | 2204 return name; |
| 2206 } | 2205 } |
| 2207 | 2206 |
| 2208 } // namespace blink | 2207 } // namespace blink |
| OLD | NEW |