Skip to content

Commit

Permalink
Merge pull request #1374 from vivliostyle/fix/issue-chrome128
Browse files Browse the repository at this point in the history
fix: Chromium's standard CSS zoom support check
  • Loading branch information
MurakamiShinyu authored Aug 20, 2024
2 parents 5820c81 + 469c2e8 commit 5c2a8d8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/core/src/vivliostyle/vgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2995,12 +2995,7 @@ export class Viewport {
if (needScaleRect === null) {
// Check if getBoundingClientRect() result needs to be scaled.
// Note: This is only needed for Chromium older than 128. (Issue #1370)
const savedWidth = contentContainer.style.width;
contentContainer.style.width = "16px";
needScaleRect =
contentContainer.clientWidth ===
contentContainer.getBoundingClientRect().width * this.scaleRatio;
contentContainer.style.width = savedWidth;
needScaleRect = !("currentCSSZoom" in contentContainer);
}
if (needScaleRect) {
Base.setCSSProperty(
Expand Down

0 comments on commit 5c2a8d8

Please sign in to comment.