DescriptionIDL compiler: avoid include for WindowMediaSource.idl
WindowMediaSource.idl is a partial interface for Window.
Thus normally we should include WindowMediaSource.h.
However, this is only constructor attributes, so there's no implementation
and no header.
Python determines the includes at the dependency resolution stage,
just checking the partial interface and if there's an [ImplementedAs].
Perl instead computes the includes at every member, hence b/c there
are only constructors it doesn't trigger it here.
Now, we don't want to have to parse all member of a partial interface
to determine if we need a header!
Conveniently, we have an existing extended attribute that says
"no header", namely [LegacyImplementedInBaseClass].
There are thus 3 clean solutions to this:
1. Add an empty header, WindowMediaSource.h;
thus we can always include the header (unless implemented elsewhere).
2. Add a new extended attribute, [NoHeader], used only here.
3. Use the existing [LegacyImplementInBaseClass];
if we get rid of other cases, can rename to [NoHeader].
I think 1. (always include the header) is cleanest, as it minimizes logic.
However, this CL is simplest (it does 3), as it uses existing logic.
WDYT?
R=haraken
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166672
Patch Set 1 #Patch Set 2 : Reupload #
Messages
Total messages: 13 (0 generated)
|