Chromium Code Reviews| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { | 155 static inline bool isAcceleratedContents(LayoutObject& layoutObject) { |
| 156 return isAcceleratedCanvas(layoutObject) || | 156 return isAcceleratedCanvas(layoutObject) || |
| 157 (layoutObject.isEmbeddedObject() && | 157 (layoutObject.isEmbeddedObject() && |
| 158 toLayoutEmbeddedObject(layoutObject) | 158 toLayoutEmbeddedObject(layoutObject) |
| 159 .requiresAcceleratedCompositing()) || | 159 .requiresAcceleratedCompositing()) || |
| 160 layoutObject.isVideo(); | 160 layoutObject.isVideo(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Get the scrolling coordinator in a way that works inside | 163 // Get the scrolling coordinator in a way that works inside |
| 164 // CompositedLayerMapping's destructor. | 164 // CompositedLayerMapping's destructor. |
| 165 static ScrollingCoordinator* scrollingCoordinatorFromLayer(PaintLayer& layer) { | 165 ScrollingCoordinator* CompositedLayerMapping::scrollingCoordinatorFromLayer( |
|
Xianzhu
2017/04/07 19:26:19
It seems better to be PaintLayer::getScrollingCoor
Daniel Bratell
2017/04/08 08:08:24
Done.
Note that the null checks were not identica
| |
| 166 PaintLayer& layer) { | |
| 166 Page* page = layer.layoutObject().frame()->page(); | 167 Page* page = layer.layoutObject().frame()->page(); |
| 167 return (!page) ? nullptr : page->scrollingCoordinator(); | 168 return (!page) ? nullptr : page->scrollingCoordinator(); |
| 168 } | 169 } |
| 169 | 170 |
| 170 CompositedLayerMapping::CompositedLayerMapping(PaintLayer& layer) | 171 CompositedLayerMapping::CompositedLayerMapping(PaintLayer& layer) |
| 171 : m_owningLayer(layer), | 172 : m_owningLayer(layer), |
| 172 m_contentOffsetInCompositingLayerDirty(false), | 173 m_contentOffsetInCompositingLayerDirty(false), |
| 173 m_pendingUpdateScope(GraphicsLayerUpdateNone), | 174 m_pendingUpdateScope(GraphicsLayerUpdateNone), |
| 174 m_isMainFrameLayoutViewLayer(false), | 175 m_isMainFrameLayoutViewLayer(false), |
| 175 m_backgroundLayerPaintsFixedRootBackground(false), | 176 m_backgroundLayerPaintsFixedRootBackground(false), |
| (...skipping 3370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3546 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { | 3547 } else if (graphicsLayer == m_decorationOutlineLayer.get()) { |
| 3547 name = "Decoration Layer"; | 3548 name = "Decoration Layer"; |
| 3548 } else { | 3549 } else { |
| 3549 NOTREACHED(); | 3550 NOTREACHED(); |
| 3550 } | 3551 } |
| 3551 | 3552 |
| 3552 return name; | 3553 return name; |
| 3553 } | 3554 } |
| 3554 | 3555 |
| 3555 } // namespace blink | 3556 } // namespace blink |
| OLD | NEW |