Commit 707429a8 authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

AnimationInputHelpers::ParseTimingFunction needs to handle a null GetExecutionContext()

Bug: 1102810
Test: fast/animation/keyframe-effect-on-element-from-inactive-document.html
Change-Id: Ie6f1d8014fb1a1ca640b81b828aa4299e57d47d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284090
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786104}
parent edbfef56
......@@ -248,8 +248,9 @@ scoped_refptr<TimingFunction> AnimationInputHelpers::ParseTimingFunction(
// Fallback to an insecure parsing mode if we weren't provided with a
// document.
SecureContextMode secure_context_mode =
document ? document->GetExecutionContext()->GetSecureContextMode()
: SecureContextMode::kInsecureContext;
document && document->GetExecutionContext()
? document->GetExecutionContext()->GetSecureContextMode()
: SecureContextMode::kInsecureContext;
const CSSValue* value = CSSParser::ParseSingleValue(
CSSPropertyID::kTransitionTimingFunction, string,
StrictCSSParserContext(secure_context_mode));
......
<body>
PASS if no crash.
<iframe id="i"></iframe>
<animateColor id="a"/>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var div = i.contentDocument.createElement("div");
i.remove();
var var00411 = new KeyframeEffect(div, [ ], 0);
</script>
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