Withdrawn: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Fri, 4 Dec 2020 17:30:11 GMT, Prasanta Sadhukhan wrote: > Issue is when using a JEditorPane to render HTML views with W3C_UNIT_LENGTHS > enabled, font-sizes set using CSS are much larger than the same font size > outside the HTML. > It's because CSS LengthUnit uses screen resolution to calculate units so for > hidpi screens, the html font size is bigger. > Fix is to calculate the units based on the CSS absolute length mentioned in > https://drafts.csswg.org/css-values-3/#absolute-lengths so hidpi scaling is > not applied twice in CSS and again by Java. This pull request has been closed without being integrated. - PR: https://git.openjdk.java.net/jdk/pull/1628
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 14:36:09 GMT, Alexey Ivanov wrote: > I believe we're talking about javadoc spec: its text has not changed. > CSS spec is updated. Since you follow the rules of CSS 2.2, it's better to > link to CSS 2.2. No, I did not mean the JavaDoc, my question was - "what part of the CSS spec was updated"? - PR: https://git.openjdk.java.net/jdk/pull/2223
Re: RFR: 8260314: Replace border="1" on tables with CSS [v3]
On Tue, 26 Jan 2021 17:32:54 GMT, Alexey Ivanov wrote: >> Replace presentational attribute `border="1"` on `` element with CSS >> styles: >> table {border: outset 1px} >> th, td {border: inset 1px} >> >> These declarations produce the same rendering as the default one in Firefox >> and Edge. >> >> Another option is to use `solid` in both cases. > > Alexey Ivanov has updated the pull request incrementally with one additional > commit since the last revision: > > Revert changes to style block in componentProperties.html Marked as reviewed by serb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 19:17:24 GMT, Jonathan Gibbons wrote: > In general, I recommend where possible using the styles provided in the > standard stylesheet, for overall visual consistency. I totally agree. I overlooked the standard styles for the tables. Thanks to @mrserb for pointing me in the right direction. Since most tables in java.desktop use striped tables, it makes sense to use this style in these files too. Although I had said I preferred `plain` class for `componentProperties.html`, I changed my opinion after looking at the updated file, it feels lighter when striped. The table in `NumericShaper` has confusing rendering with `striped` class, that's why it uses `plain`. > FYI, although it seems like the standard styles work for you in this case, if > you should ever need it, javadoc now supports package-specific and > module-specific stylesheets. Just put `*.css` files in the `doc-files` > subdirectory or a package or module, and javadoc should pick it up and use it. Thank you. It's good to know as it allows for keeping consistent look across files as opposed to applying style changes in individual files. - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 18:33:48 GMT, Alexey Ivanov wrote: >>> Probably we can import the CSS used by the javadoc itself? >> >> We do. For example, [AWT Modality in JDK >> 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) >> has borders because of `border="1"` attribute. If you remove it or change >> it to `border="1"` in Developer Tools in browser, the borders around cells >> disappear. >> >> However, I looked into it further: there are tables in Javadoc comments. One >> example is [AWTKeyStroke >> constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) >> which uses `class="striped"`. In most cases, classes in java.desktop module >> use striped tables. >> >> There's also `plain` class. I've found one usage of `class=plain"` in >> [NumericShaper >> class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). >> This style has collapsed borders around each cell. It looks similar to what >> we have now in “plain” HTML documents, yet by default the borders are not >> collapsed, that is you see borders around each individual cell. >> >> The stylesheet also declares `borderless` class which has no borders. >> >> For the consistent look and feel of documentation, I think `striped` is the >> most appropriate class. However, I prefer `plain` class for >> `componentProperties.html` file. > > I updated all the tables with `class="striped"`. > > I've also uploaded the files with different styles for visual comparison: > > ### Current: JDK 15 > > - > [DesktopProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Manual: as suggested initially > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Striped: `class="striped"` > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Plain: `class="plain"` > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/Modality.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) In general, I recommend where possib
Project Lanai (New Metal Java 2D Rendering pipeline for macOS) FINAL planned EA build has been released
All, The Lanai project has reached the stage where we are aiming to move the JEP [1] to Proposed-To-Target [2] to JDK 17 very soon. We have made one final planned EA release which includes all the latest fixes. So please visit https://jdk.java.net/lanai/ and download the EA 9 build and test with your apps and hardware. and provide feedback via the lanai-...@openjdk.java.net mailing list. -phil. [1] https://openjdk.java.net/jeps/382 [2] https://cr.openjdk.java.net/~mr/jep/jep-2.0-02.html
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 17:34:04 GMT, Matthias Perktold wrote: > > You can create the new PR with comments addressed and link to the old PR in > > the description. > > Is there anything special I need to do to have "comments addressed"? Should I > first apply your patches, and then proceed with the new fork afterwards? Whatever you like. You can incorporate the fixes to comments in your initial commit to the new branch, or you can fix them after you create the new branch with your exiting changeset. > > Can you edit the subject of the JBS issue to amend the constant > > W3C_LENGTH_UNITS? > > I don't think I have the rights to do this. I don't even have an JBS account, > I submitted the bug through the https://bugs.java.com/bugdatabase/. I just > recently signed the OCA, is that sufficient to create a JBS account? No, it is not sufficient. I have amended the subject of the bug. I wondered why I didn't see OCA request in the PR. You had gotten it before you created your first PR. - PR: https://git.openjdk.java.net/jdk/pull/2223
Re: RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 15:39:30 GMT, Alexey Ivanov wrote: >> Probably we can import the CSS used by the javadoc itself? > >> Probably we can import the CSS used by the javadoc itself? > > We do. For example, [AWT Modality in JDK > 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) > has borders because of `border="1"` attribute. If you remove it or change it > to `border="1"` in Developer Tools in browser, the borders around cells > disappear. > > However, I looked into it further: there are tables in Javadoc comments. One > example is [AWTKeyStroke > constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) > which uses `class="striped"`. In most cases, classes in java.desktop module > use striped tables. > > There's also `plain` class. I've found one usage of `class=plain"` in > [NumericShaper > class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). > This style has collapsed borders around each cell. It looks similar to what > we have now in “plain” HTML documents, yet by default the borders are not > collapsed, that is you see borders around each individual cell. > > The stylesheet also declares `borderless` class which has no borders. > > For the consistent look and feel of documentation, I think `striped` is the > most appropriate class. However, I prefer `plain` class for > `componentProperties.html` file. I updated all the tables with `class="striped"`. I've also uploaded the files with different styles for visual comparison: ### Current: JDK 15 - [DesktopProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Manual: as suggested initially - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Striped: `class="striped"` - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Plain: `class="plain"` - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/Modality.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - PR: https://git.openjdk.java.net/jdk/pull/2210
swing-dev@openjdk.java.net
On Mon, 25 Jan 2021 07:08:33 GMT, Sergey Bylokhov wrote: > Obsolete/unused classes are removed. This pull request has now been integrated. Changeset: 42cef27f Author:Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/42cef27f Stats: 151 lines in 3 files changed: 48 ins; 86 del; 17 mod 8260343: Delete obsolete classes in the Windows L&F Reviewed-by: aivanov, pbansal - PR: https://git.openjdk.java.net/jdk/pull/2216
Re: RFR: 8260314: Replace border="1" on tables with CSS [v3]
> Replace presentational attribute `border="1"` on `` element with CSS > styles: > table {border: outset 1px} > th, td {border: inset 1px} > > These declarations produce the same rendering as the default one in Firefox > and Edge. > > Another option is to use `solid` in both cases. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Revert changes to style block in componentProperties.html - Changes: - all: https://git.openjdk.java.net/jdk/pull/2210/files - new: https://git.openjdk.java.net/jdk/pull/2210/files/b6f95ed8..9a7d1315 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2210&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2210&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2210.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2210/head:pull/2210 PR: https://git.openjdk.java.net/jdk/pull/2210
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 16:41:52 GMT, Alexey Ivanov wrote: > I see you opened the PR from master branch in your personal fork rather than > a new branch. > > Yes, I think you should go on as suggested: create a new PR from a new branch. OK, will do. If you don't mind, I have a couple of noob questions, as I'm new to the whole process: > You can create the new PR with comments addressed and link to the old PR in > the description. Is there anything special I need to do to have "comments addressed"? Should I first apply your patches, and then proceed with the new fork afterwards? > Can you edit the subject of the JBS issue to amend the constant > W3C_LENGTH_UNITS? I don't think I have the rights to do this. I don't even have an JBS account, I submitted the bug through the https://bugs.java.com/bugdatabase/. I just recently signed the OCA, is that sufficient to create a JBS account? - PR: https://git.openjdk.java.net/jdk/pull/2223
Re: RFR: 8260314: Replace border="1" on tables with CSS [v2]
> Replace presentational attribute `border="1"` on `` element with CSS > styles: > table {border: outset 1px} > th, td {border: inset 1px} > > These declarations produce the same rendering as the default one in Firefox > and Edge. > > Another option is to use `solid` in both cases. Alexey Ivanov has updated the pull request incrementally with two additional commits since the last revision: - Remove redundant center-align for element - Apply class="striped" to the tables - Changes: - all: https://git.openjdk.java.net/jdk/pull/2210/files - new: https://git.openjdk.java.net/jdk/pull/2210/files/eb057764..b6f95ed8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2210&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2210&range=00-01 Stats: 59 lines in 6 files changed: 0 ins; 24 del; 35 mod Patch: https://git.openjdk.java.net/jdk/pull/2210.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2210/head:pull/2210 PR: https://git.openjdk.java.net/jdk/pull/2210
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 15:55:53 GMT, Matthias Perktold wrote: > > ⚠️ @mperktold a branch with the same name as the source branch for this > > pull request (`master`) is present in the [target > > repository](https://github.com/openjdk/jdk). If you eventually integrate > > this pull request then the branch `master` in your [personal > > fork](https://github.com/mperktold/jdk) will diverge once you sync your > > personal fork with the upstream repository. > > To avoid this situation, create a new branch for your changes and reset the > > master branch. You can do this by running the following commands in a local > > repository for your personal fork. [...] > > I am not sure whether I should still do this or not, since there is already > some feedback, and I don't know what happens to that. > In particular, I didn't understand if this is just a suggestion or actually > required. > > @aivanov-jdk if it's not required, do you have any preferences? I see you opened the PR from master branch in your personal fork rather than a new branch. Yes, I think you should go on as suggested: create a new PR from a new branch. You can create the new PR with comments addressed and link to the old PR in the description. In addition to that, if I get it right, you, @mperktold, have taken over this issue from @prsadhuk, thus #1628 is superseded by this PR and should be closed without integration. Eventually, this PR will be superseded by a new PR that you'll create. Can you edit the subject of the JBS issue to amend the constant `W3C_LENGTH_UNITS`? - PR: https://git.openjdk.java.net/jdk/pull/2223
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 14:36:09 GMT, Alexey Ivanov wrote: >>> This is what I mean, the quoted text of the CSS spec is the same for both >>> versions. >> >> Oh right I misread that, I really thought it changed, but it didn't. >> In that case I can also leave the link as it was, should I revert that >> change? > >> > This is what I mean, the quoted text of the CSS spec is the same for both >> > versions. >> >> Oh right I misread that, I really thought it changed, but it didn't. >> In that case I can also leave the link as it was, should I revert that >> change? > > I believe we're talking about javadoc spec: its text has not changed. > CSS spec is updated. Since you follow the rules of CSS 2.2, it's better to > link to CSS 2.2. > > So, the changes are good as they are. Do I get right, @mrserb? > > > ⚠️ @mperktold a branch with the same name as the source branch for this pull > request (`master`) is present in the [target > repository](https://github.com/openjdk/jdk). If you eventually integrate this > pull request then the branch `master` in your [personal > fork](https://github.com/mperktold/jdk) will diverge once you sync your > personal fork with the upstream repository. > > To avoid this situation, create a new branch for your changes and reset the > master branch. You can do this by running the following commands in a local > repository for your personal fork. [...] I am not sure whether I should still do this or not, since there is already some feedback, and I don't know what happens to that. In particular, I didn't understand if this is just a suggestion or actually required. @aivanov-jdk if it's not required, do you have any preferences? - PR: https://git.openjdk.java.net/jdk/pull/2223
Re: RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 01:54:10 GMT, Sergey Bylokhov wrote: > Probably we can import the CSS used by the javadoc itself? We do. For example, [AWT Modality in JDK 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) has borders because of `border="1"` attribute. If you remove it or change it to `border="1"` in Developer Tools in browser, the borders around cells disappear. However, I looked into it further: there are tables in Javadoc comments. One example is [AWTKeyStroke constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) which uses `class="striped"`. In most cases, classes in java.desktop module use striped tables. There's also `plain` class. I've found one usage of `class=plain"` in [NumericShaper class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). This style has collapsed borders around each cell. It looks similar to what we have now in “plain” HTML documents, yet by default the borders are not collapsed, that is you see borders around each individual cell. The stylesheet also declares `borderless` class which has no borders. For the consistent look and feel of documentation, I think `striped` is the most appropriate class. However, I prefer `plain` class for `componentProperties.html` file. - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_UNIT_LENGTHS
On Tue, 26 Jan 2021 07:50:54 GMT, Matthias Perktold wrote: > > This is what I mean, the quoted text of the CSS spec is the same for both > > versions. > > Oh right I misread that, I really thought it changed, but it didn't. > In that case I can also leave the link as it was, should I revert that change? I believe we're talking about javadoc spec: its text has not changed. CSS spec is updated. Since you follow the rules of CSS 2.2, it's better to link to CSS 2.2. So, the changes are good as they are. Do I get right, @mrserb? - PR: https://git.openjdk.java.net/jdk/pull/2223