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

8240969: WebView does not allow to load style sheet in modularized applications #22

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public final BooleanProperty javaScriptEnabledProperty() {
* Location of the user stylesheet as a string URL.
*
* <p>This should be a local URL, i.e. either {@code 'data:'},
* {@code 'file:'}, or {@code 'jar:'}. Remote URLs are not allowed
* {@code 'file:'}, {@code 'jar:'}, or {@code 'jrt:'}. Remote URLs are not allowed
* for security reasons.
*
* @defaultValue null
Expand Down Expand Up @@ -554,6 +554,7 @@ public final StringProperty userStyleSheetLocationProperty() {
dataUrl = url;
} else if (url.startsWith("file:") ||
url.startsWith("jar:") ||
url.startsWith("jrt:") ||
url.startsWith("data:"))
{
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,4 +473,8 @@ void waitForCompletion() {
assertNull(getEngine().executeScript("window.xmlDoc.body"));
});
}

@Test public void loadJrtCssFileSuccessfully() {
getEngine().setUserStyleSheetLocation("jrt:/javafx.web/html/imported-styles.css");
kevinrushforth marked this conversation as resolved.
Show resolved Hide resolved
}
}