Skip to content

Commit 418f157

Browse files
Zaggy1024tcl3
authored andcommitted
LibWeb: Stop returning the value in HTMLMediaElement::set_current_time
This wasn't actually affecting the result in a script assigning a variable to the result of an expression assigning to currentTime.
1 parent 14dba82 commit 418f157

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Libraries/LibWeb/HTML/HTMLMediaElement.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ double HTMLMediaElement::current_time() const
267267
}
268268

269269
// https://html.spec.whatwg.org/multipage/media.html#dom-media-currenttime
270-
double HTMLMediaElement::set_current_time(double current_time)
270+
void HTMLMediaElement::set_current_time(double current_time)
271271
{
272272
// On setting, if the media element's readyState is HAVE_NOTHING, then it must set the media element's default playback start
273273
// position to the new value; otherwise, it must set the official playback position to the new value and then seek to the new
@@ -283,7 +283,6 @@ double HTMLMediaElement::set_current_time(double current_time)
283283

284284
seek_element(current_time);
285285
}
286-
return current_time;
287286
}
288287

289288
// https://html.spec.whatwg.org/multipage/media.html#dom-media-fastseek

Libraries/LibWeb/HTML/HTMLMediaElement.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class HTMLMediaElement : public HTMLElement {
9595
WebIDL::ExceptionOr<void> load();
9696

9797
double current_time() const;
98-
double set_current_time(double);
98+
void set_current_time(double);
9999
void fast_seek(double);
100100

101101
double current_playback_position() const { return m_current_playback_position; }

0 commit comments

Comments
 (0)