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

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

Issue 273043002: Don't use pageLogicalHeight() to resolve percentage values in subframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@mixed-case-selector
Patch Set: Set a fixed body height to work around rounding issue on mac; also add a title to the test to descr… Created 6 years, 7 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
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 width = m_frameView->layoutSize(scrollbarInclusion).width(); 833 width = m_frameView->layoutSize(scrollbarInclusion).width();
834 834
835 return width; 835 return width;
836 } 836 }
837 837
838 int RenderView::viewLogicalHeight() const 838 int RenderView::viewLogicalHeight() const
839 { 839 {
840 return style()->isHorizontalWritingMode() ? viewHeight(ExcludeScrollbars) : viewWidth(ExcludeScrollbars); 840 return style()->isHorizontalWritingMode() ? viewHeight(ExcludeScrollbars) : viewWidth(ExcludeScrollbars);
841 } 841 }
842 842
843 LayoutUnit RenderView::viewLogicalHeightForPercentages() const
844 {
845 if (shouldUsePrintingLayout())
846 return pageLogicalHeight();
847 return viewLogicalHeight();
848 }
849
843 float RenderView::zoomFactor() const 850 float RenderView::zoomFactor() const
844 { 851 {
845 return m_frameView->frame().pageZoomFactor(); 852 return m_frameView->frame().pageZoomFactor();
846 } 853 }
847 854
848 void RenderView::pushLayoutState(RenderObject& root) 855 void RenderView::pushLayoutState(RenderObject& root)
849 { 856 {
850 ASSERT(m_layoutStateDisableCount == 0); 857 ASSERT(m_layoutStateDisableCount == 0);
851 ASSERT(m_layoutState == 0); 858 ASSERT(m_layoutState == 0);
852 859
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return viewWidth(IncludeScrollbars) / scale; 963 return viewWidth(IncludeScrollbars) / scale;
957 } 964 }
958 965
959 double RenderView::layoutViewportHeight() const 966 double RenderView::layoutViewportHeight() const
960 { 967 {
961 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 968 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
962 return viewHeight(IncludeScrollbars) / scale; 969 return viewHeight(IncludeScrollbars) / scale;
963 } 970 }
964 971
965 } // namespace WebCore 972 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698