Skip to content

Commit

Permalink
chore: update test expectations and remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
eerii committed Mar 28, 2024
1 parent 6cabb42 commit b84d3e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
19 changes: 7 additions & 12 deletions components/script/dom/htmlvideoelement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,17 @@ impl VirtualMethods for HTMLVideoElement {
match attr.local_name() {
&local_name!("poster") => match mutation {
AttributeMutation::Set(_) => {
println!("set");
if let Some(new_value) = mutation.new_value(attr) {
self.fetch_poster_frame(&new_value)
}
},
AttributeMutation::Removed => {
println!("remove");
self.htmlmediaelement.clear_current_frame();
},
AttributeMutation::Removed => self.htmlmediaelement.clear_current_frame(),
},
&local_name!("src") => {
if matches!(mutation, AttributeMutation::Removed) {
self.set_video_width(DEFAULT_WIDTH);
self.set_video_height(DEFAULT_HEIGHT);
}
},
_ => (),
};
Expand Down Expand Up @@ -485,13 +487,6 @@ impl LayoutHTMLVideoElementHelpers for LayoutDom<'_, HTMLVideoElement> {
video.set_video_width(x * 2);
};

println!(
"frame: {:?} wh: {} {}",
current_frame,
video.get_video_width(),
video.get_video_height()
);

HTMLMediaData {
current_frame: current_frame.map(|frame| frame.0),
width: current_frame.map_or(video.get_video_width() as i32, |frame| frame.1),
Expand Down

This file was deleted.

0 comments on commit b84d3e8

Please sign in to comment.