WebKit Bugzilla
Attachment 372200 Details for
Bug 198892
: [LFC][IFC] Remove Line::Content::isVisuallyEmpty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198892-20190615153757.patch (text/plain), 5.33 KB, created by
zalan
on 2019-06-15 15:37:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-06-15 15:37:57 PDT
Size:
5.33 KB
patch
obsolete
>Subversion Revision: 246468 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5e48abc2f0d7b3a0a906254d422b9ed09b014b9b..7fdbd5426597153eb5d3f4ddd9cd7b87b24aa79b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2019-06-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][IFC] Remove Line::Content::isVisuallyEmpty >+ https://bugs.webkit.org/show_bug.cgi?id=198892 >+ <rdar://problem/51780345> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Instead of setting the isVisuallyEmpty flag, reset the line height to 0. >+ >+ * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: >+ (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const): >+ * layout/inlineformatting/InlineLine.cpp: >+ (WebCore::Layout::Line::close): >+ * layout/inlineformatting/InlineLine.h: >+ (WebCore::Layout::Line::Content::isEmpty const): >+ (WebCore::Layout::Line::Content::setBaseline): >+ (WebCore::Layout::Line::Content::isVisuallyEmpty const): Deleted. >+ (WebCore::Layout::Line::Content::setIsVisuallyEmpty): Deleted. >+ > 2019-06-15 Zalan Bujtas <zalan@apple.com> > > [LFC][IFC] Intruding float may prevent adding any inline box >diff --git a/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp b/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp >index a08ac41af105500c8ca4c25c4f95b299cbfa5fed..e7400811ba37b7e9615ad4c9b606d763a6b8c640 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp >@@ -325,7 +325,7 @@ void InlineFormattingContext::LineLayout::createDisplayRuns(const Line::Content& > // A line box is always tall enough for all of the boxes it contains. > > // Ignore the initial strut. >- auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, !lineContent.isVisuallyEmpty() ? lineContent.logicalHeight() : LayoutUnit { } }; >+ auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()}; > // Create final display runs. > auto& lineRuns = lineContent.runs(); > for (unsigned index = 0; index < lineRuns.size(); ++index) { >@@ -407,8 +407,7 @@ void InlineFormattingContext::LineLayout::createDisplayRuns(const Line::Content& > } > // FIXME linebox needs to be ajusted after content alignment. > m_formattingState.addLineBox({ lineBox, lineContent.baseline() }); >- if (!lineContent.isVisuallyEmpty()) >- alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth()); >+ alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth()); > } > > static Optional<LayoutUnit> horizontalAdjustmentForAlignment(TextAlignMode align, LayoutUnit remainingWidth) >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.cpp b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >index 191f153c3193044a517c09afee4504a90e270a18..58f94c6a0913815ce62004611a63e92efca77edc 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >@@ -86,6 +86,11 @@ std::unique_ptr<Line::Content> Line::close() > { > removeTrailingTrimmableContent(); > if (!m_skipVerticalAligment) { >+ if (isVisuallyEmpty()) { >+ m_baseline = { }; >+ m_contentLogicalHeight = { }; >+ } >+ > for (auto& run : m_content->runs()) { > LayoutUnit logicalTop; > auto& inlineItem = run->inlineItem; >@@ -121,7 +126,6 @@ std::unique_ptr<Line::Content> Line::close() > run->logicalRect.setTop(logicalTop); > } > } >- m_content->setIsVisuallyEmpty(isVisuallyEmpty()); > m_content->setLogicalRect({ logicalTop(), logicalLeft(), contentLogicalWidth(), logicalHeight() }); > m_content->setBaseline(m_baseline); > return WTFMove(m_content); >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.h b/Source/WebCore/layout/inlineformatting/InlineLine.h >index 95d2566962c226516ce7e25e10bf2e39678a2f84..7bb65f2330d457fc29a719692d8bbc3a57737607 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.h >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.h >@@ -60,8 +60,6 @@ public: > using Runs = Vector<std::unique_ptr<Run>>; > const Runs& runs() const { return m_runs; } > bool isEmpty() const { return m_runs.isEmpty(); } >- // Not in painting sense though. >- bool isVisuallyEmpty() const { return m_isVisuallyEmpty; } > > LayoutUnit logicalTop() const { return m_logicalRect.top(); } > LayoutUnit logicalLeft() const { return m_logicalRect.left(); } >@@ -76,13 +74,11 @@ public: > > void setLogicalRect(const Display::Rect& logicalRect) { m_logicalRect = logicalRect; } > void setBaseline(LineBox::Baseline baseline) { m_baseline = baseline; } >- void setIsVisuallyEmpty(bool isVisuallyEmpty) { m_isVisuallyEmpty = isVisuallyEmpty; } > Runs& runs() { return m_runs; } > > Display::Rect m_logicalRect; > LineBox::Baseline m_baseline; > Runs m_runs; >- bool m_isVisuallyEmpty { true }; > }; > std::unique_ptr<Content> close(); >
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 198892
: 372200