mirror of
https://github.com/servo/servo.git
synced 2025-07-30 18:50:36 +01:00
Implement type_id as inherent methods.
This implies LayoutNode no longer needs to return an Option, as it never represents a pseudo-element. Also, fixes lies in the documentation.
This commit is contained in:
parent
f0034b4ac9
commit
dc167ca343
3 changed files with 22 additions and 24 deletions
|
@ -13,7 +13,7 @@ use data::{LayoutDataAccess, LayoutDataWrapper};
|
|||
use incremental::{self, RestyleDamage};
|
||||
use opaque_node::OpaqueNodeMethods;
|
||||
use smallvec::SmallVec16;
|
||||
use wrapper::{LayoutElement, LayoutNode, TLayoutNode};
|
||||
use wrapper::{LayoutElement, LayoutNode};
|
||||
|
||||
use script::dom::characterdata::CharacterDataTypeId;
|
||||
use script::dom::node::NodeTypeId;
|
||||
|
@ -677,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::CharacterData(CharacterDataTypeId::Text)) => {
|
||||
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