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

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 23819019: Refactor fixed layout mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git rebase Created 7 years, 2 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
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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1012 }
1013 1013
1014 IntRect RenderView::documentRect() const 1014 IntRect RenderView::documentRect() const
1015 { 1015 {
1016 FloatRect overflowRect(unscaledDocumentRect()); 1016 FloatRect overflowRect(unscaledDocumentRect());
1017 if (hasTransform()) 1017 if (hasTransform())
1018 overflowRect = layer()->currentTransform().mapRect(overflowRect); 1018 overflowRect = layer()->currentTransform().mapRect(overflowRect);
1019 return IntRect(overflowRect); 1019 return IntRect(overflowRect);
1020 } 1020 }
1021 1021
1022 int RenderView::viewHeight(ScrollableArea::VisibleContentRectIncludesScrollbars scrollbarInclusion) const 1022 int RenderView::viewHeight(ScrollableArea::IncludeScrollbarsInRect scrollbarIncl usion) const
1023 { 1023 {
1024 int height = 0; 1024 int height = 0;
1025 if (!shouldUsePrintingLayout() && m_frameView) { 1025 if (!shouldUsePrintingLayout() && m_frameView)
1026 height = m_frameView->layoutHeight(scrollbarInclusion); 1026 height = m_frameView->layoutSize(scrollbarInclusion).height();
1027 height = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(height)) : height; 1027
1028 }
1029 return height; 1028 return height;
1030 } 1029 }
1031 1030
1032 int RenderView::viewWidth(ScrollableArea::VisibleContentRectIncludesScrollbars s crollbarInclusion) const 1031 int RenderView::viewWidth(ScrollableArea::IncludeScrollbarsInRect scrollbarInclu sion) const
1033 { 1032 {
1034 int width = 0; 1033 int width = 0;
1035 if (!shouldUsePrintingLayout() && m_frameView) { 1034 if (!shouldUsePrintingLayout() && m_frameView)
1036 width = m_frameView->layoutWidth(scrollbarInclusion); 1035 width = m_frameView->layoutSize(scrollbarInclusion).width();
1037 width = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(width)) : width; 1036
1038 }
1039 return width; 1037 return width;
1040 } 1038 }
1041 1039
1042 int RenderView::viewLogicalHeight(ScrollableArea::VisibleContentRectIncludesScro llbars scrollbarInclusion) const 1040 int RenderView::viewLogicalHeight(ScrollableArea::IncludeScrollbarsInRect scroll barInclusion) const
1043 { 1041 {
1044 int height = style()->isHorizontalWritingMode() ? viewHeight(scrollbarInclus ion) : viewWidth(scrollbarInclusion); 1042 int height = style()->isHorizontalWritingMode() ? viewHeight(scrollbarInclus ion) : viewWidth(scrollbarInclusion);
1045 1043
1046 if (hasColumns() && !style()->hasInlineColumnAxis()) { 1044 if (hasColumns() && !style()->hasInlineColumnAxis()) {
1047 if (int pageLength = m_frameView->pagination().pageLength) 1045 if (int pageLength = m_frameView->pagination().pageLength)
1048 height = pageLength; 1046 height = pageLength;
1049 } 1047 }
1050 1048
1051 return height; 1049 return height;
1052 } 1050 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 #endif 1239 #endif
1242 1240
1243 if (layoutState) 1241 if (layoutState)
1244 layoutState->m_isPaginated = m_fragmenting; 1242 layoutState->m_isPaginated = m_fragmenting;
1245 1243
1246 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1244 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1247 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1245 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1248 } 1246 }
1249 1247
1250 } // namespace WebCore 1248 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698