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

Issue 2390583002: [WIP] WebFonts cache-aware timeout adaption (Closed)

Created:
4 years, 2 months ago by Shao-Chuan Lee
Modified:
4 years, 1 month ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-css, Yoav Weiss, dglazkov+blink, apavlov+blink_chromium.org, gavinp+loader_chromium.org, darktears, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin, rwlbuis, kinuko
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] WebFonts cache-aware timeout adaption This CL introduces cache-aware Resource loading and adaptive webfont display behavior, reducing unnecessary Flash of Unstyled Text (FOUT) if webfont is already available in disk cache. In cache-aware loading, the Resource is notified of disk cache miss from network stack during loading. This is implemented by sending a request to load only from disk cache, and retry with original request if the first one fails. Resource::willReloadAfterDiskCacheMiss() is called before the retry. If the cached response is a redirect, we fail the request as cache miss. In webfont display, fallback font will be used if webfont loading time exceeds certain timeout values in slow network. However it's observed that disk cache RTT may also hit the timeout regardless of network speed. In such cases we would like to block display until actual network request is being sent. Now FetchRequest provides an option to enable cache-aware loading for Resource::fetch(). If supplied cache policy doesn't conflict, cache-aware loading will be activated for new Resource instances (revalidation is not supported). Note: This CL depends on https://crrev.com/2398613002, we are now using ReturnCacheDataDontLoad which may return stale data from disk cache. BUG=570205

Patch Set 1 #

Total comments: 28

Patch Set 2 : fix comments, add unit tests #

Patch Set 3 : remove flag in finish() instead of responseReceived() #

Total comments: 14

Patch Set 4 : move callback impl to FontResource, remove unittests for now, fix #

Total comments: 6

Patch Set 5 : see comment #23 #

Patch Set 6 : RemoteFontFaceSource cache-aware behavior, fix #

Total comments: 2

Patch Set 7 : revise RemoteFontFaceSource cache-aware logic, fix #

Total comments: 1

Patch Set 8 : move logic to FontResource #

Patch Set 9 : handle font-display: swap #

Total comments: 9

Patch Set 10 : rebase, fix #

Patch Set 11 : comments #

Patch Set 12 : fix error generation in ResourceLoader::willFollowRedirect, init new field in WebURLError ctor, Res… #

Patch Set 13 : move mayActivateCacheAwareLoading() back into ResourceRequest to reuse checks, comments #

Patch Set 14 : handle case in RemoteFontFaceSource if cache-aware deactivated in startLoad(), rebase #

Total comments: 16

Patch Set 15 : fix #52 #

Total comments: 2

Patch Set 16 : remove isCacheMiss field in WebURLError/ResourceError #

Patch Set 17 : switchToSwapPeriod(), Inspector disable cache check workaround #

Total comments: 5

Patch Set 18 : rebase #

Patch Set 19 : check ERR_CACHE_MISS directly in ResourceError #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -8 lines) Patch
M third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RemoteFontFaceSource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +18 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceError.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceError.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +12 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +49 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 75 (11 generated)
Shao-Chuan Lee
This is the tentative implementation based on the design notes (https://docs.google.com/a/chromium.org/document/d/1vaGzhJyfR6ozSiMfphdOrwrca51MNVRT6K2r5M1xtlE/edit?usp=sharing) and previous offline discussions, ...
4 years, 2 months ago (2016-10-03 07:19:39 UTC) #2
hiroshige
The direction basically looks good, but there might be corner cases to consider. What (should) ...
4 years, 2 months ago (2016-10-03 08:08:02 UTC) #3
kouhei (in TOK)
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode1083 third_party/WebKit/Source/core/fetch/Resource.cpp:1083: m_isAddClientProhibited = true; AutoReset https://cs.chromium.org/chromium/src/third_party/WebKit/Source/wtf/AutoReset.h?type=cs&sq=package:chromium&rcl=1475464636&l=36 https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): ...
4 years, 2 months ago (2016-10-03 08:11:47 UTC) #4
hiroshige
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.h File third_party/WebKit/Source/core/fetch/Resource.h (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.h#newcode292 third_party/WebKit/Source/core/fetch/Resource.h:292: // TODO(632580): Workaround to persist cache-aware state, remove after ...
4 years, 2 months ago (2016-10-03 08:28:20 UTC) #5
Kunihiko Sakamoto
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp File third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp#newcode91 third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp:91: request.mutableResourceRequest().setIsCacheAwareLoadingEnabled(true); I think we should do cache-aware loading only ...
4 years, 2 months ago (2016-10-03 08:31:38 UTC) #6
Shao-Chuan Lee
On 2016/10/03 08:08:02, hiroshige wrote: > The direction basically looks good, but there might be ...
4 years, 2 months ago (2016-10-03 08:33:37 UTC) #7
Shao-Chuan Lee
On 2016/10/03 08:31:38, Kunihiko Sakamoto wrote: > https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp > File third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp (right): > > https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp#newcode91 ...
4 years, 2 months ago (2016-10-03 08:38:37 UTC) #8
Takashi Toyoshima
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp File third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp#newcode91 third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp:91: request.mutableResourceRequest().setIsCacheAwareLoadingEnabled(true); Since it will introduce additional complexity, we would ...
4 years, 2 months ago (2016-10-03 09:01:04 UTC) #9
Takashi Toyoshima
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode400 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:400: if (m_cachePolicy == WebCachePolicy::BypassingCache || Using switch is better ...
4 years, 2 months ago (2016-10-03 09:06:36 UTC) #10
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode1083 third_party/WebKit/Source/core/fetch/Resource.cpp:1083: m_isAddClientProhibited = true; On 2016/10/03 08:11:47, kouhei wrote: > ...
4 years, 2 months ago (2016-10-04 01:39:46 UTC) #13
Takashi Toyoshima
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode405 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:405: m_cachePolicy = WebCachePolicy::ReturnCacheDataDontLoad; How about using crbug.com/570205 for this ...
4 years, 2 months ago (2016-10-04 04:12:02 UTC) #14
yhirano
Shouldn't we dispatch willReloadAfterDiskCacheMiss when - A resusable Resource X is found, - X is ...
4 years, 2 months ago (2016-10-04 05:27:10 UTC) #15
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp File third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp#newcode91 third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp:91: request.mutableResourceRequest().setIsCacheAwareLoadingEnabled(true); On 2016/10/03 09:01:04, toyoshim wrote: > Since it ...
4 years, 2 months ago (2016-10-04 09:08:04 UTC) #16
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode1112 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:1112: // Assume error.errorCode() == net::ERR_CACHE_MISS, resend request with On ...
4 years, 2 months ago (2016-10-04 09:46:25 UTC) #17
Takashi Toyoshima
lg with nits, then defer to fetch owners. https://codereview.chromium.org/2390583002/diff/40001/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp File third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp (right): https://codereview.chromium.org/2390583002/diff/40001/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp#newcode37 third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp:37: #include ...
4 years, 2 months ago (2016-10-05 07:06:18 UTC) #18
hiroshige
> I guess checking error.isAccessCheck() here should suffice? Probably this is not sufficient, because there ...
4 years, 2 months ago (2016-10-05 08:27:10 UTC) #19
Shao-Chuan Lee
Moved callback implementation to FontResource. Removed unittests for now, will add them back after design ...
4 years, 2 months ago (2016-10-05 10:16:10 UTC) #20
yhirano
https://codereview.chromium.org/2390583002/diff/60001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/60001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode403 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:403: return; DCHECK(!m_isCacheAwareLoadingActivated)? https://codereview.chromium.org/2390583002/diff/60001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode413 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:413: default: This section is not ...
4 years, 2 months ago (2016-10-06 11:57:06 UTC) #21
Shao-Chuan Lee
- Moved isCacheAwareLoadingEnabled flag to FetchRequest - Moved activation logic and ResourceRequest manipulation to ResourceFetcher ...
4 years, 2 months ago (2016-10-07 08:10:07 UTC) #23
yhirano
https://codereview.chromium.org/2390583002/diff/60001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/60001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode413 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:413: default: On 2016/10/07 08:10:07, Shao-Chuan Lee wrote: > On ...
4 years, 2 months ago (2016-10-11 04:17:07 UTC) #24
Shao-Chuan Lee
ksakamoto@, toyoshim@: PTAL at changes to RemoteFontFaceSource. I guess doing the same as switchToSwapPeriod() does ...
4 years, 2 months ago (2016-10-11 07:27:28 UTC) #26
Kunihiko Sakamoto
I think cache-aware font loading should replace current logic around "ShortLimitExceeded". How about this: void ...
4 years, 2 months ago (2016-10-11 08:07:38 UTC) #27
Shao-Chuan Lee
On 2016/10/11 08:07:38, Kunihiko Sakamoto wrote: > I think cache-aware font loading should replace current ...
4 years, 2 months ago (2016-10-11 08:26:53 UTC) #28
Shao-Chuan Lee
ksakamoto@: This should be more consistent by changing periods rather than overriding current period. PTAL ...
4 years, 2 months ago (2016-10-11 10:58:48 UTC) #29
Kunihiko Sakamoto
It looks better, but I still think we should not use short limit in cache-aware ...
4 years, 2 months ago (2016-10-12 01:38:46 UTC) #30
Shao-Chuan Lee
On 2016/10/12 01:38:46, Kunihiko Sakamoto wrote: > It looks better, but I still think we ...
4 years, 2 months ago (2016-10-12 02:21:41 UTC) #31
Kunihiko Sakamoto
On 2016/10/12 02:21:41, Shao-Chuan Lee wrote: > On 2016/10/12 01:38:46, Kunihiko Sakamoto wrote: > > ...
4 years, 2 months ago (2016-10-12 02:33:56 UTC) #32
Shao-Chuan Lee
Moving cache-aware logic to FontResource, using short/long limit exceeded callbacks to manipulate font display, additional ...
4 years, 2 months ago (2016-10-12 04:52:04 UTC) #33
Shao-Chuan Lee
font-display: swap handling was missing in PS8. We still need an additional callback in RemoteFontFaceSource ...
4 years, 2 months ago (2016-10-12 05:51:08 UTC) #34
Kunihiko Sakamoto
Let me check if my understanding is correct... For font-display:fallback or optional, this CL makes ...
4 years, 2 months ago (2016-10-12 06:10:15 UTC) #35
yhirano
https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp File third_party/WebKit/Source/core/fetch/FontResource.cpp (right): https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp#newcode156 third_party/WebKit/Source/core/fetch/FontResource.cpp:156: fontLoadShortLimitCallback(nullptr); This code assumes that startLoadLimitTimersIfNeeded has been called. ...
4 years, 2 months ago (2016-10-12 06:30:38 UTC) #36
Shao-Chuan Lee
On 2016/10/12 06:10:15, Kunihiko Sakamoto wrote: > Let me check if my understanding is correct... ...
4 years, 2 months ago (2016-10-12 06:50:58 UTC) #37
Kunihiko Sakamoto
https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode59 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:59: m_period(BlockPeriod), On 2016/10/12 06:50:58, Shao-Chuan Lee wrote: > On ...
4 years, 2 months ago (2016-10-12 08:56:30 UTC) #38
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp File third_party/WebKit/Source/core/fetch/FontResource.cpp (right): https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp#newcode156 third_party/WebKit/Source/core/fetch/FontResource.cpp:156: fontLoadShortLimitCallback(nullptr); On 2016/10/12 06:30:38, yhirano wrote: > This code ...
4 years, 2 months ago (2016-10-13 05:20:45 UTC) #39
yhirano
Can you add comments as I asked at [1] and [2]? 1: https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.h#newcode290 2: https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp#newcode156 ...
4 years, 2 months ago (2016-10-14 09:29:27 UTC) #40
Shao-Chuan Lee
Oops, [1] was removed during refactoring. Re-added comments. https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp File third_party/WebKit/Source/core/fetch/FontResource.cpp (right): https://codereview.chromium.org/2390583002/diff/200001/third_party/WebKit/Source/core/fetch/FontResource.cpp#newcode42 third_party/WebKit/Source/core/fetch/FontResource.cpp:42: static ...
4 years, 2 months ago (2016-10-17 03:45:59 UTC) #41
Shao-Chuan Lee
haraken@: PTAL at changes under platform/. I wonder if it's OK to have fields for ...
4 years, 2 months ago (2016-10-17 03:59:19 UTC) #43
Shao-Chuan Lee
@tkent: @haraken is on a business trip, could you take a look at changes under ...
4 years, 2 months ago (2016-10-19 05:17:35 UTC) #46
tkent
On 2016/10/19 at 05:17:35, shaochuan wrote: > @tkent: @haraken is on a business trip, could ...
4 years, 2 months ago (2016-10-19 05:32:24 UTC) #47
blink-reviews
Thanks. This CL is still blocked by some issues: 1. This depends on https://crrev.com/2398613002/ and ...
4 years, 2 months ago (2016-10-19 05:41:59 UTC) #48
chromium-reviews
Thanks. This CL is still blocked by some issues: 1. This depends on https://crrev.com/2398613002/ and ...
4 years, 2 months ago (2016-10-19 05:41:59 UTC) #49
Shao-Chuan Lee
hiroshige@, yhirano@, kouhei@: Do you have further comments on overall loading design? If current design ...
4 years, 2 months ago (2016-10-20 10:33:45 UTC) #51
kouhei (in TOK)
https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2390583002/diff/1/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode1083 third_party/WebKit/Source/core/fetch/Resource.cpp:1083: m_isAddClientProhibited = true; On 2016/10/04 01:39:46, Shao-Chuan Lee wrote: ...
4 years, 2 months ago (2016-10-20 10:43:08 UTC) #52
yhirano
https://codereview.chromium.org/2390583002/diff/320001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/320001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode416 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:416: break; On 2016/10/20 10:43:07, kouhei wrote: > default: > ...
4 years, 2 months ago (2016-10-20 11:07:35 UTC) #53
kouhei (in TOK)
https://codereview.chromium.org/2390583002/diff/320001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp File third_party/WebKit/Source/platform/network/ResourceRequest.cpp (right): https://codereview.chromium.org/2390583002/diff/320001/third_party/WebKit/Source/platform/network/ResourceRequest.cpp#newcode416 third_party/WebKit/Source/platform/network/ResourceRequest.cpp:416: break; On 2016/10/20 11:07:35, yhirano wrote: > On 2016/10/20 ...
4 years, 2 months ago (2016-10-20 11:48:42 UTC) #54
yhirano
The design looks good to me, but I would like to see tests before landing ...
4 years, 2 months ago (2016-10-21 02:26:47 UTC) #55
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc#newcode490 content/child/web_url_request_util.cc:490: error.isCacheMiss = reason == net::ERR_CACHE_MISS; On 2016/10/20 10:43:07, kouhei ...
4 years, 2 months ago (2016-10-21 04:35:02 UTC) #56
Shao-Chuan Lee
On 2016/10/21 02:26:47, yhirano wrote: > The design looks good to me, but I would ...
4 years, 2 months ago (2016-10-21 05:07:09 UTC) #57
kouhei (in TOK)
https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc#newcode490 content/child/web_url_request_util.cc:490: error.isCacheMiss = reason == net::ERR_CACHE_MISS; On 2016/10/21 04:35:02, Shao-Chuan ...
4 years, 2 months ago (2016-10-21 05:08:43 UTC) #58
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc#newcode490 content/child/web_url_request_util.cc:490: error.isCacheMiss = reason == net::ERR_CACHE_MISS; On 2016/10/21 05:08:42, kouhei ...
4 years, 2 months ago (2016-10-21 05:22:17 UTC) #59
kouhei (in TOK)
On 2016/10/21 05:22:17, Shao-Chuan Lee wrote: > https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc > File content/child/web_url_request_util.cc (right): > > https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc#newcode490 ...
4 years, 2 months ago (2016-10-21 05:26:50 UTC) #60
Kunihiko Sakamoto
https://codereview.chromium.org/2390583002/diff/340001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2390583002/diff/340001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode253 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:253: m_period = SwapPeriod; You should call switchToSwapPeriod() instead, so ...
4 years, 2 months ago (2016-10-21 05:41:07 UTC) #61
yhirano
On 2016/10/21 05:26:50, kouhei wrote: > On 2016/10/21 05:22:17, Shao-Chuan Lee wrote: > > > ...
4 years, 2 months ago (2016-10-21 05:47:25 UTC) #62
Shao-Chuan Lee
On 2016/10/21 05:47:25, yhirano wrote: > On 2016/10/21 05:26:50, kouhei wrote: > > On 2016/10/21 ...
4 years, 2 months ago (2016-10-21 05:52:47 UTC) #63
kouhei (in TOK)
On 2016/10/21 05:52:47, Shao-Chuan Lee wrote: > On 2016/10/21 05:47:25, yhirano wrote: > > On ...
4 years, 2 months ago (2016-10-21 05:53:37 UTC) #64
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc File content/child/web_url_request_util.cc (right): https://codereview.chromium.org/2390583002/diff/320001/content/child/web_url_request_util.cc#newcode490 content/child/web_url_request_util.cc:490: error.isCacheMiss = reason == net::ERR_CACHE_MISS; On 2016/10/21 05:22:17, Shao-Chuan ...
4 years, 2 months ago (2016-10-21 06:52:03 UTC) #66
kouhei (in TOK)
lgtm from myside
4 years, 2 months ago (2016-10-21 06:53:53 UTC) #67
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/340001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp File third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp (right): https://codereview.chromium.org/2390583002/diff/340001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp#newcode253 third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp:253: m_period = SwapPeriod; On 2016/10/21 05:41:07, Kunihiko Sakamoto wrote: ...
4 years, 2 months ago (2016-10-21 07:18:01 UTC) #68
kinuko
https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/platform/exported/WebURLError.cpp File third_party/WebKit/Source/platform/exported/WebURLError.cpp (right): https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/platform/exported/WebURLError.cpp#newcode71 third_party/WebKit/Source/platform/exported/WebURLError.cpp:71: error.reason = NetworkUtils::cacheMissErrorCode(); This rather looks a little awkward ...
4 years, 2 months ago (2016-10-21 10:35:13 UTC) #69
kinuko
https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode142 third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:142: didFail(nullptr, WebURLError::cacheMissError()); nit: I think we'd better create ResourceError ...
4 years, 2 months ago (2016-10-22 04:43:01 UTC) #70
Shao-Chuan Lee
https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode142 third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:142: didFail(nullptr, WebURLError::cacheMissError()); On 2016/10/22 04:43:01, kinuko wrote: > nit: ...
4 years, 1 month ago (2016-10-25 04:18:20 UTC) #71
Shao-Chuan Lee
On 2016/10/25 04:18:20, Shao-Chuan Lee wrote: > https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp > File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): > > https://codereview.chromium.org/2390583002/diff/400001/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode142 ...
4 years, 1 month ago (2016-10-25 06:59:43 UTC) #72
yhirano
https://codereview.chromium.org/2390583002/diff/440001/third_party/WebKit/Source/platform/network/ResourceError.cpp File third_party/WebKit/Source/platform/network/ResourceError.cpp (right): https://codereview.chromium.org/2390583002/diff/440001/third_party/WebKit/Source/platform/network/ResourceError.cpp#newcode51 third_party/WebKit/Source/platform/network/ResourceError.cpp:51: ResourceError error; error.m_domain = String(net::kErrorDomain); https://codereview.chromium.org/2390583002/diff/440001/third_party/WebKit/Source/platform/network/ResourceError.cpp#newcode73 third_party/WebKit/Source/platform/network/ResourceError.cpp:73: return m_errorCode ...
4 years, 1 month ago (2016-10-25 08:50:28 UTC) #73
Shao-Chuan Lee
4 years, 1 month ago (2016-10-25 08:59:35 UTC) #74
Upcoming refactoring, as discussed offline with hiroshige@ and tyoshino@:
(using CAL = cache-aware loading)

1. Move isCALEnabled flag to ResourceLoaderOptions

2. Move isCALActivated to ResourceLoader, remove savedCachePolicy
It's better to have the flag as state during CAL in ResourceLoader, we'll simply
override the cache policy in ResourceRequest in start().

However for Resources whose loading is deferred (e.g. FontResource) the
ResourceClients may not determine whether CAL will be activated if added before
startLoad(). A workaround is to call the cache miss callback immediately if CAL
is enabled but eventually not activated, which should be OK in font-display
case.

Another issue is to revise determineRevalidationPolicy to cover edge cases.

I guess this CL is getting too big, I'll continue this part in another CL.

Powered by Google App Engine
This is Rietveld 408576698