Ignore:
Timestamp:
Oct 13, 2019, 9:02:54 AM (6 years ago)
Author:
Simon Fraser
Message:

Convert LineBoxContain to use an OptionSet<>
https://bugs.webkit.org/show_bug.cgi?id=202890

Reviewed by Alex Christensen.

Use OptionSet<LineBoxContain>.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createLineBoxContainValue):

  • css/CSSLineBoxContainValue.cpp:

(WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue):
(WebCore::CSSLineBoxContainValue::customCSSText const):

  • css/CSSLineBoxContainValue.h:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertLineBoxContain):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeLineBoxContain):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::minLineHeightForReplacedRenderer const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::ascentAndDescentForBox const):
(WebCore::RootInlineBox::includeLeadingForBox const):
(WebCore::RootInlineBox::includeFontForBox const):
(WebCore::RootInlineBox::includeGlyphsForBox const):
(WebCore::RootInlineBox::includeInitialLetterForBox const):
(WebCore::RootInlineBox::includeMarginForBox const):
(WebCore::RootInlineBox::fitsToGlyphs const):
(WebCore::RootInlineBox::includesRootLineBoxFontOrLeading const):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::lineBoxContain const):
(WebCore::RenderStyle::setLineBoxContain):
(WebCore::RenderStyle::initialLineBoxContain):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):

  • rendering/style/StyleRareInheritedData.h:
  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::styleForFirstLetter):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSLineBoxContainValue.cpp

    r173217 r251058  
    3131namespace WebCore {
    3232
    33 CSSLineBoxContainValue::CSSLineBoxContainValue(unsigned value)
     33CSSLineBoxContainValue::CSSLineBoxContainValue(OptionSet<LineBoxContain> value)
    3434    : CSSValue(LineBoxContainClass)
    3535    , m_value(value)
     
    4141    StringBuilder text;
    4242
    43     if (m_value & LineBoxContainBlock)
     43    if (m_value.contains(LineBoxContain::Block))
    4444        text.appendLiteral("block");
    45     if (m_value & LineBoxContainInline) {
     45
     46    if (m_value.contains(LineBoxContain::Inline)) {
    4647        if (!text.isEmpty())
    4748            text.append(' ');
    4849        text.appendLiteral("inline");
    4950    }
    50     if (m_value & LineBoxContainFont) {
     51    if (m_value.contains(LineBoxContain::Font)) {
    5152        if (!text.isEmpty())
    5253            text.append(' ');
    5354        text.appendLiteral("font");
    5455    }
    55     if (m_value & LineBoxContainGlyphs) {
     56    if (m_value.contains(LineBoxContain::Glyphs)) {
    5657        if (!text.isEmpty())
    5758            text.append(' ');
    5859        text.appendLiteral("glyphs");
    5960    }
    60     if (m_value & LineBoxContainReplaced) {
     61    if (m_value.contains(LineBoxContain::Replaced)) {
    6162        if (!text.isEmpty())
    6263            text.append(' ');
    6364        text.appendLiteral("replaced");
    6465    }
    65     if (m_value & LineBoxContainInlineBox) {
     66    if (m_value.contains(LineBoxContain::InlineBox)) {
    6667        if (!text.isEmpty())
    6768            text.append(' ');
    6869        text.appendLiteral("inline-box");
    6970    }
    70     if (m_value & LineBoxContainInitialLetter) {
     71    if (m_value.contains(LineBoxContain::InitialLetter)) {
    7172        if (!text.isEmpty())
    7273            text.append(' ');
Note: See TracChangeset for help on using the changeset viewer.