Move the PDFBug
-related CSS from viewer.css
and into its own file
#14788
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given that none of these CSS rules are used at all, unless debugging is enabled, it seems completely unnecessary to load them unconditionally for all users.[1]
Note that if both the
textLayer
andpdfBug
debugging hash-parameters are specified simultaneously, we'll now load thePDFBug
-file twice (since the code is simpler that way). However, given first of all that none of this is enabled by default and secondly that using those parameters together isn't helpful[2], potentially loading that file twice is hopefully not an issue.For the
gulp mozcentral
target, the size of the builtviewer.css
file is reduced> 3%
with this patch.[1] For the Firefox built-in PDF Viewer, in order to even be able to access the
PDFBug
functionality, you need to first of all setpdfjs.pdfBugEnabled = true
manually inabout:config
. Secondly, you then also need to append thepdfBug=...
hash-parameter to the URL when initially loading the document.[2] Note how the
textLayer
-settings are already, since essentially forever, overriding the highlighting-features of the "FontInspector"-tab.