mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
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.
This commit is contained in:
parent
1e150140bd
commit
f404853c99
9 changed files with 67 additions and 78 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue