OLD | NEW |
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 Loading... |
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); | 364 void RelayoutCellIfFlexed(LayoutTableCell&, int row_index, int row_height); |
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 return Table()->Header() == this && GroupShouldRepeat(); |
| 376 } |
| 377 |
| 378 bool FooterGroupShouldRepeat() const { |
| 379 return Table()->Footer() == this && GroupShouldRepeat(); |
| 380 } |
| 381 |
| 382 bool GroupShouldRepeat() const; |
370 | 383 |
371 struct TableGridRow { | 384 struct TableGridRow { |
372 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 385 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
373 | 386 |
374 public: | 387 public: |
375 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); | 388 inline void SetRowLogicalHeightToRowStyleLogicalHeight(); |
376 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); | 389 inline void UpdateLogicalHeightForCell(const LayoutTableCell*); |
377 | 390 |
378 // The index is effective column index. | 391 // The index is effective column index. |
379 Vector<TableGridCell> grid_cells; | 392 Vector<TableGridCell> grid_cells; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 // | 434 // |
422 // The use is to disable a painting optimization where we just paint the | 435 // The use is to disable a painting optimization where we just paint the |
423 // invalidated cells. | 436 // invalidated cells. |
424 bool has_multiple_cell_levels_; | 437 bool has_multiple_cell_levels_; |
425 | 438 |
426 // Whether any cell spans multiple rows or cols. | 439 // Whether any cell spans multiple rows or cols. |
427 bool has_spanning_cells_; | 440 bool has_spanning_cells_; |
428 | 441 |
429 // Header group should be painted on every page. | 442 // Header group should be painted on every page. |
430 bool is_repeating_header_group_; | 443 bool is_repeating_header_group_; |
| 444 |
| 445 // Footer group should be painted on every page. |
| 446 bool is_repeating_footer_group_; |
431 }; | 447 }; |
432 | 448 |
433 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); | 449 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, IsTableSection()); |
434 | 450 |
435 } // namespace blink | 451 } // namespace blink |
436 | 452 |
437 #endif // LayoutTableSection_h | 453 #endif // LayoutTableSection_h |
OLD | NEW |