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

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

Issue 2776643002: Walk the container chain to correctly find nested inline sticky ancestors. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 LayoutBoxModelObject* findFirstStickyBetween(LayoutObject* from, 73 LayoutBoxModelObject* findFirstStickyBetween(LayoutObject* from,
74 LayoutObject* to) { 74 LayoutObject* to) {
75 LayoutObject* maybeStickyAncestor = from; 75 LayoutObject* maybeStickyAncestor = from;
76 while (maybeStickyAncestor && maybeStickyAncestor != to) { 76 while (maybeStickyAncestor && maybeStickyAncestor != to) {
77 if (maybeStickyAncestor->isStickyPositioned()) { 77 if (maybeStickyAncestor->isStickyPositioned()) {
78 return toLayoutBoxModelObject(maybeStickyAncestor); 78 return toLayoutBoxModelObject(maybeStickyAncestor);
79 } 79 }
80 80
81 maybeStickyAncestor = 81 maybeStickyAncestor =
82 maybeStickyAncestor->isLayoutInline() 82 maybeStickyAncestor->isLayoutInline()
83 ? maybeStickyAncestor->containingBlock() 83 ? maybeStickyAncestor->container()
84 : toLayoutBox(maybeStickyAncestor)->locationContainer(); 84 : toLayoutBox(maybeStickyAncestor)->locationContainer();
85 } 85 }
86 return nullptr; 86 return nullptr;
87 } 87 }
88 } // namespace 88 } // namespace
89 89
90 class FloatStateForStyleChange { 90 class FloatStateForStyleChange {
91 public: 91 public:
92 static void setWasFloating(LayoutBoxModelObject* boxModelObject, 92 static void setWasFloating(LayoutBoxModelObject* boxModelObject,
93 bool wasFloating) { 93 bool wasFloating) {
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 if (rootElementStyle->hasBackground()) 1468 if (rootElementStyle->hasBackground())
1469 return false; 1469 return false;
1470 1470
1471 if (node() != document().firstBodyElement()) 1471 if (node() != document().firstBodyElement())
1472 return false; 1472 return false;
1473 1473
1474 return true; 1474 return true;
1475 } 1475 }
1476 1476
1477 } // namespace blink 1477 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698