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

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

Issue 1405393002: Crashes when percent calculation of row's height goes very high. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments addressed Created 4 years, 11 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; } 324 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; }
325 325
326 void ensureRows(unsigned); 326 void ensureRows(unsigned);
327 327
328 bool rowHasOnlySpanningCells(unsigned); 328 bool rowHasOnlySpanningCells(unsigned);
329 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&); 329 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&);
330 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&); 330 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&);
331 331
332 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&); 332 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&);
333 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, int, int&, Vector<int>&); 333 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int& , Vector<int>&);
334 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&, Vector<int>&); 334 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&, Vector<int>&);
335 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec tor<int>&); 335 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec tor<int>&);
336 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int& , Vector<int>&); 336 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int& , Vector<int>&);
337 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells); 337 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells);
338 338
339 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int totalPercent); 339 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int totalPercent);
340 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne d autoRowsCount); 340 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne d autoRowsCount);
341 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight); 341 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight);
342 342
343 void updateBaselineForCell(LayoutTableCell*, unsigned row, LayoutUnit& basel ineDescent); 343 void updateBaselineForCell(LayoutTableCell*, unsigned row, LayoutUnit& basel ineDescent);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // It is held at LayoutTableSection level to spare memory consumption by tab le cells. 408 // It is held at LayoutTableSection level to spare memory consumption by tab le cells.
409 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i nt>, CollapsedBorderValue>; 409 using CellsCollapsedBordersMap = HashMap<std::pair<const LayoutTableCell*, i nt>, CollapsedBorderValue>;
410 CellsCollapsedBordersMap m_cellsCollapsedBorders; 410 CellsCollapsedBordersMap m_cellsCollapsedBorders;
411 }; 411 };
412 412
413 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 413 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
414 414
415 } // namespace blink 415 } // namespace blink
416 416
417 #endif // LayoutTableSection_h 417 #endif // LayoutTableSection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698