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

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

Issue 294783004: Use tighter typing in table rendering code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo / bug and update copyrights Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 405
406 Cluster* cluster = currentCluster(); 406 Cluster* cluster = currentCluster();
407 if (cluster->m_root != table) 407 if (cluster->m_root != table)
408 return; 408 return;
409 409
410 // Pre-inflate cells that have enough text so that their inflated preferred widths will be used 410 // Pre-inflate cells that have enough text so that their inflated preferred widths will be used
411 // for column sizing. 411 // for column sizing.
412 for (RenderObject* section = table->firstChild(); section; section = section ->nextSibling()) { 412 for (RenderObject* section = table->firstChild(); section; section = section ->nextSibling()) {
413 if (!section->isTableSection()) 413 if (!section->isTableSection())
414 continue; 414 continue;
415 for (RenderObject* row = toRenderTableSection(section)->firstChild(); ro w; row = row->nextSibling()) { 415 for (RenderTableRow* row = toRenderTableSection(section)->firstRow(); ro w; row = row->nextRow()) {
416 if (!row->isTableRow()) 416 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->ne xtCell()) {
417 continue; 417 if (!cell->needsLayout())
418 for (RenderObject* cell = toRenderTableRow(row)->firstChild(); cell; cell = cell->nextSibling()) {
419 if (!cell->isTableCell() || !cell->needsLayout())
420 continue; 418 continue;
421 RenderTableCell* renderTableCell = toRenderTableCell(cell); 419 beginLayout(cell);
422 beginLayout(renderTableCell); 420 inflate(cell);
423 inflate(renderTableCell); 421 endLayout(cell);
424 endLayout(renderTableCell);
425 } 422 }
426 } 423 }
427 } 424 }
428 } 425 }
429 426
430 void FastTextAutosizer::endLayout(RenderBlock* block) 427 void FastTextAutosizer::endLayout(RenderBlock* block)
431 { 428 {
432 ASSERT(shouldHandleLayout()); 429 ASSERT(shouldHandleLayout());
433 430
434 if (block == m_firstBlockToBeginLayout) { 431 if (block == m_firstBlockToBeginLayout) {
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() 1110 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo()
1114 { 1111 {
1115 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) { 1112 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) {
1116 ASSERT(textAutosizer->m_updatePageInfoDeferred); 1113 ASSERT(textAutosizer->m_updatePageInfoDeferred);
1117 textAutosizer->m_updatePageInfoDeferred = false; 1114 textAutosizer->m_updatePageInfoDeferred = false;
1118 textAutosizer->updatePageInfoInAllFrames(); 1115 textAutosizer->updatePageInfoInAllFrames();
1119 } 1116 }
1120 } 1117 }
1121 1118
1122 } // namespace WebCore 1119 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/FixedTableLayout.cpp » ('j') | Source/core/rendering/FixedTableLayout.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698