mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Use empty pseudo to cascade only inheritable properties for text
Since for nested inline elements non-inheritable properties are properly stored in the inline context of an inline fragment, so get rid of them on the style.
This commit is contained in:
parent
1677d479f6
commit
951c050690
8 changed files with 84 additions and 191 deletions
|
@ -32,6 +32,7 @@ pub enum PseudoElement {
|
|||
Selection,
|
||||
DetailsSummary,
|
||||
DetailsContent,
|
||||
ServoText,
|
||||
ServoInputText,
|
||||
ServoTableWrapper,
|
||||
ServoAnonymousTableWrapper,
|
||||
|
@ -52,6 +53,7 @@ impl ToCss for PseudoElement {
|
|||
Selection => "::selection",
|
||||
DetailsSummary => "::-servo-details-summary",
|
||||
DetailsContent => "::-servo-details-content",
|
||||
ServoText => "::-servo-text",
|
||||
ServoInputText => "::-servo-input-text",
|
||||
ServoTableWrapper => "::-servo-table-wrapper",
|
||||
ServoAnonymousTableWrapper => "::-servo-anonymous-table-wrapper",
|
||||
|
@ -87,6 +89,7 @@ impl PseudoElement {
|
|||
PseudoElement::Selection => PseudoElementCascadeType::Eager,
|
||||
PseudoElement::DetailsSummary => PseudoElementCascadeType::Lazy,
|
||||
PseudoElement::DetailsContent |
|
||||
PseudoElement::ServoText |
|
||||
PseudoElement::ServoInputText |
|
||||
PseudoElement::ServoTableWrapper |
|
||||
PseudoElement::ServoAnonymousTableWrapper |
|
||||
|
@ -284,6 +287,12 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
}
|
||||
DetailsContent
|
||||
},
|
||||
"-servo-text" => {
|
||||
if !self.in_user_agent_stylesheet() {
|
||||
return Err(())
|
||||
}
|
||||
ServoText
|
||||
},
|
||||
"-servo-input-text" => {
|
||||
if !self.in_user_agent_stylesheet() {
|
||||
return Err(())
|
||||
|
@ -370,6 +379,7 @@ impl SelectorImpl {
|
|||
fun(PseudoElement::DetailsContent);
|
||||
fun(PseudoElement::DetailsSummary);
|
||||
fun(PseudoElement::Selection);
|
||||
fun(PseudoElement::ServoText);
|
||||
fun(PseudoElement::ServoInputText);
|
||||
fun(PseudoElement::ServoTableWrapper);
|
||||
fun(PseudoElement::ServoAnonymousTableWrapper);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue