Re: Include out of viewport frames in display list

Boris Zbarsky <[email protected]> Tue, 19 Jul 2016 11:45:51 -0400
Newsgroups gmane.comp.mozilla.devel.layout
Message-ID <[email protected]>
On 7/19/16 11:08 AM, [email protected] wrote:
> But where do I define this dictionary?

Any .webidl file you feel like.  But putting it in Document.webidl makes 
sense if that's where you use it.

> /source/release/dom/base/nsDocument.h:1042:41: error: unknown type name 'myFunctionElementInfo'; did you mean 'mozilla::dom::myFunctionElementInfo'?

Yes.  See 
https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Dictionary_types 
the part about "whose name is the dictionary name in the mozilla::dom 
namespace".

>  8:43.20 In file included from /build/dom/base/Unified_cpp_dom_base5.cpp:92:
>  8:43.20 /source/release/dom/base/nsDocument.cpp:3580:12: error: no member named 'node' in 'mozilla::dom::myFunctionElementInfo'
>  8:43.20         e->node = node;
>  8:43.20         ~  ^
>  8:43.20 /source/release/dom/base/nsDocument.cpp:3581:12: error: no member named 'number1' in 'mozilla::dom::myFunctionElementInfo'
>  8:43.20         e->number1 = number1;
>  8:43.20         ~  ^

Please see 
https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings#Dictionary_types 
where it says:

   The struct has one member for each of the dictionary's members with 
the same name except the first letter uppercased and prefixed with "m"

Seriously, the documentation should cover most of this stuff.  ;)

Also note that the struct's member will be an Optional unless the member 
is either required or has a default value, so your code above would not 
work even with the correct member name.  In your case, I expect making 
all the members required is fine; I assume you plan to initialize all of 
them for every dictionary.

-Boris