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

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

Issue 2455733003: Provide a dedicated getter for the offset to a repeatable THEAD. (Closed)
Patch Set: code review Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2010 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc.
8 * All rights reserved. 8 * All rights 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 const CollapsedBorderValues& collapsedBorders() const { 408 const CollapsedBorderValues& collapsedBorders() const {
409 ASSERT(m_collapsedBordersValid); 409 ASSERT(m_collapsedBordersValid);
410 return m_collapsedBorders; 410 return m_collapsedBorders;
411 } 411 }
412 412
413 void subtractCaptionRect(LayoutRect&) const; 413 void subtractCaptionRect(LayoutRect&) const;
414 414
415 bool isLogicalWidthAuto() const; 415 bool isLogicalWidthAuto() const;
416 416
417 // When table headers are repeated, we need to know the offset from the block
418 // start of the fragmentation context to the first occurrence of the table
419 // header.
420 LayoutUnit blockOffsetToFirstRepeatableHeader() const {
421 return m_blockOffsetToFirstRepeatableHeader;
422 }
423
417 const char* name() const override { return "LayoutTable"; } 424 const char* name() const override { return "LayoutTable"; }
418 425
419 // Whether a table has opaque foreground depends on many factors, e.g. border 426 // Whether a table has opaque foreground depends on many factors, e.g. border
420 // spacing, missing cells, etc. For simplicity, just conservatively assume 427 // spacing, missing cells, etc. For simplicity, just conservatively assume
421 // foreground of all tables are not opaque. 428 // foreground of all tables are not opaque.
422 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, 429 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&,
423 unsigned) const override { 430 unsigned) const override {
424 return false; 431 return false;
425 } 432 }
426 433
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 if (m_effectiveColumns[c].span > 1) 564 if (m_effectiveColumns[c].span > 1)
558 return c; 565 return c;
559 } 566 }
560 return numEffectiveColumns(); 567 return numEffectiveColumns();
561 } 568 }
562 569
563 short m_hSpacing; 570 short m_hSpacing;
564 short m_vSpacing; 571 short m_vSpacing;
565 int m_borderStart; 572 int m_borderStart;
566 int m_borderEnd; 573 int m_borderEnd;
574
575 LayoutUnit m_blockOffsetToFirstRepeatableHeader;
567 }; 576 };
568 577
569 inline LayoutTableSection* LayoutTable::topSection() const { 578 inline LayoutTableSection* LayoutTable::topSection() const {
570 ASSERT(!needsSectionRecalc()); 579 ASSERT(!needsSectionRecalc());
571 if (m_head) 580 if (m_head)
572 return m_head; 581 return m_head;
573 if (m_firstBody) 582 if (m_firstBody)
574 return m_firstBody; 583 return m_firstBody;
575 return m_foot; 584 return m_foot;
576 } 585 }
577 586
578 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); 587 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable());
579 588
580 } // namespace blink 589 } // namespace blink
581 590
582 #endif // LayoutTable_h 591 #endif // LayoutTable_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698