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

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

Issue 2584143003: Repeat footers in paginated context (Closed)
Patch Set: bug 656232 Created 3 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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights
8 * reserved. 8 * reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 259
260 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const; 260 int PaginationStrutForRow(LayoutTableRow*, LayoutUnit logical_offset) const;
261 261
262 bool MapToVisualRectInAncestorSpaceInternal( 262 bool MapToVisualRectInAncestorSpaceInternal(
263 const LayoutBoxModelObject* ancestor, 263 const LayoutBoxModelObject* ancestor,
264 TransformState&, 264 TransformState&,
265 VisualRectFlags = kDefaultVisualRectFlags) const override; 265 VisualRectFlags = kDefaultVisualRectFlags) const override;
266 266
267 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; }; 267 bool IsRepeatingHeaderGroup() const { return is_repeating_header_group_; };
268 bool IsRepeatingFooterGroup() const { return is_repeating_footer_group_; };
268 269
269 void UpdateLayout() override; 270 void UpdateLayout() override;
270 271
271 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); } 272 CellSpan FullSectionRowSpan() const { return CellSpan(0, grid_.size()); }
272 CellSpan FullTableEffectiveColumnSpan() const { 273 CellSpan FullTableEffectiveColumnSpan() const {
273 return CellSpan(0, Table()->NumEffectiveColumns()); 274 return CellSpan(0, Table()->NumEffectiveColumns());
274 } 275 }
275 276
276 void DetermineIfHeaderGroupShouldRepeat() { 277 void DetermineIfHeaderGroupShouldRepeat() {
277 is_repeating_header_group_ = HeaderGroupShouldRepeat(); 278 is_repeating_header_group_ = HeaderGroupShouldRepeat();
278 } 279 }
279 280
281 void DetermineIfFooterGroupShouldRepeat() {
282 is_repeating_footer_group_ = FooterGroupShouldRepeat();
283 }
284
280 protected: 285 protected:
281 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override; 286 void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override;
282 bool NodeAtPoint(HitTestResult&, 287 bool NodeAtPoint(HitTestResult&,
283 const HitTestLocation& location_in_container, 288 const HitTestLocation& location_in_container,
284 const LayoutPoint& accumulated_offset, 289 const LayoutPoint& accumulated_offset,
285 HitTestAction) override; 290 HitTestAction) override;
286 291
287 private: 292 private:
288 bool IsOfType(LayoutObjectType type) const override { 293 bool IsOfType(LayoutObjectType type) const override {
289 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type); 294 return type == kLayoutObjectTableSection || LayoutBox::IsOfType(type);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 365
361 int LogicalHeightForRow(const LayoutTableRow&) const; 366 int LogicalHeightForRow(const LayoutTableRow&) const;
362 367
363 // Honor breaking restrictions inside the table row, and adjust position and 368 // Honor breaking restrictions inside the table row, and adjust position and
364 // size accordingly. 369 // size accordingly.
365 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&); 370 void AdjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&);
366 371
367 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override; 372 bool PaintedOutputOfObjectHasNoEffectRegardlessOfSize() const override;
368 373
369 bool HeaderGroupShouldRepeat() const; 374 bool HeaderGroupShouldRepeat() const;
375 bool FooterGroupShouldRepeat() const;
376 bool GroupShouldRepeat() const;
370 377
371 struct TableGridRow { 378 struct TableGridRow {
372 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 379 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
373 380
374 public: 381 public:
375 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); 382 inline void SetRowLogicalHeightToRowStyleLogicalHeight();
376 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); 383 inline void UpdateLogicalHeightForCell(const LayoutTableCell*);
377 384
378 // The index is effective column index. 385 // The index is effective column index.
379 Vector<TableGridCell> grid_cells; 386 Vector<TableGridCell> grid_cells;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // 428 //
422 // The use is to disable a painting optimization where we just paint the 429 // The use is to disable a painting optimization where we just paint the
423 // invalidated cells. 430 // invalidated cells.
424 bool has_multiple_cell_levels_; 431 bool has_multiple_cell_levels_;
425 432
426 // Whether any cell spans multiple rows or cols. 433 // Whether any cell spans multiple rows or cols.
427 bool has_spanning_cells_; 434 bool has_spanning_cells_;
428 435
429 // Header group should be painted on every page. 436 // Header group should be painted on every page.
430 bool is_repeating_header_group_; 437 bool is_repeating_header_group_;
438
439 // Footer group should be painted on every page.
440 bool is_repeating_footer_group_;
431 }; 441 };
432 442
433 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); 443 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection());
434 444
435 } // namespace blink 445 } // namespace blink
436 446
437 #endif // LayoutTableSection_h 447 #endif // LayoutTableSection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698