Commit 293cb9bd authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Revert LoadPendingResources removals.

This is a revert of [1] which causes at least one of potentially several
missing image resources updates on Chrome internal pages. I have not
been able to reduce these pages and understand how MatchedPropertiesCache
is involved here. I have confirmed that this fixes the issue on
chrome://downloads.

This flag was necessary to reproduce issue 1094185:

  --disable-blink-features=CSSMatchedPropertiesCacheDependencies

[1] https://crrev.com/bd57436c85636c1ff62fc83f0deca55282437c0a

Bug: 1094185
Change-Id: I90c4660b5cd4aa095c072033d23bdf3304e3a48d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252799Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780223}
parent a0228568
......@@ -1467,6 +1467,9 @@ bool StyleResolver::ApplyAnimatedStandardProperties(
standard_transitions);
}
// Start loading resources used by animations.
state.LoadPendingResources();
DCHECK(!state.GetFontBuilder().FontDirty());
return true;
......@@ -1908,12 +1911,12 @@ void StyleResolver::MaybeAddToMatchedPropertiesCache(
StyleResolverState& state,
const CacheSuccess& cache_success,
const MatchResult& match_result) {
state.LoadPendingResources();
if (!state.IsAnimatingCustomProperties() &&
!cache_success.cached_matched_properties && cache_success.key.IsValid() &&
MatchedPropertiesCache::IsCacheable(state)) {
INCREMENT_STYLE_STATS_COUNTER(GetDocument().GetStyleEngine(),
matched_property_cache_added, 1);
state.LoadPendingResources();
matched_properties_cache_.Add(cache_success.key, *state.Style(),
*state.ParentStyle(), state.Dependencies());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment