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

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

Issue 1651703002: More explicit LayoutUnit conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@evenMoarConstructors
Patch Set: Traits vs Properties vs Pandas Created 4 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
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, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (cell->rowSpan() == 1) 243 if (cell->rowSpan() == 1)
244 return; 244 return;
245 245
246 // Cells only generates visual overflow. 246 // Cells only generates visual overflow.
247 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s tyleRef()); 247 LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(s tyleRef());
248 248
249 // The cell and the row share the section's coordinate system. However 249 // The cell and the row share the section's coordinate system. However
250 // the visual overflow should be determined in the coordinate system of 250 // the visual overflow should be determined in the coordinate system of
251 // the row, that's why we shift it below. 251 // the row, that's why we shift it below.
252 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y(); 252 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y();
253 cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference); 253 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
254 254
255 addVisualOverflow(cellVisualOverflowRect); 255 addVisualOverflow(cellVisualOverflowRect);
256 } 256 }
257 257
258 bool LayoutTableRow::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRe ct) const 258 bool LayoutTableRow::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRe ct) const
259 { 259 {
260 // If this object has layer, the area of collapsed borders should be transpa rent 260 // If this object has layer, the area of collapsed borders should be transpa rent
261 // to expose the collapsed borders painted on the underlying layer. 261 // to expose the collapsed borders painted on the underlying layer.
262 if (hasLayer() && table()->collapseBorders()) 262 if (hasLayer() && table()->collapseBorders())
263 return false; 263 return false;
264 return LayoutBox::backgroundIsKnownToBeOpaqueInRect(localRect); 264 return LayoutBox::backgroundIsKnownToBeOpaqueInRect(localRect);
265 } 265 }
266 266
267 } // namespace blink 267 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698