mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: be clearer about resolved_style
This commit is contained in:
parent
1a0175fdbb
commit
9c44062836
1 changed files with 2 additions and 1 deletions
|
@ -795,7 +795,8 @@ pub trait ThreadSafeLayoutNode : Clone + Copy + Sized + PartialEq {
|
|||
/// This differs from `style(ctx)` in that if the pseudo-element has not yet
|
||||
/// been computed it would panic.
|
||||
///
|
||||
/// This should be used just for querying layout, not from layout itself.
|
||||
/// This should be used just for querying layout, or when we know the
|
||||
/// element style is precomputed, not from general layout itself.
|
||||
#[inline]
|
||||
fn resolved_style(&self) -> Ref<Arc<ServoComputedValues>> {
|
||||
Ref::map(self.borrow_layout_data().unwrap(), |data| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue