[Webkit-unassigned] [Bug 61256] Print HTML with only 1 line, then 2 pages are printed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 26 17:35:41 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=61256
--- Comment #20 from Kentaro Hara <haraken at google.com> 2011-05-26 17:35:40 PST ---
> Do you have a debugging environment for at least one of the platforms where this test passes? I would like to know what the difference is between them.
> If you do not, perhaps you could post a detailed description of what happens (what arguments are passed, what the wrong calculation result is), so that we could compare that with other platforms.
Thank you very much. For now, I have only Linux Chromium for the debugging environment. The details are as follows:
- Use Chromium 13.0.776.0 (Developer Build 55d81a2 Linux)
- Run "./src/webkit/tools/layout_tests/run_webkit_tests.sh --debug printing"
- The test (printing/page-count-with-one-line.html) passes with my patch. This test contains only 1 line and checks if the page count is equal to 1.
- However, the test fails without my patch because the page count becomes 2. Specifically, what is happening here is as below:
./src/third_party/WebKit/Source/WebCore/page/PrintContext.cpp (without my patch):
void PrintContext::computePageRects(...) {
...;
const IntRect& documentRect = view->documentRect(); // documentRect is 673 x 943
if (isHorizontal) {
float ratio = printRect.height() / printRect.width(); // 539 / 755
pageWidth = documentRect.width(); // 539
pageHeight = floorf(pageWidth * ratio); // floorf(673 * (539 / 755)) = 942 (this should be 943 though...)
}
...;
}
void PrintContext::computePageRectsWithPageSizeInternal(...) {
...;
unsigned pageCount = ceilf((float)docLogicalHeight / pageLogicalHeight); // ceilf(943 / 942) = 2
...;
}
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list