Re: "static inline" in a header file is stupid, right?

2020-07-31 Thread Botond Ballo
On Fri, Jul 31, 2020 at 9:00 PM  wrote:

> Stupid: It is not stupid, it is a feature.
>

Ah, you mean `static inline` has uses in C++17 that it didn't have in older
versions?

I would appreciate an example (or a link to post etc.) so we can understand
this better.

Thanks,
Botond
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: "static inline" in a header file is stupid, right?

2020-07-31 Thread cpp . dvl
On Friday, July 31, 2020 at 12:54:59 PM UTC-5, Botond Ballo wrote:
> >
> > Hi! I come from the future, it is not in C++17.
> >
> 
> Can you elaborate on what "it" is?
> 
> Thanks,
> Botond

Stupid: It is not stupid, it is a feature. 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to ship: CSS overflow:clip

2020-07-31 Thread Mats Palmgren

Summary:
We intend to ship CSS overflow:clip in v81, which is the standardized
version of a prefixed value (-moz-hidden-unscrollable) that we already
ship.  The prefixed value becomes an alias for the new value.
The standardized value is mostly compatible, but there are some
differences.  Most notably, we now support clipping in one axis
and overflowing in the other (i.e. 'clip' can be combined with
'visible' in the overflow-x/y properties).

Bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1531609
https://bugzilla.mozilla.org/show_bug.cgi?id=1635473

Standard:
https://drafts.csswg.org/css-overflow-3/#valdef-overflow-clip
https://github.com/w3c/csswg-drafts/issues/1971

Platform coverage:
All

Preference:
None. We've shipped the prefixed version of this value since forever
and any web-compat issues are unlikely.

DevTools bug:
N/A

Other browsers:
It's not implemented in Blink/WebKit yet:
https://bugs.chromium.org/p/chromium/issues/detail?id=966283
https://bugs.webkit.org/show_bug.cgi?id=198230
Blink appears to show positive signals in:
https://github.com/w3c/csswg-drafts/issues/1971

Web-platform-tests:
Yes, some already exist and I've added more.

Secure contexts:
This will not be restricted to secure contexts, like many other CSS features.

Is this feature enabled by default in sandboxed iframes?
Yes, like many other CSS features.


Credit also goes to Jeremy Ir who implemented the initial version of
the style system changes for this feature.


/Mats

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


browser-chrome mochitests' is() now uses Object.is()

2020-07-31 Thread Geoff Brown
Traditionally, the is() function in browser-chrome mochitests performed
comparisons with ==; with bug 1647187, is() (and isnot(), todo_is(),
todo_isnot()) now performs comparisons with Object.is(). For example, where
is("4", 4, ...) would previously succeed, now it will fail, since the
parameter types are different.

This change makes the browser-chrome behavior consistent with
mochitest-plain (SimpleTest.is()) and will hopefully be more intuitive.

Thanks to everyone involved in the bug, but especially :jmaher, who updated
many, many tests to make them compatible with this change.

 - Geoff
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: "static inline" in a header file is stupid, right?

2020-07-31 Thread Botond Ballo
>
> Hi! I come from the future, it is not in C++17.
>

Can you elaborate on what "it" is?

Thanks,
Botond
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: "static inline" in a header file is stupid, right?

2020-07-31 Thread cpp . dvl
On Tuesday, April 3, 2012 at 3:38:08 PM UTC-5, Benoit Jacob wrote:
> Hello,
> 
> Short version: "inline" alone is enough to take care of multiple
> function definitions. Next time you're about to write "static inline"
> in a header file, seriously consider doing "inline" instead.
> 
> Long version:
> 
> This command,
> 
>   $ find mozilla-central -name '*.h' | xargs grep -n 'static inline'
> 
> finds 1851 matches here.
> 
> The "inline" keyword does two things that I know of:
>  1) it suggests inlining, and
>  2) it allows multiple definitions of a function, regardless of
> whether inlining happens.
> 
> That second thing means that in most cases, defining a "static inline"
> function in a header is useless, and just "inline" is what is really
> wanted in most cases.
> 
> The "static" keyword in "static inline" is harmful in the situation
> where a "static inline" function gets included and compiled in N
> different files and does not get inlined. In this situation, one would
> typically want the N copies of this function to get merged into one,
> to avoid code bloat. But the "static" keyword prevents that, forcing
> the linker to not merge these redundant functions.
> 
> Cheers,
> Benoit

Hi! I come from the future, it is not in C++17. 
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform