Remove capability to generate non-basic entities (nsIEntityConverter & nsHTMLEntities)

RESOLVED FIXED in Firefox 57

Status

()

Core
Internationalization
--
enhancement
RESOLVED FIXED
3 years ago
4 months ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

(Blocks: 3 bugs, {footprint})

unspecified
mozilla57
footprint
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
As far as I can tell, the only Firefox user of this functionality is View Selection Source, the MathML feature in particular. It is also used by the DOM Inspector and Firebug extensions. It seems to me that there are no uses either directly or via nsISaveAsCharset in either Firefox for Android or Firefox OS.

We should stop building nsIEntityConverter and the associated property files for mobile to make Gecko slightly smaller on mobile.
Blocks: 1184116
(Assignee)

Updated

2 years ago
Blocks: 942609
(Assignee)

Comment 1

8 months ago
The View MathML Source feature is now available as a Web Extension:
https://groups.google.com/d/msg/mozilla.dev.platform/SMfaMDhTXy8/Wu26wIYfCQAJ
Blocks: 1347507
(Assignee)

Updated

5 months ago
Assignee: nobody → hsivonen
Summary: Stop building nsIEntityConverter and its property files on mobile → Remove capability to generate non-basic entities (nsIEntityConverter & nsHTMLEntities)
(Assignee)

Updated

5 months ago
OS: Gonk (Firefox OS) → All
Comment hidden (mozreview-request)

Comment 3

5 months ago
hg error in cmd: hg push -r . -f try: pushing to ssh://hg.mozilla.org/try
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 14 changesets with 50 changes to 40 files (+1 heads)
remote: autoland push detected
remote: recorded push in pushlog
remote: 
remote: View the pushlog for these changes here:
remote:   https://hg.mozilla.org/try/pushloghtml?changeset=82464b3a6ebda4b5b27ad7ad60301ebe39dceff2
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=82464b3a6ebda4b5b27ad7ad60301ebe39dceff2
remote: recorded changegroup in replication log in 0.053s
remote: ** unknown exception encountered, please report by visiting
remote: ** https://mercurial-scm.org/wiki/BugTracker
remote: ** Python 2.7.5 (default, Nov  6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
remote: ** Mercurial Distributed SCM (version 4.2.2)
remote: ** Extensions loaded: blackbox, clonebundles, obsolescencehacks, pushlog, serverlog, readonly, vcsreplicator
remote: Traceback (most recent call last):
remote:   File "/var/hg/venv_pash/bin/hg", line 45, in <module>
remote:     mercurial.dispatch.run()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 83, in run
remote:     status = (dispatch(req) or 0) & 255
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 164, in dispatch
remote:     ret = _runcatch(req)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 295, in _runcatch
remote:     return _callcatch(ui, _runcatchfunc)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 303, in _callcatch
remote:     return scmutil.callcatch(ui, func)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/scmutil.py", line 146, in callcatch
remote:     return func()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 285, in _runcatchfunc
remote:     return _dispatch(req)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 912, in _dispatch
remote:     cmdpats, cmdoptions)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 648, in runcommand
remote:     ret = _runcommand(ui, options, cmd, d)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 920, in _runcommand
remote:     return cmdfunc()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/dispatch.py", line 909, in <lambda>
remote:     d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/util.py", line 1080, in check
remote:     return func(*args, **kwargs)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/commands.py", line 4663, in serve
remote:     s.serve_forever()
remote:   File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 320, in serve_forever
remote:     return super(sshserverwrapped, self).serve_forever()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/sshserver.py", line 104, in serve_forever
remote:     while self.serve_one():
remote:   File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 351, in serve_one
remote:     return super(sshserverwrapped, self).serve_one()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/sshserver.py", line 122, in serve_one
remote:     rsp = wireproto.dispatch(self.repo, self, cmd)
remote:   File "/var/hg/version-control-tools/hgext/serverlog/__init__.py", line 343, in dispatch
remote:     return origdispatch(repo, proto, cmd)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/extensions.py", line 231, in closure
remote:     return func(*(args + a), **kw)
remote:   File "/var/hg/version-control-tools/pylib/vcsreplicator/vcsreplicator/hgext.py", line 359, in wireprotodispatch
remote:     return orig(repo, proto, command)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/wireproto.py", line 570, in dispatch
remote:     return func(repo, proto, *args)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/wireproto.py", line 982, in unbundle
remote:     proto._client())
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/exchange.py", line 1777, in unbundle
remote:     lockandtr[2].close()
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/transaction.py", line 43, in _active
remote:     return func(self, *args, **kwds)
remote:   File "/var/hg/venv_pash/lib/python2.7/site-packages/mercurial/transaction.py", line 490, in close
remote:     self._postclosecallback[cat](self)
remote:   File "/var/hg/version-control-tools/hgext/pushlog/__init__.py", line 245, in onpostclose
remote:     conn.commit()
remote: sqlite3.OperationalError: database is locked
abort: stream ended unexpectedly (got 0 bytes, expected 4)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Updated

5 months ago
Duplicate of this bug: 1378283
Comment hidden (mozreview-request)

Comment 9

5 months ago
mozreview-review
Comment on attachment 8893724 [details]
Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. .

https://reviewboard.mozilla.org/r/164842/#review170498

::: dom/base/nsCopySupport.cpp:562
(Diff revision 5)
>    NS_ENSURE_TRUE(document->IsHTMLDocument(), NS_OK);
>  
>    // init encoder with document and node
>    rv = docEncoder->NativeInit(document, NS_LITERAL_STRING(kHTMLMime),
>                                nsIDocumentEncoder::OutputAbsoluteLinks |
> -                              nsIDocumentEncoder::OutputEncodeW3CEntities);
> +                              nsIDocumentEncoder::OutputEncodeBasicEntities);

What is this used for?
(Assignee)

Comment 10

5 months ago
mozreview-review-reply
Comment on attachment 8893724 [details]
Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. .

https://reviewboard.mozilla.org/r/164842/#review170498

> What is this used for?

It appears to be used for serializing the HTML markup for an `img` element when exporting an image to the clipboard. So this changes what we export to the clipboard, but even before this, we could export unescaped Unicode HTML to the clipboard, so hopefully no one will notice...
(Assignee)

Comment 11

5 months ago
mozreview-review-reply
Comment on attachment 8893724 [details]
Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. .

https://reviewboard.mozilla.org/r/164842/#review170498

> It appears to be used for serializing the HTML markup for an `img` element when exporting an image to the clipboard. So this changes what we export to the clipboard, but even before this, we could export unescaped Unicode HTML to the clipboard, so hopefully no one will notice...

I'd be shocked if receivers supported MathML entities better than they support unescaped Unicode.

Comment 12

5 months ago
mozreview-review
Comment on attachment 8893724 [details]
Bug 1048191 - Remove capability to generate entities other than quot, amp, gt, lt and nbsp. .

https://reviewboard.mozilla.org/r/164842/#review170532
Attachment #8893724 - Flags: review?(VYV03354) → review+

Comment 13

4 months ago
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4aff598d54bd
Remove capability to generate entities other than quot, amp, gt, lt and nbsp. r=emk.
https://hg.mozilla.org/mozilla-central/rev/4aff598d54bd
Status: NEW → RESOLVED
Last Resolved: 4 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

Comment 15

4 months ago
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/541587cdce4a
Port bug 1048191 to TB/SM/IB: Remove packaging of entityTables. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.