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

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

Issue 1887933002: (CANCELED) Fix TextAutosizer not to scheduleRelayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made SubtreeLayoutScope back to optional Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/TextAutosizer.h » ('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, 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 * 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 434 }
435 435
436 void LayoutTable::layout() 436 void LayoutTable::layout()
437 { 437 {
438 ASSERT(needsLayout()); 438 ASSERT(needsLayout());
439 LayoutAnalyzer::Scope analyzer(*this); 439 LayoutAnalyzer::Scope analyzer(*this);
440 440
441 if (simplifiedLayout()) 441 if (simplifiedLayout())
442 return; 442 return;
443 443
444 SubtreeLayoutScope layouter(*this);
445
444 // Note: LayoutTable is handled differently than other LayoutBlocks and the LayoutScope 446 // Note: LayoutTable is handled differently than other LayoutBlocks and the LayoutScope
445 // must be created before the table begins laying out. 447 // must be created before the table begins laying out.
446 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); 448 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layouter);
447 449
448 recalcSectionsIfNeeded(); 450 recalcSectionsIfNeeded();
449 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w e don't have to make sure 451 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w e don't have to make sure
450 // to call this before we call borderStart/borderEnd to avoid getting a stal e value. 452 // to call this before we call borderStart/borderEnd to avoid getting a stal e value.
451 recalcBordersInRowDirection(); 453 recalcBordersInRowDirection();
452 454
453 SubtreeLayoutScope layouter(*this);
454
455 // If any table section moved vertically, we will just issue paint invalidat ions for everything from that 455 // If any table section moved vertically, we will just issue paint invalidat ions for everything from that
456 // section down (it is quite unlikely that any of the following sections 456 // section down (it is quite unlikely that any of the following sections
457 // did not shift). 457 // did not shift).
458 bool sectionMoved = false; 458 bool sectionMoved = false;
459 { 459 {
460 LayoutState state(*this, locationOffset()); 460 LayoutState state(*this, locationOffset());
461 LayoutUnit oldLogicalWidth = logicalWidth(); 461 LayoutUnit oldLogicalWidth = logicalWidth();
462 LayoutUnit oldLogicalHeight = logicalHeight(); 462 LayoutUnit oldLogicalHeight = logicalHeight();
463 463
464 setLogicalHeight(LayoutUnit()); 464 setLogicalHeight(LayoutUnit());
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 1480
1481 LayoutUnit LayoutTable::paddingRight() const 1481 LayoutUnit LayoutTable::paddingRight() const
1482 { 1482 {
1483 if (collapseBorders()) 1483 if (collapseBorders())
1484 return LayoutUnit(); 1484 return LayoutUnit();
1485 1485
1486 return LayoutBlock::paddingRight(); 1486 return LayoutBlock::paddingRight();
1487 } 1487 }
1488 1488
1489 } // namespace blink 1489 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/TextAutosizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698