Bug 32308 - [Qt] Printing a QWebFrame that has a zoom factor set scales parts of the html
Summary: [Qt] Printing a QWebFrame that has a zoom factor set scales parts of the html
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2009-12-09 00:27 PST by qt-info
Modified: 2014-02-03 03:13 PST (History)
4 users (show)

See Also:


Attachments
Small example to reproduce the problem using cnn.com (849 bytes, text/x-c++src)
2009-12-09 00:27 PST, qt-info
no flags Details
Reset the zoom factor before creating a printcontext & restore it after pooling is done (636 bytes, patch)
2011-01-31 04:13 PST, Pushparajan
no flags Details | Formatted Diff | Diff
Fixing the style checker failure. (681 bytes, patch)
2011-01-31 05:04 PST, Pushparajan
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description qt-info 2009-12-09 00:27:50 PST
Created attachment 44515 [details]
Small example to reproduce the problem using cnn.com

When a QWebFrame has a zoom factor set on it and then it is printed then parts of the HTML appear to have been scaled even though the zoom factor should not effect printing at all.

In the example attached this uses cnn.com to show the differences since its clearer, the HTML can be cut down to be this:

<html><head>
<link rel="stylesheet" type="text/css" href="http://i.cdn.turner.com/cnn/.element/css/3.0/main.css">
</head><body id="cnnMainPage">  
<div class="cnn_shdcaheader"></div>
<div class="cnn_clear"></div>
<div class="cnn_shdcafooter"></div>
</body></html>

and it still occurs although its a lot less obvious (in case this helps).
Comment 1 Tor Arne Vestbø 2010-03-10 06:38:35 PST
Please follow the QtWebKit bug reporting guidelines when reporting bugs.

See http://trac.webkit.org/wiki/QtWebKitBugs

Specifically:

  - The 'QtWebKit' component should only be used for bugs/features in the
    public QtWebKit API layer, not to signify that the bug is specific to
    the Qt port of WebKit

      http://trac.webkit.org/wiki/QtWebKitBugs#Component

  - Add the keyword 'Qt' to signal that it's a Qt-related bug

      http://trac.webkit.org/wiki/QtWebKitBugs#Keywords
Comment 2 Jocelyn Turcotte 2010-03-17 04:08:17 PDT
Reproduced in arora on Windows by:
- Zooming out using Ctrl+ScrollWheel
- Selecting File/PrintPreview
Comment 3 Pushparajan 2011-01-31 04:13:41 PST
Created attachment 80630 [details]
Reset the zoom factor before creating a printcontext & restore it after pooling is done

This is a little bit hacky patch. But seems to be working.

Moreover this is my first patch. So, please guide me through to make this a fully acceptable patch.
Comment 4 WebKit Review Bot 2011-01-31 04:16:48 PST
Attachment 80630 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files']" exit_code: 1

Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Pushparajan 2011-01-31 05:04:34 PST
Created attachment 80634 [details]
Fixing the style checker failure.

Stylecheck fixed!!
Comment 6 Pushparajan 2011-01-31 22:45:17 PST
Adding some CC
Comment 7 Eric Seidel (no email) 2011-02-01 02:57:32 PST
Comment on attachment 80634 [details]
Fixing the style checker failure.

Needs ChangeLog and ideally test.
Comment 8 Jocelyn Turcotte 2014-02-03 03:13:14 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.