mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.
MozReview-Commit-ID: 7wH5XcILVmX
This commit is contained in:
parent
e1eff691f8
commit
992f7dddf4
35 changed files with 1465 additions and 901 deletions
|
@ -8,13 +8,17 @@ use gecko_bindings::structs;
|
|||
use gecko_bindings::structs::{nsChangeHint, nsStyleContext};
|
||||
use gecko_bindings::sugar::ownership::FFIArcHelpers;
|
||||
use properties::ComputedValues;
|
||||
use std::ops::BitOr;
|
||||
use std::ops::{BitOr, BitOrAssign};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct GeckoRestyleDamage(nsChangeHint);
|
||||
|
||||
impl GeckoRestyleDamage {
|
||||
pub fn new(raw: nsChangeHint) -> Self {
|
||||
GeckoRestyleDamage(raw)
|
||||
}
|
||||
|
||||
pub fn as_change_hint(&self) -> nsChangeHint {
|
||||
self.0
|
||||
}
|
||||
|
@ -50,3 +54,8 @@ impl BitOr for GeckoRestyleDamage {
|
|||
}
|
||||
}
|
||||
|
||||
impl BitOrAssign for GeckoRestyleDamage {
|
||||
fn bitor_assign(&mut self, other: Self) {
|
||||
*self = *self | other;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue