<?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>131528</bug_id>
          
          <creation_ts>2014-04-10 22:04:28 -0700</creation_ts>
          <short_desc>[Mac] Prevent crash when exiting fullscreen mode</short_desc>
          <delta_ts>2014-04-11 09:52:15 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>benjamin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>jer.noble</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>999782</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-10 22:04:28 -0700</bug_when>
    <thetext>It is possible to cause a crash in WebKit if you enter full screen mode, exit full screen mode, and close the main view quickly enough.

The crash is due to an animation thread attempting to interact with a deallocated window. When we decide to rapidly terminate a window, we need to tell any existing animation controllers to stop animating, and clear their window references.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999784</commentid>
    <comment_count>1</comment_count>
      <attachid>229107</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-10 22:06:58 -0700</bug_when>
    <thetext>Created attachment 229107
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999785</commentid>
    <comment_count>2</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-10 22:07:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/13967272&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999800</commentid>
    <comment_count>3</comment_count>
      <attachid>229107</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2014-04-10 22:44:52 -0700</bug_when>
    <thetext>Comment on attachment 229107
Patch

Nice! r=me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999894</commentid>
    <comment_count>4</comment_count>
      <attachid>229138</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-11 09:13:51 -0700</bug_when>
    <thetext>Created attachment 229138
I think this resolves the &apos;real&apos; problem</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999896</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-11 09:15:58 -0700</bug_when>
    <thetext>It was bothering me that we were entering the WKFullScreenWindowController::close method with _fullScreenState != ExitingFullScreen, but _scaleAnimation still non-nil and running an animation.

I think the actual fix need to be done &apos;finishedExitFullScreenAnimation&apos;, where we clean up the _fadeAnimation, but don&apos;t touch the _scaleAnimation.

I still like the initial fix to protect us against leaving a running animation when the window is going away, but I think the &apos;real&apos; fix is this second patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999897</commentid>
    <comment_count>6</comment_count>
      <attachid>229138</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-11 09:16:58 -0700</bug_when>
    <thetext>Comment on attachment 229138
I think this resolves the &apos;real&apos; problem

Updated patch that makes sure we never are in a state where &apos;_fullScreenState != ExitingFullScreen&apos; while we have a running animation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999909</commentid>
    <comment_count>7</comment_count>
      <attachid>229138</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2014-04-11 09:51:27 -0700</bug_when>
    <thetext>Comment on attachment 229138
I think this resolves the &apos;real&apos; problem

re-r=me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>999910</commentid>
    <comment_count>8</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-11 09:52:15 -0700</bug_when>
    <thetext>Committed r167130: &lt;http://trac.webkit.org/changeset/167130&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>229107</attachid>
            <date>2014-04-10 22:06:58 -0700</date>
            <delta_ts>2014-04-11 09:13:49 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-131528-20140410220637.patch</filename>
            <type>text/plain</type>
            <size>1433</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE2NzExMSkKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDE0LTA0LTEwICBCcmVudCBG
dWxnaGFtICA8YmZ1bGdoYW1AYXBwbGUuY29tPgorCisgICAgICAgIFtNYWNdIFByZXZlbnQgY3Jh
c2ggd2hlbiBleGl0aW5nIGZ1bGxzY3JlZW4gbW9kZQorICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTMxNTI4CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKy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YXRpb246WUVTXTsKIAorICAgIFtfc2NhbGVBbmlt
YXRpb24gc3RvcEFuaW1hdGlvbl07CisgICAgW19zY2FsZUFuaW1hdGlvbiBzZXRXaW5kb3c6bmls
XTsKKyAgICBbX2ZhZGVBbmltYXRpb24gc3RvcEFuaW1hdGlvbl07CisgICAgW19mYWRlQW5pbWF0
aW9uIHNldFdpbmRvdzpuaWxdOworCiAgICAgX3dlYlZpZXcgPSBuaWw7CiAKICAgICBbc3VwZXIg
Y2xvc2VdOwo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>229138</attachid>
            <date>2014-04-11 09:13:51 -0700</date>
            <delta_ts>2014-04-11 09:51:27 -0700</delta_ts>
            <desc>I think this resolves the &apos;real&apos; problem</desc>
            <filename>bug-131528-20140411091330.patch</filename>
            <type>text/plain</type>
            <size>1967</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE2NzEyOCkKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE0LTA0LTExICBCcmVudCBG
dWxnaGFtICA8YmZ1bGdoYW1AYXBwbGUuY29tPgorCisgICAgICAgIFtNYWNdIFByZXZlbnQgY3Jh
c2ggd2hlbiBleGl0aW5nIGZ1bGxzY3JlZW4gbW9kZQorICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTMxNTI4CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKyAgICAgICAg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yZWVuV2luZG93Q29udHJvbGxlci5tbQkod29y
a2luZyBjb3B5KQpAQCAtMzg5LDYgKzM4OSwxMCBAQCAtICh2b2lkKWZpbmlzaGVkRXhpdEZ1bGxT
Y3JlZW5BbmltYXRpb246CiAgICAgW1tzZWxmIHdpbmRvd10gb3JkZXJPdXQ6c2VsZl07CiAgICAg
W1tzZWxmIHdpbmRvd10gc2V0RnJhbWU6TlNaZXJvUmVjdCBkaXNwbGF5OllFU107CiAKKyAgICBb
X3NjYWxlQW5pbWF0aW9uIHN0b3BBbmltYXRpb25dOworICAgIFtfc2NhbGVBbmltYXRpb24gc2V0
V2luZG93Om5pbF07CisgICAgX3NjYWxlQW5pbWF0aW9uID0gbnVsbHB0cjsKKwogICAgIFtfZmFk
ZUFuaW1hdGlvbiBzdG9wQW5pbWF0aW9uXTsKICAgICBbX2ZhZGVBbmltYXRpb24gc2V0V2luZG93
Om5pbF07CiAgICAgX2ZhZGVBbmltYXRpb24gPSBudWxscHRyOwpAQCAtNDQyLDYgKzQ0NiwxMSBA
QCAtICh2b2lkKWNsb3NlCiAgICAgaWYgKF9mdWxsU2NyZWVuU3RhdGUgPT0gRXhpdGluZ0Z1bGxT
Y3JlZW4pCiAgICAgICAgIFtzZWxmIGZpbmlzaGVkRXhpdEZ1bGxTY3JlZW5BbmltYXRpb246WUVT
XTsKIAorICAgIFtfc2NhbGVBbmltYXRpb24gc3RvcEFuaW1hdGlvbl07CisgICAgW19zY2FsZUFu
aW1hdGlvbiBzZXRXaW5kb3c6bmlsXTsKKyAgICBbX2ZhZGVBbmltYXRpb24gc3RvcEFuaW1hdGlv
bl07CisgICAgW19mYWRlQW5pbWF0aW9uIHNldFdpbmRvdzpuaWxdOworCiAgICAgX3dlYlZpZXcg
PSBuaWw7CiAKICAgICBbc3VwZXIgY2xvc2VdOwo=
</data>
<flag name="review"
          id="253501"
          type_id="1"
          status="+"
          setter="jer.noble"
    />
          </attachment>
      

    </bug>

</bugzilla>