Bug 264481

Summary: Build error: reference to 'MediaQueryList' is ambiguous
Product: WebKit Reporter: Antoine Quint <graouts>
Component: CSSAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Antoine Quint 2023-11-09 06:33:09 PST
I just came across this build failure while working on an upcoming patch that added a new file:

In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource129.cpp:4:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:38:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/style/StyleBuilderConverter.h:63:
In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/SVGElementTypeHelpers.h:34:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/svg/SVGElementInlines.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/dom/ElementInlines.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/dom/DocumentInlines.h:37:
/Users/antoine/Code/safari/OpenSource/Source/WebCore/page/LocalDOMWindow.h:148:12: error: reference to 'MediaQueryList' is ambiguous
    RefPtr<MediaQueryList> matchMedia(const String&);
/Users/antoine/Code/safari/OpenSource/Source/WebCore/page/LocalDOMWindow.h:74:7: note: candidate found by name lookup is 'WebCore::MediaQueryList'
class MediaQueryList;
In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource129.cpp:4:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:34:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/style/CustomPropertyRegistry.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/StyleRule.h:30:
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/query/MediaQuery.h:40:7: note: candidate found by name lookup is 'WebCore::MQ::MediaQueryList'
using MediaQueryList = Vector<MediaQuery>;
In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource129.cpp:4:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:38:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/style/StyleBuilderConverter.h:63:
In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/SVGElementTypeHelpers.h:34:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/svg/SVGElementInlines.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/dom/ElementInlines.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/dom/DocumentInlines.h:37:
/Users/antoine/Code/safari/OpenSource/Source/WebCore/page/LocalDOMWindow.h:148:12: error: reference to 'MediaQueryList' is ambiguous
    RefPtr<MediaQueryList> matchMedia(const String&);
/Users/antoine/Code/safari/OpenSource/Source/WebCore/page/LocalDOMWindow.h:74:7: note: candidate found by name lookup is 'WebCore::MediaQueryList'
class MediaQueryList;
In file included from /Users/antoine/Builds/Debug/DerivedSources/WebCore/unified-sources/UnifiedSource129.cpp:4:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/DOMCSSRegisterCustomProperty.cpp:34:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/style/CustomPropertyRegistry.h:28:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/StyleRule.h:30:
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/query/MediaQuery.h:40:7: note: candidate found by name lookup is 'WebCore::MQ::MediaQueryList'
using MediaQueryList = Vector<MediaQuery>;
2 errors generated.
Comment 1 Antoine Quint 2023-11-09 07:48:41 PST
Pull request: https://github.com/WebKit/WebKit/pull/20231
Comment 2 EWS 2023-11-09 08:16:51 PST
Committed 270449@main (5a27613192bd): <https://commits.webkit.org/270449@main>

Reviewed commits have been landed. Closing PR #20231 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-11-09 08:17:29 PST
<rdar://problem/118179339>