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

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

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment 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 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void LayoutTableRow::willBeRemovedFromTree() 49 void LayoutTableRow::willBeRemovedFromTree()
50 { 50 {
51 LayoutTableBoxComponent::willBeRemovedFromTree(); 51 LayoutTableBoxComponent::willBeRemovedFromTree();
52 52
53 section()->setNeedsCellRecalc(); 53 section()->setNeedsCellRecalc();
54 } 54 }
55 55
56 void LayoutTableRow::styleDidChange(StyleDifference diff, const ComputedStyle* o ldStyle) 56 void LayoutTableRow::styleDidChange(StyleDifference diff, const ComputedStyle* o ldStyle)
57 { 57 {
58 ASSERT(style()->display() == TABLE_ROW); 58 DCHECK_EQ(style()->display(), EDisplay::TableRow);
59 59
60 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); 60 LayoutTableBoxComponent::styleDidChange(diff, oldStyle);
61 propagateStyleToAnonymousChildren(); 61 propagateStyleToAnonymousChildren();
62 62
63 if (!oldStyle) 63 if (!oldStyle)
64 return; 64 return;
65 65
66 if (section() && style()->logicalHeight() != oldStyle->logicalHeight()) 66 if (section() && style()->logicalHeight() != oldStyle->logicalHeight())
67 section()->rowLogicalHeightChanged(this); 67 section()->rowLogicalHeightChanged(this);
68 68
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document) 241 LayoutTableRow* LayoutTableRow::createAnonymous(Document* document)
242 { 242 {
243 LayoutTableRow* layoutObject = new LayoutTableRow(nullptr); 243 LayoutTableRow* layoutObject = new LayoutTableRow(nullptr);
244 layoutObject->setDocumentForAnonymous(document); 244 layoutObject->setDocumentForAnonymous(document);
245 return layoutObject; 245 return layoutObject;
246 } 246 }
247 247
248 LayoutTableRow* LayoutTableRow::createAnonymousWithParent(const LayoutObject* pa rent) 248 LayoutTableRow* LayoutTableRow::createAnonymousWithParent(const LayoutObject* pa rent)
249 { 249 {
250 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document() ); 250 LayoutTableRow* newRow = LayoutTableRow::createAnonymous(&parent->document() );
251 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_ROW); 251 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), EDisplay::TableRow);
252 newRow->setStyle(newStyle.release()); 252 newRow->setStyle(newStyle.release());
253 return newRow; 253 return newRow;
254 } 254 }
255 255
256 void LayoutTableRow::computeOverflow() 256 void LayoutTableRow::computeOverflow()
257 { 257 {
258 clearAllOverflows(); 258 clearAllOverflows();
259 addVisualEffectOverflow(); 259 addVisualEffectOverflow();
260 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell()) 260 for (LayoutTableCell* cell = firstCell(); cell; cell = cell->nextCell())
261 addOverflowFromCell(cell); 261 addOverflowFromCell(cell);
(...skipping 12 matching lines...) Expand all
274 // The cell and the row share the section's coordinate system. However 274 // The cell and the row share the section's coordinate system. However
275 // the visual overflow should be determined in the coordinate system of 275 // the visual overflow should be determined in the coordinate system of
276 // the row, that's why we shift it below. 276 // the row, that's why we shift it below.
277 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y(); 277 LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location( ).y();
278 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference); 278 cellVisualOverflowRect.move(LayoutUnit(), cellOffsetLogicalTopDifference);
279 279
280 addContentsVisualOverflow(cellVisualOverflowRect); 280 addContentsVisualOverflow(cellVisualOverflowRect);
281 } 281 }
282 282
283 } // namespace blink 283 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableCol.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698