Changeset 240334 in webkit


Ignore:
Timestamp:
Jan 23, 2019 7:04:50 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[css-logical] Implement flow-relative inset properties
https://bugs.webkit.org/show_bug.cgi?id=189441

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-23
Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Enable the CSSLogicalEnabled flag in the test for logical insets, and
update its expectations. It still has some failures because sideways
writing modes have not been implemented yet
(https://bugs.webkit.org/show_bug.cgi?id=166941).

  • web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
  • web-platform-tests/css/css-logical/logical-box-inset.html:

Source/WebCore:

Implement 'inset', 'inset-block', 'inset-block-start', 'inset-block-end',
'inset-inline', 'inset-inline-start' and 'inset-inline-end' CSS properties
behind the CSSLogicalEnabled runtime flag.

Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html

webexposed/css-properties-behind-flags.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSProperties.json:
  • css/CSSProperty.cpp:

(WebCore::CSSProperty::resolveDirectionAwareProperty):
(WebCore::CSSProperty::isDirectionAwareProperty):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

LayoutTests:

Check that the new CSS properties are disabled behind runtime flags
and are not exposed.

  • webexposed/css-properties-behind-flags-expected.txt:
  • webexposed/css-properties-behind-flags.html:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240331 r240334  
     12019-01-23  Oriol Brufau  <obrufau@igalia.com>
     2
     3        [css-logical] Implement flow-relative inset properties
     4        https://bugs.webkit.org/show_bug.cgi?id=189441
     5
     6        Reviewed by Dean Jackson.
     7
     8        Check that the new CSS properties are disabled behind runtime flags
     9        and are not exposed.
     10
     11        * webexposed/css-properties-behind-flags-expected.txt:
     12        * webexposed/css-properties-behind-flags.html:
     13
    1142019-01-23  Rob Buis  <rbuis@igalia.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r240333 r240334  
     12019-01-23  Oriol Brufau  <obrufau@igalia.com>
     2
     3        [css-logical] Implement flow-relative inset properties
     4        https://bugs.webkit.org/show_bug.cgi?id=189441
     5
     6        Reviewed by Dean Jackson.
     7
     8        Enable the CSSLogicalEnabled flag in the test for logical insets, and
     9        update its expectations. It still has some failures because sideways
     10        writing modes have not been implemented yet
     11        (https://bugs.webkit.org/show_bug.cgi?id=166941).
     12
     13        * web-platform-tests/css/css-logical/logical-box-inset-expected.txt:
     14        * web-platform-tests/css/css-logical/logical-box-inset.html:
     15
    1162019-01-23  Oriol Brufau  <obrufau@igalia.com>
    217
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-inset-expected.txt

    r240251 r240334  
    11
    2 FAIL Test that logical inset-* properties are supported. assert_equals: logical properties in inline style, inset-inline-start expected "1px" but got ""
    3 FAIL Test that inset-inline shorthand sets longhands and serializes correctly. assert_equals: shorthand in inline style, inset-inline expected "1px 2px" but got ""
    4 FAIL Test that inset-block shorthand sets longhands and serializes correctly. assert_equals: shorthand in inline style, inset-block expected "1px 2px" but got ""
    5 FAIL Test that inset shorthand sets longhands and serializes correctly. assert_equals: shorthand in inline style, inset expected "1px 2px 3px 4px" but got ""
    6 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: horizontal-tb; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: horizontal-tb; direction: ltr; ', inset-inline-start expected "1px" but got ""
    7 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: horizontal-tb; direction: ltr; ', inset-inline-start expected "1px" but got ""
    8 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: horizontal-tb; direction: ltr; ', left expected "5px" but got "1px"
    9 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: horizontal-tb; direction: ltr; ', left expected "5px" but got "1px"
    10 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: horizontal-tb; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: horizontal-tb; direction: rtl; ', inset-inline-start expected "1px" but got ""
    11 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: horizontal-tb; direction: rtl; ', inset-inline-start expected "1px" but got ""
    12 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: horizontal-tb; direction: rtl; ', inset-inline-end expected "1px" but got ""
    13 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: horizontal-tb; direction: rtl; ', inset-inline-end expected "1px" but got ""
    14 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-rl; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: vertical-rl; direction: rtl; ', inset-inline-start expected "1px" but got ""
    15 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: vertical-rl; direction: rtl; ', inset-inline-start expected "1px" but got ""
    16 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: vertical-rl; direction: rtl; ', inset-block-end expected "1px" but got ""
    17 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: vertical-rl; direction: rtl; ', inset-block-end expected "1px" but got ""
    18 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: rtl; ', inset-inline-start expected "1px" but got ""
    19 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: rtl; ', inset-inline-start expected "1px" but got ""
    20 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-rl; direction: rtl; ', inset-block-end expected "1px" but got ""
    21 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-rl; direction: rtl; ', inset-block-end expected "1px" but got ""
    22 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-rl; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: vertical-rl; direction: ltr; ', inset-inline-start expected "1px" but got ""
    23 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: vertical-rl; direction: ltr; ', inset-inline-start expected "1px" but got ""
    24 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: vertical-rl; direction: ltr; ', inset-block-end expected "1px" but got ""
    25 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: vertical-rl; direction: ltr; ', inset-block-end expected "1px" but got ""
    26 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: ltr; ', inset-inline-start expected "1px" but got ""
    27 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: ltr; ', inset-inline-start expected "1px" but got ""
    28 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-rl; direction: ltr; ', inset-block-end expected "1px" but got ""
    29 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-rl; direction: ltr; ', inset-block-end expected "1px" but got ""
    30 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-lr; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: vertical-lr; direction: rtl; ', inset-inline-start expected "1px" but got ""
    31 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: vertical-lr; direction: rtl; ', inset-inline-start expected "1px" but got ""
    32 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: vertical-lr; direction: rtl; ', inset-block-start expected "1px" but got ""
    33 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: vertical-lr; direction: rtl; ', inset-block-start expected "1px" but got ""
    34 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: ltr; ', inset-inline-start expected "1px" but got ""
    35 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: ltr; ', inset-inline-start expected "1px" but got ""
    36 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-lr; direction: ltr; ', inset-block-start expected "1px" but got ""
    37 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-lr; direction: ltr; ', inset-block-start expected "1px" but got ""
    38 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-lr; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: vertical-lr; direction: ltr; ', inset-inline-start expected "1px" but got ""
    39 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: vertical-lr; direction: ltr; ', inset-inline-start expected "1px" but got ""
    40 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: vertical-lr; direction: ltr; ', inset-block-start expected "1px" but got ""
    41 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: vertical-lr; direction: ltr; ', inset-block-start expected "1px" but got ""
    42 FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: rtl; ', inset-inline-start expected "1px" but got ""
    43 FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: rtl; ', inset-inline-start expected "1px" but got ""
    44 FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-lr; direction: rtl; ', inset-block-start expected "1px" but got ""
    45 FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-lr; direction: rtl; ', inset-block-start expected "1px" but got ""
     2PASS Test that logical inset-* properties are supported.
     3PASS Test that inset-inline shorthand sets longhands and serializes correctly.
     4PASS Test that inset-block shorthand sets longhands and serializes correctly.
     5PASS Test that inset shorthand sets longhands and serializes correctly.
     6PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: horizontal-tb; direction: ltr; '.
     7PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: ltr; '.
     8PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: ltr; '.
     9PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: ltr; '.
     10PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: horizontal-tb; direction: rtl; '.
     11PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: horizontal-tb; direction: rtl; '.
     12PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: rtl; '.
     13PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: horizontal-tb; direction: rtl; '.
     14PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-rl; direction: rtl; '.
     15PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: rtl; '.
     16PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: rtl; '.
     17PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: rtl; '.
     18FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: rtl; ', bottom expected "1px" but got "4px"
     19FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: rtl; ', bottom expected "1px" but got "0px"
     20FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-rl; direction: rtl; ', inset-block-end expected "1px" but got "4px"
     21FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-rl; direction: rtl; ', inset-block-end expected "1px" but got "4px"
     22PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-rl; direction: ltr; '.
     23PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-rl; direction: ltr; '.
     24PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: ltr; '.
     25PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-rl; direction: ltr; '.
     26FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: ltr; ', top expected "1px" but got "3px"
     27FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-rl; direction: ltr; ', top expected "1px" but got "0px"
     28FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-rl; direction: ltr; ', left expected "1px" but got "5px"
     29FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-rl; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-rl; direction: ltr; ', left expected "1px" but got "5px"
     30PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-lr; direction: rtl; '.
     31PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: rtl; '.
     32PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: rtl; '.
     33PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: rtl; '.
     34FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: ltr; ', bottom expected "1px" but got "4px"
     35FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: ltr; ', bottom expected "1px" but got "0px"
     36FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-lr; direction: ltr; ', left expected "1px" but got "5px"
     37FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: ltr; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-lr; direction: ltr; ', left expected "1px" but got "5px"
     38PASS Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: vertical-lr; direction: ltr; '.
     39PASS Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: vertical-lr; direction: ltr; '.
     40PASS Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: ltr; '.
     41PASS Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: vertical-lr; direction: ltr; '.
     42FAIL Test that logical inset-* properties share computed values with their physical associates, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: logical properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: rtl; ', top expected "1px" but got "3px"
     43FAIL Test that inset-* shorthands set the computed value of both logical and physical longhands, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: shorthand properties on one declaration, writing mode properties on another, 'writing-mode: sideways-lr; direction: rtl; ', top expected "1px" but got "0px"
     44FAIL Test that inset-* properties honor order of appearance when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: 'inset-inline-start' last on single declaration, 'writing-mode: sideways-lr; direction: rtl; ', inset-block-start expected "1px" but got "3px"
     45FAIL Test that inset-* properties honor selector specificty when both logical and physical associates are declared, with 'writing-mode: sideways-lr; direction: rtl; '. assert_equals: 'inset-inline-start', two declarations, 'writing-mode: sideways-lr; direction: rtl; ', inset-block-start expected "1px" but got "3px"
    4646
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html

    r240251 r240334  
    1 <!DOCTYPE html>
     1<!DOCTYPE html> <!-- webkit-test-runner [ internal:CSSLogicalEnabled=true ] -->
    22<meta charset="utf-8" />
    33<title>CSS Logical Properties: Flow-Relative Offsets</title>
  • trunk/LayoutTests/webexposed/css-properties-behind-flags-expected.txt

    r240251 r240334  
    88PASS border-inline-style is not exposed
    99PASS border-inline-color is not exposed
     10PASS inset is not exposed
     11PASS inset-block is not exposed
     12PASS inset-block-start is not exposed
     13PASS inset-block-end is not exposed
     14PASS inset-inline is not exposed
     15PASS inset-inline-start is not exposed
     16PASS inset-inline-end is not exposed
    1017PASS margin-block is not exposed
    1118PASS margin-inline is not exposed
  • trunk/LayoutTests/webexposed/css-properties-behind-flags.html

    r240251 r240334  
    1313    "border-inline-style",
    1414    "border-inline-color",
     15    "inset",
     16    "inset-block",
     17    "inset-block-start",
     18    "inset-block-end",
     19    "inset-inline",
     20    "inset-inline-start",
     21    "inset-inline-end",
    1522    "margin-block",
    1623    "margin-inline",
  • trunk/Source/WebCore/ChangeLog

    r240333 r240334  
     12019-01-23  Oriol Brufau  <obrufau@igalia.com>
     2
     3        [css-logical] Implement flow-relative inset properties
     4        https://bugs.webkit.org/show_bug.cgi?id=189441
     5
     6        Reviewed by Dean Jackson.
     7
     8        Implement 'inset', 'inset-block', 'inset-block-start', 'inset-block-end',
     9        'inset-inline', 'inset-inline-start' and 'inset-inline-end' CSS properties
     10        behind the CSSLogicalEnabled runtime flag.
     11
     12        Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html
     13               webexposed/css-properties-behind-flags.html
     14
     15        * css/CSSComputedStyleDeclaration.cpp:
     16        (WebCore::isLayoutDependent):
     17        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
     18        * css/CSSProperties.json:
     19        * css/CSSProperty.cpp:
     20        (WebCore::CSSProperty::resolveDirectionAwareProperty):
     21        (WebCore::CSSProperty::isDirectionAwareProperty):
     22        * css/StyleProperties.cpp:
     23        (WebCore::StyleProperties::getPropertyValue const):
     24        (WebCore::StyleProperties::asText const):
     25        * css/parser/CSSParserFastPaths.cpp:
     26        (WebCore::isSimpleLengthPropertyID):
     27        * css/parser/CSSPropertyParser.cpp:
     28        (WebCore::CSSPropertyParser::parseSingleValue):
     29        (WebCore::CSSPropertyParser::parseShorthand):
     30
    1312019-01-23  Oriol Brufau  <obrufau@igalia.com>
    232
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r240251 r240334  
    23502350    case CSSPropertyLeft:
    23512351    case CSSPropertyRight:
     2352    case CSSPropertyInsetBlockStart:
     2353    case CSSPropertyInsetBlockEnd:
     2354    case CSSPropertyInsetInlineStart:
     2355    case CSSPropertyInsetInlineEnd:
    23522356        return positionOffsetValueIsRendererDependent(style, renderer);
    23532357    case CSSPropertyWidth:
     
    39763980        case CSSPropertyColumns:
    39773981            return getCSSPropertyValuesForShorthandProperties(columnsShorthand());
     3982        case CSSPropertyInset:
     3983            return getCSSPropertyValuesFor4SidesShorthand(insetShorthand());
     3984        case CSSPropertyInsetBlock:
     3985            return getCSSPropertyValuesFor2SidesShorthand(insetBlockShorthand());
     3986        case CSSPropertyInsetInline:
     3987            return getCSSPropertyValuesFor2SidesShorthand(insetInlineShorthand());
    39783988        case CSSPropertyListStyle:
    39793989            return getCSSPropertyValuesForShorthandProperties(listStyleShorthand());
     
    41134123        case CSSPropertyBorderInlineStartStyle:
    41144124        case CSSPropertyBorderInlineStartWidth:
     4125        case CSSPropertyInsetBlockEnd:
     4126        case CSSPropertyInsetBlockStart:
     4127        case CSSPropertyInsetInlineEnd:
     4128        case CSSPropertyInsetInlineStart:
    41154129        case CSSPropertyMarginBlockEnd:
    41164130        case CSSPropertyMarginBlockStart:
  • trunk/Source/WebCore/css/CSSProperties.json

    r240251 r240334  
    25702570            }
    25712571        },
     2572        "inset": {
     2573            "codegen-properties": {
     2574                "runtime-flag": "cssLogical",
     2575                "longhands": [
     2576                    "top",
     2577                    "right",
     2578                    "bottom",
     2579                    "left"
     2580                ]
     2581            },
     2582            "specification": {
     2583                "category": "css-logical-props",
     2584                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2585            }
     2586        },
     2587        "inset-block": {
     2588            "codegen-properties": {
     2589                "runtime-flag": "cssLogical",
     2590                "longhands": [
     2591                    "inset-block-start",
     2592                    "inset-block-end"
     2593                ]
     2594            },
     2595            "specification": {
     2596                "category": "css-logical-props",
     2597                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2598            }
     2599        },
     2600        "inset-block-end": {
     2601            "codegen-properties": {
     2602                "runtime-flag": "cssLogical",
     2603                "skip-builder": true
     2604            },
     2605            "specification": {
     2606                "category": "css-logical-props",
     2607                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2608            }
     2609        },
     2610        "inset-block-start": {
     2611            "codegen-properties": {
     2612                "runtime-flag": "cssLogical",
     2613                "skip-builder": true
     2614            },
     2615            "specification": {
     2616                "category": "css-logical-props",
     2617                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2618            }
     2619        },
     2620        "inset-inline": {
     2621            "codegen-properties": {
     2622                "runtime-flag": "cssLogical",
     2623                "longhands": [
     2624                    "inset-inline-start",
     2625                    "inset-inline-end"
     2626                ]
     2627            },
     2628            "specification": {
     2629                "category": "css-logical-props",
     2630                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2631            }
     2632        },
     2633        "inset-inline-end": {
     2634            "codegen-properties": {
     2635                "runtime-flag": "cssLogical",
     2636                "skip-builder": true
     2637            },
     2638            "specification": {
     2639                "category": "css-logical-props",
     2640                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2641            }
     2642        },
     2643        "inset-inline-start": {
     2644            "codegen-properties": {
     2645                "runtime-flag": "cssLogical",
     2646                "skip-builder": true
     2647            },
     2648            "specification": {
     2649                "category": "css-logical-props",
     2650                "url": "https://www.w3.org/TR/css-logical/#inset-properties"
     2651            }
     2652        },
    25722653        "kerning": {
    25732654            "inherited": true,
  • trunk/Source/WebCore/css/CSSProperty.cpp

    r234798 r240334  
    7777{
    7878    switch (propertyID) {
     79    case CSSPropertyInsetInlineEnd:
     80        return resolveToPhysicalProperty(direction, writingMode, LogicalBoxSide::End, insetShorthand());
     81    case CSSPropertyInsetInlineStart:
     82        return resolveToPhysicalProperty(direction, writingMode, LogicalBoxSide::Start, insetShorthand());
     83    case CSSPropertyInsetBlockStart:
     84        return resolveToPhysicalProperty(direction, writingMode, LogicalBoxSide::Before, insetShorthand());
     85    case CSSPropertyInsetBlockEnd:
     86        return resolveToPhysicalProperty(direction, writingMode, LogicalBoxSide::After, insetShorthand());
    7987    case CSSPropertyMarginInlineEnd:
    8088        return resolveToPhysicalProperty(direction, writingMode, LogicalBoxSide::End, marginShorthand());
     
    187195    case CSSPropertyBorderBlockEndStyle:
    188196    case CSSPropertyBorderBlockEndWidth:
     197    case CSSPropertyInsetInlineEnd:
     198    case CSSPropertyInsetInlineStart:
     199    case CSSPropertyInsetBlockStart:
     200    case CSSPropertyInsetBlockEnd:
    189201    case CSSPropertyMarginInlineEnd:
    190202    case CSSPropertyMarginInlineStart:
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r240310 r240334  
    218218    case CSSPropertyFont:
    219219        return fontValue();
     220    case CSSPropertyInset:
     221        return get4Values(insetShorthand());
     222    case CSSPropertyInsetBlock:
     223        return get2Values(insetBlockShorthand());
     224    case CSSPropertyInsetInline:
     225        return get2Values(insetInlineShorthand());
    220226    case CSSPropertyMargin:
    221227        return get4Values(marginShorthand());
     
    10871093                // Don't use CSSPropertyFont because old UAs can't recognize them but are important for editing.
    10881094                break;
     1095            case CSSPropertyTop:
     1096            case CSSPropertyRight:
     1097            case CSSPropertyBottom:
     1098            case CSSPropertyLeft:
     1099                shorthandPropertyID = CSSPropertyInset;
     1100                break;
     1101            case CSSPropertyInsetBlockStart:
     1102            case CSSPropertyInsetBlockEnd:
     1103                shorthandPropertyID = CSSPropertyInsetBlock;
     1104                break;
     1105            case CSSPropertyInsetInlineStart:
     1106            case CSSPropertyInsetInlineEnd:
     1107                shorthandPropertyID = CSSPropertyInsetInline;
     1108                break;
    10891109            case CSSPropertyListStyleType:
    10901110            case CSSPropertyListStylePosition:
  • trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r239978 r240334  
    7171    case CSSPropertyCy:
    7272    case CSSPropertyLeft:
     73    case CSSPropertyInsetBlockEnd:
     74    case CSSPropertyInsetBlockStart:
     75    case CSSPropertyInsetInlineEnd:
     76    case CSSPropertyInsetInlineStart:
    7377    case CSSPropertyMarginBottom:
    7478    case CSSPropertyMarginLeft:
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r240251 r240334  
    40024002    case CSSPropertyTop:
    40034003        return consumeMarginOrOffset(m_range, m_context.mode, UnitlessQuirk::Allow);
     4004    case CSSPropertyInsetInlineStart:
     4005    case CSSPropertyInsetInlineEnd:
     4006    case CSSPropertyInsetBlockStart:
     4007    case CSSPropertyInsetBlockEnd:
    40044008    case CSSPropertyMarginInlineStart:
    40054009    case CSSPropertyMarginInlineEnd:
     
    57485752        // of -webkit-text-decoration completely.
    57495753        return consumeShorthandGreedily(webkitTextDecorationShorthand(), important);
     5754    case CSSPropertyInset:
     5755        return consume4ValueShorthand(insetShorthand(), important);
     5756    case CSSPropertyInsetBlock:
     5757        return consume2ValueShorthand(insetBlockShorthand(), important);
     5758    case CSSPropertyInsetInline:
     5759        return consume2ValueShorthand(insetInlineShorthand(), important);
    57505760    case CSSPropertyMargin:
    57515761        return consume4ValueShorthand(marginShorthand(), important);
Note: See TracChangeset for help on using the changeset viewer.