WebKit Bugzilla
Attachment 369909 Details for
Bug 165603
: Implement CSS `display: flow-root` (modern clearfix)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-165603-20190515084915.patch (text/plain), 9.82 KB, created by
Joonghun Park
on 2019-05-14 16:49:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Joonghun Park
Created:
2019-05-14 16:49:16 PDT
Size:
9.82 KB
patch
obsolete
>Subversion Revision: 245276 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4f30011f7392fb21807f61acbdaa5e085853df89..68479c118a3e0ea455b67691417b2d71d4ca141a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2019-05-14 Joonghun Park <pjh0718@gmail.com> >+ >+ Implement CSS `display: flow-root` (modern clearfix) >+ https://bugs.webkit.org/show_bug.cgi?id=165603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * 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: >+ > 2019-05-14 Joonghun Park <pjh0718@gmail.com> > > Implement page-break-* and -webkit-column-break-* as legacy-shorthands. >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index eafa215585124fc48807022fe0541ed3c2d3ad7e..8ec30f95585e2919ee7424fa24a6c9bbb410ffe4 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-14 Joonghun Park <pjh0718@gmail.com> >+ >+ Implement CSS `display: flow-root` (modern clearfix) >+ https://bugs.webkit.org/show_bug.cgi?id=165603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * UserInterface/External/CodeMirror/css.js: >+ > 2019-05-09 Devin Rousso <drousso@apple.com> > > Web Inspector: Uncaught Exception: null is not an object (evaluating 'resource.parentFrame.securityOrigin') >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index f608cfe137820d23700f0f03c7b56d79e147b019..9d120ca5e823c5a2c2092259d0a80da093b6d353 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -1409,6 +1409,9 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(DisplayType e) > case DisplayType::Contents: > m_value.valueID = CSSValueContents; > break; >+ case DisplayType::FlowRoot: >+ m_value.valueID = CSSValueFlowRoot; >+ break; > } > } > >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 5afe356e0b03d27378f146e8b27b263a89dadc82..e9192d3304bc819b1dcf21080a257818f7b3feb1 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -454,6 +454,7 @@ inline-flex > contents > grid > inline-grid >+flow-root > //none > // > // CSS_PROP_CURSOR: >diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp >index 2da5ec114c4b8a371342b52503407e1273a096bb..4e8113f5cdc195e9c897edb2221baa94077ef6ed 100644 >--- a/Source/WebCore/css/StyleResolver.cpp >+++ b/Source/WebCore/css/StyleResolver.cpp >@@ -696,6 +696,7 @@ static DisplayType equivalentBlockDisplay(const RenderStyle& style, const Docume > case DisplayType::Flex: > case DisplayType::WebKitFlex: > case DisplayType::Grid: >+ case DisplayType::FlowRoot: > return display; > > case DisplayType::ListItem: >diff --git a/Source/WebCore/css/parser/CSSParserFastPaths.cpp b/Source/WebCore/css/parser/CSSParserFastPaths.cpp >index a0a0e31990825060d9bbc10a8b748256f35ddb24..a20176528da1099f190c02dd9fdc98b308fa2cf3 100644 >--- a/Source/WebCore/css/parser/CSSParserFastPaths.cpp >+++ b/Source/WebCore/css/parser/CSSParserFastPaths.cpp >@@ -577,7 +577,7 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId > // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none > // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inline-grid > return (valueID >= CSSValueInline && valueID <= CSSValueContents) || valueID == CSSValueNone >- || valueID == CSSValueGrid || valueID == CSSValueInlineGrid; >+ || valueID == CSSValueGrid || valueID == CSSValueInlineGrid || valueID == CSSValueFlowRoot; > case CSSPropertyDominantBaseline: > // auto | use-script | no-change | reset-size | ideographic | > // alphabetic | hanging | mathematical | central | middle | >diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp >index b6bb7e1d3ce6ad0f138b1abc8f76d7572b9568f6..de2fe374089e2c583142c22129724fbb40fd32ea 100644 >--- a/Source/WebCore/rendering/RenderBox.cpp >+++ b/Source/WebCore/rendering/RenderBox.cpp >@@ -4510,7 +4510,7 @@ bool RenderBox::createsNewFormattingContext() const > { > return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() > || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFragmentedFlow() || isRenderFragmentContainer() >- || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All; >+ || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All || style().display() == DisplayType::FlowRoot; > } > > bool RenderBox::avoidsFloats() const >diff --git a/Source/WebCore/rendering/RenderElement.cpp b/Source/WebCore/rendering/RenderElement.cpp >index 1a40fb268fa305408ec3b5c9f8c6aa2018fb88b1..6ee67c52b9f3f69df0da832346532cd3b0ffb96d 100644 >--- a/Source/WebCore/rendering/RenderElement.cpp >+++ b/Source/WebCore/rendering/RenderElement.cpp >@@ -158,6 +158,7 @@ RenderPtr<RenderElement> RenderElement::createFor(Element& element, RenderStyle& > return createRenderer<RenderInline>(element, WTFMove(style)); > FALLTHROUGH; // Fieldsets should make a block flow if display:inline is set. > case DisplayType::Block: >+ case DisplayType::FlowRoot: > case DisplayType::InlineBlock: > case DisplayType::Compact: > return createRenderer<RenderBlockFlow>(element, WTFMove(style)); >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index 64e3ce9547fdf92b9444033a42b18ee6e56f8d1b..6d6ffbe5917b3f52b09dcf82dbd4ede741ecf8be 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -876,6 +876,7 @@ enum class DisplayType : uint8_t { > Contents, > Grid, > InlineGrid, >+ FlowRoot, > None > }; > >diff --git a/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js b/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js >index 3eb22500a16ca3dccec50737209df6c82d0deecf..c4ee448783e52b7c2d7172c1b37faa0d1c388058 100644 >--- a/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js >+++ b/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js >@@ -614,7 +614,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { > "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", > "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", > "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed", >- "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", >+ "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "flow-root", "footnotes", > "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove", > "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew", > "help", "hidden", "hide", "higher", "highlight", "highlighttext", >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 563df330f745c2a9a1608145b76b2c68c5cd7284..73f6234a893e825731d99d5038a05a47a955d74a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-14 Joonghun Park <pjh0718@gmail.com> >+ >+ Implement CSS `display: flow-root` (modern clearfix) >+ https://bugs.webkit.org/show_bug.cgi?id=165603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ >+ * TestExpectations: >+ > 2019-05-14 Javier Fernandez <jfernandez@igalia.com> > > Implement "line-break: anywhere" >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index b17e22e3f7875dc804f69494fc29db7ab501673b..9f82fbe9aac817b7d131cd59e0314cf13208c83d 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2002,7 +2002,6 @@ webkit.org/b/197430 imported/w3c/web-platform-tests/css/css-text/word-break/word > ### START OF display: contents failures > > webkit.org/b/157477 imported/w3c/web-platform-tests/css/css-display/display-contents-dynamic-table-001-inline.html [ ImageOnlyFailure ] >-webkit.org/b/157477 imported/w3c/web-platform-tests/css/css-display/display-flow-root-001.html [ ImageOnlyFailure ] > > ### END OF display: contents failures > ########################################
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 165603
: 369909