diff options
author | Jinwoo Song <jinwoo7.song@samsung.com> | 2015-04-28 14:09:31 +0900 |
---|---|---|
committer | Jinwoo Song <jinwoo7.song@samsung.com> | 2015-04-29 13:30:21 +0900 |
commit | f404853c99a5e4912bff09882d20e1856fbd405b (patch) | |
tree | 480b9d9e5af1e091bd419d62c0a8e14107647b0b /components/layout/css | |
parent | 1e150140bd12624ad357e3168fb496079fb8ec7c (diff) | |
download | servo-f404853c99a5e4912bff09882d20e1856fbd405b.tar.gz servo-f404853c99a5e4912bff09882d20e1856fbd405b.zip |
Make NodeTypeId include CharacterData variant
NodeTypeId is supposed to reflect the WebIDL inheritance hierarchy.
All of Text/ProcessingInstruction/Comment inherit from CharacterData,
which inherits from Node. There should be a CharacterDataTypeId value
that differentiates between those, instead.
Diffstat (limited to 'components/layout/css')
-rw-r--r-- | components/layout/css/matching.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/layout/css/matching.rs b/components/layout/css/matching.rs index b29ea3cad9c..27533070bdf 100644 --- a/components/layout/css/matching.rs +++ b/components/layout/css/matching.rs @@ -14,6 +14,7 @@ use incremental::{self, RestyleDamage}; use opaque_node::OpaqueNodeMethods; use wrapper::{LayoutElement, LayoutNode, TLayoutNode}; +use script::dom::characterdata::CharacterDataTypeId; use script::dom::node::NodeTypeId; use script::layout_interface::Animation; use selectors::bloom::BloomFilter; @@ -676,7 +677,7 @@ impl<'ln> MatchMethods for LayoutNode<'ln> { &mut None => panic!("no layout data"), &mut Some(ref mut layout_data) => { match self.type_id() { - Some(NodeTypeId::Text) => { + Some(NodeTypeId::CharacterData(CharacterDataTypeId::Text)) => { // Text nodes get a copy of the parent style. This ensures // that during fragment construction any non-inherited // CSS properties (such as vertical-align) are correctly |