Consuming the new 'page-visited' notification was fairly trivial,
since it was already brought over to onVisits. There's not much to
say about this other than that I'm a little bit uncertain about
all the hoops we have to jump through to get a JSContext and
GlobalObject from History.cpp (which is discussed in the earlier
commit in the series).
MozReview-Commit-ID: LHaBWSylyLI
--HG--
extra : rebase_source : ef8fa174f902e6abd397fb80294e83843120aa81
See the design doc[1] for further info. We would like to redesign
the places observer system to be more performant and more friendly
to consume. WebIDL was recommended as it simplifies creating simple
dictionary payloads while allowing dynamic typing with `any`.
There were some difficulties with WebIDL though, most of which
revolved around allowing consumers to be weakly referenced, from
both C++ and JS. The simplest solution I could come up with was to
create a simple native interface for the C++ case, and a WebIDL
wrapper for a JS callback in the JS case. Suggestions for simpler
alternatives are very welcome though.
[1] https://docs.google.com/document/d/1G45vfd6RXFXwNz7i4FV40lDCU0ao-JX_bZdgJV4tLjk/edit?usp=sharing
MozReview-Commit-ID: ACnAEfa5WxO
--HG--
extra : rebase_source : 0e4d66fb7eab68c14fad10e3c5876bc491452e22
This should prevent new files from being added in the startup path for content processes
MozReview-Commit-ID: 6hCLurrVQ67
--HG--
extra : rebase_source : 82d161e536decae07cef04b35e3233e947c5b0e7
We shouldn't run this on central, as it falls back to the dev configs, and fails.
It should be fine on beta/release/esr60. I had to move this version of the check to its own
kind to avoid the dependency tree bringing in the entire build process. Perhaps we can
refactor later to avoid duplication
Differential Revision: https://phabricator.services.mozilla.com/D1765
--HG--
rename : taskcluster/ci/release-bouncer-check/kind.yml => taskcluster/ci/bouncer-check/kind.yml
This is done with the following script:
```python
#!/usr/bin/env python3
import re
import subprocess
LIST_FILE = "layout/style/nsCSSKeywordList.h"
RE_KEYWORD = re.compile(r"\beCSSKeyword_(\w+)")
rg_result = subprocess.check_output(["rg", r"eCSSKeyword_\w+"], encoding="UTF-8")
to_keep = set()
for item in rg_result.splitlines():
file, line = item.split(':', 1)
for m in RE_KEYWORD.finditer(line):
to_keep.add(m.group(1))
remaining_lines = []
RE_ITEM = re.compile(r"CSS_KEY\(.+, (\w+)\)")
with open(LIST_FILE, "r") as f:
for line in f:
m = RE_ITEM.search(line)
if m is not None and m.group(1) not in to_keep:
print("Removing " + m.group(1))
continue
remaining_lines.append(line)
with open(LIST_FILE, "w", newline="") as f:
f.writelines(remaining_lines)
```
MozReview-Commit-ID: upyTPc8984
--HG--
extra : source : 65a744682fe99d8f0de4fa4b7a478e10aba0349e
This is done with the following script:
```python
#!/usr/bin/env python3
import re
import subprocess
from pathlib import Path
HEADER = Path("layout/style/nsCSSProps.h")
SOURCE = Path("layout/style/nsCSSProps.cpp")
RE_TABLE = re.compile(r"\b(k\w+KTable)")
rg_result = subprocess.check_output(["rg", r"\bk\w+KTable"], encoding="UTF-8")
to_keep = set()
all = set()
for item in rg_result.splitlines():
file, line = item.split(':', 1)
name = RE_TABLE.search(line).group(1)
path = Path(file)
if path != HEADER and path != SOURCE:
to_keep.add(name)
else:
all.add(name)
to_remove = all - to_keep
remaining_lines = []
with HEADER.open() as f:
for line in f:
m = RE_TABLE.search(line)
if m is not None and m.group(1) in to_remove:
print("Removing " + m.group(1))
continue
remaining_lines.append(line)
with HEADER.open("w", newline="") as f:
f.writelines(remaining_lines)
remaining_lines = []
removing = False
RE_DEF = re.compile(r"KTableEntry nsCSSProps::(k\w+KTable)\[\]")
with SOURCE.open() as f:
for line in f:
if removing:
if line == "};\n":
removing = False
continue
m = RE_DEF.search(line)
if m is not None and m.group(1) in to_remove:
if remaining_lines[-1] == "\n":
remaining_lines.pop()
removing = True
continue
remaining_lines.append(line)
with SOURCE.open("w", newline="") as f:
f.writelines(remaining_lines)
```
MozReview-Commit-ID: FeDZRcBceqV
--HG--
extra : source : fe9369e5cef11a6c6eaac641c185844eb45554b1
This is done with the following script:
```python
#!/usr/bin/env python3
import re
import sys
from pathlib import Path
if len(sys.argv) != 2:
print("Usage: {} objdir".format(sys.argv[0]))
exit(1)
generated = Path(sys.argv[1]) / "layout" / "style"
generated = generated / "nsComputedDOMStyleGenerated.cpp"
RE_GENERATED = re.compile(r"DoGet\w+")
keeping = set()
with generated.open() as f:
for line in f:
m = RE_GENERATED.search(line)
if m is not None:
keeping.add(m.group(0))
HEADER = "layout/style/nsComputedDOMStyle.h"
SOURCE = "layout/style/nsComputedDOMStyle.cpp"
# We need to keep functions invoked by others
RE_DEF = re.compile(r"nsComputedDOMStyle::(DoGet\w+)\(\)")
RE_SRC = re.compile(r"\b(DoGet\w+)\(\)")
with open(SOURCE, "r") as f:
for line in f:
m = RE_DEF.search(line)
if m is not None:
continue
m = RE_SRC.search(line)
if m is not None:
keeping.add(m.group(1))
removing = set()
remaining_lines = []
with open(HEADER, "r") as f:
for line in f:
m = RE_SRC.search(line)
if m is not None:
name = m.group(1)
if name not in keeping:
print("Removing " + name)
removing.add(name)
continue
remaining_lines.append(line)
with open(HEADER, "w", newline="") as f:
f.writelines(remaining_lines)
remaining_lines = []
is_removing = False
with open(SOURCE, "r") as f:
for line in f:
if is_removing:
if line == "}\n":
is_removing = False
continue
m = RE_DEF.search(line)
if m is not None:
name = m.group(1)
if name in removing:
remaining_lines.pop()
if remaining_lines[-1] == "\n":
remaining_lines.pop()
is_removing = True
continue
remaining_lines.append(line)
with open(SOURCE, "w", newline="") as f:
f.writelines(remaining_lines)
```
MozReview-Commit-ID: ACewvZ9ztWp
--HG--
extra : source : 7f167f9affd954da907d1da307ebc82be4b85911
This changes the order of properties returned from gCS. The old order
doesn't make much sense, and other browsers don't agree on an identical
order either, so it should be trivial to change it. Also the spec isn't
super clear / useful in this case.
Several -moz-prefixed properties are excluded from the list due to their
being internal. I suspect they are never accessible anyway, so probably
nothing gets changed by this.
MozReview-Commit-ID: 9LfangjpJ3P
--HG--
extra : source : 879a7265c35f51c5954d8a44ccd374a606ecba0e
Currently it's possible to specify a single query and take the union of terms with the '|'
symbol. However if you want to craft anything more complicated (i.e linux mochitest and
xpcshell, but windows reftest), it becomes really difficult. This allows developers to union
the result of multiple queries.
For example:
./mach try fuzzy -q "'linux 'mochitest | 'xpschell" -q "'windows 'reftest"
Differential Revision: https://phabricator.services.mozilla.com/D1838