Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Issue 2717123003: RemoteFontFaceSource should keep FontCustomPlatformData over FontResource revalidation (Closed)

Created:
3 years, 9 months ago by Kunihiko Sakamoto
Modified:
3 years, 9 months ago
CC:
chromium-reviews, Stephen Chennney, krit, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-css, dshwang, pdr+graphicswatchlist_chromium.org, jbroman, fmalita+watch_chromium.org, dglazkov+blink, Rik, apavlov+blink_chromium.org, Justin Novosad, darktears, blink-reviews, kinuko+watch, ajuma+watch_chromium.org, danakj+watch_chromium.org, rwlbuis, Nate Chapin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/99cc846f07ae952c27c026f7a4ddc0dbfba0a83a

Patch Set 1 #

Total comments: 8

Patch Set 2 : comments #

Total comments: 2

Patch Set 3 : test description #

Messages

Total messages: 38 (26 generated)
Kunihiko Sakamoto
PTAL This is based on the suggestion by hiroshige@ at https://codereview.chromium.org/2550663002/#msg14 .
3 years, 9 months ago (2017-02-27 10:21:18 UTC) #16
Takashi Toyoshima
I can not find any problem on this change, but have some comments. https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File ...
3 years, 9 months ago (2017-02-27 12:56:02 UTC) #19
hiroshige
https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode140 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:140: m_font = nullptr; I love clearing |m_font| here, but ...
3 years, 9 months ago (2017-02-28 00:18:28 UTC) #20
Kunihiko Sakamoto
https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode140 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:140: m_font = nullptr; On 2017/02/28 00:18:28, hiroshige wrote: > ...
3 years, 9 months ago (2017-02-28 04:04:02 UTC) #21
Takashi Toyoshima
lgtm, defer to hiroshige. https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2717123003/diff/80001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode140 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:140: m_font = nullptr; https://www.chromestatus.com/metrics/feature/popularity#CSSAtRuleFontFace https://www.chromestatus.com/metrics/feature/popularity#FontFaceConstructor ...
3 years, 9 months ago (2017-03-01 06:44:07 UTC) #22
hiroshige
lgtm. (I feel I'd like to further refactor things around FontResource::getCustomFontData(), but it will be ...
3 years, 9 months ago (2017-03-01 20:30:45 UTC) #23
hiroshige
> If this could affect, we may want to consider having a > reference in ...
3 years, 9 months ago (2017-03-01 22:17:05 UTC) #24
Kunihiko Sakamoto
+kinuko for core/ and platform/ OWNERS review https://codereview.chromium.org/2717123003/diff/100001/third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation.html File third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation.html (right): https://codereview.chromium.org/2717123003/diff/100001/third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation.html#newcode24 third_party/WebKit/LayoutTests/http/tests/webfont/font-face-revalidation.html:24: You should ...
3 years, 9 months ago (2017-03-03 02:17:24 UTC) #25
Kunihiko Sakamoto
+kinuko really
3 years, 9 months ago (2017-03-03 02:17:48 UTC) #27
kinuko
lgtm
3 years, 9 months ago (2017-03-03 07:13:52 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2717123003/120001
3 years, 9 months ago (2017-03-03 07:19:09 UTC) #35
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 07:25:14 UTC) #38
Message was sent while issue was closed.
Committed patchset #3 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/99cc846f07ae952c27c026f7a4dd...

Powered by Google App Engine
This is Rietveld 408576698