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

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

Issue 2770203002: Replace DCHECK with DCHECK_op and split some DCHECKs wherever necessary (Closed)
Patch Set: Add few more Created 3 years, 8 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/compositing/CompositingReasonFinder.h" 5 #include "core/layout/compositing/CompositingReasonFinder.h"
6 6
7 #include "core/CSSPropertyNames.h" 7 #include "core/CSSPropertyNames.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 LayoutRect(layer->boundingBoxForCompositing())) || 227 LayoutRect(layer->boundingBoxForCompositing())) ||
228 layer->compositesWithTransform() || layer->compositesWithOpacity())) { 228 layer->compositesWithTransform() || layer->compositesWithOpacity())) {
229 return false; 229 return false;
230 } 230 }
231 // Don't promote fixed position elements that are descendants of a non-view 231 // Don't promote fixed position elements that are descendants of a non-view
232 // container, e.g. transformed elements. They will stay fixed wrt the 232 // container, e.g. transformed elements. They will stay fixed wrt the
233 // container rather than the enclosing frame. 233 // container rather than the enclosing frame.
234 EPosition position = layer->layoutObject().style()->position(); 234 EPosition position = layer->layoutObject().style()->position();
235 if (position == EPosition::kFixed) 235 if (position == EPosition::kFixed)
236 return layer->fixedToViewport() && m_layoutView.frameView()->isScrollable(); 236 return layer->fixedToViewport() && m_layoutView.frameView()->isScrollable();
237 DCHECK(position == EPosition::kSticky); 237 DCHECK_EQ(position, EPosition::kSticky);
238 238
239 // Don't promote sticky position elements that cannot move with scrolls. 239 // Don't promote sticky position elements that cannot move with scrolls.
240 if (!layer->sticksToScroller()) 240 if (!layer->sticksToScroller())
241 return false; 241 return false;
242 if (layer->ancestorOverflowLayer()->isRootLayer()) 242 if (layer->ancestorOverflowLayer()->isRootLayer())
243 return m_layoutView.frameView()->isScrollable(); 243 return m_layoutView.frameView()->isScrollable();
244 return layer->ancestorOverflowLayer()->scrollsOverflow(); 244 return layer->ancestorOverflowLayer()->scrollsOverflow();
245 } 245 }
246 246
247 } // namespace blink 247 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698