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)
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)
51.46 KB,
image/png
|
Details | |
2.77 KB,
patch
|
heycam
:
review+
jwatt
:
checkin-
|
Details | Diff | Splinter Review |
1.00 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
Comment hidden (obsolete) |
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)
Updated•8 years ago
|
Flags: needinfo?(mmucci) → needinfo?(nhnt11)
Comment 2•8 years ago
|
||
Wouldn't it be better here to restrict those prefs only to the web, but not to the browser ui?
Assignee | ||
Updated•8 years ago
|
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
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
Updated•8 years ago
|
Component: Untriaged → Theme
Comment 7•8 years ago
|
||
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)
Comment 8•8 years ago
|
||
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)
Comment 9•8 years ago
|
||
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
Comment 10•8 years ago
|
||
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]
Assignee | ||
Comment 11•8 years ago
|
||
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)
Updated•8 years ago
|
status-firefox53:
--- → unaffected
status-firefox54:
--- → unaffected
status-firefox55:
--- → affected
status-firefox-esr45:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Assignee | ||
Comment 12•8 years ago
|
||
The change that fixes this bug is the CSS parser change. The gfxPlatform change is for consistency.
Comment 13•8 years ago
|
||
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+
Comment 14•8 years ago
|
||
It also might be nice to have separate prefs for the keywords and for OpenType-in-SVG itself, but that's not super important.
Assignee | ||
Comment 15•8 years ago
|
||
(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.
Comment 16•8 years ago
|
||
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
Comment 17•8 years ago
|
||
Sorry, this caused build failures so I backed it out:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=bd9b7b29f95690ab9c3aacd7864206c68509fa8d
https://hg.mozilla.org/integration/mozilla-inbound/rev/6086ceba2e8c787768266479d694806725e90add
Comment 18•8 years ago
|
||
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
Comment 19•8 years ago
|
||
sorry had to back this out for failures like
https://treeherder.mozilla.org/logviewer.html#?job_id=97251922&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=97251951&repo=mozilla-inbound
https://treeherder.mozilla.org/logviewer.html#?job_id=97251947&repo=mozilla-inbound
and
https://treeherder.mozilla.org/logviewer.html#?job_id=97251920&repo=mozilla-inbound&lineNumber=5498
Flags: needinfo?(jwatt)
Comment 20•8 years ago
|
||
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
Assignee | ||
Comment 21•8 years ago
|
||
(It's the nsCSSParser change that somehow results in the failures.)
Flags: needinfo?(jwatt)
Reporter | ||
Comment 22•8 years ago
|
||
build 14-05-1017 fixed this !
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(cam)
Resolution: --- → INVALID
Assignee | ||
Comment 23•8 years ago
|
||
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 → ---
Assignee | ||
Comment 24•7 years ago
|
||
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
Assignee | ||
Comment 25•7 years ago
|
||
Attachment #8873273 -
Flags: review?(cam)
Comment 26•7 years ago
|
||
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+
Assignee | ||
Comment 27•7 years ago
|
||
Indeed. Something like VARIANT_KEYWORD_IF_SVG_OT_ENABLED might be a better name.
Comment 28•7 years ago
|
||
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
Assignee | ||
Updated•7 years ago
|
Attachment #8864823 -
Flags: checkin-
Comment 29•7 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/11c66c13481d
Update Stylo test expectations.
Comment 30•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/920a7465a372
https://hg.mozilla.org/mozilla-central/rev/11c66c13481d
Status: REOPENED → RESOLVED
Closed: 8 years ago → 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in
before you can comment on or make changes to this bug.