| Index: Source/core/rendering/RenderView.cpp
|
| diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
|
| index 05955691af573fc99f2d0102d0b46c6a62b72e2f..4fa84d30c22c9a2e7dec036128aadb105bffbc63 100644
|
| --- a/Source/core/rendering/RenderView.cpp
|
| +++ b/Source/core/rendering/RenderView.cpp
|
| @@ -320,10 +320,7 @@ void RenderView::layout()
|
| if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight())
|
| || child->style()->logicalHeight().isPercent()
|
| || child->style()->logicalMinHeight().isPercent()
|
| - || child->style()->logicalMaxHeight().isPercent()
|
| - || child->style()->logicalHeight().isViewportPercentage()
|
| - || child->style()->logicalMinHeight().isViewportPercentage()
|
| - || child->style()->logicalMaxHeight().isViewportPercentage())
|
| + || child->style()->logicalMaxHeight().isPercent())
|
| layoutScope.setChildNeedsLayout(child);
|
| }
|
|
|
| @@ -1213,26 +1210,26 @@ bool RenderView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const
|
| return m_frameView->hasOpaqueBackground();
|
| }
|
|
|
| -LayoutUnit RenderView::viewportPercentageWidth(float percentage) const
|
| +double RenderView::viewportWidthPercent() const
|
| {
|
| - return viewLogicalWidth(ScrollableArea::IncludeScrollbars) * percentage / 100.f;
|
| + float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
|
| + return viewWidth(ScrollableArea::IncludeScrollbars) / scale / 100.f;
|
| }
|
|
|
| -LayoutUnit RenderView::viewportPercentageHeight(float percentage) const
|
| +double RenderView::viewportHeightPercent() const
|
| {
|
| - return viewLogicalHeight(ScrollableArea::IncludeScrollbars) * percentage / 100.f;
|
| + float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
|
| + return viewHeight(ScrollableArea::IncludeScrollbars) / scale / 100.f;
|
| }
|
|
|
| -LayoutUnit RenderView::viewportPercentageMin(float percentage) const
|
| +double RenderView::viewportMinPercent() const
|
| {
|
| - return std::min(viewLogicalWidth(ScrollableArea::IncludeScrollbars), viewLogicalHeight(ScrollableArea::IncludeScrollbars))
|
| - * percentage / 100.f;
|
| + return std::min(viewportWidthPercent(), viewportHeightPercent());
|
| }
|
|
|
| -LayoutUnit RenderView::viewportPercentageMax(float percentage) const
|
| +double RenderView::viewportMaxPercent() const
|
| {
|
| - return std::max(viewLogicalWidth(ScrollableArea::IncludeScrollbars), viewLogicalHeight(ScrollableArea::IncludeScrollbars))
|
| - * percentage / 100.f;
|
| + return std::max(viewportWidthPercent(), viewportHeightPercent());
|
| }
|
|
|
| FragmentationDisabler::FragmentationDisabler(RenderObject* root)
|
|
|