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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove redundant invalidation in LayoutBlock::tryLayoutDoingPositionedMovementOnly Created 4 years, 9 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 LayoutUnit pageLogicalHeight; 318 LayoutUnit pageLogicalHeight;
319 while (!done) 319 while (!done)
320 done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope) ; 320 done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope) ;
321 321
322 LayoutView* layoutView = view(); 322 LayoutView* layoutView = view();
323 if (layoutView->layoutState()->pageLogicalHeight()) 323 if (layoutView->layoutState()->pageLogicalHeight())
324 setPageLogicalOffset(layoutView->layoutState()->pageLogicalOffset(*this, logicalTop())); 324 setPageLogicalOffset(layoutView->layoutState()->pageLogicalOffset(*this, logicalTop()));
325 325
326 updateLayerTransformAfterLayout(); 326 updateLayerTransformAfterLayout();
327 327
328 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if 328 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if
chrishtr 2016/03/24 17:36:02 Move the comment into updateAfterLayout
flackr 2016/03/29 16:02:32 Done.
329 // we overflow or not. 329 // we overflow or not.
330 updateScrollInfoAfterLayout(); 330 updateAfterLayout();
331 331
332 if (m_paintInvalidationLogicalTop != m_paintInvalidationLogicalBottom) { 332 if (m_paintInvalidationLogicalTop != m_paintInvalidationLogicalBottom) {
333 bool hasVisibleContent = style()->visibility() == VISIBLE; 333 bool hasVisibleContent = style()->visibility() == VISIBLE;
334 if (!hasVisibleContent) { 334 if (!hasVisibleContent) {
335 PaintLayer* layer = enclosingLayer(); 335 PaintLayer* layer = enclosingLayer();
336 layer->updateDescendantDependentFlags(); 336 layer->updateDescendantDependentFlags();
337 hasVisibleContent = layer->hasVisibleContent(); 337 hasVisibleContent = layer->hasVisibleContent();
338 } 338 }
339 if (hasVisibleContent) 339 if (hasVisibleContent)
340 setShouldInvalidateOverflowForPaint(); 340 setShouldInvalidateOverflowForPaint();
(...skipping 2584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2925 // FIXME: Glyph overflow will get lost in this case, but not really a big de al. 2925 // FIXME: Glyph overflow will get lost in this case, but not really a big de al.
2926 GlyphOverflowAndFallbackFontsMap textBoxDataMap; 2926 GlyphOverflowAndFallbackFontsMap textBoxDataMap;
2927 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) { 2927 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it != lineBoxes.end(); ++it) {
2928 RootInlineBox* box = *it; 2928 RootInlineBox* box = *it;
2929 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); 2929 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap);
2930 } 2930 }
2931 return childrenOverflowChanged; 2931 return childrenOverflowChanged;
2932 } 2932 }
2933 2933
2934 } // namespace blink 2934 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698