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

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

Issue 2079603002: Handle nested theads correctly when paginated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 620456 Created 4 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 reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv ed.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 const char* name() const override { return "LayoutTableSection"; } 292 const char* name() const override { return "LayoutTableSection"; }
293 293
294 // Whether a section has opaque background depends on many factors, e.g. bor der spacing, 294 // Whether a section has opaque background depends on many factors, e.g. bor der spacing,
295 // border collapsing, missing cells, etc. 295 // border collapsing, missing cells, etc.
296 // For simplicity, just conservatively assume all table sections are not opa que. 296 // For simplicity, just conservatively assume all table sections are not opa que.
297 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov erride { return false; } 297 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov erride { return false; }
298 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r eturn false; } 298 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r eturn false; }
299 299
300 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const; 300 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const;
301 301
302 void setOffsetForRepeatingHeader(LayoutUnit offset) { m_offsetForRepeatingHe ader = offset; }
303 LayoutUnit offsetForRepeatingHeader() const { return m_offsetForRepeatingHea der; }
304
302 protected: 305 protected:
303 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; 306 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
304 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; 307 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
305 308
306 private: 309 private:
307 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectTableSection || LayoutBox::isOfType(type); } 310 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectTableSection || LayoutBox::isOfType(type); }
308 311
309 void willBeRemovedFromTree() override; 312 void willBeRemovedFromTree() override;
310 313
311 void layout() override; 314 void layout() override;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // and m_forceSlowPaintPathWithOverflowingCell will be set to save memory. 386 // and m_forceSlowPaintPathWithOverflowingCell will be set to save memory.
384 HashSet<LayoutTableCell*> m_overflowingCells; 387 HashSet<LayoutTableCell*> m_overflowingCells;
385 bool m_forceSlowPaintPathWithOverflowingCell; 388 bool m_forceSlowPaintPathWithOverflowingCell;
386 389
387 // This boolean tracks if we have cells overlapping due to rowspan / colspan 390 // This boolean tracks if we have cells overlapping due to rowspan / colspan
388 // (see class comment above about when it could appear). 391 // (see class comment above about when it could appear).
389 // 392 //
390 // The use is to disable a painting optimization where we just paint the 393 // The use is to disable a painting optimization where we just paint the
391 // invalidated cells. 394 // invalidated cells.
392 bool m_hasMultipleCellLevels; 395 bool m_hasMultipleCellLevels;
396
397 LayoutUnit m_offsetForRepeatingHeader;
393 }; 398 };
394 399
395 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 400 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
396 401
397 } // namespace blink 402 } // namespace blink
398 403
399 #endif // LayoutTableSection_h 404 #endif // LayoutTableSection_h
OLDNEW
« 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