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

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

Issue 2561693002: Move sticky position constraints update to the pre-paint tree walk. (Closed)
Patch Set: none Created 4 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 layer()->ancestorOverflowLayer()->getScrollableArea(); 760 layer()->ancestorOverflowLayer()->getScrollableArea();
761 StickyPositionScrollingConstraints constraints; 761 StickyPositionScrollingConstraints constraints;
762 FloatSize skippedContainersOffset; 762 FloatSize skippedContainersOffset;
763 LayoutBlock* containingBlock = this->containingBlock(); 763 LayoutBlock* containingBlock = this->containingBlock();
764 // Skip anonymous containing blocks. 764 // Skip anonymous containing blocks.
765 while (containingBlock->isAnonymous()) { 765 while (containingBlock->isAnonymous()) {
766 skippedContainersOffset += 766 skippedContainersOffset +=
767 toFloatSize(FloatPoint(containingBlock->frameRect().location())); 767 toFloatSize(FloatPoint(containingBlock->frameRect().location()));
768 containingBlock = containingBlock->containingBlock(); 768 containingBlock = containingBlock->containingBlock();
769 } 769 }
770
770 LayoutBox* scrollAncestor = 771 LayoutBox* scrollAncestor =
771 layer()->ancestorOverflowLayer()->isRootLayer() 772 layer()->ancestorOverflowLayer()->isRootLayer()
772 ? nullptr 773 ? nullptr
773 : toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject()); 774 : toLayoutBox(layer()->ancestorOverflowLayer()->layoutObject());
774 775
775 LayoutUnit maxContainerWidth = 776 LayoutUnit maxContainerWidth =
776 containingBlock->isLayoutView() 777 containingBlock->isLayoutView()
777 ? containingBlock->logicalWidth() 778 ? containingBlock->logicalWidth()
778 : containingBlock->containingBlockLogicalWidthForContent(); 779 : containingBlock->containingBlockLogicalWidthForContent();
779 // Sticky positioned element ignore any override logical width on the 780 // Sticky positioned element ignore any override logical width on the
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 if (rootElementStyle->hasBackground()) 1328 if (rootElementStyle->hasBackground())
1328 return false; 1329 return false;
1329 1330
1330 if (node() != document().firstBodyElement()) 1331 if (node() != document().firstBodyElement())
1331 return false; 1332 return false;
1332 1333
1333 return true; 1334 return true;
1334 } 1335 }
1335 1336
1336 } // namespace blink 1337 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698