<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188310</bug_id>
          
          <creation_ts>2018-08-03 09:27:46 -0700</creation_ts>
          <short_desc>Tearing down a HTMLMediaElement renderer may cause it to start playing:</short_desc>
          <delta_ts>2018-08-03 09:28:00 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=188307</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jeremyj-wk</cc>
    
    <cc>jer.noble</cc>
    
    <cc>jonlee</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1447654</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-08-03 09:27:46 -0700</bug_when>
    <thetext>Tearing down a HTMLMediaElement renderer may cause it to start playing:
 WebCore                       	0x0000000192132ec4 WebCore::HTMLMediaElement::enterFullscreen(unsigned int) + 176 (HTMLMediaElement.cpp:5901)
4   WebCore                       	0x0000000192120a5c WebCore::HTMLMediaElement::updatePlayState(WebCore::HTMLMediaElement::UpdateState) + 264 (HTMLMediaElement.cpp:5306)
5   WebCore                       	0x000000019212b618 WebCore::HTMLMediaElement::playInternal() + 972 (HTMLMediaElement.cpp:3551)
6   WebCore                       	0x000000019212b6cc WebCore::HTMLMediaElement::play() + 176 (HTMLMediaElement.cpp:3479)
7   WebCore                       	0x0000000192136a04 non-virtual thunk to WebCore::HTMLMediaElement::resumeAutoplaying() + 204 (HTMLMediaElement.cpp:7472)
8   WebCore                       	0x00000001924880f8 WebCore::PlatformMediaSession::endInterruption(WebCore::PlatformMediaSession::EndInterruptionFlags) + 512 (PlatformMediaSession.cpp:166)
9   WebCore                       	0x000000019280c320 WebCore::RenderTreeUpdater::tearDownRenderers(WebCore::Element&amp;, WebCore::RenderTreeUpdater::TeardownType, WebCore::RenderTreeBuilder&amp;)::$_5::operator()(unsigned int) const + 48 (RenderTreeUpdater.cpp:583)
10  WebCore                       	0x000000019280b46c WebCore::RenderTreeUpdater::tearDownRenderers(WebCore::Element&amp;, WebCore::RenderTreeUpdater::TeardownType, WebCore::RenderTreeBuilder&amp;) + 572 (RenderTreeUpdater.cpp:591)
11  WebCore                       	0x000000019280aca4 WebCore::RenderTreeUpdater::updateElementRenderer(WebCore::Element&amp;, WebCore::Style::ElementUpdate const&amp;) + 408 (RenderTreeUpdater.cpp:321)
12  WebCore                       	0x000000019280a290 WebCore::RenderTreeUpdater::updateRenderTree(WebCore::ContainerNode&amp;) + 1188 (RenderTreeUpdater.cpp:200)
13  WebCore                       	0x0000000192809d58 WebCore::RenderTreeUpdater::commit(std::__1::unique_ptr&lt;WebCore::Style::Update const, std::__1::default_delete&lt;WebCore::Style::Update const&gt; &gt;) + 592 (RenderTreeUpdater.cpp:132)
14  WebCore                       	0x0000000191f353c0 WebCore::Document::resolveStyle(WebCore::Document::ResolveStyleType) + 1036 (Document.cpp:1864)
15  WebCore                       	0x0000000191f35d7c WebCore::Document::updateStyleIfNeeded() + 344 (Document.cpp:1968)
16  WebCore                       	0x0000000191de910c WebCore::updateStyleIfNeededForProperty(WebCore::Element&amp;, WebCore::CSSPropertyID) + 108 (CSSComputedStyleDeclaration.cpp:2470)
17  WebCore                       	0x0000000191de8598 WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::EUpdateLayout) + 144 (CSSComputedStyleDeclaration.cpp:2681)
18  WebCore                       	0x0000000191de7f7c WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const + 76 (CSSComputedStyleDeclaration.cpp:2419)
19  WebCore                       	0x0000000191494144 WebCore::jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(JSC::ExecState*) + 316 (JSCSSStyleDeclaration.cpp:431)

Seems to be a result of this code:
void HTMLMediaElement::didDetachRenderers()
{
    updateShouldAutoplay();
}</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>