<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163958] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163958">163958</a></dd>
<dt>Author</dt> <dd>rakuco@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-12 06:58:40 -0800 (Wed, 12 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Update the HTML Media Capture implementation.
https://bugs.webkit.org/show_bug.cgi?id=118465
Reviewed by Darin Adler.
Make the implementation in WebKit compatible with the 2013-05-09
version of the spec, which makes the "capture" attribute a boolean
instead of an enum.
Source/WebCore:
Covered by fast/forms/file/file-input-capture.html.
* html/FileInputType.cpp:
(WebCore::FileInputType::handleDOMActivateEvent):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::capture): Renamed to shouldUseMediaCapture().
(WebCore::HTMLInputElement::shouldUseMediaCapture): Return a bool.
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl: Turn the `capture' attribute into a
reflective boolean instead of a DOMString.
* platform/FileChooser.h:
Source/WebKit/efl:
* ewk/ewk_file_chooser.cpp:
(ewk_file_chooser_capture_get): Return an Eina_Bool now.
* ewk/ewk_file_chooser.h: Get rid of Ewk_File_Chooser_Capture_Type.
Source/WebKit2:
* Shared/WebOpenPanelParameters.cpp:
(WebKit::WebOpenPanelParameters::capture): Return a bool.
* Shared/WebOpenPanelParameters.h: Ditto.
* UIProcess/API/C/WKOpenPanelParameters.cpp:
(WKOpenPanelParametersCopyCapture): Deprecate, the implementation is
incompatible with the current version of the spec.
(WKOpenPanelParametersGetCaptureEnabled): Add and return a bool.
* UIProcess/API/C/WKOpenPanelParameters.h:
LayoutTests:
* fast/forms/file/file-input-capture-expected.txt:
* fast/forms/file/file-input-capture.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastformsfilefileinputcaptureexpectedtxt">trunk/LayoutTests/fast/forms/file/file-input-capture-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastformsfilefileinputcapturehtml">trunk/LayoutTests/fast/forms/file/file-input-capture.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorehtmlFileInputTypecpp">trunk/Source/WebCore/html/FileInputType.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementidl">trunk/Source/WebCore/html/HTMLInputElement.idl</a></li>
<li><a href="#trunkSourceWebCoreplatformFileChooserh">trunk/Source/WebCore/platform/FileChooser.h</a></li>
<li><a href="#trunkSourceWebKiteflChangeLog">trunk/Source/WebKit/efl/ChangeLog</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_file_choosercpp">trunk/Source/WebKit/efl/ewk/ewk_file_chooser.cpp</a></li>
<li><a href="#trunkSourceWebKiteflewkewk_file_chooserh">trunk/Source/WebKit/efl/ewk/ewk_file_chooser.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebOpenPanelParameterscpp">trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebOpenPanelParametersh">trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKOpenPanelParameterscpp">trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKOpenPanelParametersh">trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/LayoutTests/ChangeLog        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Update the HTML Media Capture implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=118465
+
+ Reviewed by Darin Adler.
+
+ Make the implementation in WebKit compatible with the 2013-05-09
+ version of the spec, which makes the "capture" attribute a boolean
+ instead of an enum.
+
+ * fast/forms/file/file-input-capture-expected.txt:
+ * fast/forms/file/file-input-capture.html:
+
</ins><span class="cx"> 2014-02-12 Mihai Tica <mitica@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSS Element Blending] Implement the software path of -webkit-blend-mode with Core Graphics.
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsfilefileinputcaptureexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/file/file-input-capture-expected.txt (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/file/file-input-capture-expected.txt        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/LayoutTests/fast/forms/file/file-input-capture-expected.txt        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -4,14 +4,20 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS 'capture' in input is true
</span><del>-PASS input.capture is ''
-PASS input.capture is 'filesystem'
-PASS input.capture is 'camera'
-PASS input.capture is 'camcorder'
-PASS input.capture is 'microphone'
-PASS input.capture is 'filesystem'
-PASS input.capture is 'camcorder'
-PASS input.getAttribute('capture') is 'CamCorder'
</del><ins>+PASS input.capture is false
+PASS input.hasAttribute('capture') is false
+PASS input.capture is false
+PASS input.hasAttribute('capture') is false
+PASS input.capture is true
+PASS input.hasAttribute('capture') is true
+PASS input.capture is false
+PASS input.hasAttribute('capture') is false
+PASS input.capture is true
+PASS input.hasAttribute('capture') is true
+PASS input.capture is false
+PASS input.hasAttribute('capture') is false
+PASS input.capture is true
+PASS input.hasAttribute('capture') is true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsfilefileinputcapturehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/file/file-input-capture.html (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/file/file-input-capture.html        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/LayoutTests/fast/forms/file/file-input-capture.html        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -7,28 +7,33 @@
</span><span class="cx"> var input = document.createElement("input");
</span><span class="cx">
</span><span class="cx"> shouldBeTrue("'capture' in input");
</span><del>-shouldBe("input.capture", "''");
</del><ins>+shouldBe("input.capture", "false");
+shouldBe("input.hasAttribute('capture')", "false");
</ins><span class="cx">
</span><span class="cx"> input.setAttribute("type", "file");
</span><span class="cx">
</span><del>-shouldBe("input.capture", "'filesystem'");
</del><ins>+shouldBe("input.capture", "false");
+shouldBe("input.hasAttribute('capture')", "false");
</ins><span class="cx">
</span><del>-input.setAttribute("capture", "CaMerA");
-shouldBe("input.capture", "'camera'");
</del><ins>+input.setAttribute("capture", true);
+shouldBe("input.capture", "true");
+shouldBe("input.hasAttribute('capture')", "true");
</ins><span class="cx">
</span><del>-input.setAttribute("capture", "camcorder");
-shouldBe("input.capture", "'camcorder'");
</del><ins>+input.removeAttribute("capture");
+shouldBe("input.capture", "false");
+shouldBe("input.hasAttribute('capture')", "false");
</ins><span class="cx">
</span><del>-input.setAttribute("capture", "MiCroPhonE");
-shouldBe("input.capture", "'microphone'");
</del><ins>+input.setAttribute("capture", "'x'");
+shouldBe("input.capture", "true");
+shouldBe("input.hasAttribute('capture')", "true");
</ins><span class="cx">
</span><del>-input.setAttribute("capture", "xyzzy");
-shouldBe("input.capture", "'filesystem'");
</del><ins>+input.capture = false;
+shouldBe("input.capture", "false");
+shouldBe("input.hasAttribute('capture')", "false");
</ins><span class="cx">
</span><del>-input.capture = "CamCorder";
-shouldBe("input.capture", "'camcorder'");
-shouldBe("input.getAttribute('capture')", "'CamCorder'");
-
</del><ins>+input.capture = true;
+shouldBe("input.capture", "true");
+shouldBe("input.hasAttribute('capture')", "true");
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../../resources/js-test-post.js"></script>
</span><span class="cx"> </html>
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/ChangeLog        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Update the HTML Media Capture implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=118465
+
+ Reviewed by Darin Adler.
+
+ Make the implementation in WebKit compatible with the 2013-05-09
+ version of the spec, which makes the "capture" attribute a boolean
+ instead of an enum.
+
+ Covered by fast/forms/file/file-input-capture.html.
+
+ * html/FileInputType.cpp:
+ (WebCore::FileInputType::handleDOMActivateEvent):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::capture): Renamed to shouldUseMediaCapture().
+ (WebCore::HTMLInputElement::shouldUseMediaCapture): Return a bool.
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl: Turn the `capture' attribute into a
+ reflective boolean instead of a DOMString.
+ * platform/FileChooser.h:
+
</ins><span class="cx"> 2014-02-12 Radu Stavila <stavila@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSS Regions] Remove unused method in RenderFlowThread
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlFileInputTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FileInputType.cpp (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FileInputType.cpp        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/html/FileInputType.cpp        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> settings.acceptFileExtensions = input.acceptFileExtensions();
</span><span class="cx"> settings.selectedFiles = m_fileList->paths();
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- settings.capture = input.capture();
</del><ins>+ settings.capture = input.shouldUseMediaCapture();
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> applyFileChooserSettings(settings);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -1798,26 +1798,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>-String HTMLInputElement::capture() const
</del><ins>+bool HTMLInputElement::shouldUseMediaCapture() const
</ins><span class="cx"> {
</span><del>- if (!isFileUpload())
- return String();
-
- String capture = fastGetAttribute(captureAttr).lower();
- if (capture == "camera"
- || capture == "camcorder"
- || capture == "microphone"
- || capture == "filesystem")
- return capture;
-
- return "filesystem";
</del><ins>+ return isFileUpload() && fastHasAttribute(captureAttr);
</ins><span class="cx"> }
</span><del>-
-void HTMLInputElement::setCapture(const String& value)
-{
- setAttribute(captureAttr, value);
-}
-
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> bool HTMLInputElement::isInRequiredRadioButtonGroup()
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -298,8 +298,7 @@
</span><span class="cx"> String defaultToolTip() const;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- String capture() const;
- void setCapture(const String& value);
</del><ins>+ bool shouldUseMediaCapture() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> static const int maximumLength;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.idl        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -126,5 +126,5 @@
</span><span class="cx"> [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=NullString] attribute DOMString autocapitalize;
</span><span class="cx">
</span><span class="cx"> // See http://www.w3.org/TR/html-media-capture/
</span><del>- [Conditional=MEDIA_CAPTURE] attribute DOMString capture;
</del><ins>+ [Conditional=MEDIA_CAPTURE, Reflect] attribute boolean capture;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformFileChooserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/FileChooser.h (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/FileChooser.h        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebCore/platform/FileChooser.h        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> Vector<String> acceptFileExtensions;
</span><span class="cx"> Vector<String> selectedFiles;
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- String capture;
</del><ins>+ bool capture;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // Returns a combined vector of acceptMIMETypes and acceptFileExtensions.
</span></span></pre></div>
<a id="trunkSourceWebKiteflChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ChangeLog (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ChangeLog        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit/efl/ChangeLog        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Update the HTML Media Capture implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=118465
+
+ Reviewed by Darin Adler.
+
+ Make the implementation in WebKit compatible with the 2013-05-09
+ version of the spec, which makes the "capture" attribute a boolean
+ instead of an enum.
+
+ * ewk/ewk_file_chooser.cpp:
+ (ewk_file_chooser_capture_get): Return an Eina_Bool now.
+ * ewk/ewk_file_chooser.h: Get rid of Ewk_File_Chooser_Capture_Type.
+
</ins><span class="cx"> 2014-02-09 Ryuan Choi <ryuan.choi@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Remove PageClientEfl
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_file_choosercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_file_chooser.cpp (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_file_chooser.cpp        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit/efl/ewk/ewk_file_chooser.cpp        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -76,26 +76,14 @@
</span><span class="cx"> return files;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ewk_File_Chooser_Capture_Type ewk_file_chooser_capture_get(const Ewk_File_Chooser* chooser)
</del><ins>+Eina_Bool ewk_file_chooser_capture_get(const Ewk_File_Chooser* chooser)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- EINA_SAFETY_ON_NULL_RETURN_VAL(chooser, EWK_FILE_CHOOSER_CAPTURE_TYPE_INVALID);
-
- String capture = chooser->fileChooser->settings().capture;
-
- if (capture == "camera")
- return EWK_FILE_CHOOSER_CAPTURE_TYPE_CAMERA;
-
- if (capture == "camcorder")
- return EWK_FILE_CHOOSER_CAPTURE_TYPE_CAMCORDER;
-
- if (capture == "microphone")
- return EWK_FILE_CHOOSER_CAPTURE_TYPE_MICROPHONE;
-
- return EWK_FILE_CHOOSER_CAPTURE_TYPE_FILESYSTEM;
</del><ins>+ EINA_SAFETY_ON_NULL_RETURN_VAL(chooser, false);
+ return chooser->fileChooser->settings().capture;
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(chooser);
</span><del>- return EWK_FILE_CHOOSER_CAPTURE_TYPE_INVALID;
</del><ins>+ return false;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKiteflewkewk_file_chooserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/efl/ewk/ewk_file_chooser.h (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/efl/ewk/ewk_file_chooser.h        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit/efl/ewk/ewk_file_chooser.h        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -43,19 +43,6 @@
</span><span class="cx"> typedef struct _Ewk_File_Chooser Ewk_File_Chooser;
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * \enum _Ewk_File_Chooser_Capture_Type
- * @brief Types of capture attribute of file chooser to support the HTML media capture.
- */
-enum _Ewk_File_Chooser_Capture_Type {
- EWK_FILE_CHOOSER_CAPTURE_TYPE_INVALID,
- EWK_FILE_CHOOSER_CAPTURE_TYPE_FILESYSTEM,
- EWK_FILE_CHOOSER_CAPTURE_TYPE_CAMERA,
- EWK_FILE_CHOOSER_CAPTURE_TYPE_CAMCORDER,
- EWK_FILE_CHOOSER_CAPTURE_TYPE_MICROPHONE
-};
-typedef enum _Ewk_File_Chooser_Capture_Type Ewk_File_Chooser_Capture_Type;
-
-/**
</del><span class="cx"> * Query if multiple files are supported by file chooser.
</span><span class="cx"> *
</span><span class="cx"> * @param f file chooser object.
</span><span class="lines">@@ -114,16 +101,15 @@
</span><span class="cx"> EAPI Eina_List *ewk_file_chooser_selected_files_get(const Ewk_File_Chooser *f);
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * Returns the capture attribute of the file chooser to support HTML media capture.
</del><ins>+ * Returns whether the device's media capture capabilities should be used in the file chooser.
</ins><span class="cx"> *
</span><span class="cx"> * @see http://www.w3.org/TR/html-media-capture/ for the semantics of the capture attribute.
</span><span class="cx"> *
</span><span class="cx"> * @param f file chooser object.
</span><span class="cx"> *
</span><del>- * @return @c Ewk_File_Chooser_Capture_Type on supporting HTML media capture or
- * @c EWK_FILE_CHOOSER_CAPTURE_TYPE_INVALID on failure.
</del><ins>+ * @return @c EINA_TRUE if the device's capabilities should be used, @c EINA_FALSE otherwise.
</ins><span class="cx"> */
</span><del>-EAPI Ewk_File_Chooser_Capture_Type ewk_file_chooser_capture_get(const Ewk_File_Chooser *f);
</del><ins>+EAPI Eina_Bool ewk_file_chooser_capture_get(const Ewk_File_Chooser *f);
</ins><span class="cx">
</span><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-02-12 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Update the HTML Media Capture implementation.
+ https://bugs.webkit.org/show_bug.cgi?id=118465
+
+ Reviewed by Darin Adler.
+
+ Make the implementation in WebKit compatible with the 2013-05-09
+ version of the spec, which makes the "capture" attribute a boolean
+ instead of an enum.
+
+ * Shared/WebOpenPanelParameters.cpp:
+ (WebKit::WebOpenPanelParameters::capture): Return a bool.
+ * Shared/WebOpenPanelParameters.h: Ditto.
+ * UIProcess/API/C/WKOpenPanelParameters.cpp:
+ (WKOpenPanelParametersCopyCapture): Deprecate, the implementation is
+ incompatible with the current version of the spec.
+ (WKOpenPanelParametersGetCaptureEnabled): Add and return a bool.
+ * UIProcess/API/C/WKOpenPanelParameters.h:
+
</ins><span class="cx"> 2014-02-12 Alberto Garcia <berto@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] Fails to build if configure is run with its absolute path
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebOpenPanelParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.cpp        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>-String WebOpenPanelParameters::capture() const
</del><ins>+bool WebOpenPanelParameters::capture() const
</ins><span class="cx"> {
</span><span class="cx"> return m_settings.capture;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebOpenPanelParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit2/Shared/WebOpenPanelParameters.h        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> PassRefPtr<API::Array> acceptMIMETypes() const;
</span><span class="cx"> PassRefPtr<API::Array> selectedFileNames() const;
</span><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- String capture() const;
</del><ins>+ bool capture() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKOpenPanelParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.cpp        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -48,13 +48,19 @@
</span><span class="cx"> return toAPI(toImpl(parametersRef)->acceptMIMETypes().leakRef());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+// Deprecated.
</ins><span class="cx"> WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef parametersRef)
</span><span class="cx"> {
</span><ins>+ return 0;
+}
+
+bool WKOpenPanelParametersGetCaptureEnabled(WKOpenPanelParametersRef parametersRef)
+{
</ins><span class="cx"> #if ENABLE(MEDIA_CAPTURE)
</span><del>- return toCopiedAPI(toImpl(parametersRef)->capture());
</del><ins>+ return toImpl(parametersRef)->capture();
</ins><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(parametersRef);
</span><del>- return 0;
</del><ins>+ return false;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKOpenPanelParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h (163957 => 163958)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h        2014-02-12 13:31:22 UTC (rev 163957)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOpenPanelParameters.h        2014-02-12 14:58:40 UTC (rev 163958)
</span><span class="lines">@@ -43,8 +43,11 @@
</span><span class="cx">
</span><span class="cx"> WK_EXPORT WKArrayRef WKOpenPanelParametersCopyAcceptedMIMETypes(WKOpenPanelParametersRef parameters);
</span><span class="cx">
</span><ins>+/* DEPRECATED - Please use WKOpenPanelParametersGetCaptureEnabled() instead. */
</ins><span class="cx"> WK_EXPORT WKStringRef WKOpenPanelParametersCopyCapture(WKOpenPanelParametersRef parameters);
</span><span class="cx">
</span><ins>+WK_EXPORT bool WKOpenPanelParametersGetCaptureEnabled(WKOpenPanelParametersRef parametersRef);
+
</ins><span class="cx"> WK_EXPORT WKArrayRef WKOpenPanelParametersCopySelectedFileNames(WKOpenPanelParametersRef parametersRef);
</span><span class="cx">
</span><span class="cx"> #ifdef __cplusplus
</span></span></pre>
</div>
</div>
</body>
</html>