RFR: 8230492: font-family not set in HTMLEditor if font name has a number in it
Kevin Rushforth
kcr at openjdk.org
Wed Oct 30 13:27:32 UTC 2019
On Wed, 30 Oct 2019 11:09:38 GMT, Hadzic Samir <shadzic at openjdk.org> wrote:
> On Wed, 30 Oct 2019 10:07:42 GMT, Arun Joseph <github.com+24428922+arun-Joseph at openjdk.org> wrote:
>
>> In the HTMLEditor, when positioning the caret in a text and trying to set a font-family that has a number in it is not working.
>>
>> Issue: In [CSSPropertyParser.cpp](https://github.com/openjdk/jfx/blob/master/modules/javafx.web/src/main/native/Source/WebCore/css/parser/CSSPropertyParser.cpp), concatenateFamilyName() function parses only identifiers. So, when a number is introduced in a font-name, it fails.
>>
>> Fix: Pass the font-name as a string in HTMLEditorSkin.java by adding quotes.
>>
>> A new font is added as a resource for the test. This font is same as modules/javafx.web/src/main/native/Tools/DumpRenderTree/fonts/WebKit Layout Tests 2.ttf
>>
>> ----------------
>>
>> Commits:
>> - 5a1fbade: 8230492: font-family not set in HTMLEditor if font name has a number in it
>>
>> Changes: https://git.openjdk.java.net/jfx/pull/27/files
>> Webrev: https://webrevs.openjdk.java.net/jfx/27/webrev.00
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8230492
>> Stats: 62 lines in 3 files changed: 60 ins; 0 del; 2 mod
>> Patch: https://git.openjdk.java.net/jfx/pull/27.diff
>> Fetch: git fetch https://git.openjdk.java.net/jfx pull/27/head:pull/27
>
> Will this be in conflict with https://github.com/openjdk/jfx/pull/12 ? I'll look at your unit tests in order to implement one similar
I would think that the two fixes are independent of one another, but it would be a good idea to test HTMLEditor with both patches applied.
PR: https://git.openjdk.java.net/jfx/pull/27
More information about the openjfx-dev
mailing list