New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 652974 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug-Regression

Blocked on:
issue 602968



Sign in to add a comment

Text renders blank after the first time the extension UI is displayed in a given tab

Project Member Reported by kenmoore@google.com, Oct 5 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
1. On a non-system browser tab, press Alt+T to invoke the extension
2. Notice that the window displays a list of tabs with icons and names
3. Press Esc to dismiss the overlay
4. Press Alt+T to invoke the overlay again

What is the expected behavior?
The text should be visible, as it was the first time the extension was invoked (note: this extension was written a few years ago, and has worked just fine until recently)

What went wrong?
When the extension is re-invoked, all the text is not rendered.  The inspector shows that the text elements are present in the DOM, and if I add a style to one of the .tabmgr-title elements to change the font size, the text for that item will become visible UNLESS I set it to 10px, 12px or 13px ... all other font sizes render properly, those 3 do not render. Strange.

WebStore page: https://chrome.google.com/webstore/detail/tabs/cdbepibloojgbmnofbejfgglmdlifadj

Did this work before? Yes Last time I checked was probably a year ago.

Chrome version: 53.0.2785.143  Channel: stable
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 23.0 r0

Thanks for having a look into it!
 
Project Member

Comment 1 by sheriffbot@chromium.org, Oct 5 2016

Labels: Hotlist-Google
Labels: hasbisect-per-revision M-55 OS-Linux OS-Windows
Owner: rdevlin....@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce on Windows 10, Ubuntu 14.04 and Mac OS 10.11.6 using chrome reported version #53.0.2785.143.

Bisect Information:
=====================
Good build:  47.0.2526.111
Bad Build :  48.0.2560.0

Change Log URL: 
https://chromium.googlesource.com/chromium/src/+log/9fe937fb45fd57da5988abde1e0afc9a7c8bb5d5..aadbd2624c5003698624cf2e21fd6ae876e28629

From the above change log suspecting below change

Review url: https://codereview.chromium.org/1419603004

rdevlin.cronin@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.
rdevlin.cronin@ Ping! Could you please let us know is there any latest update available for this issue?

Thanks!
Issue is still observed on chrome latest stable-54.0.2840.99 version.

rdevlin.cronin@ Could you please let us know is there any recent update available on this issue?

 Thanks!
Components: -Platform>Extensions Blink>DOM
Owner: ----
Status: Untriaged (was: Assigned)
> When the extension is re-invoked, all the text is not rendered.  The inspector shows that the text elements are present in the DOM, and if I add a style to one of the .tabmgr-title elements to change the font size, the text for that item will become visible UNLESS I set it to 10px, 12px or 13px ... all other font sizes render properly, those 3 do not render. Strange.

This sounds like a blink bug.

Comment 6 by tkent@chromium.org, Nov 18 2016

Components: -Blink>DOM Blink>Layout Blink>Paint

Comment 7 by chrishtr@google.com, Nov 18 2016

Components: -Blink>Paint -Blink>Layout Blink>CSS
I suspect this is an issue to do with the injected style sheets not properly
getting applied. If I tweak an element on the main page (not the injected overlay) with devtools to specify a no-op style update then the overlay text
gets painted.

Comment 8 by samli@chromium.org, Nov 20 2016

Labels: -Type-Bug Type-Bug-Regression
Owner: meade@chromium.org
Status: Available (was: Untriaged)

Comment 9 by meade@chromium.org, Nov 24 2016

Cc: meade@chromium.org
Owner: r...@opera.com
I was able to reproduce this easily.
It sounds potentially like an invalidation thing. Rune - do you have any ideas?

Comment 10 by r...@opera.com, Nov 25 2016

Reproducing in Linux Chrome 54.0.2840.100
Cannot reproduce with ToT chrome.

Comment 11 by meade@chromium.org, Nov 25 2016

I can repro in 54.0.2840.100 (64-bit) on Linux by installing the extension, and pressing Alt + T 3 times.

Comment 12 by r...@opera.com, Nov 25 2016

