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