Remove ineffective call to StyleResolver::HasAuthorBackground
As far as I can tell, this check for HasAuthorBackground has never worked. The function StyleResolver::HasAuthorBackground belongs to the old code path in the StyleResolver, and in that code path, we'd only cache the UA style if we had some 'appearance' other than 'none'. And since we only try to perform the adjustment when we have no appearance, the function will always return false. Since this code was introduced [1], we've introduced the EffectiveAppearance field [2], but as far as I can tell we can only go from non-none to none if the element is nullptr, in which case we'll also not attempt the adjustment. Note also that since M83 (CSSCascade ship), StyleResolver:: HasAuthorBackground has *always* returned false regardless of circumstance. (It was believed to be unused, but I missed this call site). Hence, we can just remove the check. [1] https://crrev.com/9d6f3016641f26e4e330da6baf70fa2133f62721 [2] https://crrev.com/23a4dcc92d21834769f61c0125edbcf4b1af15dc Change-Id: I973978e08398ef5906845884b5e133923f6bfb95 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321309Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#792879}
Showing
Please register or sign in to comment