mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Bug 1401317 - Disable lazy pseudo caching when the originating element's primary style was reused via the rule node. r=emilio
MozReview-Commit-ID: IkBa39E1bR1
This commit is contained in:
parent
4abe8002e9
commit
8000d42582
2 changed files with 15 additions and 3 deletions
|
@ -1936,6 +1936,11 @@ extern "C" {
|
||||||
pub fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed)
|
pub fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed)
|
||||||
-> bool;
|
-> bool;
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Servo_Element_IsPrimaryStyleReusedViaRuleNode(element:
|
||||||
|
RawGeckoElementBorrowed)
|
||||||
|
-> bool;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
|
pub fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
|
||||||
gecko_stylesheet:
|
gecko_stylesheet:
|
||||||
|
|
|
@ -18,7 +18,7 @@ use std::ptr;
|
||||||
use style::applicable_declarations::ApplicableDeclarationBlock;
|
use style::applicable_declarations::ApplicableDeclarationBlock;
|
||||||
use style::context::{CascadeInputs, QuirksMode, SharedStyleContext, StyleContext};
|
use style::context::{CascadeInputs, QuirksMode, SharedStyleContext, StyleContext};
|
||||||
use style::context::ThreadLocalStyleContext;
|
use style::context::ThreadLocalStyleContext;
|
||||||
use style::data::ElementStyles;
|
use style::data::{ElementStyles, self};
|
||||||
use style::dom::{ShowSubtreeData, TElement, TNode};
|
use style::dom::{ShowSubtreeData, TElement, TNode};
|
||||||
use style::driver;
|
use style::driver;
|
||||||
use style::element_state::ElementState;
|
use style::element_state::ElementState;
|
||||||
|
@ -836,13 +836,20 @@ pub extern "C" fn Servo_Element_GetPseudoComputedValues(element: RawGeckoElement
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed) -> bool
|
pub extern "C" fn Servo_Element_IsDisplayNone(element: RawGeckoElementBorrowed) -> bool {
|
||||||
{
|
|
||||||
let element = GeckoElement(element);
|
let element = GeckoElement(element);
|
||||||
let data = element.borrow_data().expect("Invoking Servo_Element_IsDisplayNone on unstyled element");
|
let data = element.borrow_data().expect("Invoking Servo_Element_IsDisplayNone on unstyled element");
|
||||||
data.styles.is_display_none()
|
data.styles.is_display_none()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn Servo_Element_IsPrimaryStyleReusedViaRuleNode(element: RawGeckoElementBorrowed) -> bool {
|
||||||
|
let element = GeckoElement(element);
|
||||||
|
let data = element.borrow_data()
|
||||||
|
.expect("Invoking Servo_Element_IsPrimaryStyleReusedViaRuleNode on unstyled element");
|
||||||
|
data.flags.contains(data::PRIMARY_STYLE_REUSED_VIA_RULE_NODE)
|
||||||
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetContentsStrong {
|
pub extern "C" fn Servo_StyleSheet_Empty(mode: SheetParsingMode) -> RawServoStyleSheetContentsStrong {
|
||||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue