layout: be clearer about resolved_style

This commit is contained in:
Emilio Cobos Álvarez 2016-04-27 10:54:55 +02:00
parent 1a0175fdbb
commit 9c44062836
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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| {