WebKit Bugzilla
Attachment 372616 Details for
Bug 199100
: [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199100-20190620212642.patch (text/plain), 6.25 KB, created by
zalan
on 2019-06-20 21:26:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-20 21:26:43 PDT
Size:
6.25 KB
patch
obsolete
>Subversion Revision: 246633 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 47eaa037740a8073e2ad29ac5767ca3f31780519..4dc5b3c5e78794259f90db3aa257147c84a2009a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-20 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight >+ https://bugs.webkit.org/show_bug.cgi?id=199100 >+ <rdar://problem/51973614> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2019-06-20 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Adjust baseline top when the baseline moves. >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.cpp b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >index f3a89cc812795d60a857566c702ded8bfec59d11..95973c10189b4142310f5448237c487260a70faa 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >@@ -50,7 +50,7 @@ Line::Line(const LayoutState& layoutState, const InitialConstraints& initialCons > , m_logicalTopLeft(initialConstraints.topLeft) > , m_baseline({ initialConstraints.heightAndBaseline.baselineOffset, initialConstraints.heightAndBaseline.height - initialConstraints.heightAndBaseline.baselineOffset }) > , m_initialStrut(initialConstraints.heightAndBaseline.strut) >- , m_contentLogicalHeight(initialConstraints.heightAndBaseline.height) >+ , m_lineLogicalHeight(initialConstraints.heightAndBaseline.height) > , m_lineLogicalWidth(initialConstraints.availableWidth) > , m_skipVerticalAligment(skipVerticalAligment == SkipVerticalAligment::Yes) > { >@@ -91,12 +91,12 @@ std::unique_ptr<Line::Content> Line::close() > if (isVisuallyEmpty()) { > m_baseline = { }; > m_baselineTop = { }; >- m_contentLogicalHeight = { }; >+ m_lineLogicalHeight = { }; > } > > // Remove descent when all content is baseline aligned but none of them have descent. > if (InlineFormattingContext::Quirks::lineDescentNeedsCollapsing(m_layoutState, *m_content)) { >- m_contentLogicalHeight -= m_baseline.descent; >+ m_lineLogicalHeight -= m_baseline.descent; > m_baseline.descent = { }; > } > >@@ -320,7 +320,7 @@ void Line::adjustBaselineAndLineHeight(const InlineItem& inlineItem, LayoutUnit > m_baseline.descent = std::max(m_baseline.descent, halfLeading.descent); > if (halfLeading.ascent > 0) > m_baseline.ascent = std::max(m_baseline.ascent, halfLeading.ascent); >- m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); >+ m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height()); > return; > } > // Apply initial strut if needed. >@@ -329,7 +329,7 @@ void Line::adjustBaselineAndLineHeight(const InlineItem& inlineItem, LayoutUnit > return; > m_baseline.ascent = std::max(m_initialStrut->ascent, m_baseline.ascent); > m_baseline.descent = std::max(m_initialStrut->descent, m_baseline.descent); >- m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); >+ m_lineLogicalHeight = std::max(m_lineLogicalHeight, m_baseline.height()); > m_initialStrut = { }; > return; > } >@@ -346,20 +346,20 @@ void Line::adjustBaselineAndLineHeight(const InlineItem& inlineItem, LayoutUnit > } > m_baseline.ascent = std::max(newBaselineCandidate.ascent, m_baseline.ascent); > m_baseline.descent = std::max(newBaselineCandidate.descent, m_baseline.descent); >- m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), m_baseline.height()); >+ m_lineLogicalHeight = std::max(std::max(m_lineLogicalHeight, runHeight), m_baseline.height()); > // Baseline ascent/descent never shrink -> max. >- m_baselineTop = std::max(m_baselineTop, m_contentLogicalHeight - m_baseline.height()); >+ m_baselineTop = std::max(m_baselineTop, m_lineLogicalHeight - m_baseline.height()); > break; > } > case VerticalAlign::Top: > // Top align content never changes the baseline offset, it only pushes the bottom of the line further down. >- m_contentLogicalHeight = std::max(runHeight, m_contentLogicalHeight); >+ m_lineLogicalHeight = std::max(runHeight, m_lineLogicalHeight); > break; > case VerticalAlign::Bottom: > // Bottom aligned, tall content pushes the baseline further down from the line top. >- if (runHeight > m_contentLogicalHeight) { >- m_baselineTop += (runHeight - m_contentLogicalHeight); >- m_contentLogicalHeight = runHeight; >+ if (runHeight > m_lineLogicalHeight) { >+ m_baselineTop += (runHeight - m_lineLogicalHeight); >+ m_lineLogicalHeight = runHeight; > } > break; > default: >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.h b/Source/WebCore/layout/inlineformatting/InlineLine.h >index 2a5eb0d307919234e17746a6d8b0f53eb6bc30eb..cb69abb25748bfd1aaa51d5bd97dfcd58b438950 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.h >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.h >@@ -115,7 +115,7 @@ private: > LayoutUnit logicalRight() const { return logicalLeft() + logicalWidth(); } > > LayoutUnit logicalWidth() const { return m_lineLogicalWidth; } >- LayoutUnit logicalHeight() const { return m_contentLogicalHeight; } >+ LayoutUnit logicalHeight() const { return m_lineLogicalHeight; } > > LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; } > LayoutUnit baselineOffset() const { return m_baseline.ascent + m_baselineTop; } >@@ -145,7 +145,7 @@ private: > LayoutUnit m_baselineTop; > > Optional<LineBox::Baseline> m_initialStrut; >- LayoutUnit m_contentLogicalHeight; >+ LayoutUnit m_lineLogicalHeight; > LayoutUnit m_lineLogicalWidth; > bool m_skipVerticalAligment { false }; > };
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
Flags:
koivisto
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199100
: 372616