| 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. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 void LayoutView::clearHitTestCache() | 129 void LayoutView::clearHitTestCache() |
| 130 { | 130 { |
| 131 m_hitTestCache->clear(); | 131 m_hitTestCache->clear(); |
| 132 if (LayoutPart* frameLayoutObject = frame()->ownerLayoutObject()) | 132 if (LayoutPart* frameLayoutObject = frame()->ownerLayoutObject()) |
| 133 frameLayoutObject->view()->clearHitTestCache(); | 133 frameLayoutObject->view()->clearHitTestCache(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 void LayoutView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const | 136 void LayoutView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const |
| 137 { | 137 { |
| 138 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo
utUnit(viewLogicalHeightForBoxSizing()) : logicalHeight; | 138 computedValues.m_extent = viewLogicalHeightForBoxSizing(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 void LayoutView::updateLogicalWidth() | 141 void LayoutView::updateLogicalWidth() |
| 142 { | 142 { |
| 143 if (!shouldUsePrintingLayout() && m_frameView) | 143 setLogicalWidth(viewLogicalWidthForBoxSizing()); |
| 144 setLogicalWidth(viewLogicalWidthForBoxSizing()); | |
| 145 } | 144 } |
| 146 | 145 |
| 147 bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const | 146 bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const |
| 148 { | 147 { |
| 149 return child->isBox(); | 148 return child->isBox(); |
| 150 } | 149 } |
| 151 | 150 |
| 152 void LayoutView::layoutContent() | 151 void LayoutView::layoutContent() |
| 153 { | 152 { |
| 154 ASSERT(needsLayout()); | 153 ASSERT(needsLayout()); |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 IntRect LayoutView::documentRect() const | 830 IntRect LayoutView::documentRect() const |
| 832 { | 831 { |
| 833 FloatRect overflowRect(unscaledDocumentRect()); | 832 FloatRect overflowRect(unscaledDocumentRect()); |
| 834 if (hasTransformRelatedProperty()) | 833 if (hasTransformRelatedProperty()) |
| 835 overflowRect = layer()->currentTransform().mapRect(overflowRect); | 834 overflowRect = layer()->currentTransform().mapRect(overflowRect); |
| 836 return IntRect(overflowRect); | 835 return IntRect(overflowRect); |
| 837 } | 836 } |
| 838 | 837 |
| 839 IntSize LayoutView::layoutSize(IncludeScrollbarsInRect scrollbarInclusion) const | 838 IntSize LayoutView::layoutSize(IncludeScrollbarsInRect scrollbarInclusion) const |
| 840 { | 839 { |
| 841 if (!m_frameView || shouldUsePrintingLayout()) | 840 if (shouldUsePrintingLayout()) |
| 841 return IntSize(size().width(), pageLogicalHeight()); |
| 842 |
| 843 if (!m_frameView) |
| 842 return IntSize(); | 844 return IntSize(); |
| 843 | 845 |
| 844 IntSize result = m_frameView->layoutSize(IncludeScrollbars); | 846 IntSize result = m_frameView->layoutSize(IncludeScrollbars); |
| 845 if (scrollbarInclusion == ExcludeScrollbars) | 847 if (scrollbarInclusion == ExcludeScrollbars) |
| 846 result = m_frameView->layoutViewportScrollableArea()->excludeScrollbars(
result); | 848 result = m_frameView->layoutViewportScrollableArea()->excludeScrollbars(
result); |
| 847 return result; | 849 return result; |
| 848 } | 850 } |
| 849 | 851 |
| 850 int LayoutView::viewLogicalWidth(IncludeScrollbarsInRect scrollbarInclusion) con
st | 852 int LayoutView::viewLogicalWidth(IncludeScrollbarsInRect scrollbarInclusion) con
st |
| 851 { | 853 { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 return viewHeight(IncludeScrollbars) / scale; | 941 return viewHeight(IncludeScrollbars) / scale; |
| 940 } | 942 } |
| 941 | 943 |
| 942 void LayoutView::willBeDestroyed() | 944 void LayoutView::willBeDestroyed() |
| 943 { | 945 { |
| 944 LayoutBlockFlow::willBeDestroyed(); | 946 LayoutBlockFlow::willBeDestroyed(); |
| 945 m_compositor.clear(); | 947 m_compositor.clear(); |
| 946 } | 948 } |
| 947 | 949 |
| 948 } // namespace blink | 950 } // namespace blink |
| OLD | NEW |