Bug 222291

Summary: WebMouseEvent.h should avoid pulling in WebCore headers that know about DOM nodes
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebCore Misc.Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, berto, cdumez, cgarcia, darin, esprehn+autocc, ews-watchlist, graouts, gustavo, gyuyoung.kim, hi, kangil.han, megan_gardner, ryuan.choi, sergio, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 222216    
Attachments:
Description Flags
Patch
darin: review+
For landing none

Description Wenson Hsieh 2021-02-22 15:57:58 PST
WebMouseEvent.h includes PointerEvent.h, which then includes Node.h and a host of other DOM-related headers. Given that WebMouseEvent.h is a shared header included by code running in the UI process, we probably shouldn't.

...this also fixes a unified source build error, seen here: https://ews-build.webkit.org/#/builders/49/builds/9134/steps/8/logs/errors, which happens because `WebCore::UIEvent` collides with the globally namespaced `UIEvent` Objective-C class from UIKit.
Comment 1 Wenson Hsieh 2021-02-22 16:13:50 PST
Created attachment 421259 [details]
Patch
Comment 2 EWS Watchlist 2021-02-22 16:14:58 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Darin Adler 2021-02-22 17:16:23 PST
Comment on attachment 421259 [details]
Patch

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

> Source/WebCore/dom/PointerEventTypeNames.h:28
> +namespace WebCore {

Since this header uses WTF::String, it should include <wtf/Forward.h>.
Comment 4 Wenson Hsieh 2021-02-22 17:34:29 PST
Comment on attachment 421259 [details]
Patch

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

>> Source/WebCore/dom/PointerEventTypeNames.h:28
>> +namespace WebCore {
> 
> Since this header uses WTF::String, it should include <wtf/Forward.h>.

Fixed, thanks!
Comment 5 Wenson Hsieh 2021-02-22 17:42:14 PST
Created attachment 421274 [details]
For landing
Comment 6 EWS 2021-02-22 19:16:37 PST
Committed r273296: <https://commits.webkit.org/r273296>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421274 [details].
Comment 7 Radar WebKit Bug Importer 2021-02-22 19:17:15 PST
<rdar://problem/74625080>