Closed Bug 1542807 Opened 4 years ago Closed 2 years ago

Remove legacy layout code path for ::marker (nsBulletFrame)

Categories

(Core :: Layout, task, P2)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox68 --- wontfix
firefox91 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

(Blocks 4 open bugs, Regressed 1 open bug)

Details

(Whiteboard: [layout:backlog], [wptsync upstream])

Attachments

(9 files)

1.39 KB, text/html
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
1.77 KB, text/html
Details
48 bytes, text/x-phabricator-request
Details | Review

We should make 'list-style-type/image' markers take the same
code path as we take for 'content' markers. Then we can
remove nsBulletFrame since it's dead code.

I think this change would also fix the listed blocked bugs.

Type: defect → task
Assignee: nobody → mats
Blocks: 1587039
Blocks: 1600892
Whiteboard: [layout:backlog:code-quality]
Whiteboard: [layout:backlog:code-quality] → [layout:backlog:code-quality][layout:backlog:2020]
Whiteboard: [layout:backlog:code-quality][layout:backlog:2020] → [layout:backlog:quality][layout:backlog:2020]

Now that we triage by severity, setting this bug's priority to P2 to represent near-term backlog status. See https://wiki.mozilla.org/Platform/Layout#Backlog_Tracking_in_Bugzilla

Priority: P3 → P2
Whiteboard: [layout:backlog:quality][layout:backlog:2020] → [layout:backlog]
Blocks: 1688769
Depends on: 1696712
Depends on: 1696713
Depends on: 1697998
Depends on: 1699949
Blocks: 1699949
No longer depends on: 1699949
Blocks: 1605473

Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those. Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).

When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.

We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons. Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome. We used to
ignore these for list-style-type:<string> too.)

Depends on D111692

Per https://github.com/w3c/csswg-drafts/issues/6126 these were
never intended to be included in the first place so this is just
fixing a bug. Note that I'm leaving them in the mRuleFaces array
so that the font loading machinery works the same as before.
I'm just excluding them when queried by document.fonts.

Depends on D111693

As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts. The document certainly has no authority
to block those from loading. (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Depends on D111694

Depends on D111696

Blocks: 1715676
Blocks: 1710623
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eee949e5fd67
part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/cf91e7d0a37f
part 2 - Remove (now unused) nsBulletFrame.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/a71056d4c7cc
part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/e3aee052c495
part 4 - Exclude fonts loaded from User and UserAgent origin sheets from 'document.fonts'.  r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/38daf64afe59
part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets.  r=ckerschb
https://hg.mozilla.org/integration/autoland/rev/8fa0cb199975
part 6 - Update test expectations and fix tests that unintentionally depend on bullet ::marker font metrics.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/e9ef32fa2f2e
part 7 - Update a11y tests.  r=eeejay
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29347 for changes under testing/web-platform/tests
Whiteboard: [layout:backlog] → [layout:backlog], [wptsync upstream]
Upstream PR was closed without merging
Backout by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8e46a708ea73
Backed out 7 changesets for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE

Sigh, inert-retargeting-iframe.tentative.html is just a poorly written test... Filed bug 1716171.

Depends on: 1716171
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/82bc8b9b8bb8
part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/1efb6391d712
part 2 - Remove (now unused) nsBulletFrame.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/9ab332d94fbb
part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/fc9009240a43
part 4 - Exclude fonts loaded from User and UserAgent origin sheets from 'document.fonts'.  r=jfkthame
https://hg.mozilla.org/integration/autoland/rev/5c912a806605
part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets.  r=ckerschb
https://hg.mozilla.org/integration/autoland/rev/04385f050f0e
part 6 - Update test expectations and fix tests that unintentionally depend on bullet ::marker font metrics.  r=emilio
https://hg.mozilla.org/integration/autoland/rev/47b4452c0a60
part 7 - Update a11y tests.  r=eeejay
Blocks: 942017
Blocks: 152588
Blocks: 145075
Blocks: 717514
Blocks: 1156996
Blocks: 1329052
Regressions: 1716708
Regressions: 1717121
Blocks: 1607000
Blocks: 1615050
Upstream PR merged by jgraham
No longer regressions: CVE-2021-29988
Blocks: 1605401
You need to log in before you can comment on or make changes to this bug.