WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
240388
computeIntrinsicLogicalContentHeightUsing doesn't take intrinsicBorderForFieldset() into account
https://bugs.webkit.org/show_bug.cgi?id=240388
Summary
computeIntrinsicLogicalContentHeightUsing doesn't take intrinsicBorderForFiel...
Oriol Brufau
Reported
2022-05-13 09:50:04 PDT
Runt this: <fieldset style="height: min-content; border: solid cyan"> <legend>foo</legend> <div style="border: solid fuchsia">bar</div> </fieldset> The fieldset is not big enough, the contents overflow. Or run this: <fieldset id="target" style="height: min-content"> <legend>foo</legend> </fieldset> <script> console.log(getComputedStyle(target).height); </script> It logs -15.59375px, negative height! That's because RenderBox::computeIntrinsicLogicalContentHeightUsing uses if (intrinsicContentHeight && style().boxSizing() == BoxSizing::BorderBox) return intrinsicContentHeight.value() + borderAndPaddingLogicalHeight(); return intrinsicContentHeight; This logic should be moved into a virtual method, and override it in RenderBlock to take intrinsicBorderForFieldset() into account. Just like adjustBorderBoxLogicalHeightForBoxSizing and adjustIntrinsicLogicalHeightForBoxSizing.
Attachments
Patch
(10.79 KB, patch)
2022-05-13 11:20 PDT
,
Oriol Brufau
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Oriol Brufau
Comment 1
2022-05-13 11:20:50 PDT
Created
attachment 459312
[details]
Patch
EWS Watchlist
Comment 2
2022-05-13 11:24:17 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see
https://trac.webkit.org/wiki/WPTExportProcess
Darin Adler
Comment 3
2022-05-16 13:04:11 PDT
Comment on
attachment 459312
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=459312&action=review
> Source/WebCore/rendering/RenderBox.cpp:3269 > return intrinsicContentHeight;
After the refactoring, this could just be return std::nullopt, and I think it’s clearer that way.
EWS
Comment 4
2022-05-16 16:04:39 PDT
Committed
r294275
(
250621@main
): <
https://commits.webkit.org/250621@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 459312
[details]
.
Radar WebKit Bug Importer
Comment 5
2022-05-16 16:05:18 PDT
<
rdar://problem/93378304
>
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