| 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 web_constraint.top_offset = constraints.TopOffset(); | 324 web_constraint.top_offset = constraints.TopOffset(); |
| 325 web_constraint.bottom_offset = constraints.BottomOffset(); | 325 web_constraint.bottom_offset = constraints.BottomOffset(); |
| 326 web_constraint.scroll_container_relative_sticky_box_rect = | 326 web_constraint.scroll_container_relative_sticky_box_rect = |
| 327 EnclosingIntRect(constraints.ScrollContainerRelativeStickyBoxRect()); | 327 EnclosingIntRect(constraints.ScrollContainerRelativeStickyBoxRect()); |
| 328 web_constraint.scroll_container_relative_containing_block_rect = | 328 web_constraint.scroll_container_relative_containing_block_rect = |
| 329 EnclosingIntRect( | 329 EnclosingIntRect( |
| 330 constraints.ScrollContainerRelativeContainingBlockRect()); | 330 constraints.ScrollContainerRelativeContainingBlockRect()); |
| 331 // TODO(smcgruer): Until http://crbug.com/702229 is fixed, the nearest | 331 // TODO(smcgruer): Until http://crbug.com/702229 is fixed, the nearest |
| 332 // sticky layers may not be composited and we may incorrectly end up with | 332 // sticky layers may not be composited and we may incorrectly end up with |
| 333 // invalid layer IDs. | 333 // invalid layer IDs. |
| 334 LayoutBoxModelObject* sticky_box_shifting_ancestor = | 334 PaintLayer* sticky_box_shifting_ancestor = |
| 335 constraints.NearestStickyBoxShiftingStickyBox(); | 335 constraints.NearestStickyLayerShiftingStickyBox(); |
| 336 if (sticky_box_shifting_ancestor && | 336 if (sticky_box_shifting_ancestor && |
| 337 sticky_box_shifting_ancestor->Layer()->GetCompositedLayerMapping()) { | 337 sticky_box_shifting_ancestor->GetCompositedLayerMapping()) { |
| 338 web_constraint.nearest_layer_shifting_sticky_box = | 338 web_constraint.nearest_layer_shifting_sticky_box = |
| 339 sticky_box_shifting_ancestor->Layer() | 339 sticky_box_shifting_ancestor->GetCompositedLayerMapping() |
| 340 ->GetCompositedLayerMapping() | |
| 341 ->MainGraphicsLayer() | 340 ->MainGraphicsLayer() |
| 342 ->PlatformLayer() | 341 ->PlatformLayer() |
| 343 ->Id(); | 342 ->Id(); |
| 344 } | 343 } |
| 345 LayoutBoxModelObject* containing_block_shifting_ancestor = | 344 PaintLayer* containing_block_shifting_ancestor = |
| 346 constraints.NearestStickyBoxShiftingContainingBlock(); | 345 constraints.NearestStickyLayerShiftingContainingBlock(); |
| 347 if (containing_block_shifting_ancestor && | 346 if (containing_block_shifting_ancestor && |
| 348 containing_block_shifting_ancestor->Layer() | 347 containing_block_shifting_ancestor->GetCompositedLayerMapping()) { |
| 349 ->GetCompositedLayerMapping()) { | |
| 350 web_constraint.nearest_layer_shifting_containing_block = | 348 web_constraint.nearest_layer_shifting_containing_block = |
| 351 containing_block_shifting_ancestor->Layer() | 349 containing_block_shifting_ancestor->GetCompositedLayerMapping() |
| 352 ->GetCompositedLayerMapping() | |
| 353 ->MainGraphicsLayer() | 350 ->MainGraphicsLayer() |
| 354 ->PlatformLayer() | 351 ->PlatformLayer() |
| 355 ->Id(); | 352 ->Id(); |
| 356 } | 353 } |
| 357 | 354 |
| 358 graphics_layer_->SetStickyPositionConstraint(web_constraint); | 355 graphics_layer_->SetStickyPositionConstraint(web_constraint); |
| 359 } | 356 } |
| 360 | 357 |
| 361 void CompositedLayerMapping::UpdateLayerBlendMode(const ComputedStyle& style) { | 358 void CompositedLayerMapping::UpdateLayerBlendMode(const ComputedStyle& style) { |
| 362 SetBlendMode(style.BlendMode()); | 359 SetBlendMode(style.BlendMode()); |
| (...skipping 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3617 } else if (graphics_layer == decoration_outline_layer_.get()) { | 3614 } else if (graphics_layer == decoration_outline_layer_.get()) { |
| 3618 name = "Decoration Layer"; | 3615 name = "Decoration Layer"; |
| 3619 } else { | 3616 } else { |
| 3620 NOTREACHED(); | 3617 NOTREACHED(); |
| 3621 } | 3618 } |
| 3622 | 3619 |
| 3623 return name; | 3620 return name; |
| 3624 } | 3621 } |
| 3625 | 3622 |
| 3626 } // namespace blink | 3623 } // namespace blink |
| OLD | NEW |