Closed Bug 1362120 Opened 8 years ago Closed 7 years ago

Disabling gfx.font_rendering.opentype_svg.enabled breaks image context paint

Categories

(Firefox :: Theme, defect)

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox-esr45 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 --- fixed

People

(Reporter: u589863, Assigned: jwatt)

References

Details

(Whiteboard: [STR: see comment 9])

Attachments

(3 files)

it allows fingerprinting, CVE-2016-9079(fixed), disabling the preference help in rendering fonts correctly/better(just like woff disabling helps sometimes and more security enhance) on some hardware.
Flags: needinfo?(mmucci)
Flags: needinfo?(jfkthame)
Flags: needinfo?(mmucci) → needinfo?(nhnt11)
Blocks: 1362100
Wouldn't it be better here to restrict those prefs only to the web, but not to the browser ui?
Assignee: nobody → jwatt
Summary: bug1347543 breaks svg → The pref svg.disabled breaks the Firefox UI
(In reply to Darkspirit from comment #2) > Wouldn't it be better here to restrict those prefs only to the web, but not > to the browser ui? My question here, though, is why it has any relation to this bug.the patch here added some SVG images (not an OpenType-SVG font) just like bug 759252, so that pref shouldn't have any effect on it. If it's confirmed that this pref breaks the rendering of SVG images in general, that sounds like something that needs debugging. (I'm sure it didn't originally!)
Flags: needinfo?(jwatt)
Flags: needinfo?(jaws)
Flags: needinfo?(fbraun)
I'd be inclined to keep it around, as opentype-svg support is still a relatively little-used and therefore probably less-tested feature; though IIUC support has now been added in Edge, which may lead to wider adoption in future
Attached image d97y3va.png
I've just reproduced this bug in a new profile: Try to add new bookmark by clicking on a star. Animation is bugged. I haven't found a bug on bugzilla so maybe this is the bug which caused it
tried disabling animations, still animates!!
Component: Untriaged → Theme
Mefoster: please don't set a bunch of needinfo flags on people without good reason (e.g. a specific question that you have reason to believe that person can answer). It just leads to more clutter (in the bug and in people's email). You've already copied my comments from bug 759252 over here in comment 3 and comment 4 above (although they're a bit confusing without the context of what they were replying to), so I don't really have anything useful to add at this point.
Flags: needinfo?(jfkthame)
No longer blocks: 1357093
Mefoster, your behavior is unacceptable. Please be mindful of other people's time and stick to the Bugzilla etiquette as explained at <https://bugzilla.mozilla.org/page.cgi?id=etiquette.html>. Please stop this kind of activity.
Flags: needinfo?(jwatt)
Flags: needinfo?(jaws)
Flags: needinfo?(fbraun)
This bug report is very unclear. Attempting to clean it up. The specific problem being described here appears to be that when gfx.font_rendering.opentype_svg.enabled is set to false (not the default), the bookmark star is black instead of blue. I can reproduce this on OS X with a current Nightly by flipping this one pref, restarting, and then bookmarking a page. As far as I can tell the svg.enabled pref is entirely irrelevant here. Nor do I see any serious "breakage" -- this one icon is simply the wrong color.
Flags: needinfo?(nhnt11)
Summary: The pref svg.disabled breaks the Firefox UI → Disabling gfx.font_rendering.opentype_svg.enabled causes bookmark star to be black instead of blue
This rule (in browser/themes/shared/toolbarbutton-icons.inc.css) isn't working right with this pref enabled: toolbar:not([brighttext]) #bookmarks-menu-button[cui-areatype="toolbar"][starred] > .toolbarbutton-menubutton-button { -moz-context-properties: fill; fill: var(--toolbarbutton-icon-fill-attention); } DevTools says the rule has applied, so presumably there's some interaction with the pref and -moz-context-properties / fill?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [STR: see comment 9]
We could pass through information about whether the consumer is "chrome", but since e10s is the future and flipping this pref is rare I'm not keen on adding a parameter to the necessary functions to do that. We can reconsider if necessary. This patch at least fixes things when running with e10s active.
Attachment #8864823 - Flags: review?(cam)
The change that fixes this bug is the CSS parser change. The gfxPlatform change is for consistency.
Comment on attachment 8864823 [details] [diff] [review] patch - always enable SVG-in-OpenType in the parent process Review of attachment 8864823 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/thebes/gfxPlatform.cpp @@ +1616,5 @@ > } > > + return mOpenTypeSVGEnabled > 0 || > + // is e10s parent process: > + (XRE_IsParentProcess() && BrowserTabsRemoteAutostart()); (It might be nice to have a function that encapsulates this check with a more obvious name, like IsE10sParentProcess or something, since you write it here and in nsCSSParser.cpp, and I see it in at least one other place in the codebase too.)
Attachment #8864823 - Flags: review?(cam) → review+
It also might be nice to have separate prefs for the keywords and for OpenType-in-SVG itself, but that's not super important.
(In reply to Cameron McCormack (:heycam) from comment #13) > > + // is e10s parent process: > > + (XRE_IsParentProcess() && BrowserTabsRemoteAutostart()); > > (It might be nice to have a function that encapsulates this check with a > more obvious name, like IsE10sParentProcess or something I filed bug 1362891.
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/bd9b7b29f956 Always enable SVG-in-OpenType in the parent process. r=heycam
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/50273abf9e11 Always enable SVG-in-OpenType in the parent process. r=heycam
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c4e9e9eab87d Backed out changeset 50273abf9e11 for causing various reftest and browser chrome failures in different tests
(It's the nsCSSParser change that somehow results in the failures.)
Flags: needinfo?(jwatt)
build 14-05-1017 fixed this !
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(cam)
Resolution: --- → INVALID
Flags: needinfo?(cam)
Status: RESOLVED → VERIFIED
The patch for this got backed out, and testing '55.0a1 (2017-05-18) (64-bit)' shows this is not fixed. Maybe your profile lost the gfx.font_rendering.opentype_svg.enabled setting? At any rate, this still needs work.
Status: VERIFIED → REOPENED
Resolution: INVALID → ---
The reason image context paint fails when the pref is disabled is because in CSSParserImpl::ParsePaint we parse for the variant VARIANT_OPENTYPE_SVG_KEYWORD, which means that we parse for the variant VARIANT_KEYWORD only if the pref is enabled. SVG 2 adds the 'context-fill' and 'context-stroke' keywords to <paint>, so we should now parse for the variant VARIANT_KEYWORD regardless of the pref value. https://svgwg.org/svg2-draft/single-page.html#painting-SpecifyingPaint
Summary: Disabling gfx.font_rendering.opentype_svg.enabled causes bookmark star to be black instead of blue → Disabling gfx.font_rendering.opentype_svg.enabled breaks image context paint
Comment on attachment 8873273 [details] [diff] [review] patch - Always allow the 'context-fill'/'context-stroke' keywords in SVG <paint> Review of attachment 8873273 [details] [diff] [review]: ----------------------------------------------------------------- This makes me realize it's a bit confusing that VARIANT_OPENTYPE_SVG_KEYWORD just means "VARIANT_KEYWORD but only if the OT-in-SVG pref is set". (I thought it should mean "parse these specific keywords if the pref is set".)
Attachment #8873273 - Flags: review?(cam) → review+
Indeed. Something like VARIANT_KEYWORD_IF_SVG_OT_ENABLED might be a better name.
Pushed by jwatt@jwatt.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/920a7465a372 Always allow the 'context-fill'/'context-stroke' keywords in SVG <paint>. r=heycam
Attachment #8864823 - Flags: checkin-
Status: REOPENED → RESOLVED
Closed: 8 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: