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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: First pass addressing reviewer comments Created 3 years, 7 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 // SVG text layout code expects us to be a block-level style element. 505 // SVG text layout code expects us to be a block-level style element.
506 if ((isSVGForeignObjectElement(*element) || isSVGTextElement(*element)) && 506 if ((isSVGForeignObjectElement(*element) || isSVGTextElement(*element)) &&
507 style.IsDisplayInlineType()) 507 style.IsDisplayInlineType())
508 style.SetDisplay(EDisplay::kBlock); 508 style.SetDisplay(EDisplay::kBlock);
509 509
510 // Columns don't apply to svg text elements. 510 // Columns don't apply to svg text elements.
511 if (isSVGTextElement(*element)) 511 if (isSVGTextElement(*element))
512 style.ClearMultiCol(); 512 style.ClearMultiCol();
513 } 513 }
514 AdjustStyleForAlignment(style, layout_parent_style); 514 AdjustStyleForAlignment(style, layout_parent_style);
515
516 // Once the position of the element has been decided, we need to track whether
517 // or not it is in a sticky sub-tree. This is necessary to properly handle the
518 // document lifecycle for certain script APIs, see
519 // Document::EnsureLifecycleValidForLocationAPIsForNode.
520 style.SetIsInStickySubtree(parent_style.IsInStickySubtree() ||
fs 2017/05/01 21:19:34 if (style.GetPosition() == EPosition::kSticky) s
smcgruer 2017/05/02 15:25:41 I'm not sure I follow here. If our parent/ancestor
fs 2017/05/02 15:58:07 If parent is sticky, the inheritance mechanism wil
smcgruer 2017/05/02 17:25:30 Ok, the inheritance code is definitely confirmed m
521 style.GetPosition() == EPosition::kSticky);
515 } 522 }
516 523
517 } // namespace blink 524 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698