WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
217832
[LFC][IFC] Introduce layout bounds based vertical alignment
https://bugs.webkit.org/show_bug.cgi?id=217832
Summary
[LFC][IFC] Introduce layout bounds based vertical alignment
zalan
Reported
2020-10-16 09:11:25 PDT
https://www.w3.org/TR/css-inline-3/#line-layout
and
https://www.w3.org/TR/css-inline-3/#layout-bounds
Attachments
Patch
(29.01 KB, patch)
2020-10-16 09:15 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(29.81 KB, patch)
2020-10-16 14:00 PDT
,
zalan
no flags
Details
Formatted Diff
Diff
Patch
(31.11 KB, patch)
2020-10-17 05:38 PDT
,
zalan
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
zalan
Comment 1
2020-10-16 09:15:27 PDT
Created
attachment 411584
[details]
Patch
zalan
Comment 2
2020-10-16 14:00:15 PDT
Created
attachment 411611
[details]
Patch
zalan
Comment 3
2020-10-17 05:38:16 PDT
Created
attachment 411664
[details]
Patch
Antti Koivisto
Comment 4
2020-10-17 05:43:19 PDT
Comment on
attachment 411664
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=411664&action=review
> Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp:411 > auto lineBoxLogicalHeight = lineBox.logicalHeight(); > - auto lineLogicalHeight = InlineLayoutUnit { }; > - if (rootStyle.lineHeight().isNegative()) { > - // Negative line height value means the line height is driven by the content. > - auto usedLineSpacing = [&] { > - auto logicalTopWithLineSpacing = InlineLayoutUnit { }; > - auto logicalBottomWithLineSpacing = lineBoxLogicalHeight; > - for (auto& inlineLevelBox : lineBox.inlineLevelBoxList()) { > - if (auto lineSpacing = inlineLevelBox->lineSpacing()) { > - // FIXME: check if line spacing is distributed evenly. > - logicalTopWithLineSpacing = std::min(logicalTopWithLineSpacing, inlineLevelBox->logicalTop() - *lineSpacing / 2); > - logicalBottomWithLineSpacing = std::max(logicalBottomWithLineSpacing, inlineLevelBox->logicalBottom() + *lineSpacing / 2); > - } > - } > - return -logicalTopWithLineSpacing + (logicalBottomWithLineSpacing - lineBoxLogicalHeight); > - }; > - lineLogicalHeight = lineBox.logicalHeight() + usedLineSpacing(); > - } else > - lineLogicalHeight = rootStyle.computedLineHeight(); > - > + auto lineLogicalHeight = lineBox.logicalHeight(); > auto logicalRect = InlineRect { lineContent.logicalTopLeft, lineContent.lineLogicalWidth, lineLogicalHeight}; > // Inline tree height is all integer based. > auto lineBoxOffset = floorf((lineLogicalHeight - lineBoxLogicalHeight) / 2);
lineBoxOffset == 0?
zalan
Comment 5
2020-10-17 05:46:43 PDT
(In reply to Antti Koivisto from
comment #4
)
> Comment on
attachment 411664
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=411664&action=review
> > > Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp:411 > > auto lineBoxLogicalHeight = lineBox.logicalHeight(); > > - auto lineLogicalHeight = InlineLayoutUnit { }; > > - if (rootStyle.lineHeight().isNegative()) { > > - // Negative line height value means the line height is driven by the content. > > - auto usedLineSpacing = [&] { > > - auto logicalTopWithLineSpacing = InlineLayoutUnit { }; > > - auto logicalBottomWithLineSpacing = lineBoxLogicalHeight; > > - for (auto& inlineLevelBox : lineBox.inlineLevelBoxList()) { > > - if (auto lineSpacing = inlineLevelBox->lineSpacing()) { > > - // FIXME: check if line spacing is distributed evenly. > > - logicalTopWithLineSpacing = std::min(logicalTopWithLineSpacing, inlineLevelBox->logicalTop() - *lineSpacing / 2); > > - logicalBottomWithLineSpacing = std::max(logicalBottomWithLineSpacing, inlineLevelBox->logicalBottom() + *lineSpacing / 2); > > - } > > - } > > - return -logicalTopWithLineSpacing + (logicalBottomWithLineSpacing - lineBoxLogicalHeight); > > - }; > > - lineLogicalHeight = lineBox.logicalHeight() + usedLineSpacing(); > > - } else > > - lineLogicalHeight = rootStyle.computedLineHeight(); > > - > > + auto lineLogicalHeight = lineBox.logicalHeight(); > > auto logicalRect = InlineRect { lineContent.logicalTopLeft, lineContent.lineLogicalWidth, lineLogicalHeight}; > > // Inline tree height is all integer based. > > auto lineBoxOffset = floorf((lineLogicalHeight - lineBoxLogicalHeight) / 2); > > lineBoxOffset == 0?
was testing the review process :) Will get rid of that offset concept in a follow-up patch.
EWS
Comment 6
2020-10-17 06:30:19 PDT
Committed
r268642
: <
https://trac.webkit.org/changeset/268642
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 411664
[details]
.
Radar WebKit Bug Importer
Comment 7
2020-10-17 06:31:17 PDT
<
rdar://problem/70407284
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug