From 0a62c4e3abe143bf64265f312897c2433bef8aa0 Mon Sep 17 00:00:00 2001 From: "davve@opera.com" Date: Wed, 14 May 2014 22:57:52 +0000 Subject: Don't use pageLogicalHeight() to resolve percentage values in subframes In printing, pageLogicalHeight() is set to zero for all subframes which makes is a bad candidate for resolving percentages against. For subframes a better candidate would be the view height, as for non-printing documents. The RenderView knows when to layout in printing mode (top-level document) and when not (subframes), so move viewLogicalHeightForPercentages() to the RenderView and use its knowledge to return the view height for subframes in printing to resolve percentages against. BUG=370948 R=ojan Review URL: https://codereview.chromium.org/273043002 git-svn-id: svn://svn.chromium.org/blink/trunk@174051 bbb929c8-8fbe-4397-9dbb-9b2b20218538 --- .../printing/subframes-percentage-height-expected.html | 5 +++++ .../LayoutTests/printing/subframes-percentage-height.html | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html create mode 100644 third_party/WebKit/LayoutTests/printing/subframes-percentage-height.html (limited to 'third_party/WebKit/LayoutTests/printing') diff --git a/third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html b/third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html new file mode 100644 index 0000000..3505a25 --- /dev/null +++ b/third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html @@ -0,0 +1,5 @@ + +Test iframe with 100% height content in printing + + + diff --git a/third_party/WebKit/LayoutTests/printing/subframes-percentage-height.html b/third_party/WebKit/LayoutTests/printing/subframes-percentage-height.html new file mode 100644 index 0000000..a064b5f --- /dev/null +++ b/third_party/WebKit/LayoutTests/printing/subframes-percentage-height.html @@ -0,0 +1,12 @@ + +Test iframe with 100% height content in printing + + + -- cgit v1.1