mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Code review comments and upstream merge conflicts
Incorporated code review comments in components/net/http_loader.rs Resolved merge conflicts in cargo.lock file. Updated ReferrerPolicy in lib.rs
This commit is contained in:
commit
26dac98546
340 changed files with 9134 additions and 452 deletions
|
@ -236,10 +236,12 @@ COMPILATION_TARGETS = {
|
|||
"target_dir": "../gecko_bindings",
|
||||
"blacklist_types": [
|
||||
"nsACString_internal",
|
||||
"nsAString_internal",
|
||||
],
|
||||
"raw_lines": [
|
||||
"pub use nsstring::nsACString;",
|
||||
"pub use nsstring::{nsACString, nsAString};",
|
||||
"type nsACString_internal = nsACString;",
|
||||
"type nsAString_internal = nsAString;"
|
||||
],
|
||||
"flags": [
|
||||
"--ignore-methods",
|
||||
|
|
|
@ -32,14 +32,14 @@ def msvc32_symbolify(source, ident):
|
|||
|
||||
|
||||
class GkAtomSource:
|
||||
PATTERN = re.compile('^GK_ATOM\((.+),\s*"(.*)"\)')
|
||||
PATTERN = re.compile('^GK_ATOM\((?P<ident>.+),\s*"(?P<value>.*)"\)', re.M)
|
||||
FILE = "dist/include/nsGkAtomList.h"
|
||||
CLASS = "nsGkAtoms"
|
||||
TYPE = "nsIAtom"
|
||||
|
||||
|
||||
class CSSPseudoElementsAtomSource:
|
||||
PATTERN = re.compile('^CSS_PSEUDO_ELEMENT\((.+),\s*"(.*)",')
|
||||
PATTERN = re.compile('^CSS_PSEUDO_ELEMENT\((?P<ident>.+),\s*"(?P<value>.*)",', re.M)
|
||||
FILE = "dist/include/nsCSSPseudoElementList.h"
|
||||
CLASS = "nsCSSPseudoElements"
|
||||
# NB: nsICSSPseudoElement is effectively the same as a nsIAtom, but we need
|
||||
|
@ -48,16 +48,24 @@ class CSSPseudoElementsAtomSource:
|
|||
|
||||
|
||||
class CSSAnonBoxesAtomSource:
|
||||
PATTERN = re.compile('^CSS_ANON_BOX\((.+),\s*"(.*)"\)')
|
||||
PATTERN = re.compile('^CSS_ANON_BOX\((?P<ident>.+),\s*"(?P<value>.*)"\)', re.M)
|
||||
FILE = "dist/include/nsCSSAnonBoxList.h"
|
||||
CLASS = "nsCSSAnonBoxes"
|
||||
TYPE = "nsICSSAnonBoxPseudo"
|
||||
|
||||
|
||||
class CSSPropsAtomSource:
|
||||
PATTERN = re.compile('^CSS_PROP_[A-Z]+\(\s*(?P<value>[^,]+),\s*(?P<ident>[^,]+)', re.M)
|
||||
FILE = "dist/include/nsCSSPropList.h"
|
||||
CLASS = "nsCSSProps"
|
||||
TYPE = "nsICSSProperty"
|
||||
|
||||
|
||||
SOURCES = [
|
||||
GkAtomSource,
|
||||
CSSPseudoElementsAtomSource,
|
||||
CSSAnonBoxesAtomSource,
|
||||
CSSPropsAtomSource,
|
||||
]
|
||||
|
||||
|
||||
|
@ -95,10 +103,14 @@ def collect_atoms(objdir):
|
|||
atoms = []
|
||||
for source in SOURCES:
|
||||
with open(os.path.join(objdir, source.FILE)) as f:
|
||||
for line in f.readlines():
|
||||
result = re.match(source.PATTERN, line)
|
||||
if result:
|
||||
atoms.append(Atom(source, result.group(1), result.group(2)))
|
||||
content = f.read()
|
||||
found = set()
|
||||
for match in source.PATTERN.finditer(content):
|
||||
ident = match.group('ident')
|
||||
if ident in found:
|
||||
continue
|
||||
found.add(ident)
|
||||
atoms.append(Atom(source, ident, match.group('value')))
|
||||
return atoms
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/* automatically generated by rust-bindgen */
|
||||
|
||||
pub use nsstring::nsACString;
|
||||
pub use nsstring::{nsACString, nsAString};
|
||||
type nsACString_internal = nsACString;
|
||||
type nsAString_internal = nsAString;
|
||||
pub type ServoComputedValuesStrong = ::gecko_bindings::sugar::ownership::Strong<ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowedOrNull<'a> = Option<&'a ServoComputedValues>;
|
||||
pub type ServoComputedValuesBorrowed<'a> = &'a ServoComputedValues;
|
||||
|
@ -922,16 +923,73 @@ extern "C" {
|
|||
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_CreateEmpty()
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_Clone(declarations:
|
||||
RawServoDeclarationBlockBorrowed)
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_Equals(a: RawServoDeclarationBlockBorrowed,
|
||||
b: RawServoDeclarationBlockBorrowed)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_GetCssText(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
result: *mut nsAString_internal);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_SerializeOneValue(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
buffer: *mut nsString);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_Count(declarations:
|
||||
RawServoDeclarationBlockBorrowed)
|
||||
-> u32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_GetNthProperty(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
index: u32,
|
||||
result:
|
||||
*mut nsAString_internal)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_GetPropertyValue(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
property: *mut nsIAtom,
|
||||
is_custom: bool,
|
||||
value:
|
||||
*mut nsAString_internal);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_GetPropertyIsImportant(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
property:
|
||||
*mut nsIAtom,
|
||||
is_custom: bool)
|
||||
-> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_SetProperty(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
property: *mut nsIAtom,
|
||||
is_custom: bool,
|
||||
value: *mut nsACString_internal,
|
||||
is_important: bool) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_RemoveProperty(declarations:
|
||||
RawServoDeclarationBlockBorrowed,
|
||||
property: *mut nsIAtom,
|
||||
is_custom: bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_CSSSupports(name: *const nsACString_internal,
|
||||
value: *const nsACString_internal) -> bool;
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue