Bug 174083 - [WebIDL] Remove more unnecessary uses of the preprocessor in idl files
Summary: [WebIDL] Remove more unnecessary uses of the preprocessor in idl files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-02 20:31 PDT by Sam Weinig
Modified: 2017-07-06 15:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (44.50 KB, patch)
2017-07-02 20:37 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (74.24 KB, text/plain)
2017-07-06 14:27 PDT, Sam Weinig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2017-07-02 20:31:28 PDT
[WebIDL] Remove more unnecessary uses of the preprocessor in idl files
Comment 1 Sam Weinig 2017-07-02 20:37:59 PDT
Created attachment 314439 [details]
Patch
Comment 2 Build Bot 2017-07-02 20:40:35 PDT
Attachment 314439 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/Configurations/FeatureDefines.xcconfig:0:  Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible.  [featuredefines/equality] [5]
ERROR: Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig:0:  Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible.  [featuredefines/equality] [5]
ERROR: Source/WebCore/Configurations/FeatureDefines.xcconfig:0:  Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible.  [featuredefines/equality] [5]
ERROR: Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig:0:  Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible.  [featuredefines/equality] [5]
ERROR: Source/WebKit2/Configurations/FeatureDefines.xcconfig:0:  Any changes made to FeatureDefines should be made to all of them (changed file does not match Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig). Use sync-feature-defines if possible.  [featuredefines/equality] [5]
Total errors found: 5 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Sam Weinig 2017-07-02 20:43:05 PDT
Only 4 uses of the preprocessor for IDLs remain:
- DeviceOrientationEvent has an #if defined(WTF_PLATFORM_IOS).
    We should see if we can merge the iOS and standards track implementations. This would require adding support for the 'absolute' property.

- Document.idl has a union, RenderingContext, that has items that are conditionally supported. 
- CanvasRenderingContext2D.idl has a union, CanvasImageSource, that has items that are conditionally supported.
- HTMLMediaElement has has a union, MediaProvider, that has items that are conditionally supported.
    Solving these three are more difficult, as we don't have a good model of this conditionality. We should look into extended attributes on the union members for this.
Comment 4 Alex Christensen 2017-07-03 14:20:59 PDT
Comment on attachment 314439 [details]
Patch

Let's definitely stop running all these files through the C preprocessor.
Comment 5 WebKit Commit Bot 2017-07-03 14:49:09 PDT
Comment on attachment 314439 [details]
Patch

Clearing flags on attachment: 314439

Committed r219097: <http://trac.webkit.org/changeset/219097>
Comment 6 WebKit Commit Bot 2017-07-03 14:49:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Sam Weinig 2017-07-06 14:27:25 PDT Comment hidden (obsolete)
Comment 8 Sam Weinig 2017-07-06 14:27:25 PDT Comment hidden (obsolete)