RESOLVED FIXED 221834
enum LengthType -> enum class LengthType
https://bugs.webkit.org/show_bug.cgi?id=221834
Summary enum LengthType -> enum class LengthType
Myles C. Maxfield
Reported 2021-02-12 11:36:51 PST
enum LengthType -> enum class LengthType
Attachments
Patch (176.14 KB, patch)
2021-02-12 11:47 PST, Myles C. Maxfield
ews-feeder: commit-queue-
Patch (188.05 KB, patch)
2021-02-12 12:14 PST, Myles C. Maxfield
simon.fraser: review+
ews-feeder: commit-queue-
Patch for committing (191.31 KB, patch)
2021-02-12 12:25 PST, Myles C. Maxfield
no flags
Myles C. Maxfield
Comment 1 2021-02-12 11:47:37 PST
Sam Weinig
Comment 2 2021-02-12 11:59:36 PST
Comment on attachment 420158 [details] Patch rs=me, but get it compiling.
Myles C. Maxfield
Comment 3 2021-02-12 12:14:57 PST
Myles C. Maxfield
Comment 4 2021-02-12 12:25:47 PST
Created attachment 420164 [details] Patch for committing
EWS
Comment 5 2021-02-12 13:31:47 PST
Committed r272805: <https://commits.webkit.org/r272805> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420164 [details].
Radar WebKit Bug Importer
Comment 6 2021-02-12 13:32:25 PST
Darin Adler
Comment 7 2021-02-12 13:51:32 PST
Comment on attachment 420164 [details] Patch for committing View in context: https://bugs.webkit.org/attachment.cgi?id=420164&action=review > Source/WebCore/ChangeLog:24 > + iPhoneOS14.2.sdk/usr/include/MacTypes.h:193 has: > + > + typedef SInt32 Fixed; > + > + but we have: > + > + enum LengthType { > + ... Fixed ... > + } > + > + This leads to: error: reference to 'Fixed' is ambiguous > + > + Unfortunately, this error occurs in > + /System/Library/Frameworks/CoreText.framework/Headers/SFNTLayoutTypes.h, > + which means we can't modify the error site to qualify the name. Therefore, > + the best solution is to turn enum LengthType into enum class LengthType. > + This is in accordance with WebKit's style guide. This is only an issue if someone does: using namespace WebCore; Then later includes SFNTLayoutTypes.h. While this big enum class change is fine, another fix would be to reduce use of "using namespace WebCore" or technically to find the *incorrect* use of it, because it’s not correct to include a system framework after that.
Note You need to log in before you can comment on or make changes to this bug.