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

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

Issue 2584143003: Repeat footers in paginated context (Closed)
Patch Set: bug 656232 Created 3 years, 4 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/LayoutTableSection.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.h b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
index b4f0b4327a9aa26f92361559743725a0e0078d6d..dd69a112cff9d065833182bd3857a9fe19af8e2e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
@@ -265,6 +265,7 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
VisualRectFlags = kDefaultVisualRectFlags) const override;
bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; };
+ bool IsRepeatingFooterGroup() const { return is_repeating_footer_group_; };
void UpdateLayout() override;
@@ -280,6 +281,10 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
// Check whether row or row group has visibility:collapse.
bool RowHasVisibilityCollapse(unsigned row) const;
+ void DetermineIfFooterGroupShouldRepeat() {
+ is_repeating_footer_group_ = FooterGroupShouldRepeat();
+ }
+
protected:
void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override;
bool NodeAtPoint(HitTestResult&,
@@ -369,7 +374,15 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override;
- bool HeaderGroupShouldRepeat() const;
+ bool HeaderGroupShouldRepeat() const {
+ return Table()->Header() == this && GroupShouldRepeat();
+ }
+
+ bool FooterGroupShouldRepeat() const {
+ return Table()->Footer() == this && GroupShouldRepeat();
+ }
+
+ bool GroupShouldRepeat() const;
struct TableGridRow {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
@@ -440,6 +453,9 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
// Header group should be painted on every page.
bool is_repeating_header_group_;
+
+ // Footer group should be painted on every page.
+ bool is_repeating_footer_group_;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698