-
Notifications
You must be signed in to change notification settings - Fork 522
8260020: WebView does not render contents of locally stored MarkDown (*.md) files #1788
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
8260020: WebView does not render contents of locally stored MarkDown (*.md) files #1788
Conversation
👋 Welcome back Gopalora! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
I will let others to comment on the fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it later, but the fix looks reasonable as long it doesn't cause any side effects. It will need to be tested.
I did leave a couple inline comments.
if (equalLettersIgnoringASCIICase(contentType, "application/octet-stream"_s)) | ||
return TextDocument::create(frame, settings, url, documentIdentifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this taken from upstream WebKit? If not, please enclose this in #if PLATFORM(JAVA)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if (equalLettersIgnoringASCIICase(mimeType, "application/octet-stream"_s)) | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to make this available via MIMETypeRegistry::isSupportedNonImageMIMEType
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the comment "cross-site scripting vulnerabilities" there. So preferred this location.
was this PR closed in favor of some other work? |
No, it is on hold. When / if it is picked back up, a different solution will be explored. |
Local markdown file mime type support is missing in the current JavaFX implementation. Hence, I have added a mime type for local Markdown files.
Verification:
The test program attached to the JBS passes with this change.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1788/head:pull/1788
$ git checkout pull/1788
Update a local copy of the PR:
$ git checkout pull/1788
$ git pull https://git.openjdk.org/jfx.git pull/1788/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1788
View PR using the GUI difftool:
$ git pr show -t 1788
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1788.diff
Using Webrev
Link to Webrev Comment