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

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: Created 3 years, 10 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 ImageQualityController::remove(*this); 201 ImageQualityController::remove(*this);
202 202
203 // A continuation of this LayoutObject should be destroyed at subclasses. 203 // A continuation of this LayoutObject should be destroyed at subclasses.
204 ASSERT(!continuation()); 204 ASSERT(!continuation());
205 205
206 if (isPositioned()) { 206 if (isPositioned()) {
207 // Don't use this->view() because the document's layoutView has been set to 207 // Don't use this->view() because the document's layoutView has been set to
208 // 0 during destruction. 208 // 0 during destruction.
209 if (LocalFrame* frame = this->frame()) { 209 if (LocalFrame* frame = this->frame()) {
210 if (FrameView* frameView = frame->view()) { 210 if (FrameView* frameView = frame->view()) {
211 if (style()->hasViewportConstrainedPosition()) 211 if (style()->hasViewportConstrainedPosition() ||
212 style()->hasStickyConstrainedPosition())
212 frameView->removeViewportConstrainedObject(*this); 213 frameView->removeViewportConstrainedObject(*this);
213 } 214 }
214 } 215 }
215 } 216 }
216 217
217 LayoutObject::willBeDestroyed(); 218 LayoutObject::willBeDestroyed();
218 219
219 destroyLayer(); 220 destroyLayer();
220 } 221 }
221 222
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 if (rootElementStyle->hasBackground()) 1411 if (rootElementStyle->hasBackground())
1411 return false; 1412 return false;
1412 1413
1413 if (node() != document().firstBodyElement()) 1414 if (node() != document().firstBodyElement())
1414 return false; 1415 return false;
1415 1416
1416 return true; 1417 return true;
1417 } 1418 }
1418 1419
1419 } // namespace blink 1420 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698