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

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

Issue 2426553004: Clean up break-inside restriction propagation from table headers. (Closed)
Patch Set: Created 4 years, 2 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, 2010, 2013 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013
8 * Apple Inc. 8 * Apple Inc.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 updateHitTestResult( 251 updateHitTestResult(
252 result, locationInContainer.point() - toLayoutSize(cellPoint)); 252 result, locationInContainer.point() - toLayoutSize(cellPoint));
253 return true; 253 return true;
254 } 254 }
255 } 255 }
256 } 256 }
257 257
258 return false; 258 return false;
259 } 259 }
260 260
261 LayoutBox::PaginationBreakability LayoutTableRow::getPaginationBreakability()
262 const {
263 PaginationBreakability breakability =
264 LayoutTableBoxComponent::getPaginationBreakability();
265 if (breakability == AllowAnyBreaks) {
266 // Even if the row allows us to break inside, we will want to prevent that
267 // if we have a header group that wants to appear at the top of each page.
268 if (const LayoutTableSection* header = table()->header())
269 breakability = header->getPaginationBreakability();
270 }
271 return breakability;
272 }
273
261 void LayoutTableRow::paint(const PaintInfo& paintInfo, 274 void LayoutTableRow::paint(const PaintInfo& paintInfo,
262 const LayoutPoint& paintOffset) const { 275 const LayoutPoint& paintOffset) const {
263 TableRowPainter(*this).paint(paintInfo, paintOffset); 276 TableRowPainter(*this).paint(paintInfo, paintOffset);
264 } 277 }
265 278
266 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document) { 279 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document) {
267 LayoutTableRow* layoutObject = new LayoutTableRow(nullptr); 280 LayoutTableRow* layoutObject = new LayoutTableRow(nullptr);
268 layoutObject->setDocumentForAnonymous(document); 281 layoutObject->setDocumentForAnonymous(document);
269 return layoutObject; 282 return layoutObject;
270 } 283 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // the visual overflow should be determined in the coordinate system of 315 // the visual overflow should be determined in the coordinate system of
303 // the row, that's why we shift it below. 316 // the row, that's why we shift it below.
304 LayoutUnit cellOffsetLogicalTopDifference = 317 LayoutUnit cellOffsetLogicalTopDifference =
305 cell->location().y() - location().y(); 318 cell->location().y() - location().y();
306 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 319 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
307 320
308 addContentsVisualOverflow(cellVisualOverflowRect); 321 addContentsVisualOverflow(cellVisualOverflowRect);
309 } 322 }
310 323
311 } // namespace blink 324 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698