RESOLVED FIXED 143590
Minimum font size pref breaks SVG text very badly
https://bugs.webkit.org/show_bug.cgi?id=143590
Summary Minimum font size pref breaks SVG text very badly
Said Abou-Hallawa
Reported 2015-04-09 17:10:39 PDT
Created attachment 250488 [details] test case Open the attached test case in Safari. Enable the "Never use font sizes smaller than:" pref in Safari preferences. Result: The text is displayed with a very big font. Other examples are http://dbaron.org/log/20110225-blur-radius and http://orbis.stanford.edu. WebKit renders the text of these websites very badly if this perf is enabled.
Attachments
test case (253 bytes, image/svg+xml)
2015-04-09 17:10 PDT, Said Abou-Hallawa
no flags
Patch (8.96 KB, patch)
2015-04-09 18:13 PDT, Said Abou-Hallawa
no flags
Patch (9.33 KB, patch)
2015-04-15 18:04 PDT, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2015-04-09 18:13:26 PDT
Simon Fraser (smfr)
Comment 2 2015-04-15 12:01:34 PDT
Comment on attachment 250492 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250492&action=review > Source/WebCore/style/StyleFontSizeFunctions.cpp:44 > +static float computedFontSizeFromSpecifiedSize(float specifiedSize, bool isAbsoluteSize, bool canApplyMinSizeRules, float zoomFactor, ESmartMinimumForFontSize useSmartMinimumForFontSize, const Settings* settings) The bool param makes it hard to read at the call site. An enum would be better.
Said Abou-Hallawa
Comment 3 2015-04-15 18:04:23 PDT
WebKit Commit Bot
Comment 4 2015-04-15 19:51:32 PDT
Comment on attachment 250886 [details] Patch Clearing flags on attachment: 250886 Committed r182876: <http://trac.webkit.org/changeset/182876>
WebKit Commit Bot
Comment 5 2015-04-15 19:51:38 PDT
All reviewed patches have been landed. Closing bug.
Said Abou-Hallawa
Comment 6 2015-04-15 20:01:53 PDT
Darin Adler
Comment 7 2015-04-16 17:31:44 PDT
Comment on attachment 250886 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250886&action=review > Source/WebCore/ChangeLog:11 > + computed value after applying the minimum fort size rule. This means the font, not fort > Source/WebCore/style/StyleFontSizeFunctions.cpp:43 > + DonNotApplyMinimumFontSize, Typo: DonNot. > Source/WebCore/style/StyleFontSizeFunctions.cpp:48 > +static float computedFontSizeFromSpecifiedSize(float specifiedSize, bool isAbsoluteSize, float zoomFactor, MinimumFontSizeRule minimumForFontSizeRule, const Settings* settings) I think the argument name should be minimumSizeRule rather than minimumForFontSizeRule. Other argument names just say Size, not FontSize, and the For is not needed.
Said Abou-Hallawa
Comment 8 2015-04-17 10:37:20 PDT
(In reply to comment #7) > Comment on attachment 250886 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=250886&action=review > > > Source/WebCore/ChangeLog:11 > > + computed value after applying the minimum fort size rule. This means the > > font, not fort > > > Source/WebCore/style/StyleFontSizeFunctions.cpp:43 > > + DonNotApplyMinimumFontSize, > > Typo: DonNot. > > > Source/WebCore/style/StyleFontSizeFunctions.cpp:48 > > +static float computedFontSizeFromSpecifiedSize(float specifiedSize, bool isAbsoluteSize, float zoomFactor, MinimumFontSizeRule minimumForFontSizeRule, const Settings* settings) > > I think the argument name should be minimumSizeRule rather than > minimumForFontSizeRule. Other argument names just say Size, not FontSize, > and the For is not needed. Fixed. Committed r182955: <http://trac.webkit.org/changeset/182955>
Note You need to log in before you can comment on or make changes to this bug.