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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make sticky vertical ref tests expectations not dependent on font size. 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 layoutPositionedObjects(relayoutChildren || isDocumentElement()); 297 layoutPositionedObjects(relayoutChildren || isDocumentElement());
298 298
299 // 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.
300 computeOverflow(clientLogicalBottomAfterRepositioning()); 300 computeOverflow(clientLogicalBottomAfterRepositioning());
301 } 301 }
302 302
303 updateLayerTransformAfterLayout(); 303 updateLayerTransformAfterLayout();
304 304
305 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if 305 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if
306 // we overflow or not. 306 // we overflow or not.
307 updateScrollInfoAfterLayout(); 307 updateAfterLayout();
308 308
309 clearNeedsLayout(); 309 clearNeedsLayout();
310 } 310 }
311 311
312 void LayoutFlexibleBox::paintChildren(const PaintInfo& paintInfo, const LayoutPo int& paintOffset) const 312 void LayoutFlexibleBox::paintChildren(const PaintInfo& paintInfo, const LayoutPo int& paintOffset) const
313 { 313 {
314 BlockPainter::paintChildrenOfFlexibleBox(*this, paintInfo, paintOffset); 314 BlockPainter::paintChildrenOfFlexibleBox(*this, paintInfo, paintOffset);
315 } 315 }
316 316
317 void LayoutFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts) 317 void LayoutFlexibleBox::repositionLogicalHeightDependentFlexItems(Vector<LineCon text>& lineContexts)
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 ASSERT(child); 1768 ASSERT(child);
1769 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1769 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1770 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1770 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1771 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1771 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1772 adjustAlignmentForChild(*child, newOffset - originalOffset); 1772 adjustAlignmentForChild(*child, newOffset - originalOffset);
1773 } 1773 }
1774 } 1774 }
1775 } 1775 }
1776 1776
1777 } // namespace blink 1777 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698