Closed Bug 1559044 Opened 5 years ago Closed 5 years ago

text blinks while page loading

Categories

(Core :: Layout: Text and Fonts, defect, P3)

63 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox67 --- wontfix
firefox67.0.1 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: alice0775, Assigned: jfkthame)

References

(Regression, )

Details

(Keywords: parity-chrome, parity-edge, regression)

Attachments

(1 file)

Reproducible : always

Steps To Reproduce:

  1. Open new tab(any other page)
  2. Load https://www.tvoe.co.jp/inbound/exhibition_list/

Actual Results:
text blinks while page loading

Expected Results:
text should not blink

Because Firefox displays page many times unnecessarily, Firefox rendering is very slow.

This is regression since Firefox63.

At least, until Firefox63, the text blinks only once.
However, Since Firefox63, the text blinks many times 5-10times.

Keywords: regression
Version: Trunk → 63 Branch

(In reply to Alice0775 White from comment #2)

This is regression since Firefox63.

At least, until Firefox63, the text blinks only once.
However, Since Firefox63, the text blinks many times 5-10times.

Regression window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=0ca9cade77252f5b7a11c1cb8d00d792ee25c78a&tochange=1b9dcb1b80dd3f906ab4f59556afe32b71c51d12

Suspect: 0b885ee1e1b218957ceaee8ca70c236a86c83435 Jonathan Kew — Bug 1422530 - Don't initiate new font downloads for a fontGroup where we've already set mSkipDrawing because we're waiting on a resource to be available. r=heycam

Has Regression Range: --- → yes
Regressed by: 1422530

This is caused because the page uses Noto Sans JP (via google fonts), but the font is split into dozens of small subsets for different collections of characters. So we start downloading one of the subsets to satisfy the font request; only after that is downloaded do we find that we need another subset, so we start downloading that; and repeat many times, until we've got them all.

We need to be smarter about recognizing whether there are characters in the content that will not be covered by the current download-in-progress (because of the unicode-range descriptor), and go ahead with starting additional downloads sooner in that case.

Component: Graphics: Text → Layout: Text and Fonts
Priority: -- → P3
Has STR: --- → yes
See Also: → 1557870

https://boxil.jp/mag/ page is also affected

The original patch in bug 1422530 checked whether we're currently hiding a given piece of text
because we're waiting for a resource to download, and used this as a signal that we should not
initiate another download.

However, that's not really a good criterion to use when we're doing font selection for a given
character, both because it's an indirect signal -- whether painting the text is suppressed will
depend on timing and the font-display property -- and because it doesn't consider whether any
resource that's already being downloaded will actually be relevant for the specific character
we're trying to display.

So this patch instead checks for a relevant in-progress load earlier in the font list during
the specific FindFontForChar call, so that when unicode-range is used to split a font across
multiple subsets, an in-progress load for one subset won't make us defer the downloads of other
subsets if they are also needed for the characters present in the text.

With this, the repeated blinking no longer happens on the site here, as loading of all the
required font subsets is initiated early.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b6fa82775392
Improve criteria for deciding whether to kick off download of a @font-face resource, so that we don't defer resources that will actually be needed. r=heycam
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → jfkthame
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: