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

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

Issue 2388613002: Move below headers even when row doesn't require a strut (Closed)
Patch Set: bug 642814 Created 4 years, 2 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
11 * License as published by the Free Software Foundation; either 11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version. 12 * version 2 of the License, or (at your option) any later version.
13 * 13 *
14 * This library is distributed in the hope that it will be useful, 14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details. 17 * Library General Public License for more details.
18 * 18 *
19 * You should have received a copy of the GNU Library General Public License 19 * You should have received a copy of the GNU Library General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to 20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA. 22 * Boston, MA 02110-1301, USA.
23 */ 23 */
24 24
25 #ifndef LayoutTableSection_h 25 #ifndef LayoutTableSection_h
26 #define LayoutTableSection_h 26 #define LayoutTableSection_h
27 27
28 #include "core/CoreExport.h" 28 #include "core/CoreExport.h"
29 #include "core/layout/LayoutState.h"
29 #include "core/layout/LayoutTable.h" 30 #include "core/layout/LayoutTable.h"
30 #include "core/layout/LayoutTableBoxComponent.h" 31 #include "core/layout/LayoutTableBoxComponent.h"
31 #include "wtf/Vector.h" 32 #include "wtf/Vector.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 // This variable is used to balance the memory consumption vs the paint invalida tion time on big tables. 36 // This variable is used to balance the memory consumption vs the paint invalida tion time on big tables.
36 const float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f; 37 const float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f;
37 38
38 // Helper class for paintObject. 39 // Helper class for paintObject.
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // For simplicity, just conservatively assume all table sections are not opaqu e. 306 // For simplicity, just conservatively assume all table sections are not opaqu e.
306 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, 307 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&,
307 unsigned) const override { 308 unsigned) const override {
308 return false; 309 return false;
309 } 310 }
310 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { 311 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override {
311 return false; 312 return false;
312 } 313 }
313 314
314 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const; 315 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const;
316 bool needsStrutForTableHeaders(const LayoutState& state,
mstensho (USE GERRIT) 2016/10/04 21:02:38 I think I'd non-inline this, and skip the LayoutSt
317 LayoutUnit logicalOffset) {
318 return state.heightOffsetForTableHeaders() &&
319 (pageRemainingLogicalHeightForOffset(
mstensho (USE GERRIT) 2016/10/04 21:02:38 Expression doesn't need to be in parentheses. (Ma
rhogan 2016/10/04 21:10:45 God it's awful.
320 logicalOffset, LayoutBlock::AssociateWithLatterPage) ==
mstensho (USE GERRIT) 2016/10/04 21:02:38 AssociateWithLatterPage is defined in LayoutBox, s
321 pageLogicalHeightForOffset(logicalOffset));
322 };
315 323
316 void setOffsetForRepeatingHeader(LayoutUnit offset) { 324 void setOffsetForRepeatingHeader(LayoutUnit offset) {
317 m_offsetForRepeatingHeader = offset; 325 m_offsetForRepeatingHeader = offset;
318 } 326 }
319 LayoutUnit offsetForRepeatingHeader() const { 327 LayoutUnit offsetForRepeatingHeader() const {
320 return m_offsetForRepeatingHeader; 328 return m_offsetForRepeatingHeader;
321 } 329 }
322 330
323 bool mapToVisualRectInAncestorSpace( 331 bool mapToVisualRectInAncestorSpace(
324 const LayoutBoxModelObject* ancestor, 332 const LayoutBoxModelObject* ancestor,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 bool m_hasMultipleCellLevels; 464 bool m_hasMultipleCellLevels;
457 465
458 LayoutUnit m_offsetForRepeatingHeader; 466 LayoutUnit m_offsetForRepeatingHeader;
459 }; 467 };
460 468
461 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 469 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
462 470
463 } // namespace blink 471 } // namespace blink
464 472
465 #endif // LayoutTableSection_h 473 #endif // LayoutTableSection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698