Chromium Code Reviews| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 void LayoutView::layout() { | 225 void LayoutView::layout() { |
| 226 if (!document().paginated()) | 226 if (!document().paginated()) |
| 227 setPageLogicalHeight(LayoutUnit()); | 227 setPageLogicalHeight(LayoutUnit()); |
| 228 | 228 |
| 229 IncludeScrollbarsInRect includeScrollbars = | 229 IncludeScrollbarsInRect includeScrollbars = |
| 230 RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars | 230 RuntimeEnabledFeatures::rootLayerScrollingEnabled() ? IncludeScrollbars |
| 231 : ExcludeScrollbars; | 231 : ExcludeScrollbars; |
| 232 FloatSize viewSize(frameView()->visibleContentSize(includeScrollbars)); | |
| 233 setShouldDoFullPaintInvalidationOnResizeIfNeeded( | 232 setShouldDoFullPaintInvalidationOnResizeIfNeeded( |
| 234 offsetWidth() != viewSize.width(), offsetHeight() != viewSize.height()); | 233 offsetWidth() != layoutSize(includeScrollbars).width(), |
|
bokan
2016/12/22 00:45:49
In https://codereview.chromium.org/2461463004, I m
| |
| 234 offsetHeight() != layoutSize(includeScrollbars).height()); | |
| 235 | 235 |
| 236 if (pageLogicalHeight() && shouldUsePrintingLayout()) { | 236 if (pageLogicalHeight() && shouldUsePrintingLayout()) { |
| 237 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth(); | 237 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth(); |
| 238 if (!m_fragmentationContext) { | 238 if (!m_fragmentationContext) { |
| 239 m_fragmentationContext = | 239 m_fragmentationContext = |
| 240 WTF::wrapUnique(new ViewFragmentationContext(*this)); | 240 WTF::wrapUnique(new ViewFragmentationContext(*this)); |
| 241 m_paginationStateChanged = true; | 241 m_paginationStateChanged = true; |
| 242 } | 242 } |
| 243 } else if (m_fragmentationContext) { | 243 } else if (m_fragmentationContext) { |
| 244 m_fragmentationContext.reset(); | 244 m_fragmentationContext.reset(); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1031 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 1031 bool LayoutView::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 1032 // Frame scroll corner is painted using LayoutView as the display item client. | 1032 // Frame scroll corner is painted using LayoutView as the display item client. |
| 1033 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && | 1033 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() && |
| 1034 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) | 1034 (frameView()->horizontalScrollbar() || frameView()->verticalScrollbar())) |
| 1035 return false; | 1035 return false; |
| 1036 | 1036 |
| 1037 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 1037 return LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 } // namespace blink | 1040 } // namespace blink |
| OLD | NEW |