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

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

Issue 1820483002: Untangle multicol coordinate space conversion from offsetFromContainer(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review comment. Created 4 years, 9 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 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 { 297 {
298 return LayoutUnit(computedCSSPaddingAfter().floor() + intrinsicPaddingAfter( )); 298 return LayoutUnit(computedCSSPaddingAfter().floor() + intrinsicPaddingAfter( ));
299 } 299 }
300 300
301 void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit ro wHeight) 301 void LayoutTableCell::setOverrideLogicalContentHeightFromRowHeight(LayoutUnit ro wHeight)
302 { 302 {
303 clearIntrinsicPadding(); 303 clearIntrinsicPadding();
304 setOverrideLogicalContentHeight((rowHeight - borderAndPaddingLogicalHeight() ).clampNegativeToZero()); 304 setOverrideLogicalContentHeight((rowHeight - borderAndPaddingLogicalHeight() ).clampNegativeToZero());
305 } 305 }
306 306
307 LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o, const Lay outPoint& point, bool* offsetDependsOnPoint) const 307 LayoutSize LayoutTableCell::offsetFromContainer(const LayoutObject* o) const
308 { 308 {
309 ASSERT(o == container()); 309 ASSERT(o == container());
310 310
311 LayoutSize offset = LayoutBlockFlow::offsetFromContainer(o, point, offsetDep endsOnPoint); 311 LayoutSize offset = LayoutBlockFlow::offsetFromContainer(o);
312 if (parent()) 312 if (parent())
313 offset -= parentBox()->locationOffset(); 313 offset -= parentBox()->locationOffset();
314 314
315 return offset; 315 return offset;
316 } 316 }
317 317
318 LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI nvalidationState) const 318 LayoutRect LayoutTableCell::clippedOverflowRectForPaintInvalidation(const Layout BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI nvalidationState) const
319 { 319 {
320 // If the table grid is dirty, we cannot get reliable information about adjo ining cells, 320 // If the table grid is dirty, we cannot get reliable information about adjo ining cells,
321 // so we ignore outside borders. This should not be a problem because it mea ns that 321 // so we ignore outside borders. This should not be a problem because it mea ns that
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const 1017 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const
1018 { 1018 {
1019 // If this object has layer, the area of collapsed borders should be transpa rent 1019 // If this object has layer, the area of collapsed borders should be transpa rent
1020 // to expose the collapsed borders painted on the underlying layer. 1020 // to expose the collapsed borders painted on the underlying layer.
1021 if (hasLayer() && table()->collapseBorders()) 1021 if (hasLayer() && table()->collapseBorders())
1022 return false; 1022 return false;
1023 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); 1023 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect);
1024 } 1024 }
1025 1025
1026 } // namespace blink 1026 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCell.h ('k') | third_party/WebKit/Source/core/layout/api/LayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698