mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove parsing for display:block/inline-block.
The default is now column flexboxes, which are almost the same as blocks. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1060223002
This commit is contained in:
parent
88f38ce0e6
commit
970f42b8d7
@ -867,12 +867,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
|
||||
case PARAGRAPH:
|
||||
m_value.valueID = CSSValueParagraph;
|
||||
break;
|
||||
case BLOCK:
|
||||
m_value.valueID = CSSValueBlock;
|
||||
break;
|
||||
case INLINE_BLOCK:
|
||||
m_value.valueID = CSSValueInlineBlock;
|
||||
break;
|
||||
case FLEX:
|
||||
m_value.valueID = CSSValueFlex;
|
||||
break;
|
||||
|
||||
@ -262,8 +262,6 @@ inline
|
||||
// Contains only inline content.
|
||||
paragraph
|
||||
// Contains only block content.
|
||||
block
|
||||
inline-block
|
||||
flex
|
||||
inline-flex
|
||||
//none
|
||||
@ -667,6 +665,7 @@ upright
|
||||
vertical-right
|
||||
|
||||
// -webkit-line-box-contain
|
||||
block
|
||||
font
|
||||
glyphs
|
||||
inline-box
|
||||
|
||||
@ -48,15 +48,11 @@ static EDisplay equivalentInlineDisplay(EDisplay display)
|
||||
case PARAGRAPH:
|
||||
return INLINE;
|
||||
|
||||
case BLOCK:
|
||||
return INLINE_BLOCK;
|
||||
|
||||
case FLEX:
|
||||
return INLINE_FLEX;
|
||||
|
||||
case INLINE:
|
||||
case INLINE_FLEX:
|
||||
case INLINE_BLOCK:
|
||||
return display;
|
||||
|
||||
case NONE:
|
||||
@ -72,17 +68,13 @@ static EDisplay equivalentBlockDisplay(EDisplay display)
|
||||
{
|
||||
switch (display) {
|
||||
case PARAGRAPH:
|
||||
case BLOCK:
|
||||
case FLEX:
|
||||
return display;
|
||||
|
||||
case INLINE:
|
||||
case INLINE_FLEX:
|
||||
return FLEX;
|
||||
|
||||
case INLINE:
|
||||
case INLINE_BLOCK:
|
||||
return BLOCK;
|
||||
|
||||
case NONE:
|
||||
ASSERT_NOT_REACHED();
|
||||
return NONE;
|
||||
@ -97,7 +89,7 @@ static EDisplay equivalentBlockDisplay(EDisplay display)
|
||||
// and absolute or relatively positioned elements.
|
||||
static bool doesNotInheritTextDecoration(const RenderStyle* style, const Element& e)
|
||||
{
|
||||
return style->display() == INLINE_BLOCK || isAtShadowBoundary(&e) || style->hasOutOfFlowPosition();
|
||||
return isAtShadowBoundary(&e) || style->hasOutOfFlowPosition();
|
||||
}
|
||||
|
||||
static bool parentStyleForcesZIndexToCreateStackingContext(const RenderStyle* parentStyle)
|
||||
|
||||
@ -172,7 +172,7 @@ void StyleResolver::matchRules(Element& element, ElementRuleCollector& collector
|
||||
PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document& document)
|
||||
{
|
||||
RefPtr<RenderStyle> documentStyle = RenderStyle::create();
|
||||
documentStyle->setDisplay(BLOCK);
|
||||
documentStyle->setDisplay(FLEX);
|
||||
documentStyle->setRTLOrdering(LogicalOrder);
|
||||
documentStyle->setLocale(document.contentLanguage());
|
||||
documentStyle->setZIndex(0);
|
||||
|
||||
@ -125,9 +125,6 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
|
||||
return 0;
|
||||
case INLINE:
|
||||
return new RenderInline(element);
|
||||
case BLOCK:
|
||||
case INLINE_BLOCK:
|
||||
return new RenderBlockFlow(element);
|
||||
case PARAGRAPH:
|
||||
return new RenderParagraph(element);
|
||||
case FLEX:
|
||||
|
||||
@ -234,10 +234,8 @@ bool RenderStyle::requiresOnlyBlockChildren()
|
||||
case INLINE:
|
||||
return false;
|
||||
|
||||
case BLOCK:
|
||||
case FLEX:
|
||||
case INLINE_FLEX:
|
||||
case INLINE_BLOCK:
|
||||
return true;
|
||||
|
||||
case NONE:
|
||||
|
||||
@ -1261,7 +1261,7 @@ private:
|
||||
|
||||
bool isDisplayReplacedType(EDisplay display) const
|
||||
{
|
||||
return display == INLINE_BLOCK || display == INLINE_FLEX;
|
||||
return display == INLINE_FLEX;
|
||||
}
|
||||
|
||||
bool isDisplayInlineType(EDisplay display) const
|
||||
|
||||
@ -341,7 +341,6 @@ enum ECursor {
|
||||
// The order of this enum must match the order of the display values in CSSValueKeywords.in.
|
||||
enum EDisplay {
|
||||
INLINE, PARAGRAPH,
|
||||
BLOCK, INLINE_BLOCK,
|
||||
FLEX, INLINE_FLEX,
|
||||
NONE,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user