Changeset 216517 in webkit


Ignore:
Timestamp:
May 9, 2017 11:02:12 AM (7 years ago)
Author:
mmaxfield@apple.com
Message:

font-stretch: normal selects expanded fonts instead of condensed fonts
https://bugs.webkit.org/show_bug.cgi?id=171838
<rdar://problem/31005481>

Reviewed by Jon Lee.

Source/WebCore:

CSS Fonts level 3 says: "If the value of ‘font-stretch’ is ‘normal’ or one of the condensed
values, narrower width values are checked first, then wider values."

CSS Fonts level 4 erroneously was incompatible with this, but was updated in
https://github.com/w3c/csswg-drafts/commit/4559389d183bbaaf3321af5ba1c924caa7c488bb
to be consistent with this.

Now, CSS Fonts level 4 states: "If the desired stretch value is less than or equal to100,
stretch values below the desired stretch value are checked in descending order followed by
stretch values above the desired stretch value in ascending order"

Test: fast/text/font-width-100.html

  • platform/graphics/FontSelectionAlgorithm.cpp:

LayoutTests:

  • fast/text/font-width-100-expected.html: Added.
  • fast/text/font-width-100.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r216515 r216517  
     12017-05-09  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        font-stretch: normal selects expanded fonts instead of condensed fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=171838
     5        <rdar://problem/31005481>
     6
     7        Reviewed by Jon Lee.
     8
     9        * fast/text/font-width-100-expected.html: Added.
     10        * fast/text/font-width-100.html: Added.
     11
    1122017-05-09  Matt Lewis  <jlewis3@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r216513 r216517  
     12017-05-09  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        font-stretch: normal selects expanded fonts instead of condensed fonts
     4        https://bugs.webkit.org/show_bug.cgi?id=171838
     5        <rdar://problem/31005481>
     6
     7        Reviewed by Jon Lee.
     8
     9        CSS Fonts level 3 says: "If the value of ‘font-stretch’ is ‘normal’ or one of the condensed
     10        values, narrower width values are checked first, then wider values."
     11
     12        CSS Fonts level 4 erroneously was incompatible with this, but was updated in
     13        https://github.com/w3c/csswg-drafts/commit/4559389d183bbaaf3321af5ba1c924caa7c488bb
     14        to be consistent with this.
     15
     16        Now, CSS Fonts level 4 states: "If the desired stretch value is less than or equal to100,
     17        stretch values below the desired stretch value are checked in descending order followed by
     18        stretch values above the desired stretch value in ascending order"
     19
     20        Test: fast/text/font-width-100.html
     21
     22        * platform/graphics/FontSelectionAlgorithm.cpp:
     23
    1242017-05-09  Romain Bellessort  <romain.bellessort@crf.canon.fr>
    225
  • trunk/Source/WebCore/platform/graphics/FontSelectionAlgorithm.cpp

    r213464 r216517  
    3636        return { FontSelectionValue(), m_request.width };
    3737
    38     if (m_request.width >= normalStretchValue()) {
     38    if (m_request.width > normalStretchValue()) {
    3939        if (width.minimum > m_request.width)
    4040            return { width.minimum - m_request.width, width.minimum };
Note: See TracChangeset for help on using the changeset viewer.