Chromium Code Reviews| Index: Source/core/rendering/RenderView.cpp |
| diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp |
| index 89e7169c5c08d83d5b18c51f9839b8b1b81cc380..0919483c436d4cd88474d19584261576624e7b01 100644 |
| --- a/Source/core/rendering/RenderView.cpp |
| +++ b/Source/core/rendering/RenderView.cpp |
| @@ -28,6 +28,7 @@ |
| #include "core/page/Frame.h" |
| #include "core/page/FrameView.h" |
| #include "core/page/Page.h" |
| +#include "core/page/Settings.h" |
| #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" |
| #include "core/platform/graphics/FloatQuad.h" |
| #include "core/platform/graphics/GraphicsContext.h" |
| @@ -950,6 +951,16 @@ bool RenderView::rootBackgroundIsEntirelyFixed() const |
| return rootRenderer->hasEntirelyFixedBackground(); |
| } |
| +bool RenderView::useDesktopStyleLayout() const |
| +{ |
| + Page* page = document()->page(); |
| + |
| + if (!page) |
| + return false; |
| + |
| + return !page->settings()->layoutFallbackWidth(); |
| +} |
| + |
| LayoutRect RenderView::backgroundRect(RenderBox* backgroundRenderer) const |
| { |
| if (!hasColumns()) |
| @@ -977,8 +988,9 @@ int RenderView::viewHeight() const |
| int height = 0; |
| if (!shouldUsePrintingLayout() && m_frameView) { |
| height = m_frameView->layoutHeight(); |
| - height = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(height)) : height; |
|
aelias_OOO_until_Jul13
2013/07/31 22:31:21
This is a legacy of one of the other WebKit ports,
|
| + height = !useDesktopStyleLayout() ? ceilf(style()->effectiveZoom() * float(height)) : height; |
| } |
| + |
| return height; |
| } |
| @@ -987,8 +999,9 @@ int RenderView::viewWidth() const |
| int width = 0; |
| if (!shouldUsePrintingLayout() && m_frameView) { |
| width = m_frameView->layoutWidth(); |
| - width = m_frameView->useFixedLayout() ? ceilf(style()->effectiveZoom() * float(width)) : width; |
| + width = !useDesktopStyleLayout() ? ceilf(style()->effectiveZoom() * float(width)) : width; |
| } |
| + |
| return width; |
| } |