Lynn Neir reports: Many of the Layout tests (e.g., "css1/text_properties/line_height.html") use ‘ex’ to calculate margin or line-height, etc. This value depends directly on the proper calculation of xHeight. In my tests I never actually see the existing code that calculates xHeight getting executed, seems windows function GetGlyphOutline is failing, that is it never gets to line: xHeight = gm.gmptGlyphOrigin.y * metricsMultiplier; So then it ends up always using xHeight = ascent * 0.56f, which is not exactly correct to match mac results. So the code I used is below: cairo_text_extents_t extents; cairo_scaled_font_text_extents(scaledFont, "x", &extents); xHeight = -extents.y_bearing; This code correctly gets the x-Height and the results match for the ones above. Try it out for yourself and see what you think." I did try it out, and found that the results were better. Moreover, the actual implementation of "cairo_scaled_font_text_extents" makes use of the same ::GetGlyphOutline (and related) calls, with additional fallback handling for non-TrueType fonts, etc.
Created attachment 128794 [details] Correct handling of xHeight to produce better layout test results. This patch brings several css1/text layout tests into agreement with the Apple port.
Attachment 128794 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
All changes landed in r108843.