Bug 211494

Summary: Factor EventHandler code that sends mouseEnteredContentArea/mouseExitedContentArea into its own function
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Simon Fraser (smfr) 2020-05-05 22:04:32 PDT
Factor EventHandler code that sends mouseEnteredContentArea/mouseExitedContentArea into its own function
Comment 1 Simon Fraser (smfr) 2020-05-05 22:06:38 PDT
Created attachment 398588 [details]
Patch
Comment 2 Simon Fraser (smfr) 2020-05-05 22:40:28 PDT
Created attachment 398593 [details]
Patch
Comment 3 Antti Koivisto 2020-05-06 07:56:28 PDT
Comment on attachment 398593 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=398593&action=review

> Source/WebCore/page/EventHandler.cpp:2627
> +        if (elementUnderMouse) {
> +            frameView->mouseEnteredContentArea();
> +            if (scrollableAreaForNodeUnderMouse)
> +                scrollableAreaForNodeUnderMouse->mouseEnteredContentArea();
> +        } else {
> +            if (scrollableAreaForLastNode)
> +                scrollableAreaForLastNode->mouseExitedContentArea();
> +            frameView->mouseExitedContentArea();
> +        }
> +        return;

You could early return instead of the else branch.
Comment 4 EWS 2020-05-06 08:30:20 PDT
Committed r261229: <https://trac.webkit.org/changeset/261229>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398593 [details].
Comment 5 Radar WebKit Bug Importer 2020-05-06 08:31:16 PDT
<rdar://problem/62931618>