Skip to content

Commit

Permalink
[UnifiedPDF] Pinch and keyboard zooming do not disable automatically …
Browse files Browse the repository at this point in the history
…resize option.

https://bugs.webkit.org/show_bug.cgi?id=271088
rdar://problem/124717930

Reviewed by Tim Horton.

When pinch zooming is performed we should stop updating the document
fitting scale. Zooming via keyboard shortcuts should also have the same
beheavior. Let's do this when the page's scale factor has changed so
that it catches both cases.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::didBeginMagnificationGesture):

Canonical link: https://commits.webkit.org/276309@main
  • Loading branch information
sammygill committed Mar 18, 2024
1 parent 803074e commit a7b53c3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,9 @@ static String mutationObserverNotificationString()
origin->move(0, std::round(frameView->topContentInset()));
}

if (scale != 1.0)
m_documentLayout.setShouldUpdateAutoSizeScale(PDFDocumentLayout::ShouldUpdateAutoSizeScale::No);

setScaleFactor(scale, origin);
}

Expand Down

0 comments on commit a7b53c3

Please sign in to comment.