mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Make the value of assignment to media currentTime the rhs value
In cases where a script assigns `x = video.currentTime = y`, we are expected to have a result of `x === y`, even if the video's duration is less than y. According to the spec, this happens because the official playback position is set to `y` in this case, but since we are following implementations in making `currentTime` immediately return the position on the valid media timeline, we have to specifically return the unchanged value from the setter. See: https://github.com/whatwg/html/issues/11773
This commit is contained in:
parent
9e4c87ab85
commit
93fde59892
Notes:
github-actions[bot]
2025-10-28 00:30:45 +00:00
Author: https://github.com/Zaggy1024
Commit: 93fde59892
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6410
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/gmta ✅
2 changed files with 9 additions and 3 deletions
|
|
@ -95,7 +95,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> load();
|
||||
|
||||
double current_time() const;
|
||||
void set_current_time(double);
|
||||
double set_current_time(double);
|
||||
void fast_seek(double);
|
||||
|
||||
double current_playback_position() const { return m_current_playback_position; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue