Bug 1691868 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I noticed a few broken pieces of code that are trying to use the content policy `TYPE_INTERNAL_IMAGE_FAVICON` for favicon loads from bookmark menu items, but not succeeding at it:
 - `nsMenuItemIconX` (used for native menus on macOS) [calls `GetContentPolicyTypeForUIImageLoading`](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/widget/cocoa/nsMenuItemIconX.mm#162-165) but then doesn't use `mContentType` for anything.
 - `GetContentPolicyTypeForUIImageLoading` only returns `TYPE_INTERNAL_IMAGE_FAVICON` if `QueryTriggeringPrincipal` returns `true`, which it only does [if the loading node has a `triggeringprincipal` attribute with a deserializable principal](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/dom/base/nsContentUtils.cpp#9719). Bug 1319908 [added code](https://hg.mozilla.org/mozilla-central/rev/5021d272e953#l1.33) to `browser-places.js` which set that attribute, but this code does not seem to have survived.
I noticed a few broken pieces of code that are trying to use the content policy `TYPE_INTERNAL_IMAGE_FAVICON` for favicon loads from bookmark menu items, but not succeeding at it:
 - `nsMenuItemIconX` (used for native menus on macOS) [calls `GetContentPolicyTypeForUIImageLoading`](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/widget/cocoa/nsMenuItemIconX.mm#162-165) but then doesn't use `mContentType` for anything.
 - `GetContentPolicyTypeForUIImageLoading` only returns `TYPE_INTERNAL_IMAGE_FAVICON` if `QueryTriggeringPrincipal` returns `true`, which it only does [if the loading node has a `triggeringprincipal` attribute](https://searchfox.org/mozilla-central/rev/7067bbd8194f4346ec59d77c33cd88f06763e090/dom/base/nsContentUtils.cpp#9719) with a deserializable principal. Bug 1319908 [added code](https://hg.mozilla.org/mozilla-central/rev/5021d272e953#l1.33) to `browser-places.js` which set that attribute, but this code does not seem to have survived.

Back to Bug 1691868 Comment 0