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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Initial commit 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 // FIXME: 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 r = LayoutRect(location().x(), location().y() + intrinsicPaddingB efore(), size().width(), size().height() - intrinsicPaddingBefore() - intrinsicP addingAfter());
1051
1052 // FIXME: Temporary in order to ensure compatibility with existing layout
1053 // test results.
1054 LayoutBlock* cb = containingBlock();
1055 if (cb && cb->isTableCell())
1056 r.move(0, -toLayoutTableCell(containingBlock())->intrinsicPaddingBefore( ));
1057
1058 setLayoutRectDimForLayoutView(r);
1059 return r;
1060 }
1061
1044 } // namespace blink 1062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698