<?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>131908</bug_id>
          
          <creation_ts>2014-04-19 22:17:48 -0700</creation_ts>
          <short_desc>[Mac] Unable to select &apos;Off&apos; or &apos;Auto&apos; from track menu when tracks consist of unsupported track types</short_desc>
          <delta_ts>2014-04-20 21:28:59 -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>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></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>bfulgham</cc>
    
    <cc>calvaris</cc>
    
    <cc>commit-queue</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>glenn</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>jer.noble</cc>
    
    <cc>philipj</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1002342</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-19 22:17:48 -0700</bug_when>
    <thetext>When Webkit is asked to display a media track menu with out-of-band tracks of an unsupported track type (e.g., TTML), you are not able to select the &apos;Off&apos; menu item.

There is no user-visible impact here (since the track doesn&apos;t display whether it is selected or not), but it&apos;s unexpected behavior to select the &apos;Off&apos; menu element, but for the menu to not show an &apos;Off&apos; checked state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1002343</commentid>
    <comment_count>1</comment_count>
      <attachid>229756</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-19 22:21:22 -0700</bug_when>
    <thetext>Created attachment 229756
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1002344</commentid>
    <comment_count>2</comment_count>
      <attachid>229756</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-19 22:21:59 -0700</bug_when>
    <thetext>Comment on attachment 229756
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229756&amp;action=review

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3717
&gt; +    } else if (trackToSelect == TextTrack::captionMenuOffItem()) {

I&apos;m not sure if this would be better to just incorporate into the loop above?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1002444</commentid>
    <comment_count>3</comment_count>
      <attachid>229756</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2014-04-20 20:23:29 -0700</bug_when>
    <thetext>Comment on attachment 229756
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=229756&amp;action=review

&gt; Source/WebCore/ChangeLog:10
&gt; +        (WebCore::HTMLMediaElement::parseAttribute): When the user selects &apos;Off&apos;, make sure the currently &apos;showing&apos;

prepare-ChangeLog doesn&apos;t like something about HTMLMediaElement.cpp so it thinks all changes are in parseAttribute, so you should fix this entry manually.

&gt;&gt; Source/WebCore/html/HTMLMediaElement.cpp:3717
&gt;&gt; +    } else if (trackToSelect == TextTrack::captionMenuOffItem()) {
&gt; 
&gt; I&apos;m not sure if this would be better to just incorporate into the loop above?

It could be, but I think it is probably easier to follow the logic this way.

&gt; Source/WebCore/html/HTMLMediaElement.cpp:3720
&gt; +            if (!trackToSelect || track != trackToSelect)

trackToSelect is TextTrack::captionMenuOffItem so it can&apos;t be NULL, and TextTrack::captionMenuOffItem won&apos;t be in textTracks(), so this check can be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1002460</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2014-04-20 21:28:59 -0700</bug_when>
    <thetext>Committed r167578: &lt;http://trac.webkit.org/changeset/167578&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>229756</attachid>
            <date>2014-04-19 22:21:22 -0700</date>
            <delta_ts>2014-04-20 20:23:28 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-131908-20140419222102.patch</filename>
            <type>text/plain</type>
            <size>1693</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDE2NzU2MykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDE0LTA0LTE5ICBCcmVudCBG
dWxnaGFtICA8YmZ1bGdoYW1AYXBwbGUuY29tPgorCisgICAgICAgIFtNYWNdIFVuYWJsZSB0byBz
ZWxlY3QgJ09mZicgb3IgJ0F1dG8nIGZyb20gdHJhY2sgbWVudSB3aGVuIHRyYWNrcyBjb25zaXN0
IG9mIHVuc3VwcG9ydGVkIHRyYWNrIHR5cGVzCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQu
b3JnL3Nob3dfYnVnLmNnaT9pZD0xMzE5MDgKKyAgICAgICAgPHJkYXI6Ly9wcm9ibGVtLzE1OTk5
ODgyP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1lbnVPZmZJdGVtKCkpIHsKKyAgICAgICAg
Zm9yIChpbnQgaSA9IDAsIGxlbmd0aCA9IHRyYWNrTGlzdC0+bGVuZ3RoKCk7IGkgPCBsZW5ndGg7
ICsraSkgeworICAgICAgICAgICAgVGV4dFRyYWNrKiB0cmFjayA9IHRyYWNrTGlzdC0+aXRlbShp
KTsKKyAgICAgICAgICAgIGlmICghdHJhY2tUb1NlbGVjdCB8fCB0cmFjayAhPSB0cmFja1RvU2Vs
ZWN0KQorICAgICAgICAgICAgICAgIHRyYWNrLT5zZXRNb2RlKFRleHRUcmFjazo6ZGlzYWJsZWRL
ZXl3b3JkKCkpOworICAgICAgICB9CiAgICAgfQogCiAgICAgQ2FwdGlvblVzZXJQcmVmZXJlbmNl
cyogY2FwdGlvblByZWZlcmVuY2VzID0gZG9jdW1lbnQoKS5wYWdlKCkgPyBkb2N1bWVudCgpLnBh
Z2UoKS0+Z3JvdXAoKS5jYXB0aW9uUHJlZmVyZW5jZXMoKSA6IDA7Cg==
</data>
<flag name="review"
          id="254127"
          type_id="1"
          status="+"
          setter="eric.carlson"
    />
          </attachment>
      

    </bug>

</bugzilla>