Details
- Reviewers
emilio - Group Reviewers
webidl Restricted Project layout-reviewers - Commits
- rFIREFOXAUTOLAND43f88cf6a158: Bug 1919718 - Part 2: Implement HTMLInputElement.alpha r=emilio,webidl,firefox…
rFIREFOXAUTOLAND7a1ca0d96275: Bug 1919718 - Part 2: Implement HTMLInputElement.alpha r=emilio,webidl,firefox… - Bugzilla Bug ID
- 1919718
Diff Detail
- Repository
- rFIREFOXAUTOLAND firefox-autoland
- Build Status
Buildable 899040 Build 1000136: arc lint + arc unit
Event Timeline
Code analysis found 2 defects in diff 1182371:
- 1 defect found by clang-format
- 1 defect found by clang-format (Mozlint)
You can run this analysis locally with:
- ./mach lint --warnings --outgoing
- ./mach clang-format -p dom/html/HTMLInputElement.cpp
For your convenience, here is a patch that fixes all the clang-format defects (use it in your repository with hg import or git apply -p0).
If you see a problem in this automated review, please report it here.
You can view these defects in the Diff Detail section of Phabricator diff 1182371.
| dom/html/HTMLInputElement.cpp | ||
|---|---|---|
| 796–798 | This reads extra weird: "if not set alpha, then set alpha to 1.0". Maybe !aAllowAlpha or something? | |
| 2212 | This doesn't seem safe? You're not making it required. Either do so or check whether it's present? | |
| layout/forms/nsColorControlFrame.cpp | ||
| 87 | Please fix the comment, but also this is a web-exposed change: you can currently override ::-moz-color-swatch { background-color: blue } or something, since this was not !important, right? Have you done some analysis of whether people are using this? I assume this is safe to change, but might be worth having a pref just in case... | |
| layout/style/res/forms.css | ||
| 442 | Using custom properties in UA stylesheets is generally a massive smell. It works here because the property is always set and this element happens to but I'm still not a fan. Instead, wdyt of just changing background-color: with color:, and using currentColor here? Also, no need to repeat the same color twice, just background-image: linear-gradient(var(--overlay-color)) would work. Also, does #ccc work fine in dark mode? | |
| 447 | Can you elaborate on the background-size/background-position? Why do you need to specify them? Doesn't the default just work if you make the gradient stops pixels rather than percentages? | |
| dom/html/HTMLInputElement.cpp | ||
|---|---|---|
| 2212 | The picker always send it though, only the element send it optionally. Maybe MOZ_ASSERT is enough? | |
| layout/forms/nsColorControlFrame.cpp | ||
| 87 | Wait, it's web exposed?! 🤯 | |
| layout/style/res/forms.css | ||
| 442 | SGTM, will try. #ccc works fine but probably I should check the difference from the light mode. | |
| 447 | This was a copypaste from color picker CSS, I'll check whether it works and maybe fix it there too. | |
The analysis task source-test-clang-external failed, but we could not detect any defect.
Please check this task manually.
The analysis task source-test-clang-tidy failed, but we could not detect any defect.
Please check this task manually.
If you see a problem in this automated review, please report it here.
| dom/html/HTMLInputElement.cpp | ||
|---|---|---|
| 796–798 |
This doesn't seem addressed and I think it still reads very weird, but it's not a huge deal. | |
| dom/webidl/HTMLInputElement.webidl | ||
| 307–308 | Do you need unrestricted float to not sanitize NaNs away? | |
| dom/html/HTMLInputElement.cpp | ||
|---|---|---|
| 796–798 |
WFM :) | |