Changeset 214394 in webkit


Ignore:
Timestamp:
Mar 24, 2017 11:50:18 PM (7 years ago)
Author:
mmaxfield@apple.com
Message:

Add font-optical-sizing to CSSComputedStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=170083

Reviewed by Joseph Pecoraro.

Source/WebCore:

Covered by existing tests.

  • css/CSSComputedStyleDeclaration.cpp:

LayoutTests:

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/text/variations/optical-sizing-expected.txt:
  • fast/text/variations/optical-sizing.html:
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-expected.txt: Added.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Added.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
Location:
trunk
Files:
1 added
9 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r214390 r214394  
     12017-03-24  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Add font-optical-sizing to CSSComputedStyleDeclaration
     4        https://bugs.webkit.org/show_bug.cgi?id=170083
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        * fast/css/getComputedStyle/computed-style-expected.txt:
     9        * fast/css/getComputedStyle/computed-style-font-family-expected.txt:
     10        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
     11        * fast/css/getComputedStyle/resources/property-names.js:
     12        * fast/text/variations/optical-sizing-expected.txt:
     13        * fast/text/variations/optical-sizing.html:
     14        * platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-expected.txt: Added.
     15        * platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Added.
     16        * platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Added.
     17
    1182017-03-24  Ryan Haddad  <ryanhaddad@apple.com>
    219
  • trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt

    r213094 r214394  
    5151font-variant: normal;
    5252font-weight: normal;
     53font-optical-sizing: auto;
    5354hanging-punctuation: none;
    5455height: 576px;
  • trunk/LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt

    r213267 r214394  
    88font-variant: normal;
    99font-weight: normal;
     10font-optical-sizing: auto;
    1011font-variant-ligatures: normal;
    1112font-variant-position: normal;
  • trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt

    r213094 r214394  
    5050font-variant: normal
    5151font-weight: normal
     52font-optical-sizing: auto
    5253hanging-punctuation: none
    5354height: 100px
  • trunk/LayoutTests/fast/css/getComputedStyle/resources/property-names.js

    r210449 r214394  
    198198    "font-variant-position": true,
    199199    "font-weight": true,
     200    "font-optical-sizing": true,
    200201    "glyph-orientation-horizontal": true,
    201202    "glyph-orientation-vertical": true,
  • trunk/LayoutTests/fast/text/variations/optical-sizing-expected.txt

    r214364 r214394  
    1414PASS document.getElementById('test4').style.fontOpticalSizing is "none"
    1515PASS document.getElementById('test5').style.fontOpticalSizing is "inherit"
     16PASS window.getComputedStyle(document.getElementById('test1')).fontOpticalSizing is "auto"
     17PASS window.getComputedStyle(document.getElementById('test2')).fontOpticalSizing is "auto"
     18PASS window.getComputedStyle(document.getElementById('test3')).fontOpticalSizing is "auto"
     19PASS window.getComputedStyle(document.getElementById('test4')).fontOpticalSizing is "none"
     20PASS window.getComputedStyle(document.getElementById('test5')).fontOpticalSizing is "none"
     21PASS Found optical sizing
    1622PASS successfullyParsed is true
    1723
  • trunk/LayoutTests/fast/text/variations/optical-sizing.html

    r214364 r214394  
    2525shouldBeEqualToString("document.getElementById('test4').style.fontOpticalSizing", "none");
    2626shouldBeEqualToString("document.getElementById('test5').style.fontOpticalSizing", "inherit");
     27
     28shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).fontOpticalSizing", "auto");
     29shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).fontOpticalSizing", "auto");
     30shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).fontOpticalSizing", "auto");
     31shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).fontOpticalSizing", "none");
     32shouldBeEqualToString("window.getComputedStyle(document.getElementById('test5')).fontOpticalSizing", "none");
     33
     34var computedStyle = window.getComputedStyle(document.getElementById('test1'));
     35var found = false;
     36for (let i = 0; i < x.length; ++i) {
     37    if (computedStyle[i] == "font-optical-sizing") {
     38        found = true;
     39        testPassed("Found optical sizing");
     40        break;
     41    }
     42}
     43if (!found)
     44    testFailed("Didn't find optical sizing");
    2745</script>
    2846
  • trunk/Source/WebCore/ChangeLog

    r214392 r214394  
     12017-03-24  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Add font-optical-sizing to CSSComputedStyleDeclaration
     4        https://bugs.webkit.org/show_bug.cgi?id=170083
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        Covered by existing tests.
     9
     10        * css/CSSComputedStyleDeclaration.cpp:
     11
    1122017-03-24  Daniel Bates  <dabates@apple.com>
    213
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r214364 r214394  
    163163    CSSPropertyFontVariant,
    164164    CSSPropertyFontWeight,
     165#if ENABLE(VARIATION_FONTS)
     166    CSSPropertyFontOpticalSizing,
     167#endif
    165168    CSSPropertyHangingPunctuation,
    166169    CSSPropertyHeight,
Note: See TracChangeset for help on using the changeset viewer.