WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
255098
RenderBox::hasTrimmedMargin(PhyscialDirection) has redundant code
https://bugs.webkit.org/show_bug.cgi?id=255098
Summary
RenderBox::hasTrimmedMargin(PhyscialDirection) has redundant code
Sammy Gill
Reported
2023-04-06 09:56:35 PDT
There are 2 RenderBox::hasTrimmedMargin methods. They take in either a PhysicalDirection or std::optional<MarginTrimType>. The version that takes in a physicalDirection simply maps the physical direction to a MarginTrimType and then calls the other version to perform the actual logic. There are pieces of debug code in here that are shared/redundant and will make it tedious to modify as future margin trim patches are landed. Since the version that takes in a PhysicalDirection just performs a mapping and calls the other, we can remove the debug code from it and keep it in the other.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-04-06 09:56:52 PDT
<
rdar://problem/107713529
>
Sammy Gill
Comment 2
2023-04-06 09:59:33 PDT
Actually it's not just strictly debug code. There is also a !isInFlow() check that can be removed too
Sammy Gill
Comment 3
2023-04-06 10:55:13 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/12464
EWS
Comment 4
2023-04-06 13:55:14 PDT
Committed
262684@main
(0c3876d9cb24): <
https://commits.webkit.org/262684@main
> Reviewed commits have been landed. Closing PR #12464 and removing active labels.
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