mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix match_refs and let_returns in layout, address review changes
This commit is contained in:
parent
5c24da3e2d
commit
8e2c37a542
12 changed files with 54 additions and 62 deletions
|
@ -522,8 +522,8 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> {
|
|||
let parent_layout_data: &Option<LayoutDataWrapper> = unsafe {
|
||||
&*parent_node.borrow_layout_data_unchecked()
|
||||
};
|
||||
match parent_layout_data {
|
||||
&Some(ref parent_layout_data_ref) => {
|
||||
match *parent_layout_data {
|
||||
Some(ref parent_layout_data_ref) => {
|
||||
// Check parent style.
|
||||
let parent_style = parent_layout_data_ref.shared_data.style.as_ref().unwrap();
|
||||
if !arc_ptr_eq(parent_style, &candidate.parent_style) {
|
||||
|
@ -678,9 +678,9 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
};
|
||||
|
||||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
match &mut *layout_data_ref {
|
||||
&mut None => panic!("no layout data"),
|
||||
&mut Some(ref mut layout_data) => {
|
||||
match *layout_data_ref {
|
||||
None => panic!("no layout data"),
|
||||
Some(ref mut layout_data) => {
|
||||
match self.type_id() {
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::Text) => {
|
||||
// Text nodes get a copy of the parent style. This ensures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue