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

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

Issue 403723004: Add several repaint tests in case of table resize (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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) 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 SubtreeLayoutScope layouter(*this); 412 SubtreeLayoutScope layouter(*this);
413 413
414 // If any table section moved vertically, we will just repaint everything fr om that 414 // If any table section moved vertically, we will just repaint everything fr om that
415 // section down (it is quite unlikely that any of the following sections 415 // section down (it is quite unlikely that any of the following sections
416 // did not shift). 416 // did not shift).
417 bool sectionMoved = false; 417 bool sectionMoved = false;
418 LayoutUnit movedSectionLogicalTop = 0; 418 LayoutUnit movedSectionLogicalTop = 0;
419 { 419 {
420 LayoutState state(*this, locationOffset()); 420 LayoutState state(*this, locationOffset());
421 421
422 LayoutUnit oldLogicalHeight = logicalHeight();
422 setLogicalHeight(0); 423 setLogicalHeight(0);
423 424
424 LayoutUnit oldLogicalWidth = logicalWidth(); 425 LayoutUnit oldLogicalWidth = logicalWidth();
425 updateLogicalWidth(); 426 updateLogicalWidth();
426 427
427 if (logicalWidth() != oldLogicalWidth) { 428 if (logicalWidth() != oldLogicalWidth) {
428 for (unsigned i = 0; i < m_captions.size(); i++) 429 for (unsigned i = 0; i < m_captions.size(); i++)
429 layouter.setNeedsLayout(m_captions[i]); 430 layouter.setNeedsLayout(m_captions[i]);
430 } 431 }
431 // FIXME: The optimisation below doesn't work since the internal table 432 // FIXME: The optimisation below doesn't work since the internal table
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // table can be containing block of positioned elements. 546 // table can be containing block of positioned elements.
546 // FIXME: Only pass true if width or height changed. 547 // FIXME: Only pass true if width or height changed.
547 layoutPositionedObjects(true); 548 layoutPositionedObjects(true);
548 549
549 updateLayerTransformAfterLayout(); 550 updateLayerTransformAfterLayout();
550 551
551 // Layout was changed, so probably borders too. 552 // Layout was changed, so probably borders too.
552 invalidateCollapsedBorders(); 553 invalidateCollapsedBorders();
553 554
554 computeOverflow(clientLogicalBottom()); 555 computeOverflow(clientLogicalBottom());
556
557 // This is needed after we optimized size-style-change not to always ful ly invalidate.
558 // FIXME: It would be better to let the changed cells invalidate themsel ves.
dsinclair 2014/07/23 16:57:29 crbug? Do you have an idea of how hard this would
Xianzhu 2014/07/23 17:31:48 Filed crbug.com/396674.
559 if (selfNeedsLayout() && (oldLogicalWidth != logicalWidth() || oldLogica lHeight != logicalHeight()))
560 setShouldDoFullPaintInvalidation(true);
555 } 561 }
556 562
557 // FIXME: This value isn't the intrinsic content logical height, but we need 563 // FIXME: This value isn't the intrinsic content logical height, but we need
558 // to update the value as its used by flexbox layout. crbug.com/367324 564 // to update the value as its used by flexbox layout. crbug.com/367324
559 updateIntrinsicContentLogicalHeight(contentLogicalHeight()); 565 updateIntrinsicContentLogicalHeight(contentLogicalHeight());
560 566
561 if (view()->layoutState()->pageLogicalHeight()) 567 if (view()->layoutState()->pageLogicalHeight())
562 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, log icalTop())); 568 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, log icalTop()));
563 569
564 m_columnLogicalWidthChanged = false; 570 m_columnLogicalWidthChanged = false;
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1423 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1418 { 1424 {
1419 ASSERT(cell->isFirstOrLastCellInRow()); 1425 ASSERT(cell->isFirstOrLastCellInRow());
1420 if (hasSameDirectionAs(cell->row())) 1426 if (hasSameDirectionAs(cell->row()))
1421 return style()->borderEnd(); 1427 return style()->borderEnd();
1422 1428
1423 return style()->borderStart(); 1429 return style()->borderStart();
1424 } 1430 }
1425 1431
1426 } 1432 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698