mirror of
https://github.com/servo/servo.git
synced 2025-08-19 04:15:33 +01:00
Bug 1366144: Correctly diff ::before and ::after pseudo-element styles if there's no generated content. r=heycam
MozReview-Commit-ID: BHSxMJd0G0O Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
5a012cc9b1
commit
605974a112
3 changed files with 77 additions and 23 deletions
|
@ -141,6 +141,13 @@ impl ComputedValues {
|
|||
self.get_box().clone_display() == longhands::display::computed_value::T::contents
|
||||
}
|
||||
|
||||
/// Returns true if the value of the `content` property would make a
|
||||
/// pseudo-element not rendered.
|
||||
#[inline]
|
||||
pub fn ineffective_content_property(&self) -> bool {
|
||||
self.get_counters().ineffective_content_property()
|
||||
}
|
||||
|
||||
% for style_struct in data.style_structs:
|
||||
#[inline]
|
||||
pub fn clone_${style_struct.name_lower}(&self) -> Arc<style_structs::${style_struct.name}> {
|
||||
|
@ -4204,6 +4211,10 @@ clip-path
|
|||
|
||||
<%self:impl_trait style_struct_name="Counters"
|
||||
skip_longhands="content counter-increment counter-reset">
|
||||
pub fn ineffective_content_property(&self) -> bool {
|
||||
self.gecko.mContents.is_empty()
|
||||
}
|
||||
|
||||
pub fn set_content(&mut self, v: longhands::content::computed_value::T) {
|
||||
use properties::longhands::content::computed_value::T;
|
||||
use properties::longhands::content::computed_value::ContentItem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue