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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Codereview update 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) 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 1034
1035 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const 1035 bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR ect) const
1036 { 1036 {
1037 // If this object has layer, the area of collapsed borders should be transpa rent 1037 // If this object has layer, the area of collapsed borders should be transpa rent
1038 // to expose the collapsed borders painted on the underlying layer. 1038 // to expose the collapsed borders painted on the underlying layer.
1039 if (hasLayer() && table()->collapseBorders()) 1039 if (hasLayer() && table()->collapseBorders())
1040 return false; 1040 return false;
1041 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); 1041 return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect);
1042 } 1042 }
1043 1043
1044 // TODO(lunalu): Deliberately dump the "inner" box of table cells, since that is what
1045 // current results reflect. We'd like to clean up the results to dump both the
1046 // outer box and the intrinsic padding so that both bits of information are
1047 // captured by the results.
1048 LayoutRect LayoutTableCell::debugRect() const
1049 {
1050 LayoutRect rect = LayoutRect(location().x(),
1051 location().y() + intrinsicPaddingBefore(),
1052 size().width(),
1053 size().height() - intrinsicPaddingBefore() - intrinsicPaddingAfter());
1054
1055 LayoutBlock* cb = containingBlock();
1056 if (cb)
1057 cb->adjustChildDebugRect(rect);
1058
1059 return rect;
1060 }
1061
1062 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const
1063 {
1064 r.move(0, -intrinsicPaddingBefore());
1065 }
1066
1044 } // namespace blink 1067 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698