summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/printing
diff options
context:
space:
mode:
authordavve@opera.com <davve@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-05-14 22:57:52 +0000
committerdavve@opera.com <davve@opera.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-05-14 22:57:52 +0000
commit0a62c4e3abe143bf64265f312897c2433bef8aa0 (patch)
tree722fbb139ba5757f67b59511a9fa2857d81e6ae1 /third_party/WebKit/LayoutTests/printing
parent762dedc643efdccbfa4e040b2dddaa3ee54bd21c (diff)
downloadchromium_src-0a62c4e3abe143bf64265f312897c2433bef8aa0.zip
chromium_src-0a62c4e3abe143bf64265f312897c2433bef8aa0.tar.gz
chromium_src-0a62c4e3abe143bf64265f312897c2433bef8aa0.tar.bz2
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
Diffstat (limited to 'third_party/WebKit/LayoutTests/printing')
-rw-r--r--third_party/WebKit/LayoutTests/printing/subframes-percentage-height-expected.html5
-rw-r--r--third_party/WebKit/LayoutTests/printing/subframes-percentage-height.html12
2 files changed, 17 insertions, 0 deletions
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 @@
+<!doctype html>
+<title>Test iframe with 100% height content in printing</title>
+<!-- We page zoom scale down the page by 1.25 when printing. -->
+<body style="margin:0; zoom: 80%; height:400px">
+ <iframe frameborder="0" style="box-sizing: border-box; height: 150px; width: 300px; border: 10px solid blue;"></iframe>
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 @@
+<!doctype html>
+<title>Test iframe with 100% height content in printing</title>
+<script>
+ if (window.testRunner)
+ testRunner.setPrinting();
+</script>
+<body style="margin: 0; height:400px">
+<iframe frameborder=0 src="data:text/html,<!doctype html>
+<style>
+ html, body { height: 100%; margin: 0 }
+ div { height: 100%; border: 10px solid blue; box-sizing: border-box; }
+</style><div></div>"></iframe>