| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/layout/ViewFragmentationContext.h" | 34 #include "core/layout/ViewFragmentationContext.h" |
| 35 #include "core/layout/api/LayoutAPIShim.h" | 35 #include "core/layout/api/LayoutAPIShim.h" |
| 36 #include "core/layout/api/LayoutPartItem.h" | 36 #include "core/layout/api/LayoutPartItem.h" |
| 37 #include "core/layout/api/LayoutViewItem.h" | 37 #include "core/layout/api/LayoutViewItem.h" |
| 38 #include "core/layout/compositing/PaintLayerCompositor.h" | 38 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 39 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 40 #include "core/paint/PaintLayer.h" | 40 #include "core/paint/PaintLayer.h" |
| 41 #include "core/paint/ViewPainter.h" | 41 #include "core/paint/ViewPainter.h" |
| 42 #include "core/svg/SVGDocumentExtensions.h" | 42 #include "core/svg/SVGDocumentExtensions.h" |
| 43 #include "platform/Histogram.h" | 43 #include "platform/Histogram.h" |
| 44 #include "platform/RuntimeEnabledFeatures.h" |
| 44 #include "platform/geometry/FloatQuad.h" | 45 #include "platform/geometry/FloatQuad.h" |
| 45 #include "platform/geometry/TransformState.h" | 46 #include "platform/geometry/TransformState.h" |
| 46 #include "platform/graphics/paint/PaintController.h" | 47 #include "platform/graphics/paint/PaintController.h" |
| 47 #include "platform/instrumentation/tracing/TraceEvent.h" | 48 #include "platform/instrumentation/tracing/TraceEvent.h" |
| 48 #include "platform/instrumentation/tracing/TracedValue.h" | 49 #include "platform/instrumentation/tracing/TracedValue.h" |
| 49 #include "public/platform/Platform.h" | 50 #include "public/platform/Platform.h" |
| 50 #include "wtf/PtrUtil.h" | 51 #include "wtf/PtrUtil.h" |
| 51 #include <inttypes.h> | 52 #include <inttypes.h> |
| 52 | 53 |
| 53 namespace blink { | 54 namespace blink { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 181 |
| 181 void LayoutView::updateLogicalWidth() { | 182 void LayoutView::updateLogicalWidth() { |
| 182 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing())); | 183 setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing())); |
| 183 } | 184 } |
| 184 | 185 |
| 185 bool LayoutView::isChildAllowed(LayoutObject* child, | 186 bool LayoutView::isChildAllowed(LayoutObject* child, |
| 186 const ComputedStyle&) const { | 187 const ComputedStyle&) const { |
| 187 return child->isBox(); | 188 return child->isBox(); |
| 188 } | 189 } |
| 189 | 190 |
| 191 bool LayoutView::canHaveChildren() const { |
| 192 FrameOwner* owner = frame()->owner(); |
| 193 if (!owner) |
| 194 return true; |
| 195 if (!RuntimeEnabledFeatures::displayNoneIFrameCreatesNoLayoutObjectEnabled()) |
| 196 return true; |
| 197 return !owner->isDisplayNone(); |
| 198 } |
| 199 |
| 190 void LayoutView::layoutContent() { | 200 void LayoutView::layoutContent() { |
| 191 ASSERT(needsLayout()); | 201 ASSERT(needsLayout()); |
| 192 | 202 |
| 193 LayoutBlockFlow::layout(); | 203 LayoutBlockFlow::layout(); |
| 194 | 204 |
| 195 #if DCHECK_IS_ON() | 205 #if DCHECK_IS_ON() |
| 196 checkLayoutState(); | 206 checkLayoutState(); |
| 197 #endif | 207 #endif |
| 198 } | 208 } |
| 199 | 209 |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 1059 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 1050 // Frame scroll corner is painted using LayoutView as the display item client. | 1060 // Frame scroll corner is painted using LayoutView as the display item client. |
| 1051 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && | 1061 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |
| 1052 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) | 1062 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) |
| 1053 return false; | 1063 return false; |
| 1054 | 1064 |
| 1055 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 1065 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 1056 } | 1066 } |
| 1057 | 1067 |
| 1058 } // namespace blink | 1068 } // namespace blink |
| OLD | NEW |