Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(883)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutState.cpp

Issue 2882043002: Update our treatment of repeating headers in tables (Closed)
Patch Set: bug 720620 Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool containing_block_logical_width_changed) 46 bool containing_block_logical_width_changed)
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 layout_object.View()->PushLayoutState(*this); 57 layout_object.View()->PushLayoutState(*this);
57 58
58 if (layout_object.IsLayoutFlowThread()) { 59 if (layout_object.IsLayoutFlowThread()) {
59 // Entering a new pagination context. 60 // Entering a new pagination context.
60 pagination_offset_ = LayoutSize(); 61 pagination_offset_ = LayoutSize();
61 is_paginated_ = true; 62 is_paginated_ = true;
62 return; 63 return;
63 } 64 }
64 65
65 // Disable pagination for objects we don't support. For now this includes 66 // Disable pagination for objects we don't support. For now this includes
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 122
122 LayoutUnit LayoutState::PageLogicalOffset( 123 LayoutUnit LayoutState::PageLogicalOffset(
123 const LayoutBox& child, 124 const LayoutBox& child,
124 const LayoutUnit& child_logical_offset) const { 125 const LayoutUnit& child_logical_offset) const {
125 if (child.IsHorizontalWritingMode()) 126 if (child.IsHorizontalWritingMode())
126 return pagination_offset_.Height() + child_logical_offset; 127 return pagination_offset_.Height() + child_logical_offset;
127 return pagination_offset_.Width() + child_logical_offset; 128 return pagination_offset_.Width() + child_logical_offset;
128 } 129 }
129 130
130 } // namespace blink 131 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutState.h ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698