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

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

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: rebaseline. 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 /* 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 25 matching lines...) Expand all
36 #include "core/layout/api/LayoutAPIShim.h" 36 #include "core/layout/api/LayoutAPIShim.h"
37 #include "core/layout/api/LayoutPartItem.h" 37 #include "core/layout/api/LayoutPartItem.h"
38 #include "core/layout/api/LayoutViewItem.h" 38 #include "core/layout/api/LayoutViewItem.h"
39 #include "core/layout/compositing/PaintLayerCompositor.h" 39 #include "core/layout/compositing/PaintLayerCompositor.h"
40 #include "core/page/Page.h" 40 #include "core/page/Page.h"
41 #include "core/paint/PaintLayer.h" 41 #include "core/paint/PaintLayer.h"
42 #include "core/paint/ViewPaintInvalidator.h" 42 #include "core/paint/ViewPaintInvalidator.h"
43 #include "core/paint/ViewPainter.h" 43 #include "core/paint/ViewPainter.h"
44 #include "core/svg/SVGDocumentExtensions.h" 44 #include "core/svg/SVGDocumentExtensions.h"
45 #include "platform/Histogram.h" 45 #include "platform/Histogram.h"
46 #include "platform/RuntimeEnabledFeatures.h"
46 #include "platform/geometry/FloatQuad.h" 47 #include "platform/geometry/FloatQuad.h"
47 #include "platform/geometry/TransformState.h" 48 #include "platform/geometry/TransformState.h"
48 #include "platform/graphics/paint/PaintController.h" 49 #include "platform/graphics/paint/PaintController.h"
49 #include "platform/instrumentation/tracing/TraceEvent.h" 50 #include "platform/instrumentation/tracing/TraceEvent.h"
50 #include "platform/instrumentation/tracing/TracedValue.h" 51 #include "platform/instrumentation/tracing/TracedValue.h"
51 #include "public/platform/Platform.h" 52 #include "public/platform/Platform.h"
52 #include "wtf/PtrUtil.h" 53 #include "wtf/PtrUtil.h"
53 54
54 namespace blink { 55 namespace blink {
55 56
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 182
182 void LayoutView::updateLogicalWidth() { 183 void LayoutView::updateLogicalWidth() {
183 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing())); 184 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing()));
184 } 185 }
185 186
186 bool LayoutView::isChildAllowed(LayoutObject* child, 187 bool LayoutView::isChildAllowed(LayoutObject* child,
187 const ComputedStyle&) const { 188 const ComputedStyle&) const {
188 return child->isBox(); 189 return child->isBox();
189 } 190 }
190 191
192 bool LayoutView::canHaveChildren() const {
193 FrameOwner* owner = frame()->owner();
194 if (!owner)
195 return true;
196 if (!RuntimeEnabledFeatures::displayNoneIFrameCreatesNoLayoutObjectEnabled())
197 return true;
198 return !owner->isDisplayNone();
199 }
200
191 void LayoutView::layoutContent() { 201 void LayoutView::layoutContent() {
192 ASSERT(needsLayout()); 202 ASSERT(needsLayout());
193 203
194 LayoutBlockFlow::layout(); 204 LayoutBlockFlow::layout();
195 205
196 #if DCHECK_IS_ON() 206 #if DCHECK_IS_ON()
197 checkLayoutState(); 207 checkLayoutState();
198 #endif 208 #endif
199 } 209 }
200 210
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { 1076 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const {
1067 // Frame scroll corner is painted using LayoutView as the display item client. 1077 // Frame scroll corner is painted using LayoutView as the display item client.
1068 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && 1078 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
1069 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) 1079 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar()))
1070 return false; 1080 return false;
1071 1081
1072 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); 1082 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize();
1073 } 1083 }
1074 1084
1075 } // namespace blink 1085 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698