Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 99b626befab865c4f50048ef2c567c2a10d5d053
      
https://github.com/WebKit/WebKit/commit/99b626befab865c4f50048ef2c567c2a10d5d053
  Author: Sam Weinig <[email protected]>
  Date:   2025-07-04 (Fri, 04 Jul 2025)

  Changed paths:
    M Source/WTF/wtf/Compiler.h
    M Source/WebCore/rendering/style/StyleBoxData.h
    M Source/WebCore/rendering/style/StyleMiscNonInheritedData.h
    M Source/WebCore/rendering/style/StyleMultiColData.h
    M Source/WebCore/rendering/style/StyleRareInheritedData.h
    M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
    M Source/WebCore/rendering/style/StyleSelfAlignmentData.h

  Log Message:
  -----------
  [WTF] Provide a type hint to debuggers for opaque bitfield values where 
supported
https://bugs.webkit.org/show_bug.cgi?id=295294

Reviewed by Darin Adler.

Newer versions of clang support an attribute, `preferred_type`, which provides
a hint to debuggers about what type is stored in opaqued bitfields:

    https://clang.llvm.org/docs/AttributeReference.html#preferred-type.

This adds a new macro to wtf/Compiler.h called `PREFERRED_TYPE(...)` that
wraps the attribute when supported.

Some initial adoption of it was done in 'WebCore/rendering/style' to
illustrate how it can be used.

* Source/WTF/wtf/Compiler.h:
    - Adds new PREFERRED_TYPE macro.
    - Cleans up Compiler.h a bit, fixing typos, reducing some duplication and
      making COMPILER_HAS_CPP_ATTRIBUTE a top level macro.

* Source/WebCore/rendering/style/StyleBoxData.h:
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.h:
* Source/WebCore/rendering/style/StyleMultiColData.h:
* Source/WebCore/rendering/style/StyleRareInheritedData.h:
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/style/StyleSelfAlignmentData.h:
    - Adopted PREFERRED_TYPE, replacing comments annotations.

Canonical link: https://commits.webkit.org/297027@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to