Changeset 245494 in webkit


Ignore:
Timestamp:
May 17, 2019 9:29:48 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Implement CSS display: flow-root (modern clearfix)
https://bugs.webkit.org/show_bug.cgi?id=165603

Patch by Joonghun Park <pjh0718@gmail.com> on 2019-05-17
Reviewed by Zalan Bujtas.

This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.

'display: flow-root' generates a block container box, and lays out its contents using flow layout.
It always establishes a new block formatting context for its contents.

Source/WebCore:

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSValueKeywords.in:
  • css/StyleResolver.cpp:

(WebCore::equivalentBlockDisplay):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::createsNewFormattingContext const):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor):

  • rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

  • UserInterface/External/CodeMirror/css.js:

LayoutTests:

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245490 r245494  
     12019-05-17  Joonghun Park  <pjh0718@gmail.com>
     2
     3        Implement CSS `display: flow-root` (modern clearfix)
     4        https://bugs.webkit.org/show_bug.cgi?id=165603
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.
     9
     10        'display: flow-root' generates a block container box, and lays out its contents using flow layout.
     11        It always establishes a new block formatting context for its contents.
     12
     13        * TestExpectations:
     14
    1152019-05-17  Antoine Quint  <graouts@apple.com>
    216
  • trunk/LayoutTests/TestExpectations

    r245366 r245494  
    20072007
    20082008webkit.org/b/157477 imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-table-001-inline.html [ ImageOnlyFailure ]
    2009 webkit.org/b/157477 imported/w3c/web-platform-tests/css/css-display/display-flow-root-001.html [ ImageOnlyFailure ]
    20102009
    20112010### END OF display: contents failures
  • trunk/Source/WebCore/ChangeLog

    r245492 r245494  
     12019-05-17  Joonghun Park  <pjh0718@gmail.com>
     2
     3        Implement CSS `display: flow-root` (modern clearfix)
     4        https://bugs.webkit.org/show_bug.cgi?id=165603
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.
     9
     10        'display: flow-root' generates a block container box, and lays out its contents using flow layout.
     11        It always establishes a new block formatting context for its contents.
     12
     13        * css/CSSPrimitiveValueMappings.h:
     14        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     15        * css/CSSValueKeywords.in:
     16        * css/StyleResolver.cpp:
     17        (WebCore::equivalentBlockDisplay):
     18        * css/parser/CSSParserFastPaths.cpp:
     19        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     20        * rendering/RenderBox.cpp:
     21        (WebCore::RenderBox::createsNewFormattingContext const):
     22        * rendering/RenderElement.cpp:
     23        (WebCore::RenderElement::createFor):
     24        * rendering/style/RenderStyleConstants.h:
     25
    1262019-05-17  Don Olmstead  <don.olmstead@sony.com>
    227
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r245275 r245494  
    14091409    case DisplayType::Contents:
    14101410        m_value.valueID = CSSValueContents;
     1411        break;
     1412    case DisplayType::FlowRoot:
     1413        m_value.valueID = CSSValueFlowRoot;
    14111414        break;
    14121415    }
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r245275 r245494  
    455455grid
    456456inline-grid
     457flow-root
    457458//none
    458459//
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r244912 r245494  
    697697    case DisplayType::WebKitFlex:
    698698    case DisplayType::Grid:
     699    case DisplayType::FlowRoot:
    699700        return display;
    700701
  • trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r245275 r245494  
    578578        // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inline-grid
    579579        return (valueID >= CSSValueInline && valueID <= CSSValueContents) || valueID == CSSValueNone
    580             || valueID == CSSValueGrid || valueID == CSSValueInlineGrid;
     580            || valueID == CSSValueGrid || valueID == CSSValueInlineGrid || valueID == CSSValueFlowRoot;
    581581    case CSSPropertyDominantBaseline:
    582582        // auto | use-script | no-change | reset-size | ideographic |
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r244906 r245494  
    45114511    return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
    45124512        || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFragmentedFlow() || isRenderFragmentContainer()
    4513         || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All;
     4513        || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All || style().display() == DisplayType::FlowRoot;
    45144514}
    45154515
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r245126 r245494  
    159159        FALLTHROUGH; // Fieldsets should make a block flow if display:inline is set.
    160160    case DisplayType::Block:
     161    case DisplayType::FlowRoot:
    161162    case DisplayType::InlineBlock:
    162163    case DisplayType::Compact:
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r245275 r245494  
    877877    Grid,
    878878    InlineGrid,
     879    FlowRoot,
    879880    None
    880881};
  • trunk/Source/WebInspectorUI/ChangeLog

    r245486 r245494  
     12019-05-17  Joonghun Park  <pjh0718@gmail.com>
     2
     3        Implement CSS `display: flow-root` (modern clearfix)
     4        https://bugs.webkit.org/show_bug.cgi?id=165603
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This change follows https://drafts.csswg.org/css-display-3/#valdef-display-flow-root as below.
     9
     10        'display: flow-root' generates a block container box, and lays out its contents using flow layout.
     11        It always establishes a new block formatting context for its contents.
     12
     13        * UserInterface/External/CodeMirror/css.js:
     14
    1152019-05-17  Ross Kirsling  <ross.kirsling@sony.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js

    r234898 r245494  
    615615    "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
    616616    "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
    617     "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
     617    "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "flow-root", "footnotes",
    618618    "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
    619619    "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
Note: See TracChangeset for help on using the changeset viewer.