I downloaded 57.0.2933.0 where I can reproduce.

Comment 13 by r...@opera.com, Nov 25 2016

Able to reproduce on ToT built locally as well after retrying a couple of times.

Comment 14 by r...@opera.com, Nov 25 2016

Tried FullStyleUpdate instead of AnalyzedUpdate in StyleEngine::injectAuthorSheet() which effectively does a SubtreeStyleChange on Document. Didn't help.

Comment 15 by r...@opera.com, Nov 25 2016

After a day of printf debugging this seems to point in the direction of webfont loading. The 'Roboto Bold' font is an @font-face in the injected stylesheet and changing the font to anything else, or even change the size as mentioned in comment #5, the text is displayed. Not rendering the text is most likely a FOUT-avoidance and we probably don't get the correct invalidation of fonts after the 'Roboto Bold' font finishes loading. I don't know if this is specific to web-fonts embedded in extensions.

That was all I figured out today.

Comment 16 by r...@opera.com, Nov 30 2016

Components: -Blink>CSS Blink>WebFonts Internals>Skia
Owner: ----
Status: Untriaged (was: Available)
Discussed with fs@opera.com. We think this is related to bitmapped fonts because of the fact that it's not working for certain sizes (see comment #5). Setting back to Untriaged.

Comment 17 by r...@opera.com, Nov 30 2016

Cc: r...@opera.com

Comment 18 by meade@chromium.org, Nov 30 2016

Thanks for putting in all that effort Rune! Much appreciated :)
Owner: ksakamoto@chromium.org
Status: Assigned (was: Untriaged)
Thanks Rune. Looks like a font invalidation issue, let me take a look.
Components: -Internals>Skia Blink>Loader
Created a reduced test case: https://codereview.chromium.org/2550663002
Something is wrong with cache revalidation of font resources.

Comment 21 by rdb@chromium.org, Dec 2 2016

Go team! 

Comment 22 by r...@opera.com, Dec 2 2016

Font::drawText() returns early because shouldSkipDrawing() returns true even long after the font finishes loading. At the bottom level of that call we end up in CSSCustomFontData::shouldSkipDrawing() which returns true because this is true:

  m_fallbackVisibility == InvisibleFallback && m_isLoading;

In fact, I don't see a single place in the code where m_isLoading can ever be set back to false after being set to true in beginLoadIfNeeded().

Comment 23 by r...@opera.com, Dec 2 2016

Hmm, seems that could be the mode of operandi for that class as it's only instantiated from createLoadingFallbackFontData.
Blockedon: 602968
Project Member

Comment 25 by bugdroid1@chromium.org, Mar 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a

commit 99cc846f07ae952c27c026f7a4ddc0dbfba0a83a
Author: ksakamoto <ksakamoto@chromium.org>
Date: Fri Mar 03 07:24:10 2017

RemoteFontFaceSource should keep FontCustomPlatformData over FontResource revalidation

RemoteFontFaceSource assumed that FontResource::isLoaded() never returns
false after notifyFinished(), but FontResource can go back to "loading"
state by resource revalidation. This caused a bug where webfonts are not
displayed when loaded in one frame and immediately revalidated in
another frame.

To fix this bug, this CL does the following:
- Make FontCustomPlatformData RefCounted.
- Make RemoteFontFaceSource to get RefPtr<FontCustomPlatformData> and
  use it in RemoteFontFaceSource::createFontData().
- RemoteFontFaceSource never accesses FontResource after notifyFinished().

BUG= 602968 ,  652974 ,  692574 

Review-Url: https://codereview.chromium.org/2717123003
Cr-Commit-Position: refs/heads/master@{#454537}

[add] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation-expected.html
[add] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation.html
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/core/css/BinaryDataFontFaceSource.h
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/core/loader/resource/FontResource.cpp
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/core/loader/resource/FontResource.h
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h
[modify] https://crrev.com/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a/third_party/WebKit/Source/platform/testing/FontTestHelpers.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment