Changeset 246679 in webkit


Ignore:
Timestamp:
Jun 21, 2019 8:43:17 AM (5 years ago)
Author:
Alan Bujtas
Message:

[LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
https://bugs.webkit.org/show_bug.cgi?id=199100
<rdar://problem/51973614>

Reviewed by Antti Koivisto.

m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::close):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::logicalHeight const):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246678 r246679  
     12019-06-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
     4        https://bugs.webkit.org/show_bug.cgi?id=199100
     5        <rdar://problem/51973614>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).
     10
     11        * layout/inlineformatting/InlineLine.cpp:
     12        (WebCore::Layout::Line::close):
     13        (WebCore::Layout::Line::adjustBaselineAndLineHeight):
     14        * layout/inlineformatting/InlineLine.h:
     15        (WebCore::Layout::Line::logicalHeight const):
     16
    1172019-06-21  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp

    r246678 r246679  
    5151    , m_baseline({ initialConstraints.heightAndBaseline.baselineOffset, initialConstraints.heightAndBaseline.height - initialConstraints.heightAndBaseline.baselineOffset })
    5252    , m_initialStrut(initialConstraints.heightAndBaseline.strut)
    53     , m_contentLogicalHeight(initialConstraints.heightAndBaseline.height)
     53    , m_lineLogicalHeight(initialConstraints.heightAndBaseline.height)
    5454    , m_lineLogicalWidth(initialConstraints.availableWidth)
    5555    , m_skipVerticalAligment(skipVerticalAligment == SkipVerticalAligment::Yes)
     
    9292            m_baseline = { };
    9393            m_baselineTop = { };
    94             m_contentLogicalHeight = { };
     94            m_lineLogicalHeight = { };
    9595        }
    9696
    9797        // Remove descent when all content is baseline aligned but none of them have descent.
    9898        if (InlineFormattingContext::Quirks::lineDescentNeedsCollapsing(m_layoutState, *m_content)) {
    99             m_contentLogicalHeight -= m_baseline.descent;
     99            m_lineLogicalHeight -= m_baseline.descent;
    100100            m_baseline.descent = { };
    101101        }
     
    320320        if (halfLeading.ascent > 0)
    321321            m_baseline.ascent = std::max(m_baseline.ascent, halfLeading.ascent);
    322         m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
     322        m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
    323323        return;
    324324    }
     
    329329        m_baseline.ascent = std::max(m_initialStrut->ascent, m_baseline.ascent);
    330330        m_baseline.descent = std::max(m_initialStrut->descent, m_baseline.descent);
    331         m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
     331        m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
    332332        m_initialStrut = { };
    333333        return;
     
    344344            m_baseline.descent = std::max(inlineBlockBaseline.descent, m_baseline.descent);
    345345            m_baseline.ascent = std::max(inlineBlockBaseline.ascent, m_baseline.ascent);
    346             m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), m_baseline.height());
     346            m_lineLogicalHeight = std::max(std::max(m_lineLogicalHeight, runHeight), m_baseline.height());
    347347            break;
    348348        }
    349349        m_baseline.descent = std::max<LayoutUnit>(0, m_baseline.descent);
    350350        m_baseline.ascent = std::max(runHeight, m_baseline.ascent);
    351         m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height());
     351        m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height());
    352352        break;
    353353    case VerticalAlign::Top:
    354354        // Top align content never changes the baseline offset, it only pushes the bottom of the line further down.
    355         m_contentLogicalHeight = std::max(runHeight, m_contentLogicalHeight);
     355        m_lineLogicalHeight = std::max(runHeight, m_lineLogicalHeight);
    356356        break;
    357357    case VerticalAlign::Bottom:
    358         if (m_contentLogicalHeight < runHeight) {
    359             m_baselineTop += runHeight - m_contentLogicalHeight;
    360             m_contentLogicalHeight = runHeight;
     358        if (m_lineLogicalHeight < runHeight) {
     359            m_baselineTop += runHeight - m_lineLogicalHeight;
     360            m_lineLogicalHeight = runHeight;
    361361        }
    362362        break;
  • trunk/Source/WebCore/layout/inlineformatting/InlineLine.h

    r246678 r246679  
    116116
    117117    LayoutUnit logicalWidth() const { return m_lineLogicalWidth; }
    118     LayoutUnit logicalHeight() const { return m_contentLogicalHeight; }
     118    LayoutUnit logicalHeight() const { return m_lineLogicalHeight; }
    119119
    120120    LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; }
     
    146146
    147147    Optional<LineBox::Baseline> m_initialStrut;
    148     LayoutUnit m_contentLogicalHeight;
     148    LayoutUnit m_lineLogicalHeight;
    149149    LayoutUnit m_lineLogicalWidth;
    150150    bool m_skipVerticalAligment { false };
Note: See TracChangeset for help on using the changeset viewer.