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

Side by Side Diff: Source/core/rendering/RenderTableCol.cpp

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderTableCol.h ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void RenderTableCol::updateFromElement() 59 void RenderTableCol::updateFromElement()
60 { 60 {
61 unsigned oldSpan = m_span; 61 unsigned oldSpan = m_span;
62 Node* n = node(); 62 Node* n = node();
63 if (isHTMLTableColElement(n)) { 63 if (isHTMLTableColElement(n)) {
64 HTMLTableColElement& tc = toHTMLTableColElement(*n); 64 HTMLTableColElement& tc = toHTMLTableColElement(*n);
65 m_span = tc.span(); 65 m_span = tc.span();
66 } else 66 } else
67 m_span = !(style() && style()->display() == TABLE_COLUMN_GROUP); 67 m_span = !(style() && style()->display() == TABLE_COLUMN_GROUP);
68 if (m_span != oldSpan && style() && parent()) 68 if (m_span != oldSpan && style() && parent())
69 setNeedsLayoutAndPrefWidthsRecalcAndFullRepaint(); 69 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
70 } 70 }
71 71
72 void RenderTableCol::insertedIntoTree() 72 void RenderTableCol::insertedIntoTree()
73 { 73 {
74 RenderBox::insertedIntoTree(); 74 RenderBox::insertedIntoTree();
75 table()->addColumn(this); 75 table()->addColumn(this);
76 } 76 }
77 77
78 void RenderTableCol::willBeRemovedFromTree() 78 void RenderTableCol::willBeRemovedFromTree()
79 { 79 {
80 RenderBox::willBeRemovedFromTree(); 80 RenderBox::willBeRemovedFromTree();
81 table()->removeColumn(this); 81 table()->removeColumn(this);
82 } 82 }
83 83
84 bool RenderTableCol::isChildAllowed(RenderObject* child, RenderStyle* style) con st 84 bool RenderTableCol::isChildAllowed(RenderObject* child, RenderStyle* style) con st
85 { 85 {
86 // We cannot use isTableColumn here as style() may return 0. 86 // We cannot use isTableColumn here as style() may return 0.
87 return child->isRenderTableCol() && style->display() == TABLE_COLUMN; 87 return child->isRenderTableCol() && style->display() == TABLE_COLUMN;
88 } 88 }
89 89
90 bool RenderTableCol::canHaveChildren() const 90 bool RenderTableCol::canHaveChildren() const
91 { 91 {
92 // Cols cannot have children. This is actually necessary to fix a bug 92 // Cols cannot have children. This is actually necessary to fix a bug
93 // with libraries.uc.edu, which makes a <p> be a table-column. 93 // with libraries.uc.edu, which makes a <p> be a table-column.
94 return isTableColumnGroup(); 94 return isTableColumnGroup();
95 } 95 }
96 96
97 LayoutRect RenderTableCol::clippedOverflowRectForRepaint(const RenderLayerModelO bject* repaintContainer) const 97 LayoutRect RenderTableCol::clippedOverflowRectForPaintInvalidation(const RenderL ayerModelObject* paintInvalidationContainer) const
98 { 98 {
99 // For now, just repaint the whole table. 99 // For now, just repaint the whole table.
100 // FIXME: Find a better way to do this, e.g., need to repaint all the cells that we 100 // FIXME: Find a better way to do this, e.g., need to repaint all the cells that we
101 // might have propagated a background color or borders into. 101 // might have propagated a background color or borders into.
102 // FIXME: check for repaintContainer each time here? 102 // FIXME: check for paintInvalidationContainer each time here?
103 103
104 RenderTable* parentTable = table(); 104 RenderTable* parentTable = table();
105 if (!parentTable) 105 if (!parentTable)
106 return LayoutRect(); 106 return LayoutRect();
107 return parentTable->clippedOverflowRectForRepaint(repaintContainer); 107 return parentTable->clippedOverflowRectForPaintInvalidation(paintInvalidatio nContainer);
108 } 108 }
109 109
110 void RenderTableCol::imageChanged(WrappedImagePtr, const IntRect*) 110 void RenderTableCol::imageChanged(WrappedImagePtr, const IntRect*)
111 { 111 {
112 // FIXME: Repaint only the rect the image paints in. 112 // FIXME: Repaint only the rect the image paints in.
113 paintInvalidationForWholeRenderer(); 113 paintInvalidationForWholeRenderer();
114 } 114 }
115 115
116 void RenderTableCol::clearPreferredLogicalWidthsDirtyBits() 116 void RenderTableCol::clearPreferredLogicalWidthsDirtyBits()
117 { 117 {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 return style()->borderStart(); 174 return style()->borderStart();
175 } 175 }
176 176
177 const BorderValue& RenderTableCol::borderAdjoiningCellAfter(const RenderTableCel l* cell) const 177 const BorderValue& RenderTableCol::borderAdjoiningCellAfter(const RenderTableCel l* cell) const
178 { 178 {
179 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this); 179 ASSERT_UNUSED(cell, table()->colElement(cell->col() - 1) == this);
180 return style()->borderEnd(); 180 return style()->borderEnd();
181 } 181 }
182 182
183 } 183 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableCol.h ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698