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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 years, 2 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 m_relaidOutChildren.clear(); 382 m_relaidOutChildren.clear();
383 383
384 if (updateLogicalWidthAndColumnWidth()) 384 if (updateLogicalWidthAndColumnWidth())
385 relayoutChildren = true; 385 relayoutChildren = true;
386 386
387 SubtreeLayoutScope layoutScope(*this); 387 SubtreeLayoutScope layoutScope(*this);
388 LayoutUnit previousHeight = logicalHeight(); 388 LayoutUnit previousHeight = logicalHeight();
389 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()); 389 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight());
390 390
391 PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; 391 PaintLayerScrollableArea::DelayScrollOffsetClampScope delayClampScope;
392 392
393 { 393 {
394 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); 394 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope);
395 LayoutState state(*this, locationOffset()); 395 LayoutState state(*this, locationOffset());
396 396
397 m_numberOfInFlowChildrenOnFirstLine = -1; 397 m_numberOfInFlowChildrenOnFirstLine = -1;
398 398
399 prepareOrderIteratorAndMargins(); 399 prepareOrderIteratorAndMargins();
400 400
401 layoutFlexItems(relayoutChildren, layoutScope); 401 layoutFlexItems(relayoutChildren, layoutScope);
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 LayoutUnit originalOffset = 2238 LayoutUnit originalOffset =
2239 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 2239 lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
2240 LayoutUnit newOffset = 2240 LayoutUnit newOffset =
2241 contentExtent - originalOffset - lineCrossAxisExtent; 2241 contentExtent - originalOffset - lineCrossAxisExtent;
2242 adjustAlignmentForChild(*child, newOffset - originalOffset); 2242 adjustAlignmentForChild(*child, newOffset - originalOffset);
2243 } 2243 }
2244 } 2244 }
2245 } 2245 }
2246 2246
2247 } // namespace blink 2247 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698