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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTable.h

Issue 2584143003: Repeat footers in paginated context (Closed)
Patch Set: bug 656232 Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutTable.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.h b/third_party/WebKit/Source/core/layout/LayoutTable.h
index fe3b67a627df9896665cbefbcc1bc8c538635182..dd073123f7e5ed4dc9a2415775d4616793d983a7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.h
@@ -253,6 +253,20 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
effective_column_positions_[index] = position;
}
+ // |page| is the page the row is on relative to the start of the table.
+ void SetPositionOfRepeatingFooterGroupOnPage(unsigned page,
+ LayoutUnit position) {
+ if (position_of_repeating_footer_group_on_page_.size() <= page)
+ position_of_repeating_footer_group_on_page_.Grow(page + 1);
+ position_of_repeating_footer_group_on_page_[page] = position;
+ }
+ const LayoutUnit GetPositionOfRepeatingFooterGroupOnPage(int page) const {
+ return position_of_repeating_footer_group_on_page_[page];
+ }
+ unsigned PagesWithRepeatingFooters() const {
mstensho (USE GERRIT) 2017/05/10 10:59:03 Could you squeeze "Count" (or some synonym) into t
+ return position_of_repeating_footer_group_on_page_.size();
+ }
+
LayoutTableSection* Header() const {
// TODO(mstensho): We should ideally DCHECK(!needsSectionRecalc()) here, but
// we currently cannot, due to crbug.com/693212
@@ -445,7 +459,9 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
void PaintMask(const PaintInfo&, const LayoutPoint&) const final;
- void SubtractCaptionRect(LayoutRect&) const;
+ enum CaptionSelector { BottomCaptionsOnly, AllCaptions };
+ void SubtractCaptionRect(LayoutRect&,
+ CaptionSelector captions = AllCaptions) const;
bool IsLogicalWidthAuto() const;
@@ -555,6 +571,8 @@ class CORE_EXPORT LayoutTable final : public LayoutBlock {
// numEffectiveColumns() + 1.
mutable Vector<int> effective_column_positions_;
+ mutable Vector<LayoutUnit> position_of_repeating_footer_group_on_page_;
+
// The captions associated with this object.
mutable Vector<LayoutTableCaption*> captions_;

Powered by Google App Engine
This is Rietveld 408576698