New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout problem with Chrome 102 #896
Comments
Update (Chrome 103)I tested the latest Google Chrome Canary 103.0.5014.0 and found that the problems on Test 1 and Test 2 did not occur, but the problems on Test 3 and Test 4 still occurred. |
The problems on Test 1 and Test 2 are not found in Chrome 103 but still found in Chrome 102 (currently Chrome Beta, and will be same in the Release version), and the problems on Test 3 and Test 4 will not be resolved until the following Chromium issue is fixed: The problem is that different layout engines (LayoutNG and the legacy one) are used for screen display and printing, and the results do not match. There were a workaround: that uses multi-column layout, in Chromium the same legacy layout engine was used both printing and multi-column in screen, but this workaround is no longer effective because the layout engine for multi-column layout is changed to LayoutNG from Chromium 102. So we should not use Chromium 102 and later version (especially on Vivliostyle CLI) until this Chromium issue is resolved. |
- Fix #896 This is a workaround for the Chromium problem that printing uses legacy layout and causes inconsistent result with viewing.
I found a workaround for this problem: |
Note: From the Chromium issue, https://bugs.chromium.org/p/chromium/issues/detail?id=1121942#c79: (Is there any estimated timeline on when the printing side of things here will be released?)
|
Hi @MurakamiShinyu we are tentatively looking at enabling LayoutNGPrinting for M108 by default (still no promises however) - please let us know if you find any issue. |
Hi @bfgeek, I have posted the following Chromium issues on LayoutNGPrinting:
Apart from these, LayoutNGPrinting works fine. Thank you! |
I tested Vivliostyle Viewer with Chrome 102 (currently, Google Chrome
CanaryBeta) and found layout problems which are not found with Chrome 101(currently, Google Chrome Beta)and older versions.Test cases
Test 1:
https://vivliostyle.org/viewer/#src=https://vivliostyle.github.io/vivliostyle_doc/samples/gutenberg/Alice.html&bookMode=true&userStyle=data:,/*%3Cviewer%3E*/%0A@page%20%7B%20size:%20a5;%20%7D%0A/*%3C/viewer%3E*/
(This test is from issue #793)
See page 33.
Result screenshot (Chrome 102):
The overflowed text "me," is shown at end of page. Note that there is no forced break after the text "me," in the source HTML https://github.com/vivliostyle/vivliostyle_doc/blob/gh-pages/samples/gutenberg/Alice.html#L908.
Test 2
https://vivliostyle.org/viewer/#src=https://jagat-xpub.github.io/cosmology/&userStyle=data:,/*%3Cviewer%3E*/%0A@page%20%7B%20size:%20a5;%20%7D%0A/*%3C/viewer%3E*/
(This test is from issue #758)
Result screenshot (Chrome 102):
I found that the result changes when display resolution setting
window.devicePixelRatio
changes. The above result is withwindow.devicePixelRatio == 1
and the below is withwindow.devicePixelRatio == 2
:Test 3
https://vivliostyle.org/viewer/#src=https://www.aozora.gr.jp/cards/000119/files/624_14544.html&userStyle=data:,/*%3Cviewer%3E*/%0A@page%20%7B%20size:%20a5;%20%7D%0A:root,%20body%20%7B%20margin:%200%20!important;%20%7D%0A/*%3C/viewer%3E*/%0A@page%20%7B%0A%20%20outline:%201px%20solid%20silver;%0A%7D
(This test is from issue #816)
Result screenshot (Chrome 102):
In this case, the text overflow problem is shown in print but not in viewer.
Test 4
https://vivliostyle.org/viewer/#src=https://gist.githack.com/MurakamiShinyu/dd8d656b7a2d27b432551f0753e87356/raw/test-hyphenation.html
(This test is from issue #793)
Result screenshot (Chrome 102):
In this case, the hyphenation results differ between viewer and print.
The text was updated successfully, but these errors were encountered: