The existing printing implementation for the WinCairo port does not properly consider the margin settings when calculating the scaling factor to use when drawing to the print context. Consequently, a page printed using the WinCairo port is not the same size as that produced by Safari, and does not properly draw within the specified margins. Fix is to compute the scaling factor after incorporating the margin regions. This allows the WinCairo print output to closely match the Safari output.
Created attachment 48077 [details] Patch to correct handling of margins when printing.
Attachment 48077 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebKit/win/WebFrame.cpp:2081: Extra space before ( in function call [whitespace/parens] [4] WebKit/win/WebFrame.cpp:2082: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 48078 [details] Revised patch, remove two extra spaces in function calls.
Comment on attachment 48078 [details] Revised patch, remove two extra spaces in function calls. > + cairoMarginRect.scale(1.0f / scale); You can just say "1 / scale" here. The 1 will get promoted to a float automatically. r=me
Landed in http://trac.webkit.org/changeset/54356.