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

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

Issue 1819073004: Fix table cell background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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, 2009, 2010 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserv ed.
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 LayoutTableSection* header() const { return m_head; } 244 LayoutTableSection* header() const { return m_head; }
245 LayoutTableSection* footer() const { return m_foot; } 245 LayoutTableSection* footer() const { return m_foot; }
246 LayoutTableSection* firstBody() const { return m_firstBody; } 246 LayoutTableSection* firstBody() const { return m_firstBody; }
247 247
248 // This function returns 0 if the table has no section. 248 // This function returns 0 if the table has no section.
249 LayoutTableSection* topSection() const; 249 LayoutTableSection* topSection() const;
250 LayoutTableSection* bottomSection() const; 250 LayoutTableSection* bottomSection() const;
251 251
252 // This function returns 0 if the table has no non-empty sections. 252 // This function returns 0 if the table has no non-empty sections.
253 LayoutTableSection* topNonEmptySection() const; 253 LayoutTableSection* topNonEmptySection() const;
254 LayoutTableSection* bottomNonEmptySection() const;
254 255
255 unsigned lastEffectiveColumnIndex() const { return numEffectiveColumns() - 1 ; } 256 unsigned lastEffectiveColumnIndex() const { return numEffectiveColumns() - 1 ; }
256 257
257 void splitEffectiveColumn(unsigned index, unsigned firstSpan); 258 void splitEffectiveColumn(unsigned index, unsigned firstSpan);
258 void appendEffectiveColumn(unsigned span); 259 void appendEffectiveColumn(unsigned span);
259 unsigned numEffectiveColumns() const { return m_effectiveColumns.size(); } 260 unsigned numEffectiveColumns() const { return m_effectiveColumns.size(); }
260 unsigned spanOfEffectiveColumn(unsigned effectiveColumnIndex) const { return m_effectiveColumns[effectiveColumnIndex].span; } 261 unsigned spanOfEffectiveColumn(unsigned effectiveColumnIndex) const { return m_effectiveColumns[effectiveColumnIndex].span; }
261 262
262 unsigned absoluteColumnToEffectiveColumn(unsigned absoluteColumnIndex) const 263 unsigned absoluteColumnToEffectiveColumn(unsigned absoluteColumnIndex) const
263 { 264 {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 } 330 }
330 }; 331 };
331 ColAndColGroup colElementAtAbsoluteColumn(unsigned absoluteColumnIndex) cons t 332 ColAndColGroup colElementAtAbsoluteColumn(unsigned absoluteColumnIndex) cons t
332 { 333 {
333 // The common case is to not have col/colgroup elements, make that case fast. 334 // The common case is to not have col/colgroup elements, make that case fast.
334 if (!m_hasColElements) 335 if (!m_hasColElements)
335 return ColAndColGroup(); 336 return ColAndColGroup();
336 return slowColElementAtAbsoluteColumn(absoluteColumnIndex); 337 return slowColElementAtAbsoluteColumn(absoluteColumnIndex);
337 } 338 }
338 339
340 unsigned colElementToAbsoluteColumn(const LayoutTableCol *) const;
Xianzhu 2016/03/28 00:44:42 Nit: Remove the extra space before '*'.
atotic1 2016/03/29 17:05:16 Done.
341
339 bool needsSectionRecalc() const { return m_needsSectionRecalc; } 342 bool needsSectionRecalc() const { return m_needsSectionRecalc; }
340 void setNeedsSectionRecalc() 343 void setNeedsSectionRecalc()
341 { 344 {
342 if (documentBeingDestroyed()) 345 if (documentBeingDestroyed())
343 return; 346 return;
344 m_needsSectionRecalc = true; 347 m_needsSectionRecalc = true;
345 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh anged); 348 setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::TableCh anged);
346 } 349 }
347 350
348 LayoutTableSection* sectionAbove(const LayoutTableSection*, SkipEmptySection sValue = DoNotSkipEmptySections) const; 351 LayoutTableSection* sectionAbove(const LayoutTableSection*, SkipEmptySection sValue = DoNotSkipEmptySections) const;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (m_firstBody) 517 if (m_firstBody)
515 return m_firstBody; 518 return m_firstBody;
516 return m_foot; 519 return m_foot;
517 } 520 }
518 521
519 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable()); 522 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTable, isTable());
520 523
521 } // namespace blink 524 } // namespace blink
522 525
523 #endif // LayoutTable_h 526 #endif // LayoutTable_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698