| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 bool is_anchored_top : 1; | 44 bool is_anchored_top : 1; |
| 45 bool is_anchored_bottom : 1; | 45 bool is_anchored_bottom : 1; |
| 46 | 46 |
| 47 // For each edge, when the anchored bit above is set this gives the distance | 47 // For each edge, when the anchored bit above is set this gives the distance |
| 48 // to keep the element from that edge of the ancestor scroller or viewport. | 48 // to keep the element from that edge of the ancestor scroller or viewport. |
| 49 float left_offset; | 49 float left_offset; |
| 50 float right_offset; | 50 float right_offset; |
| 51 float top_offset; | 51 float top_offset; |
| 52 float bottom_offset; | 52 float bottom_offset; |
| 53 | 53 |
| 54 // This is the layout position of the sticky element before it has been | |
| 55 // shifted relative to the enclosing composited layer. | |
| 56 WebPoint parent_relative_sticky_box_offset; | |
| 57 | |
| 58 // The layout rectangle of the sticky element before it has been shifted | 54 // The layout rectangle of the sticky element before it has been shifted |
| 59 // to stick. | 55 // to stick. |
| 60 WebRect scroll_container_relative_sticky_box_rect; | 56 WebRect scroll_container_relative_sticky_box_rect; |
| 61 | 57 |
| 62 // The layout rectangle of the containing block edges which this sticky | 58 // The layout rectangle of the containing block edges which this sticky |
| 63 // element should not be shifted beyond. | 59 // element should not be shifted beyond. |
| 64 WebRect scroll_container_relative_containing_block_rect; | 60 WebRect scroll_container_relative_containing_block_rect; |
| 65 | 61 |
| 66 // The nearest ancestor sticky layers that affect the sticky box constraint | 62 // The nearest ancestor sticky layers that affect the sticky box constraint |
| 67 // rect and the containing block constraint rect respectively. | 63 // rect and the containing block constraint rect respectively. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 78 right_offset(0.f), | 74 right_offset(0.f), |
| 79 top_offset(0.f), | 75 top_offset(0.f), |
| 80 bottom_offset(0.f), | 76 bottom_offset(0.f), |
| 81 nearest_layer_shifting_sticky_box(WebLayer::kInvalidLayerId), | 77 nearest_layer_shifting_sticky_box(WebLayer::kInvalidLayerId), |
| 82 nearest_layer_shifting_containing_block(WebLayer::kInvalidLayerId) {} | 78 nearest_layer_shifting_containing_block(WebLayer::kInvalidLayerId) {} |
| 83 }; | 79 }; |
| 84 | 80 |
| 85 } // namespace blink | 81 } // namespace blink |
| 86 | 82 |
| 87 #endif // WebLayerStickyPositionConstraint_h | 83 #endif // WebLayerStickyPositionConstraint_h |
| OLD | NEW |