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

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

Issue 2784673004: Consider compositing state in row background display item client accessor. (Closed)
Patch Set: Created 3 years, 8 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, 2009, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 private: 331 private:
332 const LayoutTableCell& m_layoutTableCell; 332 const LayoutTableCell& m_layoutTableCell;
333 }; 333 };
334 334
335 bool usesCompositedCellDisplayItemClients() const; 335 bool usesCompositedCellDisplayItemClients() const;
336 const CollapsedBorderValues* collapsedBorderValues() const { 336 const CollapsedBorderValues* collapsedBorderValues() const {
337 return m_collapsedBorderValues.get(); 337 return m_collapsedBorderValues.get();
338 } 338 }
339 const DisplayItemClient& backgroundDisplayItemClient() const { 339 const DisplayItemClient& backgroundDisplayItemClient() const {
340 return m_rowBackgroundDisplayItemClient 340 return (m_rowBackgroundDisplayItemClient &&
341 usesCompositedCellDisplayItemClients())
Xianzhu 2017/03/29 00:43:53 How about keeping this as-is and changing ensureIs
Xianzhu 2017/03/29 00:58:55 I read your comment in the bug and now think this
341 ? static_cast<const DisplayItemClient&>( 342 ? static_cast<const DisplayItemClient&>(
342 *m_rowBackgroundDisplayItemClient) 343 *m_rowBackgroundDisplayItemClient)
343 : *this; 344 : *this;
344 } 345 }
345 346
346 LayoutRect debugRect() const override; 347 LayoutRect debugRect() const override;
347 348
348 void adjustChildDebugRect(LayoutRect&) const override; 349 void adjustChildDebugRect(LayoutRect&) const override;
349 350
350 // A table cell's location is relative to its containing section. 351 // A table cell's location is relative to its containing section.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 return toLayoutTableCell(firstChild()); 472 return toLayoutTableCell(firstChild());
472 } 473 }
473 474
474 inline LayoutTableCell* LayoutTableRow::lastCell() const { 475 inline LayoutTableCell* LayoutTableRow::lastCell() const {
475 return toLayoutTableCell(lastChild()); 476 return toLayoutTableCell(lastChild());
476 } 477 }
477 478
478 } // namespace blink 479 } // namespace blink
479 480
480 #endif // LayoutTableCell_h 481 #endif // LayoutTableCell_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698