Remove never-reached if block in StyleSheetContents::WrapperDeleteRule
|StyleSheetContents::import_rules_| is of type HeapVector<Member<StyleRuleImport>>. Its members will always resolve |import_rules_[index]->IsFontFaceRule()| to false (once StyleRuleBase::IsImportRule() is the one that resolves to true. This CL removes the if-block that checks that altogether, allowing the removal of the remaining DEFINE_STYLE_RULE_TYPE_CASTS occurrence. Note: This was caught because trying to use To<StyleRuleFaceRule> failed to compile. ../../third_party/blink/renderer/platform/wtf/casting.h:102:10: error: non-const lvalue reference to type 'blink::StyleRuleFontFace' cannot bind to a value of unrelated type 'blink::StyleRuleImport' return static_cast<Derived&>(from); ^ ~~~~ R=jbroman@chromium.org CC=blink-reviews-vendor@chromium.org BUG=891908 Change-Id: I6bbf992b3654601a50fc68b18961de79899d5284 Reviewed-on: https://chromium-review.googlesource.com/c/1496056Reviewed-by:Jeremy Roman <jbroman@chromium.org> Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Cr-Commit-Position: refs/heads/master@{#636879}
Showing
Please register or sign in to comment