WebKit
WebKit copied to clipboard
Font sizes are rounded to the nearest 1px
ca512052229331ce34ed6dfc536e2afa7a13c901
Font sizes are rounded to the nearest 1px https://bugs.webkit.org/show_bug.cgi?id=46987 <rdar://problem/40829933> Reviewed by NOBODY (OOPS!). Previously, we have sibling functions: float computedSize() const { return m_computedSize; } unsigned computedPixelSize() const { return unsigned(m_computedSize + 0.5f); } The bug is that we were using computedPixelSize() rather than computedSize() when performing layout + rendering, which causes font sizes to be quantized to discrete multiples of 1px. This is problematic because it means authors can't get nicely flowing font sizes, as per https://jsfiddle.net/64hwk8bt/1/. It was also doubly unfortunate because if you did something like divide a font size by 2 and then multiply it by 2 (in script), the font-size wouldn't round-trip unperterbed. This patch fixes this by avoiding the rounding, via migrating callers as such: +--------------------------------------+------------------------------------------+ | Calls to this: | Are replaced with calls to this instead: | +--------------------------------------+------------------------------------------+ | FontDescription::computedPixelSize() | FontDescription::computedSize() | | FontCascade::pixelSize() | FontCascade::size() | | RenderStyle::computedFontPixelSize() | RenderStyle::computedFontSize() | +--------------------------------------+------------------------------------------+ This patch also deletes the old functions which are now unused. * LayoutTests/fast/canvas/canvas-font-ex-units-crash-expected.txt: * LayoutTests/fast/text-indicator/text-indicator-estimated-color-with-implicit-newline-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-values/update-subpixel-rem-unit-expected.txt: * LayoutTests/platform/mac/css1/basic/inheritance-expected.png: Added. * LayoutTests/platform/mac/css1/basic/inheritance-expected.txt: * LayoutTests/platform/mac/css1/box_properties/clear_float-expected.txt: * LayoutTests/platform/mac/css1/font_properties/font-expected.png: Added. * LayoutTests/platform/mac/css1/font_properties/font-expected.txt: * LayoutTests/platform/mac/css1/font_properties/font_size-expected.txt: * LayoutTests/platform/mac/css1/formatting_model/inline_elements-expected.txt: * LayoutTests/platform/mac/css1/text_properties/vertical_align-expected.txt: * LayoutTests/platform/mac/css2.1/20110323/table-height-algorithm-023-expected.png: Added. * LayoutTests/platform/mac/css2.1/20110323/table-height-algorithm-023-expected.txt: * LayoutTests/platform/mac/css2.1/20110323/table-height-algorithm-024-expected.png: Added. * LayoutTests/platform/mac/css2.1/20110323/table-height-algorithm-024-expected.txt: * LayoutTests/platform/mac/css2.1/t100801-c544-valgn-02-d-agi-expected.txt: * LayoutTests/platform/mac/css2.1/t100801-c544-valgn-03-d-agi-expected.txt: * LayoutTests/platform/mac/css2.1/t100801-c544-valgn-04-d-agi-expected.txt: * LayoutTests/platform/mac/css2.1/t1507-c526-font-sz-00-b-expected.txt: * LayoutTests/platform/mac/css2.1/t1508-c527-font-09-b-expected.txt: * LayoutTests/platform/mac/css3/zoom-coords-expected.txt: * LayoutTests/platform/mac/editing/selection/select-text-overflow-ellipsis-expected.txt: * LayoutTests/platform/mac/fast/block/basic/001-expected.png: Added. * LayoutTests/platform/mac/fast/block/basic/001-expected.txt: * LayoutTests/platform/mac/fast/block/float/centered-float-avoidance-complexity-expected.txt: * LayoutTests/platform/mac/fast/block/float/nopaint-after-layer-destruction2-expected.txt: * LayoutTests/platform/mac/fast/block/margin-collapse/103-expected.txt: * LayoutTests/platform/mac/fast/block/positioning/047-expected.txt: * LayoutTests/platform/mac/fast/css-generated-content/013-expected.txt: * LayoutTests/platform/mac/fast/css-generated-content/015-expected.txt: * LayoutTests/platform/mac/fast/css-generated-content/initial-letter-clearance-expected.txt: * LayoutTests/platform/mac/fast/css-generated-content/initial-letter-descender-expected.txt: * LayoutTests/platform/mac/fast/css-generated-content/initial-letter-sunken-expected.png: Added. * LayoutTests/platform/mac/fast/css-generated-content/initial-letter-sunken-expected.txt: * LayoutTests/platform/mac/fast/css/css1_forward_compatible_parsing-expected.txt: * LayoutTests/platform/mac/fast/css/first-line-text-decoration-inherited-from-parent-expected.txt: * LayoutTests/platform/mac/fast/css/h1-in-section-elements-expected.txt: * LayoutTests/platform/mac/fast/css/invalid-percentage-property-expected.txt: * LayoutTests/platform/mac/fast/css/preserve-user-specified-zoom-level-on-reload-expected.txt: * LayoutTests/platform/mac/fast/css/text-overflow-ellipsis-text-align-center-expected.txt: * LayoutTests/platform/mac/fast/css/text-overflow-ellipsis-text-align-justify-expected.txt: * LayoutTests/platform/mac/fast/css/text-overflow-ellipsis-text-align-left-expected.txt: * LayoutTests/platform/mac/fast/css/text-overflow-ellipsis-text-align-right-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed-expected.png: Added. * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-center-mixed-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed-expected.png: Added. * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-justify-mixed-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed-expected.png: Added. * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-left-mixed-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.txt: * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed-expected.png: Added. * LayoutTests/platform/mac/fast/css/vertical-text-overflow-ellipsis-text-align-right-mixed-expected.txt: * LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt: * LayoutTests/platform/mac/fast/encoding/utf-16-big-endian-expected.txt: * LayoutTests/platform/mac/fast/encoding/utf-16-little-endian-expected.txt: * LayoutTests/platform/mac/fast/forms/button-default-title-expected.txt: * LayoutTests/platform/mac/fast/forms/color/input-appearance-color-expected.txt: * LayoutTests/platform/mac/fast/forms/listbox-hit-test-zoomed-expected.txt: * LayoutTests/platform/mac/fast/forms/negativeLineHeight-expected.txt: * LayoutTests/platform/mac/fast/forms/textAreaLineHeight-expected.txt: * LayoutTests/platform/mac/fast/frames/onlyCommentInIFrame-expected.txt: * LayoutTests/platform/mac/fast/images/imagemap-focus-ring-zoom-expected.txt: * LayoutTests/platform/mac/fast/inline/continuation-outlines-expected.txt: * LayoutTests/platform/mac/fast/inline/continuation-outlines-with-layers-expected.txt: * LayoutTests/platform/mac/fast/inline/outline-continuations-expected.txt: * LayoutTests/platform/mac/fast/invalid/junk-data-expected.txt: * LayoutTests/platform/mac/fast/invalid/nestedh3s-expected.png: Added. * LayoutTests/platform/mac/fast/invalid/nestedh3s-expected.txt: * LayoutTests/platform/mac/fast/multicol/span/anonymous-style-inheritance-expected.txt: * LayoutTests/platform/mac/fast/overflow/007-expected.png: Added. * LayoutTests/platform/mac/fast/overflow/007-expected.txt: * LayoutTests/platform/mac/fast/overflow/infiniteRecursion-expected.txt: * LayoutTests/platform/mac/fast/overflow/infiniteRecursionGuard-expected.txt: * LayoutTests/platform/mac/fast/parser/xhtml-alternate-entities-expected.txt: * LayoutTests/platform/mac/fast/ruby/ruby-inline-table-expected.txt: * LayoutTests/platform/mac/fast/selectors/018b-expected.txt: * LayoutTests/platform/mac/fast/selectors/unqualified-hover-quirks-expected.txt: * LayoutTests/platform/mac/fast/selectors/unqualified-hover-strict-expected.txt: * LayoutTests/platform/mac/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.png: Added. * LayoutTests/platform/mac/fast/sub-pixel/selection/selection-rect-in-sub-pixel-table-expected.txt: * LayoutTests/platform/mac/fast/table/041-expected.txt: * LayoutTests/platform/mac/fast/table/frame-and-rules-expected.png: Added. * LayoutTests/platform/mac/fast/table/frame-and-rules-expected.txt: * LayoutTests/platform/mac/fast/table/nested-percent-height-table-expected.txt: * LayoutTests/platform/mac/fast/table/percent-heights-expected.txt: * LayoutTests/platform/mac/fast/text/basic/generic-family-changes-expected.txt: * LayoutTests/platform/mac/fast/text/basic/generic-family-reset-expected.txt: * LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.png: Added. * LayoutTests/platform/mac/fast/text/capitalize-boundaries-expected.txt: * LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.png: Added. * LayoutTests/platform/mac/fast/text/international/vertical-text-glyph-test-expected.txt: * LayoutTests/platform/mac/fast/text/international/vertical-text-metrics-test-expected.txt: * LayoutTests/platform/mac/fast/text/line-breaks-expected.txt: * LayoutTests/platform/mac/fast/text/whitespace/020-expected.txt: * LayoutTests/platform/mac/fast/transforms/bounding-rect-zoom-expected.txt: * LayoutTests/platform/mac/fast/transforms/transforms-with-zoom-expected.txt: * LayoutTests/platform/mac/fast/writing-mode/japanese-rl-text-with-broken-font-expected.txt: * LayoutTests/platform/mac/fast/xsl/xslt-extra-content-at-end-expected.txt: * LayoutTests/platform/mac/fast/xsl/xslt-missing-namespace-in-xslt-expected.txt: * LayoutTests/platform/mac/platform/mac/fast/text/webfont-after-tiny-monospace-text-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubNone-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/g-dirLTR-ubOverride-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubNone-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/g-dirRTL-ubOverride-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-anchor-no-markup-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubNone-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-dirLTR-ubOverride-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubNone-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/text-dirRTL-ubOverride-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubEmbed-in-rtl-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubNone-in-rtl-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirLTR-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirNone-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-default-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubEmbed-in-ltr-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-default-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubNone-in-ltr-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-default-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-ltr-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-dirRTL-ubOverride-in-rtl-context-expected.txt: * LayoutTests/platform/mac/svg/W3C-I18N/tspan-direction-ltr-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-units-03-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/coords-units-02-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/coords-units-03-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/coords-viewattr-03-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.txt: * LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt: * LayoutTests/platform/mac/svg/batik/text/smallFonts-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textEffect2-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textEffect3-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textFeatures-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textLayout2-expected.txt: * LayoutTests/platform/mac/svg/batik/text/textProperties-expected.txt: * LayoutTests/platform/mac/svg/carto.net/button-expected.txt: * LayoutTests/platform/mac/svg/carto.net/colourpicker-expected.txt: * LayoutTests/platform/mac/svg/carto.net/combobox-expected.txt: * LayoutTests/platform/mac/svg/carto.net/scrollbar-expected.txt: * LayoutTests/platform/mac/svg/carto.net/selectionlist-expected.txt: * LayoutTests/platform/mac/svg/carto.net/slider-expected.txt: * LayoutTests/platform/mac/svg/carto.net/tabgroup-expected.txt: * LayoutTests/platform/mac/svg/carto.net/textbox-expected.txt: * LayoutTests/platform/mac/svg/carto.net/window-expected.txt: * LayoutTests/platform/mac/svg/custom/bug45331-expected.txt: * LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.txt: * LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.txt: * LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.txt: * LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.txt: * LayoutTests/platform/mac/svg/custom/font-face-cascade-order-expected.txt: * LayoutTests/platform/mac/svg/custom/font-face-simple-expected.txt: * LayoutTests/platform/mac/svg/custom/invalid-css-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-clipPath-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/js-late-pattern-creation-expected.txt: * LayoutTests/platform/mac/svg/custom/junk-data-expected.txt: * LayoutTests/platform/mac/svg/custom/linking-uri-01-b-expected.txt: * LayoutTests/platform/mac/svg/custom/marker-default-width-height-expected.txt: * LayoutTests/platform/mac/svg/custom/missing-xlink-expected.txt: * LayoutTests/platform/mac/svg/custom/path-bad-data-expected.txt: * LayoutTests/platform/mac/svg/custom/path-textPath-simulation-expected.txt: * LayoutTests/platform/mac/svg/custom/shapes-supporting-markers-expected.txt: * LayoutTests/platform/mac/svg/custom/stroke-width-large-expected.txt: * LayoutTests/platform/mac/svg/custom/svg-fonts-in-html-expected.txt: * LayoutTests/platform/mac/svg/custom/text-tref-03-b-change-href-dom-expected.txt: * LayoutTests/platform/mac/svg/custom/text-tref-03-b-change-href-expected.txt: * LayoutTests/platform/mac/svg/custom/text-tref-03-b-referenced-element-removal-expected.txt: * LayoutTests/platform/mac/svg/custom/text-tref-03-b-tref-removal-expected.txt: * LayoutTests/platform/mac/svg/custom/tref-own-content-removal-expected.txt: * LayoutTests/platform/mac/svg/custom/tref-update-expected.txt: * LayoutTests/platform/mac/svg/custom/use-detach-expected.txt: * LayoutTests/platform/mac/svg/custom/use-font-face-crash-expected.txt: * LayoutTests/platform/mac/svg/custom/use-referencing-nonexisting-symbol-expected.txt: * LayoutTests/platform/mac/svg/foreignObject/text-tref-02-b-expected.txt: * LayoutTests/platform/mac/svg/hixie/text/003-expected.txt: * LayoutTests/platform/mac/svg/text/bidi-text-anchor-direction-expected.txt: * LayoutTests/platform/mac/svg/text/font-size-below-point-five-expected.txt: * LayoutTests/platform/mac/svg/text/foreignObject-repaint-expected.txt: * LayoutTests/platform/mac/svg/text/scaled-font-expected.txt: * LayoutTests/platform/mac/svg/text/scaling-font-with-geometric-precision-expected.txt: * LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt: * LayoutTests/platform/mac/svg/text/small-fonts-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-02-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-03-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-04-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-05-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-deco-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-fonts-01-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-fonts-02-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-intro-05-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-path-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-text-03-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-text-04-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-text-05-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-text-07-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-text-08-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-tref-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-tselect-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-tselect-02-f-expected.txt: * LayoutTests/platform/mac/svg/text/text-tspan-01-b-expected.txt: * LayoutTests/platform/mac/svg/text/text-ws-01-t-expected.txt: * LayoutTests/platform/mac/svg/text/text-ws-02-t-expected.txt: * LayoutTests/platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt: * LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.txt: * LayoutTests/platform/mac/svg/transforms/text-with-pattern-inside-transformed-html-expected.txt: * LayoutTests/platform/mac/svg/transforms/text-with-pattern-with-svg-transform-expected.txt: * LayoutTests/platform/mac/svg/wicd/sizing-flakiness-expected.txt: * LayoutTests/platform/mac/svg/wicd/test-rightsizing-b-expected.txt: * LayoutTests/platform/mac/svg/wicd/test-scalable-background-image1-expected.txt: * LayoutTests/platform/mac/svg/wicd/test-scalable-background-image2-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-background-images-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-coords-viewattr-01-b-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-hixie-mixed-008-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-hixie-mixed-009-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-float-border-padding-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-huge-size-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt: * LayoutTests/platform/mac/svg/zoom/page/zoom-zoom-coords-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-coords-viewattr-01-b-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-foreignObject-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-hixie-mixed-009-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: * LayoutTests/platform/mac/svg/zoom/text/zoom-svg-float-border-padding-expected.txt: * LayoutTests/svg/custom/glyph-selection-lang-attribute-expected.txt: * LayoutTests/svg/custom/svg-fonts-with-no-element-reference-expected.txt: * LayoutTests/svg/text/font-size-below-point-five-2-expected.txt: * Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp: (WebCore::AccessibilityObjectAtspi::textAttributes const): * Source/WebCore/editing/TextIterator.cpp: (WebCore::shouldEmitExtraNewlineForNode): * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::State::fontString const): * Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp: (WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const): * Source/WebCore/layout/formattingContexts/inline/InlineLevelBox.h: (WebCore::Layout::m_style): * Source/WebCore/loader/cache/CachedSVGFont.cpp: (WebCore::CachedSVGFont::platformDataFromCustomData): * Source/WebCore/page/PrintContext.cpp: (WebCore::PrintContext::pageProperty): * Source/WebCore/page/ios/FrameIOS.mm: (WebCore::Frame::renderRectForPoint const): * Source/WebCore/platform/adwaita/ThemeAdwaita.cpp: (WebCore::ThemeAdwaita::controlSize const): * Source/WebCore/platform/graphics/FontCascade.h: (WebCore::FontCascade::pixelSize const): Deleted. * Source/WebCore/platform/graphics/FontCascadeCache.h: (WebCore::FontDescriptionKey::FontDescriptionKey): * Source/WebCore/platform/graphics/FontDescription.h: (WebCore::FontDescription::computedSize const): (WebCore::FontDescription::computedPixelSize const): Deleted. * Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp: (WebCore::FontCache::createFontPlatformData): (WebCore::FontCache::lastResortFallbackFont): * Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::configurePatternForFontDescription): (WebCore::FontCache::systemFallbackForCharacters): (WebCore::FontCache::createFontPlatformData): * Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * Source/WebCore/platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * Source/WebCore/platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::lastResortFallbackFont): (WebCore::FontCache::createFontPlatformData): * Source/WebCore/platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * Source/WebCore/platform/graphics/win/FontCustomPlatformDataCairo.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * Source/WebCore/platform/mac/ThemeMac.mm: (WebCore::controlSizeForFont): (WebCore::stepperControlSizeForFont): * Source/WebCore/platform/win/DragImageWin.cpp: (WebCore::createDragImageForLink): * Source/WebCore/rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::columnGap const): * Source/WebCore/rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::columnGap const): * Source/WebCore/rendering/RenderRubyRun.cpp: (WebCore::shouldOverhang): (WebCore::RenderRubyRun::getOverhang const): * Source/WebCore/rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::adjustInlineDirectionLineBounds const): * Source/WebCore/rendering/RenderText.cpp: (WebCore::RenderText::maxWordFragmentWidth): * Source/WebCore/rendering/RenderThemeIOS.mm: (WebCore::RenderThemeIOS::adjustCheckboxStyle const): (WebCore::RenderThemeIOS::adjustRadioStyle const): * Source/WebCore/rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::controlSizeForFont const): (WebCore::RenderThemeMac::controlSizeForSystemFont const): (WebCore::RenderThemeMac::paintMenuListButtonDecorations): (WebCore::RenderThemeMac::popupInternalPaddingBox const): (WebCore::RenderThemeMac::adjustMenuListButtonStyle const): * Source/WebCore/rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const): (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const): (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const): * Source/WebCore/rendering/TextBoxPainter.cpp: (WebCore::TextBoxPainter<TextBoxPath>::paintBackgroundDecorations): (WebCore::TextBoxPainter<TextBoxPath>::paintForegroundDecorations): * Source/WebCore/rendering/line/BreakingContext.h: (WebCore::tryHyphenating): * Source/WebCore/rendering/mathml/RenderMathMLRow.cpp: (WebCore::RenderMathMLRow::stretchVerticalOperatorsAndLayoutChildren): * Source/WebCore/rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computeLineHeight const): (WebCore::RenderStyle::computedFontPixelSize const): Deleted. * Source/WebCore/rendering/style/RenderStyle.h: * Source/WebCore/rendering/svg/SVGInlineTextBox.cpp: (WebCore::textShouldBePainted): * Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp: (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const): * Source/WebCore/rendering/svg/SVGTextLayoutEngineSpacing.cpp: (WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing): * Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp: (WebCore::styleForFirstLetter): * Source/WebCore/style/InlineTextBoxStyle.cpp: (WebCore::computedVisualOverflowForDecorations): * Source/WebCore/style/StyleAdjuster.cpp: (WebCore::Style::Adjuster::adjust const): * Source/WebCore/style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::resolveElement): * Source/WebCore/svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS const): (WebCore::SVGLengthContext::convertValueFromEMSToUserUnits const):
https://github.com/WebKit/WebKit/commit/ca512052229331ce34ed6dfc536e2afa7a13c901
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/65aeb24108e3b7f4fc4651f8e52e5b18ac983dba)
Is this just a rename, or does it fix the bug in the title?
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/74a2a6a849047f23df2faf887664b2e051cee73d)
It fixes the bug in the title.
float computedSize() const { return m_computedSize; }
unsigned computedPixelSize() const { return unsigned(m_computedSize + 0.5f); }
https://jsfiddle.net/64hwk8bt/1/

EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/67a9b782417a297abed4f24ae4723e6afdae87c1)
That wasn't clear from the commit message. Can you separate the renames from the bug fix?
There are no renames :)
I updated the commit message.
I guess I could do better: "This patch migrates:" => "This patch migrates callers from:"
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/a31695b06801c615eef12109eee863514df1baed)
Looks like html.css includes
font-size: 1.17em;
...
font-size: .83em;
...
font-size: .67em;
Also we have:
// When the CSS keyword "larger" is used, this function will attempt to match within the keyword
// table, and failing that, will simply multiply by 1.2.
inline float BuilderCustom::largerFontSize(float size)
{
// FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale up to
// the next size level.
return size * 1.2f;
}
// Like the previous function, but for the keyword "smaller".
inline float BuilderCustom::smallerFontSize(float size)
{
// FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale down to
// the next size level.
return size / 1.2f;
}
Oh, small caps are also affected because they are 70% of the normal font size.
Some tests have font-size: 250%;
which causes fractional sizes
SVG text is also computed to have a fractional font size by default.
Superscript and subscript are also a scaled font size.
Ruby is scaled too.
Looks like this patch is causing SVG text to no longer be drawn :O
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/72ad3bd7857265e1693839dde3dade7326e96494)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ac466b9bc6b831a783a65ed9b291dbbb8fd8a30e)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ea5e2031851b056f03ce425168e8b9426af3a8fa)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/b5b30db179a1d8e4f7d8edeeda8aad62b6f5f6d2)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/9c2f4a01771cd75c52fd5f20d8032b04b7c9d5a6)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/ca512052229331ce34ed6dfc536e2afa7a13c901)
unperterbed
Small spelling mistake here, it's "unperturbed".
Very nice ASCII table.
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/0fb159d369e444efed7917b535ae2eddb4f86d6c)
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/801f0f1a0bb57d71c9f715578b0c0d6cff565f84)
Before / After
https://github.com/WebKit/WebKit/assets/918903/3abc189e-944b-4914-a367-1d2862d483cd
EWS run on previous version of this PR (hash https://github.com/WebKit/WebKit/commit/a6099957bf7e9b8ab6afb68c768449938ee4a390)
EWS run on current version of this PR (hash https://github.com/WebKit/WebKit/commit/e6e5fb9046c0a01310a4369bc05753a038a34349)