Open Bug 1470764 Opened 6 years ago Updated 7 months ago

Implement images.theme_ntp_background, properties.ntp_background_{alignment,repeat}

Categories

(WebExtensions :: Themes, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ntim, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [hnt])

Attachments

(2 files)

No description provided.
Component: Theme → Themes
Product: Firefox → WebExtensions
NI for prioritization
Flags: needinfo?(mdeboer)
Flags: needinfo?(mdeboer)
Priority: -- → P3
Assignee: nobody → ntim.bugs
Comment on attachment 8990504 [details] Bug 1470764 - Implement images.theme_ntp_background, properties.ntp_background_{alignment,repeat}. https://reviewboard.mozilla.org/r/255574/#review262370 Code analysis found 1 defect in this patch: - 1 defect found by mozlint You can run this analysis locally with: - `./mach lint path/to/file` (JS/Python) If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx ::: browser/base/content/contentTheme.js:39 (Diff revision 1) > }], > + ["--newtab-background-image", { > + lwtProperty: "ntp_background_image", > + processValue(value, element) { > + if (!value) { > + return null; Error: Trailing spaces not allowed. [eslint: no-trailing-spaces]
Hello, Will this allow dynamic NTP background images? Looks like the type of `theme_ntp_background` is `ExtensionURL`, does it mean I can only use images packaged in the extension? Other properties seems to accept data URLs as well. Thank you.
(In reply to jingyu9575 from comment #5) > Hello, > Will this allow dynamic NTP background images? Looks like the type of > `theme_ntp_background` is `ExtensionURL`, does it mean I can only use images > packaged in the extension? Other properties seems to accept data URLs as > well. > Thank you. Yes, this is for NTP background images. Dynamic theming will work, but data URLs won't work, simply for performance reasons (cross process communication is heavy).
Thanks for the answer. I was thinking about using images not bundled in the extension, e.g. downloading new images daily from free wallpaer sites, or letting users upload their own images, and using them as the background. Without data URLs, how can I pass the non-bundled images to this API?
Assignee: ntim.bugs → nobody
In case someone wants to take over this patch, what's left to do is adding tests, and also fixing the fact that web_accessible_resources is required for the images to work.
Severity: normal → S3
Blocks: 1876160
Assignee: nobody → achurchwell
Whiteboard: [hnt]
Assignee: achurchwell → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: