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

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

Issue 1158183006: Remove the old multicol implementation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase master Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutView.h ('k') | Source/core/layout/TextAutosizer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 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 10 matching lines...) Expand all
21 #include "config.h" 21 #include "config.h"
22 #include "core/layout/LayoutView.h" 22 #include "core/layout/LayoutView.h"
23 23
24 #include "core/dom/Document.h" 24 #include "core/dom/Document.h"
25 #include "core/dom/Element.h" 25 #include "core/dom/Element.h"
26 #include "core/editing/FrameSelection.h" 26 #include "core/editing/FrameSelection.h"
27 #include "core/frame/LocalFrame.h" 27 #include "core/frame/LocalFrame.h"
28 #include "core/frame/Settings.h" 28 #include "core/frame/Settings.h"
29 #include "core/html/HTMLFrameOwnerElement.h" 29 #include "core/html/HTMLFrameOwnerElement.h"
30 #include "core/html/HTMLIFrameElement.h" 30 #include "core/html/HTMLIFrameElement.h"
31 #include "core/layout/ColumnInfo.h"
32 #include "core/layout/HitTestResult.h" 31 #include "core/layout/HitTestResult.h"
33 #include "core/layout/LayoutFlowThread.h" 32 #include "core/layout/LayoutFlowThread.h"
34 #include "core/layout/LayoutGeometryMap.h" 33 #include "core/layout/LayoutGeometryMap.h"
35 #include "core/layout/LayoutPart.h" 34 #include "core/layout/LayoutPart.h"
36 #include "core/layout/LayoutQuote.h" 35 #include "core/layout/LayoutQuote.h"
37 #include "core/layout/LayoutScrollbarPart.h" 36 #include "core/layout/LayoutScrollbarPart.h"
38 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h" 37 #include "core/layout/compositing/DeprecatedPaintLayerCompositor.h"
39 #include "core/page/Page.h" 38 #include "core/page/Page.h"
40 #include "core/paint/DeprecatedPaintLayer.h" 39 #include "core/paint/DeprecatedPaintLayer.h"
41 #include "core/paint/ViewPainter.h" 40 #include "core/paint/ViewPainter.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 { 144 {
146 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo utUnit(viewLogicalHeightForBoxSizing()) : logicalHeight; 145 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo utUnit(viewLogicalHeightForBoxSizing()) : logicalHeight;
147 } 146 }
148 147
149 void LayoutView::updateLogicalWidth() 148 void LayoutView::updateLogicalWidth()
150 { 149 {
151 if (!shouldUsePrintingLayout() && m_frameView) 150 if (!shouldUsePrintingLayout() && m_frameView)
152 setLogicalWidth(viewLogicalWidthForBoxSizing()); 151 setLogicalWidth(viewLogicalWidthForBoxSizing());
153 } 152 }
154 153
155 LayoutUnit LayoutView::availableLogicalHeight(AvailableLogicalHeightType heightT ype) const
156 {
157 // If we have columns, then the available logical height is reduced to the c olumn height.
158 if (hasColumns())
159 return columnInfo()->columnHeight();
160 return LayoutBlockFlow::availableLogicalHeight(heightType);
161 }
162
163 bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const 154 bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const
164 { 155 {
165 return child->isBox(); 156 return child->isBox();
166 } 157 }
167 158
168 void LayoutView::layoutContent() 159 void LayoutView::layoutContent()
169 { 160 {
170 ASSERT(needsLayout()); 161 ASSERT(needsLayout());
171 162
172 LayoutBlockFlow::layout(); 163 LayoutBlockFlow::layout();
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 { 853 {
863 if (Element* documentElement = document().documentElement()) { 854 if (Element* documentElement = document().documentElement()) {
864 if (LayoutObject* rootObject = documentElement->layoutObject()) 855 if (LayoutObject* rootObject = documentElement->layoutObject())
865 return rootObject->layoutObjectForRootBackground(); 856 return rootObject->layoutObjectForRootBackground();
866 } 857 }
867 return 0; 858 return 0;
868 } 859 }
869 860
870 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const 861 LayoutRect LayoutView::backgroundRect(LayoutBox* backgroundLayoutObject) const
871 { 862 {
872 if (!hasColumns()) 863 return LayoutRect(unscaledDocumentRect());
873 return LayoutRect(unscaledDocumentRect());
874
875 ColumnInfo* columnInfo = this->columnInfo();
876 LayoutRect backgroundRect(0, 0, columnInfo->desiredColumnWidth(), columnInfo ->columnHeight() * columnInfo->columnCount());
877 if (!isHorizontalWritingMode())
878 backgroundRect = backgroundRect.transposedRect();
879 backgroundLayoutObject->flipForWritingMode(backgroundRect);
880
881 return backgroundRect;
882 } 864 }
883 865
884 IntRect LayoutView::documentRect() const 866 IntRect LayoutView::documentRect() const
885 { 867 {
886 FloatRect overflowRect(unscaledDocumentRect()); 868 FloatRect overflowRect(unscaledDocumentRect());
887 if (hasTransformRelatedProperty()) 869 if (hasTransformRelatedProperty())
888 overflowRect = layer()->currentTransform().mapRect(overflowRect); 870 overflowRect = layer()->currentTransform().mapRect(overflowRect);
889 return IntRect(overflowRect); 871 return IntRect(overflowRect);
890 } 872 }
891 873
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 return viewHeight(IncludeScrollbars) / scale; 974 return viewHeight(IncludeScrollbars) / scale;
993 } 975 }
994 976
995 void LayoutView::willBeDestroyed() 977 void LayoutView::willBeDestroyed()
996 { 978 {
997 LayoutBlockFlow::willBeDestroyed(); 979 LayoutBlockFlow::willBeDestroyed();
998 m_compositor.clear(); 980 m_compositor.clear();
999 } 981 }
1000 982
1001 } // namespace blink 983 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.h ('k') | Source/core/layout/TextAutosizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698