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

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

Issue 1867693002: Better scrolling fix (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refined 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 LayoutState state(*this, locationOffset()); 281 LayoutState state(*this, locationOffset());
282 282
283 m_numberOfInFlowChildrenOnFirstLine = -1; 283 m_numberOfInFlowChildrenOnFirstLine = -1;
284 284
285 LayoutBlock::startDelayUpdateScrollInfo(); 285 LayoutBlock::startDelayUpdateScrollInfo();
286 286
287 prepareOrderIteratorAndMargins(); 287 prepareOrderIteratorAndMargins();
288 288
289 layoutFlexItems(relayoutChildren, layoutScope); 289 layoutFlexItems(relayoutChildren, layoutScope);
290 290
291 ScrollPositionMap scrollMap; 291 if (LayoutBlock::finishDelayUpdateScrollInfo(&layoutScope))
292 if (LayoutBlock::finishDelayUpdateScrollInfo(&layoutScope, &scrollMap)) {
293 layoutFlexItems(false, layoutScope); 292 layoutFlexItems(false, layoutScope);
294 for (auto& entry : scrollMap) {
295 entry.key->scrollToPosition(entry.value, ScrollOffsetClamped);
296 }
297 }
298 293
299 if (logicalHeight() != previousHeight) 294 if (logicalHeight() != previousHeight)
300 relayoutChildren = true; 295 relayoutChildren = true;
301 296
302 layoutPositionedObjects(relayoutChildren || isDocumentElement()); 297 layoutPositionedObjects(relayoutChildren || isDocumentElement());
303 298
304 // FIXME: css3/flexbox/repaint-rtl-column.html seems to issue paint inva lidations for more overflow than it needs to. 299 // FIXME: css3/flexbox/repaint-rtl-column.html seems to issue paint inva lidations for more overflow than it needs to.
305 computeOverflow(clientLogicalBottomAfterRepositioning()); 300 computeOverflow(clientLogicalBottomAfterRepositioning());
306 } 301 }
307 302
(...skipping 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 ASSERT(child); 1768 ASSERT(child);
1774 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1769 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1775 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1770 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1776 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1771 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1777 adjustAlignmentForChild(*child, newOffset - originalOffset); 1772 adjustAlignmentForChild(*child, newOffset - originalOffset);
1778 } 1773 }
1779 } 1774 }
1780 } 1775 }
1781 1776
1782 } // namespace blink 1777 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698