| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 // Composited layers that inherit a fixed position state will be positio
ned with respect to the nearest compositedLayerMapping's GraphicsLayer. | 205 // Composited layers that inherit a fixed position state will be positio
ned with respect to the nearest compositedLayerMapping's GraphicsLayer. |
| 206 // So, once we find a layer that has its own compositedLayerMapping, we
can stop searching for a fixed position RenderObject. | 206 // So, once we find a layer that has its own compositedLayerMapping, we
can stop searching for a fixed position RenderObject. |
| 207 } while (layer && !layer->hasCompositedLayerMapping()); | 207 } while (layer && !layer->hasCompositedLayerMapping()); |
| 208 return WebLayerPositionConstraint(); | 208 return WebLayerPositionConstraint(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) | 211 void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) |
| 212 { | 212 { |
| 213 ASSERT(layer->hasCompositedLayerMapping()); | 213 ASSERT(layer->hasCompositedLayerMapping()); |
| 214 CompositedLayerMappingPtr compositedLayerMapping = layer->compositedLayerMap
ping(); | 214 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi
ng(); |
| 215 GraphicsLayer* mainLayer = compositedLayerMapping->localRootForOwningLayer()
; | 215 GraphicsLayer* mainLayer = compositedLayerMapping->localRootForOwningLayer()
; |
| 216 | 216 |
| 217 // Avoid unnecessary commits | 217 // Avoid unnecessary commits |
| 218 clearPositionConstraintExceptForLayer(compositedLayerMapping->ancestorClippi
ngLayer(), mainLayer); | 218 clearPositionConstraintExceptForLayer(compositedLayerMapping->ancestorClippi
ngLayer(), mainLayer); |
| 219 clearPositionConstraintExceptForLayer(compositedLayerMapping->mainGraphicsLa
yer(), mainLayer); | 219 clearPositionConstraintExceptForLayer(compositedLayerMapping->mainGraphicsLa
yer(), mainLayer); |
| 220 | 220 |
| 221 if (WebLayer* scrollableLayer = toWebLayer(mainLayer)) | 221 if (WebLayer* scrollableLayer = toWebLayer(mainLayer)) |
| 222 scrollableLayer->setPositionConstraint(computePositionConstraint(layer))
; | 222 scrollableLayer->setPositionConstraint(computePositionConstraint(layer))
; |
| 223 } | 223 } |
| 224 | 224 |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 bool frameIsScrollable = frameView && frameView->isScrollable(); | 950 bool frameIsScrollable = frameView && frameView->isScrollable(); |
| 951 if (frameIsScrollable != m_wasFrameScrollable) | 951 if (frameIsScrollable != m_wasFrameScrollable) |
| 952 return true; | 952 return true; |
| 953 | 953 |
| 954 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) | 954 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll
ing()) : 0) |
| 955 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); | 955 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds(
); |
| 956 return false; | 956 return false; |
| 957 } | 957 } |
| 958 | 958 |
| 959 } // namespace blink | 959 } // namespace blink |
| OLD | NEW |