Open Bug 2008737 Opened 19 days ago Updated 12 days ago

Update geckoview's ImageResource.fromSizeSrcBundle to look up the icon from "light" instead of "default"

Categories

(WebExtensions :: Android, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

Details

The internal representation of a browserAction/pageAction/action icon is currently defined in IconDetails._normalize, and is currently an object consisting of default, light and dark. In bug 1994948 we attempted to simplify this to just dark and light. The removal of default however caused test failures in GeckoView, described in detail at https://bugzilla.mozilla.org/show_bug.cgi?id=1994948#c14.

As a work-around to counter the test failures, we temporarily restored the default property. But since it is an internal-only implementation detail, we should instead drop default, and rename default to light at https://searchfox.org/firefox-main/rev/33bba5cfe4a89dda0ee07fa9fbac578353713fd3/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/ImageResource.java#307 .
The code there pretends to be generic, but in reality its only uses are in WebExtension code (introduced in bug 1658456), as explained in detail at https://bugzilla.mozilla.org/show_bug.cgi?id=1994948#c16

While editing this piece of code, let's also add explanatory comments and correct the incorrectly named property names: theme_images and themed_icon are mentioned in comments/error messages, but they do not exist.

Severity: -- → N/A
Component: General → Android
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.