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

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

Issue 1781463002: Fix table background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sample code for improved collapsed border painting Created 3 years, 11 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, 2009, 2013 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv ed.
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void addOverflowFromCell(const LayoutTableCell*); 125 void addOverflowFromCell(const LayoutTableCell*);
126 126
127 const char* name() const override { return "LayoutTableRow"; } 127 const char* name() const override { return "LayoutTableRow"; }
128 128
129 // Whether a row has opaque background depends on many factors, e.g. border spacing, 129 // Whether a row has opaque background depends on many factors, e.g. border spacing,
130 // border collapsing, missing cells, etc. 130 // border collapsing, missing cells, etc.
131 // For simplicity, just conservatively assume all table rows are not opaque. 131 // For simplicity, just conservatively assume all table rows are not opaque.
132 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov erride { return false; } 132 bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect&, unsigned) const ov erride { return false; }
133 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r eturn false; } 133 bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override { r eturn false; }
134 134
135 // Returns section-relative position.
136 LayoutRect positionByCellSpan() const;
137
135 private: 138 private:
136 LayoutObjectChildList* virtualChildren() override { return children(); } 139 LayoutObjectChildList* virtualChildren() override { return children(); }
137 const LayoutObjectChildList* virtualChildren() const override { return child ren(); } 140 const LayoutObjectChildList* virtualChildren() const override { return child ren(); }
138 141
139 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectTableRow || LayoutBox::isOfType(type); } 142 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectTableRow || LayoutBox::isOfType(type); }
140 143
141 void willBeRemovedFromTree() override; 144 void willBeRemovedFromTree() override;
142 145
143 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride; 146 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride;
144 void layout() override; 147 void layout() override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 194
192 inline LayoutTableRow* LayoutTableSection::lastRow() const 195 inline LayoutTableRow* LayoutTableSection::lastRow() const
193 { 196 {
194 ASSERT(children() == virtualChildren()); 197 ASSERT(children() == virtualChildren());
195 return toLayoutTableRow(children()->lastChild()); 198 return toLayoutTableRow(children()->lastChild());
196 } 199 }
197 200
198 } // namespace blink 201 } // namespace blink
199 202
200 #endif // LayoutTableRow_h 203 #endif // LayoutTableRow_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCol.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698