Previously the `<del>` tag that Discount emits would be removed by Qt
since it's not in the subset of HTML that it understands. It does know
about `<s>` though, so replace `<del>` with `<s>` to render strikethroughs
correctly.
Note that I couldn't get Okular to build locally (PEBCAK issue) so I split out this file to debug it. I've tested against http://daringfireball.net/projects/downloads/MarkdownTest_1.0.zip and ff866f73d4/tests/data and the only difference is that trailing whitespace is now trimmed from the end of a line:
```diff
8c8
< <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes:</p>
---
> <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Dashes: </p>
```
A quick search suggests this isn't a problem though https://stackoverflow.com/a/27026403:
> Within block tags (i.e. `<p>`, `<h1>`, `<div>`, ...) spaces as well as line breaks at the beginning or end of the tags should always be ignored (i.e. `<p>test</p>` should look the same as `<p> test </p>`).
I also tried https://doc.qt.io/qt-5/qtextdocument.html#setMarkdown which solves the strikethrough problem, though there are many visible differences with that approach. Most notably, everything is squashed together and code blocks lose their formatting.
Currently we use the default font sizes for NewSignatureData, which are 10 for fontSize and 20 for leftFontSize
This can be too large for a small signature field, leasing to cut-off text
When passing 0 poppler picks a suitable size depending on the size of the signature field
CCBUG: 443403
documentSignatureMessageWidgetText and getSignatureFormFields in gui/signatureguiutils.cpp
have similar loops to extract PDF form fields from pages. I made both loops more similar
and added early exit loop conditions to improve performance in documents with many pages.
A document can be encrypted without requiring a password to open/sign it.
Currently we assume we need a password to sign it for such documents, but
that's not correct.
Instead of checking whether the document is encrypted remember whether
we needed a password for opening.
BUG: 474888