-
Bug
-
Resolution: Unresolved
-
P4
-
8, 9, 10
-
generic
-
windows_10
FULL PRODUCT VERSION :
java version "1.8.0_162-ea"
Java(TM) SE Runtime Environment (build 1.8.0_162-ea-b01)
Java HotSpot(TM) Client VM (build 25.162-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10586]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Java 8 update 152 + b161
A DESCRIPTION OF THE PROBLEM :
Wrong font + background colors in HTML's "<input controls" inside WebView (javaFX) with "High Contrast #1 or #2 or Black" Theme on Windows 10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Hi JavaFX team,
Steps to reproduce:
1. Set "High Contrast Black / #1 / #2 as Theme on Windows 10
2. Run JavaFX application - code provided below.
3. See IE vs JavaFX WebView screenshots (https://ibb.co/hmNhnb)
Main issue Black text on Black background - is not readeable.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be white (yellow) font on black background
see https://ibb.co/hmNhnb for rendering in IE (or other browser).
ACTUAL -
black text with black background
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/**
* Title: <TBD>
* Description: <TBD>
* Copyright: Copyright (c) 2015+ Company: SAP SE
*
* @author Mykola Gorbarov (d043357)
* @version 1.0
*/
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class HiContrastTest extends Application {
private Scene scene;
@Override
public void start(Stage stage) {
// create scene
stage.setTitle("High Contrast Web View");
scene = new Scene(new Browser(), 750, 500, Color.web("#666970"));
stage.setScene(scene);
// show stage
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
class Browser extends Region {
final WebView browser = new WebView();
public Browser() {
// load the home page
browser.getEngine().loadContent("<html><head><!--740:U1Y --> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"><meta http-equiv=\"content-style-type\" content=\"text/css\"><style> body{ background-color:#95B1C1; color:#000000; font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } table{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } table.dd{ border-width:2px; border-style:solid; border-collapse:collapse; border-color:#4F556A; }table.dd th{ border-width:1px; padding:2px; border-style:solid; background:#6780B8; color:#FFFFFF; } table.dd td{ border-width:1px; padding:2px; border-style:solid; } table.trans{ border-style:none } table.trans td{ border-style:none; padding:0 } table.trans table.dd table.trans td{ border-style:none; padding:0 } table.trans table.dd td{ border-style:solid; padding:2px; } button{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; background-color:#95B1C1; margin:0px; width:100%; cursor:pointer; height:20px; text-align:center; background-image:url(back.gif); padding-left:5px; padding-right:5px; border-left:1px solid gray; border-right:1px solid gray; border-top:0; border-bottom:0; } button span{ white-space:nowrap; vertical-align:top; } .imgButtonLabel{ padding-left:5px; } input{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } select{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } a{ text-decoration:none; color:#0063A4; } a:hover{ text-decoration:underline; } a:visited{ color:#666666; } .HEADING{ font-size:17pt; } .KEY{ background-color:#CDE8FB; } .SUCCESS{ background-color:#CEF8AE; } .WARNING{ background-color:#FDBCBC; } .HEADER1{ background:#6780B8; font-family:SansSerif,helvetica,sans-serif; color:#FFFFFF; } </style><script language=\"JavaScript\"> var enter_pressed = \" \"; function ButtonClick(form,button) { if(enter_pressed == \" \"){ fname=form.name; form.sapbu_cl.value=button.id; form.sapse_cl.value=\" \"; form.sapin_cl.value=\" \"; document[fname].submit();} else{enter_pressed = \" \"; } } function SelectChange(form,select) { fname=form.name; form.sapbu_cl.value=\" \"; form.sapse_cl.value=select.id; form.sapin_cl.value=\" \"; document[fname].submit();} function InputHelpF1(form,input) { fname=form.name; form.sapbu_cl.value=\" \"; form.sapse_cl.value=\" \"; form.sapin_cl.value=input.id + \"sapHELPF1\"; document[fname].submit();} function InputKeyDown(form,input) {form.sapbu_cl.value=\" \"; form.sapse_cl.value=\" \"; if(event.keyCode == 115) {form.sapin_cl.value=input.id+\"sapHELPF4\"; fname=form.name; document[fname].submit();} if(event.keyCode == 13 || event.keyCode == 10) { form.sapin_cl.value=input.id+\"sapENTER\"; enter_pressed=\"X\"; fname=form.name; document[fname].submit();} } function toggle(areaname) { target = document.all(areaname); if (target.style.display == \"none\") { target.style.display = \"\";} else { target.style.display = \"none\"; } } </script></head><body scroll=\"no\" topmargin=\"0\" leftmargin=\"0\"> <!%_BODYSTART> <DIV style=\"{ margin-top:5pt; margin-left:5pt }\"> <!%_A1F1!><form style=\"margin:1px\" name=\"A1F1\" method=\"post\" action=\"SAPEVENT:A1F1\"> <input type=\"hidden\" name=\"sapbu_cl\" value=\" \"><input type=\"hidden\" name=\"sapse_cl\" value=\" \"><input type=\"hidden\" name=\"sapin_cl\" value=\" \"> <!%_A1F1S1!><select id=\"A1F1S1NAME:TYPE_SELECTION\" name=\"A1F1S1\" tabindex=\"0\" style=\"display: \" onChange=\"SelectChange(this.form,this);\" title=\"Object Category\"><option value=\"APH\" >Application Hierarchy</option><option value=\"_QS\">Development Object</option><option value=\"K\">Package</option><option value=\"P\">Program</option><option value=\"F\">Function Group</option><option value=\"FF\">Function Module</option><option value=\"O\" selected><!%!>Class / Interface</option><option value=\"WS\">Internet Service</option><option value=\"YC\">Web Dynpro Comp. / Intf.</option><option value=\"WO\">BSP Application</option><option value=\"WB\">BSP Extension</option><option value=\"WIA\">Inactive Objects</option><option value=\"$TM\">Local Objects</option> </select><!%_A1F1S1!> <br><table class=\"trans\" cellspacing=\"0\" cellpadding=\"0\"><tr> <td> <input type=\"text\" id=\"A1F1I2NAME:TYPE_NAME\" name=\"A1F1I2\" size=35 maxlength=30 style=\"display: \" tabindex=\"0\" title=\"Object Name\" value= \"CL_TREE_MODEL\" onHelp=\"InputHelpF1(this.form,this);\" onKeyDown=\"InputKeyDown(this.form,this);\"></td> <td><button id=\"A1F1B3NAME:BUTTON_F4\" type=\"button\" tabindex=\"0\" style=\"display: \" title=\"Input help\" onClick=\"ButtonClick(A1F1,this);\" onKeypress=\"if(event.keycode=13) ButtonClick(A1F1,this);\"> <img src=\"s_b_prvi.gif\" alt=\" Input help\" title=\" Input help\" align=\"middle\"> </button></td> <td> <!%_A1F1S4!><select id=\"A1F1S4NAME:APPL_HIER_TYPE\" name=\"A1F1S4\" tabindex=\"0\" style=\"display:none\" onChange=\"SelectChange(this.form,this);\" title=\"Object Name\"> <option value=\"WA\" selected><!%!></option> <option value=\"WO\">BSP Applications</option> <option value=\"XD\">Business Add-Ins (Definition)</option> <option value=\"XI\">Business Add-Ins (Impl.)</option> <option value=\"O\">Class / Interface</option> <option value=\"DE\">Data Elements</option> <option value=\"DT\">Database Tables</option> <option value=\"DD\">Domains</option> <option value=\"F\">Function Groups</option> <option value=\"FF\">Function Modules</option> <option value=\"K\">Packages</option> <option value=\"P\">Programs</option> <option value=\"DH\">Search Helps</option> <option value=\"DS\">Structures</option> <option value=\"DA\">Table Types</option> <option value=\"T\">Transactions</option> <option value=\"DV\">Views</option> </select><!%_A1F1S4!></td> <td><button id=\"A1F1B5NAME:BUTTON_SHOW\" type=\"button\" tabindex=\"0\" style=\"display: \" title=\"Display\" onClick=\"ButtonClick(A1F1,this);\" onKeypress=\"if(event.keycode=13) ButtonClick(A1F1,this);\"> <img src=\"s_b_disp.gif\" alt=\" Display\" title=\" Display\" align=\"middle\"> </button></td> </tr></table> <!%_CURSOR!><!A1F1> </form><!%_/A1F1!> </DIV> <!%_CURSOR!><!A1> <!%_BODYEND></body></html>");
//add components
getChildren().add(browser);
}
}
---------- END SOURCE ----------
SUPPORT :
YES
java version "1.8.0_162-ea"
Java(TM) SE Runtime Environment (build 1.8.0_162-ea-b01)
Java HotSpot(TM) Client VM (build 25.162-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 10.0.10586]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Java 8 update 152 + b161
A DESCRIPTION OF THE PROBLEM :
Wrong font + background colors in HTML's "<input controls" inside WebView (javaFX) with "High Contrast #1 or #2 or Black" Theme on Windows 10.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Hi JavaFX team,
Steps to reproduce:
1. Set "High Contrast Black / #1 / #2 as Theme on Windows 10
2. Run JavaFX application - code provided below.
3. See IE vs JavaFX WebView screenshots (https://ibb.co/hmNhnb)
Main issue Black text on Black background - is not readeable.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be white (yellow) font on black background
see https://ibb.co/hmNhnb for rendering in IE (or other browser).
ACTUAL -
black text with black background
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/**
* Title: <TBD>
* Description: <TBD>
* Copyright: Copyright (c) 2015+ Company: SAP SE
*
* @author Mykola Gorbarov (d043357)
* @version 1.0
*/
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class HiContrastTest extends Application {
private Scene scene;
@Override
public void start(Stage stage) {
// create scene
stage.setTitle("High Contrast Web View");
scene = new Scene(new Browser(), 750, 500, Color.web("#666970"));
stage.setScene(scene);
// show stage
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
class Browser extends Region {
final WebView browser = new WebView();
public Browser() {
// load the home page
browser.getEngine().loadContent("<html><head><!--740:U1Y --> <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"><meta http-equiv=\"content-style-type\" content=\"text/css\"><style> body{ background-color:#95B1C1; color:#000000; font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } table{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } table.dd{ border-width:2px; border-style:solid; border-collapse:collapse; border-color:#4F556A; }table.dd th{ border-width:1px; padding:2px; border-style:solid; background:#6780B8; color:#FFFFFF; } table.dd td{ border-width:1px; padding:2px; border-style:solid; } table.trans{ border-style:none } table.trans td{ border-style:none; padding:0 } table.trans table.dd table.trans td{ border-style:none; padding:0 } table.trans table.dd td{ border-style:solid; padding:2px; } button{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; background-color:#95B1C1; margin:0px; width:100%; cursor:pointer; height:20px; text-align:center; background-image:url(back.gif); padding-left:5px; padding-right:5px; border-left:1px solid gray; border-right:1px solid gray; border-top:0; border-bottom:0; } button span{ white-space:nowrap; vertical-align:top; } .imgButtonLabel{ padding-left:5px; } input{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } select{ font-family:SansSerif,helvetica,sans-serif; font-size:9pt; } a{ text-decoration:none; color:#0063A4; } a:hover{ text-decoration:underline; } a:visited{ color:#666666; } .HEADING{ font-size:17pt; } .KEY{ background-color:#CDE8FB; } .SUCCESS{ background-color:#CEF8AE; } .WARNING{ background-color:#FDBCBC; } .HEADER1{ background:#6780B8; font-family:SansSerif,helvetica,sans-serif; color:#FFFFFF; } </style><script language=\"JavaScript\"> var enter_pressed = \" \"; function ButtonClick(form,button) { if(enter_pressed == \" \"){ fname=form.name; form.sapbu_cl.value=button.id; form.sapse_cl.value=\" \"; form.sapin_cl.value=\" \"; document[fname].submit();} else{enter_pressed = \" \"; } } function SelectChange(form,select) { fname=form.name; form.sapbu_cl.value=\" \"; form.sapse_cl.value=select.id; form.sapin_cl.value=\" \"; document[fname].submit();} function InputHelpF1(form,input) { fname=form.name; form.sapbu_cl.value=\" \"; form.sapse_cl.value=\" \"; form.sapin_cl.value=input.id + \"sapHELPF1\"; document[fname].submit();} function InputKeyDown(form,input) {form.sapbu_cl.value=\" \"; form.sapse_cl.value=\" \"; if(event.keyCode == 115) {form.sapin_cl.value=input.id+\"sapHELPF4\"; fname=form.name; document[fname].submit();} if(event.keyCode == 13 || event.keyCode == 10) { form.sapin_cl.value=input.id+\"sapENTER\"; enter_pressed=\"X\"; fname=form.name; document[fname].submit();} } function toggle(areaname) { target = document.all(areaname); if (target.style.display == \"none\") { target.style.display = \"\";} else { target.style.display = \"none\"; } } </script></head><body scroll=\"no\" topmargin=\"0\" leftmargin=\"0\"> <!%_BODYSTART> <DIV style=\"{ margin-top:5pt; margin-left:5pt }\"> <!%_A1F1!><form style=\"margin:1px\" name=\"A1F1\" method=\"post\" action=\"SAPEVENT:A1F1\"> <input type=\"hidden\" name=\"sapbu_cl\" value=\" \"><input type=\"hidden\" name=\"sapse_cl\" value=\" \"><input type=\"hidden\" name=\"sapin_cl\" value=\" \"> <!%_A1F1S1!><select id=\"A1F1S1NAME:TYPE_SELECTION\" name=\"A1F1S1\" tabindex=\"0\" style=\"display: \" onChange=\"SelectChange(this.form,this);\" title=\"Object Category\"><option value=\"APH\" >Application Hierarchy</option><option value=\"_QS\">Development Object</option><option value=\"K\">Package</option><option value=\"P\">Program</option><option value=\"F\">Function Group</option><option value=\"FF\">Function Module</option><option value=\"O\" selected><!%!>Class / Interface</option><option value=\"WS\">Internet Service</option><option value=\"YC\">Web Dynpro Comp. / Intf.</option><option value=\"WO\">BSP Application</option><option value=\"WB\">BSP Extension</option><option value=\"WIA\">Inactive Objects</option><option value=\"$TM\">Local Objects</option> </select><!%_A1F1S1!> <br><table class=\"trans\" cellspacing=\"0\" cellpadding=\"0\"><tr> <td> <input type=\"text\" id=\"A1F1I2NAME:TYPE_NAME\" name=\"A1F1I2\" size=35 maxlength=30 style=\"display: \" tabindex=\"0\" title=\"Object Name\" value= \"CL_TREE_MODEL\" onHelp=\"InputHelpF1(this.form,this);\" onKeyDown=\"InputKeyDown(this.form,this);\"></td> <td><button id=\"A1F1B3NAME:BUTTON_F4\" type=\"button\" tabindex=\"0\" style=\"display: \" title=\"Input help\" onClick=\"ButtonClick(A1F1,this);\" onKeypress=\"if(event.keycode=13) ButtonClick(A1F1,this);\"> <img src=\"s_b_prvi.gif\" alt=\" Input help\" title=\" Input help\" align=\"middle\"> </button></td> <td> <!%_A1F1S4!><select id=\"A1F1S4NAME:APPL_HIER_TYPE\" name=\"A1F1S4\" tabindex=\"0\" style=\"display:none\" onChange=\"SelectChange(this.form,this);\" title=\"Object Name\"> <option value=\"WA\" selected><!%!></option> <option value=\"WO\">BSP Applications</option> <option value=\"XD\">Business Add-Ins (Definition)</option> <option value=\"XI\">Business Add-Ins (Impl.)</option> <option value=\"O\">Class / Interface</option> <option value=\"DE\">Data Elements</option> <option value=\"DT\">Database Tables</option> <option value=\"DD\">Domains</option> <option value=\"F\">Function Groups</option> <option value=\"FF\">Function Modules</option> <option value=\"K\">Packages</option> <option value=\"P\">Programs</option> <option value=\"DH\">Search Helps</option> <option value=\"DS\">Structures</option> <option value=\"DA\">Table Types</option> <option value=\"T\">Transactions</option> <option value=\"DV\">Views</option> </select><!%_A1F1S4!></td> <td><button id=\"A1F1B5NAME:BUTTON_SHOW\" type=\"button\" tabindex=\"0\" style=\"display: \" title=\"Display\" onClick=\"ButtonClick(A1F1,this);\" onKeypress=\"if(event.keycode=13) ButtonClick(A1F1,this);\"> <img src=\"s_b_disp.gif\" alt=\" Display\" title=\" Display\" align=\"middle\"> </button></td> </tr></table> <!%_CURSOR!><!A1F1> </form><!%_/A1F1!> </DIV> <!%_CURSOR!><!A1> <!%_BODYEND></body></html>");
//add components
getChildren().add(browser);
}
}
---------- END SOURCE ----------
SUPPORT :
YES