| Index: Source/core/html/HTMLInputElement.cpp
|
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
|
| index c4952be77fee45ee510c43f5006a4d2cd40a05e7..04bc9fff1b14ed4a1a5592744bce14c50084d036 100644
|
| --- a/Source/core/html/HTMLInputElement.cpp
|
| +++ b/Source/core/html/HTMLInputElement.cpp
|
| @@ -1739,26 +1739,22 @@ bool HTMLInputElement::shouldAppearIndeterminate() const
|
| }
|
|
|
| #if ENABLE(MEDIA_CAPTURE)
|
| -String HTMLInputElement::capture() const
|
| +bool HTMLInputElement::capture() const
|
| {
|
| - if (!isFileUpload())
|
| - return String();
|
| -
|
| - String capture = fastGetAttribute(captureAttr).lower();
|
| - if (capture == "camera"
|
| - || capture == "camcorder"
|
| - || capture == "microphone"
|
| - || capture == "filesystem")
|
| - return capture;
|
| + if (!isFileUpload() || !fastHasAttribute(captureAttr))
|
| + return false;
|
|
|
| - return "filesystem";
|
| -}
|
| + // As per crbug.com/240252, emit a deprecation warning when the "capture"
|
| + // attribute is used as an enum. The spec has been updated and "capture" is
|
| + // supposed to be used as a boolean.
|
| + bool hasDeprecatedUsage = !fastGetAttribute(captureAttr).isNull();
|
| + if (hasDeprecatedUsage)
|
| + UseCounter::countDeprecation(document(), UseCounter::CaptureAttributeAsEnum);
|
| + else
|
| + UseCounter::count(document(), UseCounter::CaptureAttributeAsEnum);
|
|
|
| -void HTMLInputElement::setCapture(const String& value)
|
| -{
|
| - setAttribute(captureAttr, value);
|
| + return true;
|
| }
|
| -
|
| #endif
|
|
|
| bool HTMLInputElement::isInRequiredRadioButtonGroup()
|
|
|