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

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 5 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
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; } 305 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowLayoutOb ject ? table()->vBorderSpacing() : 0; }
306 306
307 void ensureRows(unsigned); 307 void ensureRows(unsigned);
308 308
309 bool rowHasOnlySpanningCells(unsigned); 309 bool rowHasOnlySpanningCells(unsigned);
310 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&); 310 unsigned calcRowHeightHavingOnlySpanningCells(unsigned, int&, unsigned, unsi gned&, Vector<int>&);
311 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&); 311 void updateRowsHeightHavingOnlySpanningCells(LayoutTableCell*, struct Spanni ngRowsHeight&, unsigned&, Vector<int>&);
312 312
313 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&); 313 void populateSpanningRowsHeightFromCell(LayoutTableCell*, struct SpanningRow sHeight&);
314 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, int, int&, Vector<int>&); 314 void distributeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float,
315 int&, Vector<int>&);
mstensho (USE GERRIT) 2015/11/02 10:46:42 Please put it back on one line.
a.suchit2 2016/01/12 06:46:35 Done.
315 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&, Vector<int>&); 316 void distributeWholeExtraRowSpanHeightToPercentRows(LayoutTableCell*, float, int&, Vector<int>&);
316 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec tor<int>&); 317 void distributeExtraRowSpanHeightToAutoRows(LayoutTableCell*, int, int&, Vec tor<int>&);
317 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int& , Vector<int>&); 318 void distributeExtraRowSpanHeightToRemainingRows(LayoutTableCell*, int, int& , Vector<int>&);
318 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells); 319 void distributeRowSpanHeightToRows(SpanningLayoutTableCells& rowSpanCells);
319 320
320 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int totalPercent); 321 void distributeExtraLogicalHeightToPercentRows(int& extraLogicalHeight, int totalPercent);
321 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne d autoRowsCount); 322 void distributeExtraLogicalHeightToAutoRows(int& extraLogicalHeight, unsigne d autoRowsCount);
322 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight); 323 void distributeRemainingExtraLogicalHeight(int& extraLogicalHeight);
323 324
324 void updateBaselineForCell(LayoutTableCell*, unsigned row, LayoutUnit& basel ineDescent); 325 void updateBaselineForCell(LayoutTableCell*, unsigned row, LayoutUnit& basel ineDescent);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // It is held at LayoutTableSection level to spare memory consumption by tab le cells. 385 // It is held at LayoutTableSection level to spare memory consumption by tab le cells.
385 using CellsCollapsedBordersMap = HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue>; 386 using CellsCollapsedBordersMap = HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue>;
386 CellsCollapsedBordersMap m_cellsCollapsedBorders; 387 CellsCollapsedBordersMap m_cellsCollapsedBorders;
387 }; 388 };
388 389
389 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 390 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
390 391
391 } // namespace blink 392 } // namespace blink
392 393
393 #endif // LayoutTableSection_h 394 #endif // LayoutTableSection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698