Bug 264480 - CSSVariableReferenceValue.h: error: member access into incomplete type 'WebCore::CSSVariableData'
Summary: CSSVariableReferenceValue.h: error: member access into incomplete type 'WebCo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-09 06:25 PST by Antoine Quint
Modified: 2023-11-09 07:41 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2023-11-09 06:25:26 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/UnifiedSource140.cpp:1:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.cpp:29:
In file included from /Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSPendingSubstitutionValue.h:33:
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:110:51: error: member access into incomplete type 'WebCore::CSSVariableData'
    auto resolvedTokens = resolveTokenRange(m_data->tokenRange(), builderState);
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:41:7: note: forward declaration of 'WebCore::CSSVariableData'
class CSSVariableData;
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:114:56: error: member access into incomplete type 'WebCore::CSSVariableData'
    if (!m_cacheDependencyData || m_cacheDependencyData->tokens() != *resolvedTokens) {
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:41:7: note: forward declaration of 'WebCore::CSSVariableData'
class CSSVariableData;
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:115:33: error: incomplete type 'WebCore::CSSVariableData' named in nested name specifier
        m_cacheDependencyData = CSSVariableData::create(*resolvedTokens, context());
/Users/antoine/Code/safari/OpenSource/Source/WebCore/css/CSSVariableReferenceValue.h:41:7: note: forward declaration of 'WebCore::CSSVariableData'
class CSSVariableData;
3 errors generated.

It looks like merely forward-declaring CSSVariableData in CSSVariableReferenceValue.h is not enough.
Comment 1 Antoine Quint 2023-11-09 06:37:14 PST
Pull request: https://github.com/WebKit/WebKit/pull/20225
Comment 2 EWS 2023-11-09 07:40:49 PST
Committed 270446@main (595985c4802a): <https://commits.webkit.org/270446@main>

Reviewed commits have been landed. Closing PR #20225 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-11-09 07:41:14 PST
<rdar://problem/118177825>