OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 : containing_block_logical_width_changed_( | 47 : containing_block_logical_width_changed_( |
48 containing_block_logical_width_changed), | 48 containing_block_logical_width_changed), |
49 next_(layout_object.View()->GetLayoutState()), | 49 next_(layout_object.View()->GetLayoutState()), |
50 layout_object_(layout_object) { | 50 layout_object_(layout_object) { |
51 if (layout_object.IsLayoutFlowThread()) | 51 if (layout_object.IsLayoutFlowThread()) |
52 flow_thread_ = ToLayoutFlowThread(&layout_object); | 52 flow_thread_ = ToLayoutFlowThread(&layout_object); |
53 else | 53 else |
54 flow_thread_ = next_->FlowThread(); | 54 flow_thread_ = next_->FlowThread(); |
55 pagination_state_changed_ = next_->pagination_state_changed_; | 55 pagination_state_changed_ = next_->pagination_state_changed_; |
56 height_offset_for_table_headers_ = next_->HeightOffsetForTableHeaders(); | 56 height_offset_for_table_headers_ = next_->HeightOffsetForTableHeaders(); |
| 57 height_offset_for_table_footers_ = next_->HeightOffsetForTableFooters(); |
57 layout_object.View()->PushLayoutState(*this); | 58 layout_object.View()->PushLayoutState(*this); |
58 | 59 |
59 if (layout_object.IsLayoutFlowThread()) { | 60 if (layout_object.IsLayoutFlowThread()) { |
60 // Entering a new pagination context. | 61 // Entering a new pagination context. |
61 pagination_offset_ = LayoutSize(); | 62 pagination_offset_ = LayoutSize(); |
62 is_paginated_ = true; | 63 is_paginated_ = true; |
63 return; | 64 return; |
64 } | 65 } |
65 | 66 |
66 // Disable pagination for objects we don't support. For now this includes | 67 // Disable pagination for objects we don't support. For now this includes |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 123 |
123 LayoutUnit LayoutState::PageLogicalOffset( | 124 LayoutUnit LayoutState::PageLogicalOffset( |
124 const LayoutBox& child, | 125 const LayoutBox& child, |
125 const LayoutUnit& child_logical_offset) const { | 126 const LayoutUnit& child_logical_offset) const { |
126 if (child.IsHorizontalWritingMode()) | 127 if (child.IsHorizontalWritingMode()) |
127 return pagination_offset_.Height() + child_logical_offset; | 128 return pagination_offset_.Height() + child_logical_offset; |
128 return pagination_offset_.Width() + child_logical_offset; | 129 return pagination_offset_.Width() + child_logical_offset; |
129 } | 130 } |
130 | 131 |
131 } // namespace blink | 132 } // namespace blink |
OLD | NEW |