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

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

Issue 2670603002: Avoid pathological layout on nested percent height tables (Closed)
Patch Set: bug 687061 Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | no next file » | 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, 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const; 323 int paginationStrutForRow(LayoutTableRow*, LayoutUnit logicalOffset) const;
324 324
325 bool mapToVisualRectInAncestorSpace( 325 bool mapToVisualRectInAncestorSpace(
326 const LayoutBoxModelObject* ancestor, 326 const LayoutBoxModelObject* ancestor,
327 LayoutRect&, 327 LayoutRect&,
328 VisualRectFlags = DefaultVisualRectFlags) const override; 328 VisualRectFlags = DefaultVisualRectFlags) const override;
329 329
330 bool isRepeatingHeaderGroup() const; 330 bool isRepeatingHeaderGroup() const;
331 331
332 void layout() override;
333
332 protected: 334 protected:
333 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override; 335 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
334 bool nodeAtPoint(HitTestResult&, 336 bool nodeAtPoint(HitTestResult&,
335 const HitTestLocation& locationInContainer, 337 const HitTestLocation& locationInContainer,
336 const LayoutPoint& accumulatedOffset, 338 const LayoutPoint& accumulatedOffset,
337 HitTestAction) override; 339 HitTestAction) override;
338 340
339 private: 341 private:
340 bool isOfType(LayoutObjectType type) const override { 342 bool isOfType(LayoutObjectType type) const override {
341 return type == LayoutObjectTableSection || LayoutBox::isOfType(type); 343 return type == LayoutObjectTableSection || LayoutBox::isOfType(type);
342 } 344 }
343 345
344 void willBeRemovedFromTree() override; 346 void willBeRemovedFromTree() override;
345 347
346 void layout() override;
347
348 int borderSpacingForRow(unsigned row) const { 348 int borderSpacingForRow(unsigned row) const {
349 return m_grid[row].rowLayoutObject ? table()->vBorderSpacing() : 0; 349 return m_grid[row].rowLayoutObject ? table()->vBorderSpacing() : 0;
350 } 350 }
351 351
352 void ensureRows(unsigned numRows) { 352 void ensureRows(unsigned numRows) {
353 if (numRows > m_grid.size()) 353 if (numRows > m_grid.size())
354 m_grid.grow(numRows); 354 m_grid.grow(numRows);
355 } 355 }
356 356
357 void ensureCols(unsigned rowIndex, unsigned numCols) { 357 void ensureCols(unsigned rowIndex, unsigned numCols) {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // The use is to disable a painting optimization where we just paint the 475 // The use is to disable a painting optimization where we just paint the
476 // invalidated cells. 476 // invalidated cells.
477 bool m_hasMultipleCellLevels; 477 bool m_hasMultipleCellLevels;
478 }; 478 };
479 479
480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 480 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
481 481
482 } // namespace blink 482 } // namespace blink
483 483
484 #endif // LayoutTableSection_h 484 #endif // LayoutTableSection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698