Collapse images disallowed by the Safe Browsing Subresource Filter.
When the ImageResource being loaded into an HTMLImageElement is disallowed by
subresource filtering, the element is now collapsed in the layout (instead of
showing fallback content).
This is achieved by the following changes:
1) Internally, access check related methods in FetchContext, ResourceLoader
and ResourceFetcher have been refactored so that they now return a
ResourceRequestBlockedReason enumerator instead of a boolean value.
2) ResourceError now has an |m_shouldCollapseInitiator| field. When a load is
disallowed because of subresource filtering, the ResourceError instance set
on the failed Resource will now has this boolean set.
3) HTMLImageElement now has three states: showing primary content, showing
fallback content, and collapsed. When the |m_shouldCollapseInitiator| is
set on its ImageResource, it enters this new, third state.
BUG=
609747
Committed:
https://crrev.com/3c67d0c8a79c59b3afa1d73761387fb3be82a0bd
Cr-Commit-Position: refs/heads/master@{#436917}