WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
118465
Update the HTML Media Capture implementation.
https://bugs.webkit.org/show_bug.cgi?id=118465
Summary
Update the HTML Media Capture implementation.
Raphael Kubo da Costa (:rakuco)
Reported
2013-07-08 05:17:24 PDT
Update the HTML Media Capture implementation.
Attachments
Patch
(17.72 KB, patch)
2013-07-08 05:26 PDT
,
Raphael Kubo da Costa (:rakuco)
no flags
Details
Formatted Diff
Diff
Patch
(16.15 KB, patch)
2014-02-11 07:28 PST
,
Raphael Kubo da Costa (:rakuco)
no flags
Details
Formatted Diff
Diff
Patch for landing
(16.96 KB, patch)
2014-02-12 05:32 PST
,
Raphael Kubo da Costa (:rakuco)
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Raphael Kubo da Costa (:rakuco)
Comment 1
2013-07-08 05:26:52 PDT
Created
attachment 206232
[details]
Patch
Raphael Kubo da Costa (:rakuco)
Comment 2
2013-07-08 05:34:24 PDT
CC'ing people who can take a look at the changes to WebCore/WebKit2 and the ports affected by the change. Since the spec has been changed in an incompatible way, I've changed the API in EFL-WebKit1 accordingly. I'm not sure if I can remove or change existing C API in WK2, so I've just deprecated the existing function there and added another one. The work in Blink/Chromium is being tracked in <
https://codereview.chromium.org/15015006
>, <
https://codereview.chromium.org/14758008
> and <
https://codereview.chromium.org/18332015
>.
Raphael Kubo da Costa (:rakuco)
Comment 3
2013-08-12 06:57:47 PDT
Ping?
Raphael Kubo da Costa (:rakuco)
Comment 4
2014-02-11 07:28:24 PST
Created
attachment 223860
[details]
Patch
Darin Adler
Comment 5
2014-02-11 15:30:16 PST
Comment on
attachment 223860
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=223860&action=review
> Source/WebCore/html/HTMLInputElement.cpp:1806 > - if (!isFileUpload()) > - return String(); > - > - String capture = fastGetAttribute(captureAttr).lower(); > - if (capture == "camera" > - || capture == "camcorder" > - || capture == "microphone" > - || capture == "filesystem") > - return capture; > - > - return "filesystem"; > -} > + if (!isFileUpload() || !fastHasAttribute(captureAttr)) > + return false; > > -void HTMLInputElement::setCapture(const String& value) > -{ > - setAttribute(captureAttr, value); > + return true;
Coding style wise, the the way to write this is: return isFileUpload() && fastHasAttribute(captureAttr); But getting at capture from the DOM API in JavaScript or other bindings will give true, even if isFileUpload() is false. If we keep this function, I suggest we name it differently to make it clear it’s not exactly the same as the DOM API function.
> Source/WebCore/html/HTMLInputElement.h:301 > + bool capture() const;
As I said above, I think it’s not good to have this HTMLInputElement::capture function that returns something different from what calling capture on an HTMLInputElement from JavaScript would give. It should be named differently.
Raphael Kubo da Costa (:rakuco)
Comment 6
2014-02-12 05:32:19 PST
Created
attachment 223964
[details]
Patch for landing
Raphael Kubo da Costa (:rakuco)
Comment 7
2014-02-12 05:33:06 PST
Thanks for the suggestion. I've renamed capture() to shouldUseMediaCapture().
Raphael Kubo da Costa (:rakuco)
Comment 8
2014-02-12 06:54:01 PST
Committed
r163958
: <
http://trac.webkit.org/changeset/163958
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug