Bug 222291 - WebMouseEvent.h should avoid pulling in WebCore headers that know about DOM nodes
Summary: WebMouseEvent.h should avoid pulling in WebCore headers that know about DOM n...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks: 222216
  Show dependency treegraph
 
Reported: 2021-02-22 15:57 PST by Wenson Hsieh
Modified: 2021-02-22 19:17 PST (History)
17 users (show)

See Also:


Attachments
Patch (27.99 KB, patch)
2021-02-22 16:13 PST, Wenson Hsieh
darin: review+
Details | Formatted Diff | Diff
For landing (28.05 KB, patch)
2021-02-22 17:42 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>