mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
stylo: Remove Servo_Element_ShouldTraverse.
This commit is contained in:
parent
57e1b25cbd
commit
2dc9166256
2 changed files with 0 additions and 22 deletions
|
@ -1129,10 +1129,6 @@ extern "C" {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_Element_ClearData(node: RawGeckoElementBorrowed);
|
pub fn Servo_Element_ClearData(node: RawGeckoElementBorrowed);
|
||||||
}
|
}
|
||||||
extern "C" {
|
|
||||||
pub fn Servo_Element_ShouldTraverse(node: RawGeckoElementBorrowed)
|
|
||||||
-> bool;
|
|
||||||
}
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_StyleSheet_Empty(parsing_mode: SheetParsingMode)
|
pub fn Servo_StyleSheet_Empty(parsing_mode: SheetParsingMode)
|
||||||
-> RawServoStyleSheetStrong;
|
-> RawServoStyleSheetStrong;
|
||||||
|
|
|
@ -347,24 +347,6 @@ pub extern "C" fn Servo_Element_ClearData(element: RawGeckoElementBorrowed) -> (
|
||||||
GeckoElement(element).clear_data();
|
GeckoElement(element).clear_data();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub extern "C" fn Servo_Element_ShouldTraverse(element: RawGeckoElementBorrowed) -> bool {
|
|
||||||
let element = GeckoElement(element);
|
|
||||||
debug_assert!(!element.has_dirty_descendants(),
|
|
||||||
"only call Servo_Element_ShouldTraverse if you know the element \
|
|
||||||
does not have dirty descendants");
|
|
||||||
let result = match element.borrow_data() {
|
|
||||||
// Note that we check for has_restyle here rather than has_current_styles,
|
|
||||||
// because we also want the traversal code to trigger if there's restyle
|
|
||||||
// damage. We really only need the Gecko post-traversal in that case, so
|
|
||||||
// the servo traversal will be a no-op, but it's cheap enough that we
|
|
||||||
// don't bother distinguishing the two cases.
|
|
||||||
Some(d) => !d.has_styles() || d.has_restyle(),
|
|
||||||
None => true,
|
|
||||||
};
|
|
||||||
result
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetStrong {
|
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetStrong {
|
||||||
let url = ServoUrl::parse("about:blank").unwrap();
|
let url = ServoUrl::parse("about:blank").unwrap();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue