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

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

Issue 2336323002: [M54] Freeze auto scrollbars while calculating table row height. (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/fast/table/row-height-recalc-terminates.html ('k') | no next file » | 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, 2008, 2009, 2010, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 Apple Inc. All r ights 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 14 matching lines...) Expand all
25 25
26 #include "core/layout/LayoutTableSection.h" 26 #include "core/layout/LayoutTableSection.h"
27 27
28 #include "core/layout/HitTestResult.h" 28 #include "core/layout/HitTestResult.h"
29 #include "core/layout/LayoutAnalyzer.h" 29 #include "core/layout/LayoutAnalyzer.h"
30 #include "core/layout/LayoutTableCell.h" 30 #include "core/layout/LayoutTableCell.h"
31 #include "core/layout/LayoutTableCol.h" 31 #include "core/layout/LayoutTableCol.h"
32 #include "core/layout/LayoutTableRow.h" 32 #include "core/layout/LayoutTableRow.h"
33 #include "core/layout/LayoutView.h" 33 #include "core/layout/LayoutView.h"
34 #include "core/layout/SubtreeLayoutScope.h" 34 #include "core/layout/SubtreeLayoutScope.h"
35 #include "core/paint/PaintLayerScrollableArea.h"
35 #include "core/paint/TableSectionPainter.h" 36 #include "core/paint/TableSectionPainter.h"
36 #include "wtf/HashSet.h" 37 #include "wtf/HashSet.h"
37 #include <algorithm> 38 #include <algorithm>
38 #include <limits> 39 #include <limits>
39 40
40 namespace blink { 41 namespace blink {
41 42
42 using namespace HTMLNames; 43 using namespace HTMLNames;
43 44
44 // This variable is used to balance the memory consumption vs the paint invalida tion time on big tables. 45 // This variable is used to balance the memory consumption vs the paint invalida tion time on big tables.
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 ASSERT(!uniqueCells.contains(cell)); 776 ASSERT(!uniqueCells.contains(cell));
776 uniqueCells.add(cell); 777 uniqueCells.add(cell);
777 #endif 778 #endif
778 779
779 rowSpanCells.append(cell); 780 rowSpanCells.append(cell);
780 lastRowSpanCell = cell; 781 lastRowSpanCell = cell;
781 } 782 }
782 } 783 }
783 784
784 if (cell->rowIndex() == r && cell->hasOverrideLogicalContentHeig ht()) { 785 if (cell->rowIndex() == r && cell->hasOverrideLogicalContentHeig ht()) {
786 PaintLayerScrollableArea::FreezeScrollbarsScope freezeScroll bars;
785 cell->clearIntrinsicPadding(); 787 cell->clearIntrinsicPadding();
786 cell->clearOverrideSize(); 788 cell->clearOverrideSize();
787 cell->forceChildLayout(); 789 cell->forceChildLayout();
788 } 790 }
789 791
790 if (cell->rowSpan() == 1) 792 if (cell->rowSpan() == 1)
791 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + ce ll->logicalHeightForRowSizing()); 793 m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + ce ll->logicalHeightForRowSizing());
792 794
793 // Find out the baseline. The baseline is set on the first row i n a rowSpan. 795 // Find out the baseline. The baseline is set on the first row i n a rowSpan.
794 if (cell->rowIndex() == r) 796 if (cell->rowIndex() == r)
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery, 1748 // Repeating table headers are painted once per fragmentation page/column. T his does not go through the regular fragmentation machinery,
1747 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns. 1749 // so we need special code to expand the invalidation rect to contain all po sitions of the header in all columns.
1748 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates. 1750 // Note that this is in flow thread coordinates, not visual coordinates. The enclosing LayoutFlowThread will convert to visual coordinates.
1749 if (table()->header() == this && hasRepeatingHeaderGroup()) 1751 if (table()->header() == this && hasRepeatingHeaderGroup())
1750 rect.setHeight(table()->logicalHeight()); 1752 rect.setHeight(table()->logicalHeight());
1751 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags); 1753 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rec t, flags);
1752 } 1754 }
1753 1755
1754 1756
1755 } // namespace blink 1757 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/table/row-height-recalc-terminates.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698