Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Boris Zbarsky

On 4/9/19 10:37 AM, Brian Grinstead wrote:

I'll think some more about if there’s a way to limit the risk of losing test 
coverage.


One simple thing is to restrict the change to 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread jj


> We could similarly remove type="text/css" from 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Brian Grinstead



> On Apr 8, 2019, at 8:55 PM, Cameron McCormack  wrote:
> 
> On Tue, Apr 9, 2019, at 1:39 PM, Brian Grinstead wrote:
>> I'd like to rewrite markup in the tree to avoid using the [type] 
>> attribute on 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Brian Grinstead
Thank you. I will update the script(s) to use that list.

> On Apr 9, 2019, at 7:52 AM, Kartikaya Gupta  wrote:
> 
> On Mon, Apr 8, 2019 at 11:39 PM Brian Grinstead  
> wrote:
>> I've prepared a script that rewrites this across the tree. The script and 
>> the generated patch can be seen at 
>> https://bugzilla.mozilla.org/show_bug.cgi?id=1542877. The following 
>> directories are excluded:
>> 
>> - third_party
> 
> Just as a general note, there is a tools/rewriting/ThirdPartyPaths.txt
> that contains all the folders that should be skipped with these sorts
> of rewrites, because they are stuff vendored into m-c. In this case
> most of those folders probably don't have script tags, but still, it
> would be good to ensure you're not accidentally changing stuff in
> those folders.

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


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Kartikaya Gupta
On Tue, Apr 9, 2019 at 12:01 AM Felipe G  wrote:
>
> > I'm writing to the list in order to:
> > 2) See if there are any general best-practices for getting this type of
> > change reviewed / landed. For example, should we prefer separate commits /
> > reviews per directory, or does a single tree-wide commit make sense?
> >
> Please include the string "# ignore-this-changeset" in the commit summary
> so that it can be skipped on the blame view in searchfox

Note that searchfox doesn't look for that string. The only revisions
searchfox currently ignores are the gecko-dev revisions listed in
.git-blame-ignore-revs. But it doesn't do a great job of it, and I was
thinking of disabling that behaviour until we have a better
implementation of blame-skipping.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Kartikaya Gupta
On Mon, Apr 8, 2019 at 11:39 PM Brian Grinstead  wrote:
> I've prepared a script that rewrites this across the tree. The script and the 
> generated patch can be seen at 
> https://bugzilla.mozilla.org/show_bug.cgi?id=1542877. The following 
> directories are excluded:
>
> - third_party

Just as a general note, there is a tools/rewriting/ThirdPartyPaths.txt
that contains all the folders that should be skipped with these sorts
of rewrites, because they are stuff vendored into m-c. In this case
most of those folders probably don't have script tags, but still, it
would be good to ensure you're not accidentally changing stuff in
those folders.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Gijs Kruitbosch

On 09/04/2019 15:37, Brian Grinstead wrote:

I'll think some more about if there’s a way to limit the risk of losing test 
coverage. Perhaps doing it in a couple of separate patches would result in a 
final patch that’s more manageable to review: first do simpletest.js and other 
common helper scripts tree-wide,


This seems like a good plan.



then do full-replacement in folders that wouldn’t have a reason to test this 
specifically (browser/, devtools/, gfx/, particular dom/ subdirectories etc).


Devtools doesn't have tests that check that scripts with different type 
attributes and URLs etc. end up shown in the debugger?


~ Gijs



Brian


On Apr 9, 2019, at 3:57 AM, Gijs Kruitbosch  wrote:

On 09/04/2019 11:16, James Graham wrote:


I also wonder if there are other non-wpt tests that would be broken by such a 
change??


This was my thought as well. Is there a compelling reason to want to do this 
rewrite for extant HTML mochitest test files?

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




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


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Brian Grinstead



> On Apr 9, 2019, at 2:31 AM, Anne van Kesteren  wrote:
> 
> On Tue, Apr 9, 2019 at 5:56 AM Cameron McCormack  wrote:
>> On Tue, Apr 9, 2019, at 1:39 PM, Brian Grinstead wrote:
>>> I'd like to rewrite markup in the tree to avoid using the [type]
>>> attribute on 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Brian Grinstead
The reasoning is:
- If we don't rewrite existing test files then it will keep getting propagated 
in new tests as old ones get cloned.
- It's a small cleanup that makes existing tests slightly easier to read 
(especially when combined with other boilerplate reduction).
- I was under the impression until yesterday that type="application/javascript" 
was required on script tags in XUL documents (or maybe xul:script tags in any 
document). I assume I'm not the only one who's thought that or some variation 
of it - if we stop using the attribute then it would be one less out of the 
ordinary thing to deal with for Firefox development.

I'll think some more about if there’s a way to limit the risk of losing test 
coverage. Perhaps doing it in a couple of separate patches would result in a 
final patch that’s more manageable to review: first do simpletest.js and other 
common helper scripts tree-wide, then do full-replacement in folders that 
wouldn’t have a reason to test this specifically (browser/, devtools/, gfx/, 
particular dom/ subdirectories etc).

Brian

> On Apr 9, 2019, at 3:57 AM, Gijs Kruitbosch  wrote:
> 
> On 09/04/2019 11:16, James Graham wrote:
> 
>> I also wonder if there are other non-wpt tests that would be broken by such 
>> a change??
> 
> This was my thought as well. Is there a compelling reason to want to do this 
> rewrite for extant HTML mochitest test files?
> 
> ~ Gijs
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform

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


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Gijs Kruitbosch

On 09/04/2019 11:16, James Graham wrote:

I also wonder if there are other non-wpt tests that would be broken by 
such a change??


This was my thought as well. Is there a compelling reason to want to do 
this rewrite for extant HTML mochitest test files?


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


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread James Graham



On 09/04/2019 10:31, Anne van Kesteren wrote:

On Tue, Apr 9, 2019 at 5:56 AM Cameron McCormack  wrote:

On Tue, Apr 9, 2019, at 1:39 PM, Brian Grinstead wrote:

I'd like to rewrite markup in the tree to avoid using the [type]
attribute on 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-09 Thread Anne van Kesteren
On Tue, Apr 9, 2019 at 5:56 AM Cameron McCormack  wrote:
> On Tue, Apr 9, 2019, at 1:39 PM, Brian Grinstead wrote:
> > I'd like to rewrite markup in the tree to avoid using the [type]
> > attribute on 

Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-08 Thread Felipe G
> I'm writing to the list in order to:
> 2) See if there are any general best-practices for getting this type of
> change reviewed / landed. For example, should we prefer separate commits /
> reviews per directory, or does a single tree-wide commit make sense?
>
> Please include the string "# ignore-this-changeset" in the commit summary
so that it can be skipped on the blame view in searchfox
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-08 Thread Cameron McCormack
On Tue, Apr 9, 2019, at 1:56 PM, Cameron McCormack wrote:
> You should exclude layout/reftests/w3c-received/ too.

layout/reftests/w3c-css/received/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-08 Thread Cameron McCormack
On Tue, Apr 9, 2019, at 1:39 PM, Brian Grinstead wrote:
> I'd like to rewrite markup in the tree to avoid using the [type] 
> attribute on 

Proposal to remove unnecessary [type] attributes on script tags in mozilla-central

2019-04-08 Thread Brian Grinstead
I'd like to rewrite markup in the tree to avoid using the [type] attribute on