Auto merge of #18095 - emilio:unused, r=bholley

stylo: Remove some unused FFI functions.

Bug: 1390650
Reviewed-by: bholley
MozReview-Commit-ID: K9fXGRmgkr4

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18095)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-08-15 19:29:45 -05:00 committed by GitHub
commit eba896157e
3 changed files with 0 additions and 37 deletions

View file

@ -511,12 +511,6 @@ extern "C" {
extern "C" { extern "C" {
pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned); pub fn Servo_StyleSet_Drop(ptr: RawServoStyleSetOwned);
} }
extern "C" {
pub fn Gecko_ChildrenCount(node: RawGeckoNodeBorrowed) -> u32;
}
extern "C" {
pub fn Gecko_NodeIsElement(node: RawGeckoNodeBorrowed) -> bool;
}
extern "C" { extern "C" {
pub fn Gecko_IsInDocument(node: RawGeckoNodeBorrowed) -> bool; pub fn Gecko_IsInDocument(node: RawGeckoNodeBorrowed) -> bool;
} }
@ -595,9 +589,6 @@ extern "C" {
extern "C" { extern "C" {
pub fn Gecko_DocumentState(aDocument: *const nsIDocument) -> u64; pub fn Gecko_DocumentState(aDocument: *const nsIDocument) -> u64;
} }
extern "C" {
pub fn Gecko_IsTextNode(node: RawGeckoNodeBorrowed) -> bool;
}
extern "C" { extern "C" {
pub fn Gecko_IsRootElement(element: RawGeckoElementBorrowed) -> bool; pub fn Gecko_IsRootElement(element: RawGeckoElementBorrowed) -> bool;
} }
@ -605,16 +596,9 @@ extern "C" {
pub fn Gecko_MatchesElement(type_: CSSPseudoClassType, pub fn Gecko_MatchesElement(type_: CSSPseudoClassType,
element: RawGeckoElementBorrowed) -> bool; element: RawGeckoElementBorrowed) -> bool;
} }
extern "C" {
pub fn Gecko_LocalName(element: RawGeckoElementBorrowed) -> *mut nsIAtom;
}
extern "C" { extern "C" {
pub fn Gecko_Namespace(element: RawGeckoElementBorrowed) -> *mut nsIAtom; pub fn Gecko_Namespace(element: RawGeckoElementBorrowed) -> *mut nsIAtom;
} }
extern "C" {
pub fn Gecko_GetElementId(element: RawGeckoElementBorrowed)
-> *mut nsIAtom;
}
extern "C" { extern "C" {
pub fn Gecko_MatchLang(element: RawGeckoElementBorrowed, pub fn Gecko_MatchLang(element: RawGeckoElementBorrowed,
override_lang: *mut nsIAtom, override_lang: *mut nsIAtom,
@ -1073,9 +1057,6 @@ extern "C" {
type_: nsStyleContentType) type_: nsStyleContentType)
-> *mut nsStyleContentData_CounterFunction; -> *mut nsStyleContentData_CounterFunction;
} }
extern "C" {
pub fn Gecko_GetNodeFlags(node: RawGeckoNodeBorrowed) -> u32;
}
extern "C" { extern "C" {
pub fn Gecko_SetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32); pub fn Gecko_SetNodeFlags(node: RawGeckoNodeBorrowed, flags: u32);
} }
@ -1105,10 +1086,6 @@ extern "C" {
any_style_changed: *mut bool) any_style_changed: *mut bool)
-> nsChangeHint; -> nsChangeHint;
} }
extern "C" {
pub fn Gecko_HintsHandledForDescendants(aHint: nsChangeHint)
-> nsChangeHint;
}
extern "C" { extern "C" {
pub fn Gecko_GetElementSnapshot(table: *const ServoElementSnapshotTable, pub fn Gecko_GetElementSnapshot(table: *const ServoElementSnapshotTable,
element: RawGeckoElementBorrowed) element: RawGeckoElementBorrowed)

View file

@ -100,15 +100,6 @@ impl GeckoRestyleDamage {
pub fn reconstruct() -> Self { pub fn reconstruct() -> Self {
GeckoRestyleDamage(structs::nsChangeHint_nsChangeHint_ReconstructFrame) GeckoRestyleDamage(structs::nsChangeHint_nsChangeHint_ReconstructFrame)
} }
/// Assuming |self| is applied to an element, returns the set of damage that
/// would be superfluous to apply for descendants.
pub fn handled_for_descendants(self) -> Self {
let hint = unsafe {
bindings::Gecko_HintsHandledForDescendants(self.0)
};
GeckoRestyleDamage(hint)
}
} }
impl Default for GeckoRestyleDamage { impl Default for GeckoRestyleDamage {

View file

@ -135,11 +135,6 @@ impl ServoRestyleDamage {
} }
} }
} }
/// Servo doesn't implement this optimization.
pub fn handled_for_descendants(self) -> Self {
Self::empty()
}
} }
impl Default for ServoRestyleDamage { impl Default for ServoRestyleDamage {