mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
parent
406be7accf
commit
91c61ae751
10 changed files with 72 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/browser
|
||||||
|
|
||||||
callback BrowserElementNextPaintEventCallback = void ();
|
callback BrowserElementNextPaintEventCallback = void ();
|
||||||
|
|
||||||
//dictionary BrowserElementDownloadOptions {
|
//dictionary BrowserElementDownloadOptions {
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/scripting.html#canvaspattern
|
||||||
|
|
||||||
interface CanvasPattern {
|
interface CanvasPattern {
|
||||||
//void setTransform(SVGMatrix matrix);
|
//void setTransform(SVGMatrix matrix);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface
|
||||||
|
|
||||||
[Constructor(DOMString type, optional ErrorEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
|
[Constructor(DOMString type, optional ErrorEventInit eventInitDict)/*, Exposed=(Window,Worker)*/]
|
||||||
interface ErrorEvent : Event {
|
interface ErrorEvent : Event {
|
||||||
readonly attribute DOMString message;
|
readonly attribute DOMString message;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75708506
|
||||||
|
|
||||||
interface HTMLCollection {
|
interface HTMLCollection {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
getter Element? item(unsigned long index);
|
getter Element? item(unsigned long index);
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#interface-namednodemap
|
||||||
|
|
||||||
interface NamedNodeMap {
|
interface NamedNodeMap {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
getter Attr? item(unsigned long index);
|
getter Attr? item(unsigned long index);
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// This interface is entirely internal to Servo, and should not be accessible to
|
||||||
|
// web pages.
|
||||||
|
|
||||||
// FIXME: find a better way to hide this from content (#3688)
|
// FIXME: find a better way to hide this from content (#3688)
|
||||||
[NoInterfaceObject]
|
[NoInterfaceObject]
|
||||||
interface ServoHTMLParser {
|
interface ServoHTMLParser {
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// This interface is entirely internal to Servo, and should not be accessible to
|
||||||
|
// web pages.
|
||||||
|
|
||||||
enum TestEnum { "", "foo", "bar" };
|
enum TestEnum { "", "foo", "bar" };
|
||||||
|
|
||||||
dictionary TestDictionary {
|
dictionary TestDictionary {
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// This interface is entirely internal to Servo, and should not be accessible to
|
||||||
|
// web pages.
|
||||||
|
|
||||||
interface TestBindingProxy : TestBinding {
|
interface TestBindingProxy : TestBinding {
|
||||||
|
|
||||||
getter DOMString getNamedItem(DOMString name);
|
getter DOMString getNamedItem(DOMString name);
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
// https://w3c.github.io/websockets/#the-websocket-interface
|
||||||
|
|
||||||
enum BinaryType { "blob", "arraybuffer" };
|
enum BinaryType { "blob", "arraybuffer" };
|
||||||
|
|
||||||
[Constructor(DOMString url)]
|
[Constructor(DOMString url)]
|
||||||
|
|
|
@ -15,7 +15,7 @@ import sys
|
||||||
import toml
|
import toml
|
||||||
from licenseck import licenses
|
from licenseck import licenses
|
||||||
|
|
||||||
filetypes_to_check = [".rs", ".rc", ".cpp", ".c", ".h", ".py", ".toml"]
|
filetypes_to_check = [".rs", ".rc", ".cpp", ".c", ".h", ".py", ".toml", ".webidl"]
|
||||||
reftest_directories = ["tests/ref"]
|
reftest_directories = ["tests/ref"]
|
||||||
reftest_filetype = ".list"
|
reftest_filetype = ".list"
|
||||||
python_dependencies = [
|
python_dependencies = [
|
||||||
|
@ -153,6 +153,53 @@ def check_toml(contents):
|
||||||
yield (idx + 1, "found asterisk instead of minimum version number")
|
yield (idx + 1, "found asterisk instead of minimum version number")
|
||||||
|
|
||||||
|
|
||||||
|
def check_webidl_spec(contents):
|
||||||
|
# Sorted by this function (in pseudo-Rust). The idea is to group the same
|
||||||
|
# organization together.
|
||||||
|
# fn sort_standards(a: &Url, b: &Url) -> Ordering {
|
||||||
|
# let a_domain = a.domain().split(".");
|
||||||
|
# a_domain.pop();
|
||||||
|
# a_domain.reverse();
|
||||||
|
# let b_domain = b.domain().split(".");
|
||||||
|
# b_domain.pop();
|
||||||
|
# b_domain.reverse();
|
||||||
|
# for i in a_domain.into_iter().zip(b_domain.into_iter()) {
|
||||||
|
# match i.0.cmp(b.0) {
|
||||||
|
# Less => return Less,
|
||||||
|
# Greater => return Greater,
|
||||||
|
# _ => (),
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
# a_domain.path().cmp(b_domain.path())
|
||||||
|
# }
|
||||||
|
standards = [
|
||||||
|
"//w3c.github.io",
|
||||||
|
"//www.khronos.org/registry/webgl/specs",
|
||||||
|
"//developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/browser",
|
||||||
|
"//developer.mozilla.org/en-US/docs/Web/API",
|
||||||
|
"//dev.w3.org/2006/webapi",
|
||||||
|
"//dev.w3.org/csswg",
|
||||||
|
"//dev.w3.org/fxtf",
|
||||||
|
"//dvcs.w3.org/hg",
|
||||||
|
"//www.w3.org/TR",
|
||||||
|
"//dom.spec.whatwg.org",
|
||||||
|
"//domparsing.spec.whatwg.org",
|
||||||
|
"//encoding.spec.whatwg.org",
|
||||||
|
"//html.spec.whatwg.org",
|
||||||
|
"//url.spec.whatwg.org",
|
||||||
|
"//xhr.spec.whatwg.org",
|
||||||
|
"//www.whatwg.org/html",
|
||||||
|
"//www.whatwg.org/specs",
|
||||||
|
# Not a URL
|
||||||
|
"// This interface is entirely internal to Servo, and should not be" +
|
||||||
|
" accessible to\n// web pages."
|
||||||
|
]
|
||||||
|
for i in standards:
|
||||||
|
if contents.find(i) != -1:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def collect_errors_for_files(files_to_check, checking_functions):
|
def collect_errors_for_files(files_to_check, checking_functions):
|
||||||
for file_name in files_to_check:
|
for file_name in files_to_check:
|
||||||
with open(file_name, "r") as fp:
|
with open(file_name, "r") as fp:
|
||||||
|
@ -160,6 +207,9 @@ def collect_errors_for_files(files_to_check, checking_functions):
|
||||||
if file_name.endswith(".toml"):
|
if file_name.endswith(".toml"):
|
||||||
for error in check_toml(contents):
|
for error in check_toml(contents):
|
||||||
yield (file_name, error[0], error[1])
|
yield (file_name, error[0], error[1])
|
||||||
|
elif file_name.endswith(".webidl"):
|
||||||
|
if not check_webidl_spec(contents):
|
||||||
|
yield (file_name, 0, "No specification link found.")
|
||||||
else:
|
else:
|
||||||
for check in checking_functions:
|
for check in checking_functions:
|
||||||
for error in check(contents):
|
for error in check(contents):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue