Bug 255098
Summary: | RenderBox::hasTrimmedMargin(PhyscialDirection) has redundant code | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sammy Gill <sgill26> |
Component: | Layout and Rendering | Assignee: | Sammy Gill <sgill26> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Sammy Gill
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
<rdar://problem/107713529>
Sammy Gill
Actually it's not just strictly debug code. There is also a !isInFlow() check that can be removed too
Sammy Gill
Pull request: https://github.com/WebKit/WebKit/pull/12464
EWS
Committed 262684@main (0c3876d9cb24): <https://commits.webkit.org/262684@main>
Reviewed commits have been landed. Closing PR #12464 and removing active labels.