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

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

Issue 2716583005: Do not promote position sticky or fixed elements unless they move with scroll. (Closed)
Patch Set: Create a stacking context for sticky. 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
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 ImageQualityController::remove(*this); 242 ImageQualityController::remove(*this);
243 243
244 // A continuation of this LayoutObject should be destroyed at subclasses. 244 // A continuation of this LayoutObject should be destroyed at subclasses.
245 ASSERT(!continuation()); 245 ASSERT(!continuation());
246 246
247 if (isPositioned()) { 247 if (isPositioned()) {
248 // Don't use this->view() because the document's layoutView has been set to 248 // Don't use this->view() because the document's layoutView has been set to
249 // 0 during destruction. 249 // 0 during destruction.
250 if (LocalFrame* frame = this->frame()) { 250 if (LocalFrame* frame = this->frame()) {
251 if (FrameView* frameView = frame->view()) { 251 if (FrameView* frameView = frame->view()) {
252 if (style()->hasViewportConstrainedPosition()) 252 if (style()->hasViewportConstrainedPosition() ||
253 style()->hasStickyConstrainedPosition())
chrishtr 2017/03/16 00:24:03 This was a bug before?
flackr 2017/03/20 21:04:59 Not so much a bug, just hasStickyConstrainedPositi
253 frameView->removeViewportConstrainedObject(*this); 254 frameView->removeViewportConstrainedObject(*this);
254 } 255 }
255 } 256 }
256 } 257 }
257 258
258 LayoutObject::willBeDestroyed(); 259 LayoutObject::willBeDestroyed();
259 260
260 destroyLayer(); 261 destroyLayer();
261 } 262 }
262 263
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 if (rootElementStyle->hasBackground()) 1468 if (rootElementStyle->hasBackground())
1468 return false; 1469 return false;
1469 1470
1470 if (node() != document().firstBodyElement()) 1471 if (node() != document().firstBodyElement())
1471 return false; 1472 return false;
1472 1473
1473 return true; 1474 return true;
1474 } 1475 }
1475 1476
1476 } // namespace blink 1477 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698