WebKit Bugzilla
Attachment 372602 Details for
Bug 199092
: [LFC][IFC] LineBox::Baseline should have a height getter.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199092-20190620170642.patch (text/plain), 4.92 KB, created by
zalan
on 2019-06-20 17:06:43 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-20 17:06:43 PDT
Size:
4.92 KB
patch
obsolete
>Subversion Revision: 246633 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e62420cbdc90ed1a7fed9b099970da9397b2a81a..d69fa0a5d008c9a708453d03d121a175d96ff417 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-06-20 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][IFC] LineBox::Baseline should have a height getter. >+ https://bugs.webkit.org/show_bug.cgi?id=199092 >+ <rdar://problem/51966958> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The baseline height does not need to be a getter on the Line (no one calls it). >+ >+ * layout/inlineformatting/InlineLine.cpp: >+ (WebCore::Layout::Line::adjustBaselineAndLineHeight): >+ * layout/inlineformatting/InlineLine.h: >+ (WebCore::Layout::Line::contentLogicalWidth const): >+ (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted. >+ * layout/inlineformatting/InlineLineBox.h: >+ (WebCore::Layout::LineBox::Baseline::height const): >+ > 2019-06-20 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Make the initial strut explicit >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.cpp b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >index c0cd5da060038e760f4f6feaccb1b58ecb5ddb12..1389c3471d7ef31d0d25231d53703a33b89378fd 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >@@ -319,7 +319,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, baselineAlignedContentHeight()); >+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); > return; > } > // Apply initial strut if needed. >@@ -328,7 +328,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, baselineAlignedContentHeight()); >+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, m_baseline.height()); > m_initialStrut = { }; > return; > } >@@ -343,12 +343,12 @@ void Line::adjustBaselineAndLineHeight(const InlineItem& inlineItem, LayoutUnit > auto inlineBlockBaseline = formattingState.lineBoxes().last().baseline(); > m_baseline.descent = std::max(inlineBlockBaseline.descent, m_baseline.descent); > m_baseline.ascent = std::max(inlineBlockBaseline.ascent, m_baseline.ascent); >- m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), baselineAlignedContentHeight()); >+ m_contentLogicalHeight = std::max(std::max(m_contentLogicalHeight, runHeight), m_baseline.height()); > break; > } > m_baseline.descent = std::max<LayoutUnit>(0, m_baseline.descent); > m_baseline.ascent = std::max(runHeight, m_baseline.ascent); >- m_contentLogicalHeight = std::max(m_contentLogicalHeight, baselineAlignedContentHeight()); >+ m_contentLogicalHeight = std::max(m_contentLogicalHeight, 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. >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.h b/Source/WebCore/layout/inlineformatting/InlineLine.h >index 08f908a2144dbfe603ae49203ddf1845a5723c58..2a5eb0d307919234e17746a6d8b0f53eb6bc30eb 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.h >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.h >@@ -118,7 +118,6 @@ private: > LayoutUnit logicalHeight() const { return m_contentLogicalHeight; } > > LayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; } >- LayoutUnit baselineAlignedContentHeight() const { return m_baseline.ascent + m_baseline.descent; } > LayoutUnit baselineOffset() const { return m_baseline.ascent + m_baselineTop; } > > void appendNonBreakableSpace(const InlineItem&, const Display::Rect& logicalRect); >diff --git a/Source/WebCore/layout/inlineformatting/InlineLineBox.h b/Source/WebCore/layout/inlineformatting/InlineLineBox.h >index ec3403143b0e6b22d41f70bbd266af108bc13c63..96a74f53cc168515518e00313047c6660f0f2779 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLineBox.h >+++ b/Source/WebCore/layout/inlineformatting/InlineLineBox.h >@@ -35,6 +35,8 @@ namespace Layout { > class LineBox { > public: > struct Baseline { >+ LayoutUnit height() const { return ascent + descent; } >+ > LayoutUnit ascent; > LayoutUnit descent; > };
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 199092
: 372602