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

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

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: . Created 4 years 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 180
181 void LayoutView::updateLogicalWidth() { 181 void LayoutView::updateLogicalWidth() {
182 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing())); 182 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing()));
183 } 183 }
184 184
185 bool LayoutView::isChildAllowed(LayoutObject* child, 185 bool LayoutView::isChildAllowed(LayoutObject* child,
186 const ComputedStyle&) const { 186 const ComputedStyle&) const {
187 return child->isBox(); 187 return child->isBox();
188 } 188 }
189 189
190 bool LayoutView::canHaveChildren() const {
191 FrameOwner* owner = frame()->owner();
192 if (!owner)
193 return true;
194 return !owner->isDisplayNone();
195 }
196
190 void LayoutView::layoutContent() { 197 void LayoutView::layoutContent() {
191 ASSERT(needsLayout()); 198 ASSERT(needsLayout());
192 199
193 LayoutBlockFlow::layout(); 200 LayoutBlockFlow::layout();
194 201
195 #if ENABLE(ASSERT) 202 #if ENABLE(ASSERT)
196 checkLayoutState(); 203 checkLayoutState();
197 #endif 204 #endif
198 } 205 }
199 206
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 1036 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
1030 // Frame scroll corner is painted using LayoutView as the display item client. 1037 // Frame scroll corner is painted using LayoutView as the display item client.
1031 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 1038 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
1032 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) 1039 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar()))
1033 return false; 1040 return false;
1034 1041
1035 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 1042 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
1036 } 1043 }
1037 1044
1038 } // namespace blink 1045 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698