mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Remove pretty useless layer of abstraction.
This commit is contained in:
parent
49e6594bc9
commit
d570fc8164
2 changed files with 10 additions and 19 deletions
|
@ -22,7 +22,6 @@ use context::{QuirksMode, SharedStyleContext, PostAnimationTasks, UpdateAnimatio
|
|||
use data::ElementData;
|
||||
use dom::{LayoutIterator, NodeInfo, OpaqueNode, TElement, TDocument, TNode};
|
||||
use element_state::{ElementState, DocumentState};
|
||||
use error_reporting::ParseErrorReporter;
|
||||
use font_metrics::{FontMetrics, FontMetricsProvider, FontMetricsQueryResult};
|
||||
use gecko::data::PerDocumentStyleData;
|
||||
use gecko::global_style_data::GLOBAL_STYLE_DATA;
|
||||
|
@ -68,7 +67,7 @@ use gecko_bindings::sugar::ownership::{HasArcFFI, HasSimpleFFI};
|
|||
use hash::FnvHashMap;
|
||||
use logical_geometry::WritingMode;
|
||||
use media_queries::Device;
|
||||
use properties::{ComputedValues, LonghandId, parse_style_attribute};
|
||||
use properties::{ComputedValues, LonghandId};
|
||||
use properties::{Importance, PropertyDeclaration, PropertyDeclarationBlock};
|
||||
use properties::animated_properties::{AnimationValue, AnimationValueMap};
|
||||
use properties::animated_properties::TransitionProperty;
|
||||
|
@ -89,7 +88,6 @@ use std::mem;
|
|||
use std::ops::DerefMut;
|
||||
use std::ptr;
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
use stylesheets::UrlExtraData;
|
||||
use stylist::Stylist;
|
||||
|
||||
/// A simple wrapper over `nsIDocument`.
|
||||
|
@ -495,19 +493,7 @@ impl<'le> GeckoElement<'le> {
|
|||
self.as_node().get_bool_flag(nsINode_BooleanFlag::ElementMayHaveAnonymousChildren)
|
||||
}
|
||||
|
||||
/// Parse the style attribute of an element.
|
||||
pub fn parse_style_attribute<R>(
|
||||
value: &str,
|
||||
url_data: &UrlExtraData,
|
||||
quirks_mode: QuirksMode,
|
||||
reporter: &R,
|
||||
) -> PropertyDeclarationBlock
|
||||
where
|
||||
R: ParseErrorReporter,
|
||||
{
|
||||
parse_style_attribute(value, url_data, reporter, quirks_mode)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn flags(&self) -> u32 {
|
||||
self.raw_node()._base._base_1.mFlags
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue