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

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

Issue 2079603002: Handle nested theads correctly when paginated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 620456 Created 4 years, 5 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 LayoutState(LayoutBox&, const LayoutSize& offset, LayoutUnit pageLogicalHeig ht = LayoutUnit(), bool pageHeightLogicalChanged = false, bool containingBlockLo gicalWidthChanged = false); 73 LayoutState(LayoutBox&, const LayoutSize& offset, LayoutUnit pageLogicalHeig ht = LayoutUnit(), bool pageHeightLogicalChanged = false, bool containingBlockLo gicalWidthChanged = false);
74 74
75 ~LayoutState(); 75 ~LayoutState();
76 76
77 bool isPaginated() const { return m_isPaginated; } 77 bool isPaginated() const { return m_isPaginated; }
78 78
79 // The page logical offset is the object's offset from the top of the page i n the page progression 79 // The page logical offset is the object's offset from the top of the page i n the page progression
80 // direction (so an x-offset in vertical text and a y-offset for horizontal text). 80 // direction (so an x-offset in vertical text and a y-offset for horizontal text).
81 LayoutUnit pageLogicalOffset(const LayoutBox&, const LayoutUnit& childLogica lOffset) const; 81 LayoutUnit pageLogicalOffset(const LayoutBox&, const LayoutUnit& childLogica lOffset) const;
82 82
83 LayoutUnit heightOffsetForTableHeaders() const { return m_heightOffsetForTab leHeaders; };
84 void setHeightOffsetForTableHeaders(LayoutUnit offset) { m_heightOffsetForTa bleHeaders = offset; };
85
83 const LayoutSize& layoutOffset() const { return m_layoutOffset; } 86 const LayoutSize& layoutOffset() const { return m_layoutOffset; }
84 const LayoutSize& pageOffset() const { return m_pageOffset; } 87 const LayoutSize& pageOffset() const { return m_pageOffset; }
85 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; } 88 LayoutUnit pageLogicalHeight() const { return m_pageLogicalHeight; }
86 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } 89 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
87 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; } 90 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; }
88 91
89 LayoutState* next() const { return m_next; } 92 LayoutState* next() const { return m_next; }
90 93
91 LayoutFlowThread* flowThread() const { return m_flowThread; } 94 LayoutFlowThread* flowThread() const { return m_flowThread; }
92 95
93 LayoutObject& layoutObject() const { return m_layoutObject; } 96 LayoutObject& layoutObject() const { return m_layoutObject; }
94 97
95 private: 98 private:
96 // Do not add anything apart from bitfields until after m_flowThread. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173 99 // Do not add anything apart from bitfields until after m_flowThread. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173
97 bool m_isPaginated : 1; 100 bool m_isPaginated : 1;
98 // If our page height has changed, this will force all blocks to relayout. 101 // If our page height has changed, this will force all blocks to relayout.
99 bool m_pageLogicalHeightChanged : 1; 102 bool m_pageLogicalHeightChanged : 1;
100 bool m_containingBlockLogicalWidthChanged : 1; 103 bool m_containingBlockLogicalWidthChanged : 1;
101 104
102 LayoutFlowThread* m_flowThread; 105 LayoutFlowThread* m_flowThread;
103 106
104 LayoutState* m_next; 107 LayoutState* m_next;
105 108
106 // x/y offset from container. Does not include relative positioning or scrol l offsets. 109 // x/y offset from container. Does not include relative positioning or scrol l offsets.
107 LayoutSize m_layoutOffset; 110 LayoutSize m_layoutOffset;
108 111
109 // The current page height for the pagination model that encloses us. 112 // The current page height for the pagination model that encloses us.
110 LayoutUnit m_pageLogicalHeight; 113 LayoutUnit m_pageLogicalHeight;
114
115 // The height we need to make available for repeating table headers in pagin ated layout.
116 LayoutUnit m_heightOffsetForTableHeaders;
117
111 // The offset of the start of the first page in the nearest enclosing pagina tion model. 118 // The offset of the start of the first page in the nearest enclosing pagina tion model.
112 LayoutSize m_pageOffset; 119 LayoutSize m_pageOffset;
113 120
114 LayoutObject& m_layoutObject; 121 LayoutObject& m_layoutObject;
115 }; 122 };
116 123
117 } // namespace blink 124 } // namespace blink
118 125
119 #endif // LayoutState_h 126 #endif // LayoutState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698