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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp

Issue 2261663002: Disallow cast/implicit conversion from LayoutUnit to int/unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 3 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 368
369 unsigned cols = frameSet()->totalCols(); 369 unsigned cols = frameSet()->totalCols();
370 unsigned rows = frameSet()->totalRows(); 370 unsigned rows = frameSet()->totalRows();
371 371
372 if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) { 372 if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) {
373 m_rows.resize(rows); 373 m_rows.resize(rows);
374 m_cols.resize(cols); 374 m_cols.resize(cols);
375 } 375 }
376 376
377 LayoutUnit borderThickness(frameSet()->border()); 377 LayoutUnit borderThickness(frameSet()->border());
378 layOutAxis(m_rows, frameSet()->rowLengths(), size().height() - (rows - 1) * borderThickness); 378 layOutAxis(m_rows, frameSet()->rowLengths(), (size().height() - (rows - 1) * borderThickness).toInt());
379 layOutAxis(m_cols, frameSet()->colLengths(), size().width() - (cols - 1) * b orderThickness); 379 layOutAxis(m_cols, frameSet()->colLengths(), (size().width() - (cols - 1) * borderThickness).toInt());
380 380
381 positionFrames(); 381 positionFrames();
382 382
383 LayoutBox::layout(); 383 LayoutBox::layout();
384 384
385 computeEdgeInfo(); 385 computeEdgeInfo();
386 386
387 updateLayerTransformAfterLayout(); 387 updateLayerTransformAfterLayout();
388 388
389 clearNeedsLayout(); 389 clearNeedsLayout();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 return SetCursor; 571 return SetCursor;
572 } 572 }
573 if (canResizeColumn(roundedPoint)) { 573 if (canResizeColumn(roundedPoint)) {
574 cursor = columnResizeCursor(); 574 cursor = columnResizeCursor();
575 return SetCursor; 575 return SetCursor;
576 } 576 }
577 return LayoutBox::getCursor(point, cursor); 577 return LayoutBox::getCursor(point, cursor);
578 } 578 }
579 579
580 } // namespace blink 580 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698