Bug 247856 - Simplify includesAdjacentEdges in BorderEdge.h
Summary: Simplify includesAdjacentEdges in BorderEdge.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-13 03:11 PST by Ahmad Saleem
Modified: 2022-11-13 20:41 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-11-13 03:11:33 PST
Hi Team,

While going through Blink commits, I came across another simplification / refactoring for "adjacency test" for Border Painting:

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/45cd7b0546450187bb5f781d47778b739911341f

Webkit GitHub - https://github.com/WebKit/WebKit/blob/5a9504aef82d929917a680a05a3fc17f7f6b4dde/Source/WebCore/rendering/BorderEdge.h#L77

I am raising this bug so if this can be applied in Webkit context.

Thanks!
Comment 1 Tim Nguyen (:ntim) 2022-11-13 08:09:06 PST
(In reply to Ahmad Saleem from comment #0)
> I am raising this bug so if this can be applied in Webkit context.

Yep, the equivalent would be:

flags.containsAny({ BoxSideFlag::Top, BoxSideFlag::Bottom })
&& flags.containsAny({ BoxSideFlag::Left, BoxSideFlag::Right })
Comment 2 Ahmad Saleem 2022-11-13 12:05:25 PST
https://github.com/WebKit/WebKit/pull/6445
Comment 3 EWS 2022-11-13 20:40:10 PST
Committed 256631@main (cf6c7427c391): <https://commits.webkit.org/256631@main>

Reviewed commits have been landed. Closing PR #6445 and removing active labels.
Comment 4 Radar WebKit Bug Importer 2022-11-13 20:41:20 PST
<rdar://problem/102302676>