WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
227941
Web Inspector: REGRESSION(?): alpha slider doesn't match alpha input for `transparent` in color picker
https://bugs.webkit.org/show_bug.cgi?id=227941
Summary
Web Inspector: REGRESSION(?): alpha slider doesn't match alpha input for `tra...
Devin Rousso
Reported
2021-07-13 22:11:26 PDT
# STEPS TO REPRODUCE 1. inspect any page 2. add CSS `color: transparent` 3. click the color swatch to show the color picker # EXPECTED the alpha slider would be at the bottom and the alpha input would say `0` # ACTUAL the alpha slider is at the top and the alpha input says `0`
Attachments
Patch
(1.29 KB, patch)
2021-07-19 10:58 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Patch
(1.29 KB, patch)
2021-07-19 11:23 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Patch
(1.35 KB, patch)
2021-07-19 11:31 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-07-13 22:11:43 PDT
<
rdar://problem/80557438
>
Nikita Vasilyev
Comment 2
2021-07-19 10:56:01 PDT
Reduction: data:text/html,<p%20style="color:transparent">color
Nikita Vasilyev
Comment 3
2021-07-19 10:58:18 PDT
Created
attachment 433799
[details]
Patch
Devin Rousso
Comment 4
2021-07-19 11:05:05 PDT
Comment on
attachment 433799
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=433799&action=review
> Source/WebInspectorUI/ChangeLog:11 > + When the initial value was set to 0, the `set value` was exiting early when the passed value was 0.
Based on this, it seems like the real issue is that the initial value of `_knobY` is really the incorrect value? Changing to `NaN` seems a bit scary since there's no handling of `isNaN` anywhere in this file. Perhaps we just need to add a `recalculateKnobY` call inside the early return in `set value`?
Nikita Vasilyev
Comment 5
2021-07-19 11:22:55 PDT
This works as well.
Nikita Vasilyev
Comment 6
2021-07-19 11:23:09 PDT
Created
attachment 433801
[details]
Patch
Devin Rousso
Comment 7
2021-07-19 11:24:36 PDT
Comment on
attachment 433801
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=433801&action=review
> Source/WebInspectorUI/UserInterface/Views/Slider.js:61 > + this.recalculateKnobY();
We should only need to do this inside the `if (value === this._value)`. As you have it now, we'd call `set knobY` twice in the non-early-return path.
Nikita Vasilyev
Comment 8
2021-07-19 11:31:16 PDT
Created
attachment 433804
[details]
Patch
Devin Rousso
Comment 9
2021-07-19 11:39:11 PDT
Comment on
attachment 433804
[details]
Patch r=me
EWS
Comment 10
2021-07-19 13:50:03 PDT
Committed
r280045
(
239780@main
): <
https://commits.webkit.org/239780@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 433804
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug