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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // init LayoutObject attributes 112 // init LayoutObject attributes
113 setInline(false); // our object is not Inline 113 setInline(false); // our object is not Inline
114 } 114 }
115 115
116 LayoutTableSection::~LayoutTableSection() 116 LayoutTableSection::~LayoutTableSection()
117 { 117 {
118 } 118 }
119 119
120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl e* oldStyle) 120 void LayoutTableSection::styleDidChange(StyleDifference diff, const ComputedStyl e* oldStyle)
121 { 121 {
122 DCHECK(style()->display() == TABLE_FOOTER_GROUP || style()->display() == TAB LE_ROW_GROUP || style()->display() == TABLE_HEADER_GROUP); 122 DCHECK(style()->display() == EDisplay::TableFooterGroup || style()->display( ) == EDisplay::TableRowGroup || style()->display() == EDisplay::TableHeaderGroup );
123 123
124 LayoutTableBoxComponent::styleDidChange(diff, oldStyle); 124 LayoutTableBoxComponent::styleDidChange(diff, oldStyle);
125 propagateStyleToAnonymousChildren(); 125 propagateStyleToAnonymousChildren();
126 126
127 if (!oldStyle) 127 if (!oldStyle)
128 return; 128 return;
129 129
130 LayoutTable* table = this->table(); 130 LayoutTable* table = this->table();
131 if (!table) 131 if (!table)
132 return; 132 return;
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 } 1689 }
1690 if (!result.hitTestRequest().listBased()) 1690 if (!result.hitTestRequest().listBased())
1691 break; 1691 break;
1692 } 1692 }
1693 1693
1694 return false; 1694 return false;
1695 } 1695 }
1696 1696
1697 LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutOb ject* parent) 1697 LayoutTableSection* LayoutTableSection::createAnonymousWithParent(const LayoutOb ject* parent)
1698 { 1698 {
1699 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), TABLE_ROW_GROUP); 1699 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp lay(parent->styleRef(), EDisplay::TableRowGroup);
1700 LayoutTableSection* newSection = new LayoutTableSection(nullptr); 1700 LayoutTableSection* newSection = new LayoutTableSection(nullptr);
1701 newSection->setDocumentForAnonymous(&parent->document()); 1701 newSection->setDocumentForAnonymous(&parent->document());
1702 newSection->setStyle(newStyle.release()); 1702 newSection->setStyle(newStyle.release());
1703 return newSection; 1703 return newSection;
1704 } 1704 }
1705 1705
1706 void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign ed effectiveColumn) const 1706 void LayoutTableSection::setLogicalPositionForCell(LayoutTableCell* cell, unsign ed effectiveColumn) const
1707 { 1707 {
1708 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]); 1708 LayoutPoint cellLocation(0, m_rowPos[cell->rowIndex()]);
1709 int horizontalBorderSpacing = table()->hBorderSpacing(); 1709 int horizontalBorderSpacing = table()->hBorderSpacing();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, 1747 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery,
1748 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. 1748 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns.
1749 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. 1749 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates.
1750 if (table()->header() == this && isRepeatingHeaderGroup()) 1750 if (table()->header() == this && isRepeatingHeaderGroup())
1751 rect.setHeight(table()->logicalHeight()); 1751 rect.setHeight(table()->logicalHeight());
1752 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); 1752 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags);
1753 } 1753 }
1754 1754
1755 1755
1756 } // namespace blink 1756 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698