| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 void LayoutView::layoutContent() { | 190 void LayoutView::layoutContent() { |
| 191 ASSERT(needsLayout()); | 191 ASSERT(needsLayout()); |
| 192 | 192 |
| 193 LayoutBlockFlow::layout(); | 193 LayoutBlockFlow::layout(); |
| 194 | 194 |
| 195 #if ENABLE(ASSERT) | 195 #if DCHECK_IS_ON() |
| 196 checkLayoutState(); | 196 checkLayoutState(); |
| 197 #endif | 197 #endif |
| 198 } | 198 } |
| 199 | 199 |
| 200 #if ENABLE(ASSERT) | 200 #if DCHECK_IS_ON() |
| 201 void LayoutView::checkLayoutState() { | 201 void LayoutView::checkLayoutState() { |
| 202 ASSERT(!m_layoutState->next()); | 202 ASSERT(!m_layoutState->next()); |
| 203 } | 203 } |
| 204 #endif | 204 #endif |
| 205 | 205 |
| 206 void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded( | 206 void LayoutView::setShouldDoFullPaintInvalidationOnResizeIfNeeded( |
| 207 bool widthChanged, | 207 bool widthChanged, |
| 208 bool heightChanged) { | 208 bool heightChanged) { |
| 209 // When background-attachment is 'fixed', we treat the viewport (instead of | 209 // When background-attachment is 'fixed', we treat the viewport (instead of |
| 210 // the 'root' i.e. html or body) as the background positioning area, and we | 210 // the 'root' i.e. html or body) as the background positioning area, and we |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // The document element paints the viewport background, so we need to | 287 // The document element paints the viewport background, so we need to |
| 288 // invalidate it when layout overflow changes. | 288 // invalidate it when layout overflow changes. |
| 289 // FIXME: Improve viewport background styling/invalidation/painting. | 289 // FIXME: Improve viewport background styling/invalidation/painting. |
| 290 // crbug.com/475115 | 290 // crbug.com/475115 |
| 291 if (Element* documentElement = document().documentElement()) { | 291 if (Element* documentElement = document().documentElement()) { |
| 292 if (LayoutObject* rootObject = documentElement->layoutObject()) | 292 if (LayoutObject* rootObject = documentElement->layoutObject()) |
| 293 rootObject->setShouldDoFullPaintInvalidation(); | 293 rootObject->setShouldDoFullPaintInvalidation(); |
| 294 } | 294 } |
| 295 } | 295 } |
| 296 | 296 |
| 297 #if ENABLE(ASSERT) | 297 #if DCHECK_IS_ON() |
| 298 checkLayoutState(); | 298 checkLayoutState(); |
| 299 #endif | 299 #endif |
| 300 clearNeedsLayout(); | 300 clearNeedsLayout(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 LayoutRect LayoutView::visualOverflowRect() const { | 303 LayoutRect LayoutView::visualOverflowRect() const { |
| 304 // In root layer scrolling mode, the LayoutView performs overflow clipping | 304 // In root layer scrolling mode, the LayoutView performs overflow clipping |
| 305 // like a regular scrollable div. | 305 // like a regular scrollable div. |
| 306 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 306 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| 307 return LayoutBlockFlow::visualOverflowRect(); | 307 return LayoutBlockFlow::visualOverflowRect(); |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 1049 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 1050 // Frame scroll corner is painted using LayoutView as the display item client. | 1050 // Frame scroll corner is painted using LayoutView as the display item client. |
| 1051 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && | 1051 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |
| 1052 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) | 1052 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) |
| 1053 return false; | 1053 return false; |
| 1054 | 1054 |
| 1055 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 1055 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 1056 } | 1056 } |
| 1057 | 1057 |
| 1058 } // namespace blink | 1058 } // namespace blink |
| OLD | NEW |