Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2735633004: HTML Media Capture: update capture attribute to use string. (Closed)
Patch Set: Fix for android webview Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLInputElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
index 77db91671a0e37d0448b181acc33ffafcfd20927..41e42d473b7b337ba65c3d44c92a543b238c08c4 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1681,6 +1681,20 @@ bool HTMLInputElement::ShouldAppearIndeterminate() const {
return input_type_->ShouldAppearIndeterminate();
}
+String HTMLInputElement::GetCapture() const {
+ String capture = FastGetAttribute(captureAttr).DeprecatedLower();
mcasas 2017/04/26 19:27:36 DeprecatedLower() looks deprecated, perhaps you ca
riju_ 2017/04/27 12:30:19 Done.
+ if (capture == "user" || capture == "environment")
+ return capture;
+
+ // The missing value default and invalid value default is the
+ // implementation-specific state, which is 'environment'.
+ return "environment";
mcasas 2017/04/26 19:27:36 This is implied by l.1686. What about: if (captur
riju_ 2017/04/27 12:30:19 Done.
+}
+
+void HTMLInputElement::SetCapture(const AtomicString& value) {
+ setAttribute(captureAttr, value);
+}
+
bool HTMLInputElement::IsInRequiredRadioButtonGroup() {
// TODO(tkent): Remove type check.
DCHECK_EQ(type(), InputTypeNames::radio);

Powered by Google App Engine
This is Rietveld 408576698