From 1a8da2e5f88a6341cbee2c85404778b7174653f8 Mon Sep 17 00:00:00 2001 From: Ulrich Windl Date: Fri, 11 Jan 2019 22:42:47 +0100 Subject: [PATCH 1/3] Fix XSL for Firefox 60 Firefox did display HTML tags instead of interpreting them; with the changes applied to FontVal/fval.xsl, HTML is parsed correctly. --- bin/fval.xsl | 114 +++++++++++++++++++++++---------------------------- 1 file changed, 52 insertions(+), 62 deletions(-) diff --git a/bin/fval.xsl b/bin/fval.xsl index 09c1b92..e9e0557 100644 --- a/bin/fval.xsl +++ b/bin/fval.xsl @@ -79,30 +79,26 @@ - <INPUT - id='cbInfo' type='checkbox' name='cbInfo' onclick='cbInfo_onclick()' - checked> + Info - <INPUT - id='cbPass' type='checkbox' name='cbPass' onclick='cbPass_onclick()' - checked > - Pass + + Pass - <INPUT - id='cbWarn' type='checkbox' name='cbWarn' onclick='cbWarn_onclick()' - checked > - Warning + + Warning - <INPUT - id='cbErr' type='checkbox' name='cbErr' onclick='cbErr_onclick()' - checked > + Error @@ -153,11 +149,9 @@ - <A - HREF='#_' - > - - </A> + + + @@ -179,80 +173,78 @@
- <INPUT - id='cb__' type='checkbox' name='cb__' onclick='display_table(table__)' - checked > + - <A - NAME='_' - > - - </A> + + +
- <TABLE - WIDTH='100%' id='table__' - > - - Error code - Message - Details - -
- </TABLE> + + + + + + +
+
Error codeMessageDetails


- <INPUT - id='cb__' type='checkbox' name='cb__' onclick='display_table(table__)' - checked > + Rasterization Test, BW
- <TABLE - WIDTH='100%' id='table__' - > +
- </TABLE> +
Error code Message Details


- <INPUT - id='cb__' type='checkbox' name='cb__' onclick='display_table(table__)' - checked > + Rasterization Test, Grayscale
- <TABLE - WIDTH='100%' id='table__' - > +
- </TABLE> +
Error code Message Details


- <INPUT - id='cb__' type='checkbox' name='cb__' onclick='display_table(table__)' - checked > + Rasterization Test, ClearType
- <TABLE - WIDTH='100%' id='table__' - > +
- </TABLE> +
Error code Message Details

@@ -273,13 +265,11 @@ - <TR - class='class_' - > + - </TR> + From ef9bcdbe000ffe63066a3d1934db74812c426bba Mon Sep 17 00:00:00 2001 From: Ulrich Windl Date: Fri, 11 Jan 2019 22:44:50 +0100 Subject: [PATCH 2/3] Fix bin/fval.xsl for Firefox Firefox does not know document.all.tags() used in display_row(), so replace with standard document.body.querySelectorAll(), thereby simplifying the selection of rows. --- bin/fval.xsl | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bin/fval.xsl b/bin/fval.xsl index e9e0557..d17e1dd 100644 --- a/bin/fval.xsl +++ b/bin/fval.xsl @@ -27,19 +27,10 @@ } function display_row(cb_id, row_classname) { - rowColl = document.all.tags("TR"); + rowColl = document.body.querySelectorAll("TR." + row_classname); for (i=0; i!=rowColl.length; i++) { - if (rowColl(i).className == row_classname) - { - if (cb_id.checked) - { - rowColl(i).style.display = ""; - } - else - { - rowColl(i).style.display = "none"; - } - } + rowColl.item(i).style.display = + cb_id.checked ? "" : "none"; } } From c11e3da12e92533aef3c1064679a67c7b12299a3 Mon Sep 17 00:00:00 2001 From: Ulrich Windl Date: Fri, 11 Jan 2019 22:48:57 +0100 Subject: [PATCH 3/3] Improve display_table() in bin/fval.xsl 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. --- bin/fval.xsl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/fval.xsl b/bin/fval.xsl index d17e1dd..cf24bc6 100644 --- a/bin/fval.xsl +++ b/bin/fval.xsl @@ -21,9 +21,9 @@ { display_row(document.FORM1.cbErr, "class_E"); } - function display_table(table_id) + function display_table(checked, table_id) { - table_id.style.display = (table_id.style.display == "none" ) ? "" : "none"; + table_id.style.display = checked ? "" : "none"; } function display_row(cb_id, row_classname) { @@ -168,7 +168,7 @@ id='cb_{@CodeFriendlyTag}_{parent::node()/@FontIndex}' type='checkbox' name='cb_{@CodeFriendlyTag}_{parent::node()/@FontIndex}' - onclick='display_table(table_{@CodeFriendlyTag}_{parent::node()/@FontIndex})' + onclick='display_table(cb_{@CodeFriendlyTag}_{parent::node()/@FontIndex}.checked, table_{@CodeFriendlyTag}_{parent::node()/@FontIndex})' checked='1'/>
Rasterization Test, BW

Rasterization Test, Grayscale

Rasterization Test, ClearType