Bug 202859

Summary: <input type="range">.setAttribute("value") does not update the value
Product: WebKit Reporter: PhistucK <phistuck>
Component: FormsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, dbates, ddkilzer, esprehn+autocc, ews-watchlist, fred.wang, gyuyoung.kim, joepeck, mifenton, tkent, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=17193
https://bugs.webkit.org/show_bug.cgi?id=186045
Bug Depends on: 203499    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch fred.wang: review+, commit-queue: commit-queue-

Description PhistucK 2019-10-11 11:55:25 PDT
Based on Chromium issue - https://crbug.com/852938 -

const input = document.createElement('input');
 input.type = 'range';
 input.min = 0;
 input.max = 10;
 document.body.appendChild(input);
 requestAnimationFrame(() => {
  requestAnimationFrame(() => {
   input.setAttribute('value', 2);
  });
 });


See the recently added web-platform-test - https://crrev.com/ffdff57271ad1e77d0a277b95f0fbb6ebd02354b/third_party/blink/web_tests/external/wpt/html/semantics/forms/the-input-element/range-setattribute-value.html

The issue also has a small patch that can likely be ported to WebKit -
https://chromium.googlesource.com/chromium/src.git/+/ffdff57271ad1e77d0a277b95f0fbb6ebd02354b
Comment 1 Radar WebKit Bug Importer 2019-10-11 14:36:32 PDT
<rdar://problem/56204271>
Comment 2 Chris Dumez 2019-10-28 13:44:05 PDT
Created attachment 382100 [details]
Patch
Comment 3 Chris Dumez 2019-10-28 15:58:01 PDT
Created attachment 382126 [details]
Patch
Comment 4 Chris Dumez 2019-10-29 08:44:47 PDT
Created attachment 382182 [details]
Patch
Comment 5 WebKit Commit Bot 2019-10-29 11:46:27 PDT
Comment on attachment 382182 [details]
Patch

Rejecting attachment 382182 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 382182, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Logging in as commit-queue@webkit.org...
Fetching: https://bugs.webkit.org/attachment.cgi?id=382182&action=edit
Fetching: https://bugs.webkit.org/show_bug.cgi?id=202859&ctype=xml&excludefield=attachmentdata
Processing 1 patch from 1 bug.
Updating working directory
Processing patch 382182 from bug 202859.
Fetching: https://bugs.webkit.org/attachment.cgi?id=382182
Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Fr\xe9d\xe9ric Wang']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 5 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/html/RangeInputType.cpp
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/TestExpectations
Hunk #1 FAILED at 3940.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/TestExpectations.rej
patching file LayoutTests/platform/mac-wk1/TestExpectations
Hunk #1 succeeded at 795 (offset -4 lines).
Hunk #2 succeeded at 817 (offset -4 lines).

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Fr\xe9d\xe9ric Wang']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Parsed 5 diffs from patch file(s).
patching file Source/WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebCore/html/RangeInputType.cpp
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/TestExpectations
Hunk #1 FAILED at 3940.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/TestExpectations.rej
patching file LayoutTests/platform/mac-wk1/TestExpectations
Hunk #1 succeeded at 795 (offset -4 lines).
Hunk #2 succeeded at 817 (offset -4 lines).

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Fr\xe9d\xe9ric Wang']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
From https://git.webkit.org/git/WebKit
   730cced3b0f..912eb638a48  master     -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 251712 = 730cced3b0f48f0c2e61c09e4be19b1f16995f95
r251713 = 31bd6e34ed1a40acc82db9d64ef851317f893826
r251714 = 8418af8a2662b3d5d40dbccd8de722eb72c5603b
r251715 = ea7ae235842f31baccbba9284196a7a9a5847e6a
r251716 = 912eb638a4835635f9adcb01998737ec43e72445
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: https://webkit-queues.webkit.org/results/13188833
Comment 6 Chris Dumez 2019-10-29 12:03:19 PDT
Committed r251718: <https://trac.webkit.org/changeset/251718>