Convert image-rendering #defines to an enum class.
Categories
(Core :: CSS Parsing and Computation, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox74 | --- | fixed |
People
(Reporter: emilio, Assigned: thomas.dolezal, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++][lang=rust])
Attachments
(1 file, 8 obsolete files)
|
3.52 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
See all the already-fixed bugs blocking bug 1277133 for existing examples of this. But let me know if you need concrete steps and I'm happy to provide them.
Comment 1•6 years ago
|
||
Hi, I am a beginner and wanted to work on this. What steps to follow?
| Reporter | ||
Comment 2•6 years ago
|
||
So you need to replace this set of #defines by something like:
enum class StyleImageRendering : uint8_t {
Auto,
Optimizespeed,
Optimizequality,
CrispEdges,
}
Then you need to add gecko_enum_prefix="StyleImageRendering" to this entry.
Then you need to add mozilla::StyleImageRendering to this list.
Change this line to be:
mozilla::StyleImageRendering mImageRendering;
And then replace all the usages of NS_STYLE_IMAGE_RENDERING_* by the relevant constant (there's only one).
| Assignee | ||
Comment 3•6 years ago
|
||
I took a try at this issue based on how Emilio described. Looking for any feedback.
| Assignee | ||
Comment 4•6 years ago
|
||
Sorry I believe I missed a usage in nsLayoutUtils.cpp
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Comment 6•6 years ago
|
||
| Assignee | ||
Comment 7•6 years ago
|
||
Sorry I had trouble with the patch file
| Assignee | ||
Comment 8•6 years ago
|
||
This patch file should have all my changes
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 9•6 years ago
|
||
I think this patch file should have the formatting properly since i noticed in previous was not looking good, sorry for all the spam
| Reporter | ||
Comment 10•6 years ago
|
||
| Assignee | ||
Comment 11•6 years ago
|
||
I fixed the line to include mImageRendering, I cannot get it too successfully build since the build says something is wrong with the servo style bindings in the toml file. Could there be another place I need to look?
| Reporter | ||
Comment 12•6 years ago
|
||
Could you attach the full error?
| Assignee | ||
Comment 13•6 years ago
|
||
0:17.37 cargo:rerun-if-changed=/home/tom/src/mozilla-central/layout/style/ServoBindings.toml
0:17.37 --- stderr
| Reporter | ||
Updated•6 years ago
|
| Reporter | ||
Comment 14•6 years ago
|
||
| Assignee | ||
Comment 15•6 years ago
|
||
Have fixed the two mistakes in this patch hopefully. It builds successfully
| Assignee | ||
Comment 16•6 years ago
|
||
Patch for the fix
| Reporter | ||
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•