@@ -679,21 +679,13 @@ const PDFViewerApplication = {
679
679
if ( typeof PDFJSDev !== "undefined" && PDFJSDev . test ( "MOZCENTRAL" ) ) {
680
680
return shadow ( this , "supportsFullscreen" , document . fullscreenEnabled ) ;
681
681
}
682
- const doc = document . documentElement ;
683
- let support = ! ! (
684
- doc . requestFullscreen ||
685
- doc . mozRequestFullScreen ||
686
- doc . webkitRequestFullScreen
682
+ return shadow (
683
+ this ,
684
+ "supportsFullscreen" ,
685
+ document . fullscreenEnabled ||
686
+ document . mozFullScreenEnabled ||
687
+ document . webkitFullscreenEnabled
687
688
) ;
688
-
689
- if (
690
- document . fullscreenEnabled === false ||
691
- document . mozFullScreenEnabled === false ||
692
- document . webkitFullscreenEnabled === false
693
- ) {
694
- support = false ;
695
- }
696
- return shadow ( this , "supportsFullscreen" , support ) ;
697
689
} ,
698
690
699
691
get supportsIntegratedFind ( ) {
@@ -853,12 +845,8 @@ const PDFViewerApplication = {
853
845
this . pdfAttachmentViewer . reset ( ) ;
854
846
this . pdfLayerViewer . reset ( ) ;
855
847
856
- if ( this . pdfHistory ) {
857
- this . pdfHistory . reset ( ) ;
858
- }
859
- if ( this . findBar ) {
860
- this . findBar . reset ( ) ;
861
- }
848
+ this . pdfHistory ?. reset ( ) ;
849
+ this . findBar ?. reset ( ) ;
862
850
this . toolbar . reset ( ) ;
863
851
this . secondaryToolbar . reset ( ) ;
864
852
@@ -1850,9 +1838,7 @@ const PDFViewerApplication = {
1850
1838
this . printService . destroy ( ) ;
1851
1839
this . printService = null ;
1852
1840
1853
- if ( this . pdfDocument ) {
1854
- this . pdfDocument . annotationStorage . resetModified ( ) ;
1855
- }
1841
+ this . pdfDocument ?. annotationStorage . resetModified ( ) ;
1856
1842
}
1857
1843
this . forceRendering ( ) ;
1858
1844
} ,
@@ -1864,10 +1850,7 @@ const PDFViewerApplication = {
1864
1850
} ,
1865
1851
1866
1852
requestPresentationMode ( ) {
1867
- if ( ! this . pdfPresentationMode ) {
1868
- return ;
1869
- }
1870
- this . pdfPresentationMode . request ( ) ;
1853
+ this . pdfPresentationMode ?. request ( ) ;
1871
1854
} ,
1872
1855
1873
1856
triggerPrinting ( ) {
0 commit comments