-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8292948: JEditorPane ignores font-size styles in external linked css-file #10054
Conversation
Fully resolve specified font-size before implying 'font-size: inherit'. The isDefined(CSS.Attribute.FONT_SIZE) test misses declarations resolved via AttributeSet.ResolveAttribute ("resolver") attribute.
👋 Welcome back stanio! A progress list of the required criteria for merging this PR into |
Webrevs
|
test/jdk/javax/swing/text/html/StyleSheet/TestExternalCSSFontSize.java
Outdated
Show resolved
Hide resolved
Don't rely on the current working directory.
The failure to save the image suppresses the original failure.
Simplify overall setup.
Make potential discrepancies with not resolving the base more obvious.
Use just the instance editor component.
@stanio This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 169 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@prsadhuk) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
If there are no other reviewers, @prsadhuk, would you sponsor this change? |
/sponsor |
Going to push as commit 1caba0f.
Your commit was automatically rebased without conflicts. |
JDK-8292948 reveals a regression by the fix for JDK-8257664 (#1759) causing
font-size
declarations from external style sheets to be ignored.As far as I've traced, the problem is with the
isDefined(CSS.Attribute.FONT_SIZE)
test:jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java
Lines 2825 to 2830 in 70b5b31
It misses declarations from linked styles via a
resolver
(AttributeSet.ResolveAttribute
) attribute that happens to hold the external style sheet rules. The fix for this would be to move the impliedCSS.Attribute.FONT_SIZE
handling after:jdk/src/java.desktop/share/classes/javax/swing/text/html/StyleSheet.java
Lines 2833 to 2835 in 70b5b31
and drop the
isDefined()
test.[I'll prepare a jtreg test further.]
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10054/head:pull/10054
$ git checkout pull/10054
Update a local copy of the PR:
$ git checkout pull/10054
$ git pull https://git.openjdk.org/jdk pull/10054/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10054
View PR using the GUI difftool:
$ git pr show -t 10054
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10054.diff