| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 StickyPositionScrollingConstraints::kAnchorEdgeBottom; | 321 StickyPositionScrollingConstraints::kAnchorEdgeBottom; |
| 322 web_constraint.left_offset = constraints.LeftOffset(); | 322 web_constraint.left_offset = constraints.LeftOffset(); |
| 323 web_constraint.right_offset = constraints.RightOffset(); | 323 web_constraint.right_offset = constraints.RightOffset(); |
| 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 LayoutBoxModelObject* sticky_box_shifting_ancestor = | 331 PaintLayer* sticky_box_shifting_ancestor = |
| 332 constraints.NearestStickyBoxShiftingStickyBox(); | 332 constraints.NearestStickyLayerShiftingStickyBox(); |
| 333 if (sticky_box_shifting_ancestor && | 333 if (sticky_box_shifting_ancestor && |
| 334 sticky_box_shifting_ancestor->Layer()->GetCompositedLayerMapping()) { | 334 sticky_box_shifting_ancestor->GetCompositedLayerMapping()) { |
| 335 web_constraint.nearest_layer_shifting_sticky_box = | 335 web_constraint.nearest_layer_shifting_sticky_box = |
| 336 sticky_box_shifting_ancestor->Layer() | 336 sticky_box_shifting_ancestor->GetCompositedLayerMapping() |
| 337 ->GetCompositedLayerMapping() | |
| 338 ->MainGraphicsLayer() | 337 ->MainGraphicsLayer() |
| 339 ->PlatformLayer() | 338 ->PlatformLayer() |
| 340 ->Id(); | 339 ->Id(); |
| 341 } | 340 } |
| 342 LayoutBoxModelObject* containing_block_shifting_ancestor = | 341 PaintLayer* containing_block_shifting_ancestor = |
| 343 constraints.NearestStickyBoxShiftingContainingBlock(); | 342 constraints.NearestStickyLayerShiftingContainingBlock(); |
| 344 if (containing_block_shifting_ancestor && | 343 if (containing_block_shifting_ancestor && |
| 345 containing_block_shifting_ancestor->Layer() | 344 containing_block_shifting_ancestor->GetCompositedLayerMapping()) { |
| 346 ->GetCompositedLayerMapping()) { | |
| 347 web_constraint.nearest_layer_shifting_containing_block = | 345 web_constraint.nearest_layer_shifting_containing_block = |
| 348 containing_block_shifting_ancestor->Layer() | 346 containing_block_shifting_ancestor->GetCompositedLayerMapping() |
| 349 ->GetCompositedLayerMapping() | |
| 350 ->MainGraphicsLayer() | 347 ->MainGraphicsLayer() |
| 351 ->PlatformLayer() | 348 ->PlatformLayer() |
| 352 ->Id(); | 349 ->Id(); |
| 353 } | 350 } |
| 354 | 351 |
| 355 graphics_layer_->SetStickyPositionConstraint(web_constraint); | 352 graphics_layer_->SetStickyPositionConstraint(web_constraint); |
| 356 } | 353 } |
| 357 | 354 |
| 358 void CompositedLayerMapping::UpdateLayerBlendMode(const ComputedStyle& style) { | 355 void CompositedLayerMapping::UpdateLayerBlendMode(const ComputedStyle& style) { |
| 359 SetBlendMode(style.BlendMode()); | 356 SetBlendMode(style.BlendMode()); |
| (...skipping 3260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3620 } else if (graphics_layer == decoration_outline_layer_.get()) { | 3617 } else if (graphics_layer == decoration_outline_layer_.get()) { |
| 3621 name = "Decoration Layer"; | 3618 name = "Decoration Layer"; |
| 3622 } else { | 3619 } else { |
| 3623 NOTREACHED(); | 3620 NOTREACHED(); |
| 3624 } | 3621 } |
| 3625 | 3622 |
| 3626 return name; | 3623 return name; |
| 3627 } | 3624 } |
| 3628 | 3625 |
| 3629 } // namespace blink | 3626 } // namespace blink |
| OLD | NEW |