Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for viewing validation results on Linux with Firefox #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sjvudp
Copy link

@sjvudp sjvudp commented Jan 22, 2019

Running Font-Validator on Linux creates some XML (like /tmp/tmp7e1c5047.tmp.report.xml) with XSL (fval.xsl). However when viewing the XML in Firefox 60, several HTML tags are being displayed instead of being interpreted.
While having almost no idea about XSL rules, and very little about Javascript (Firefox does not know document.all.tags() used in display_row()), I started to fix things be deducing patterns and asking "Dr. Google". So I fixed FontVal/fval.xsl and bin/fval.xsl (while not understanding why there are two different ones).
I also fixed a bug where display_table() did unconditionally toggle the visibility of the given table.

It's three commits, maybe you like them.

Ulrich Windl added 3 commits January 11, 2019 22:42
Firefox did display HTML tags instead of interpreting them; with the
changes applied to FontVal/fval.xsl, HTML is parsed correctly.
Firefox does not know document.all.tags() used in display_row(), so
replace with standard document.body.querySelectorAll(), thereby
simplifying the selection of rows.
display_table() did unconditionally toggle the visibility of the given
table; now pass the actual value of the corresponding checkbox, and set
visibility accordingly.  Update corresponding onclick events, accordingly.
@msftclas
Copy link

msftclas commented Jan 22, 2019

CLA assistant check
All CLA requirements met.

@HinTak
Copy link

HinTak commented Jan 22, 2019

Did you check https://github.com/HinTak/Font-Validator? We did some xsl related work very early on...

@sjvudp
Copy link
Author

sjvudp commented Jan 22, 2019

Did you check https://github.com/HinTak/Font-Validator? We did some xsl related work very early on...

No, I did not, because I don't know which is the "right" repository ;-)
Doing a quick diff between my pull request and your master branch shows my fixes are missing.

@HinTak
Copy link

HinTak commented Jan 22, 2019

The xsl is not used at all in mine - it is emitted from memory when needed, due to Linux/mac usage. Try running the binary and see the xsl deposited next to the report.

@davelab6
Copy link
Contributor

davelab6 commented Jan 23, 2019 via email

@HinTak
Copy link

HinTak commented Jan 23, 2019

I checked mine with Firefox 64 and it works fine. The problem you saw is rather a problem of the old microsoft code again Firefox's rendering model. Firefox cannot re-interprete literal <> generated by xsl transformation as xml objects... In fact only MSIE seems to do so. Hence at the very beginning of my fork an additional html output file is auto-generated for non-windows.

I.e. : if you are on windows, use the built-in IE based viewer. If you are on non-windows, there should be an additional html report, view that with Firefox instead of viewing the xml. If you are on windows and wants to use Firefox, that's the situation my fork does not cater for.

@HinTak
Copy link

HinTak commented Jan 23, 2019

Also as a general policy, I don't/won't t take changes that makes fontval works better on Linux/mac, at the risk/sacrifice of making it worse on windows. Your changes, in principle, affect rendering with MS IE too. (although I am reasonably sure it does not in actuality - but who knows given the unknowns with MSIE?)

I am not a big Microsoft fan, but just don't want to have regressions and code-churns (I.e. breaking one platform to accommodate another, then go in the opposite directions).

@sjvudp
Copy link
Author

sjvudp commented Jan 23, 2019

Well, I don't care: I made these chenges to make the output readable on Linux, and while doind so I found some fun fixing all the problems I found. At the end I thought I'll share my work. There's no obligation for you to use it, of course.
Maybe I just started with the wrong repository branch...

@HinTak
Copy link

HinTak commented Jan 24, 2019

Give 2.1.4 from
https://github.com/HinTak/Font-Validator/releases a try. You should find a html report.

It looks as if you might be running the GUI? On Linux the built-in report viewer in the GUI was fully functional about a year or so ago, with webkit (webkit1). Whether it stills work or not, depends. Fedora has completely deprecated webkit1, and went fully webkit2 in fedora 29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants