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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2735633004: HTML Media Capture: update capture attribute to use string. (Closed)
Patch Set: Do not propagate String(capture) outside Blink Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 } 1674 }
1675 1675
1676 String HTMLInputElement::DefaultToolTip() const { 1676 String HTMLInputElement::DefaultToolTip() const {
1677 return input_type_->DefaultToolTip(*input_type_view_); 1677 return input_type_->DefaultToolTip(*input_type_view_);
1678 } 1678 }
1679 1679
1680 bool HTMLInputElement::ShouldAppearIndeterminate() const { 1680 bool HTMLInputElement::ShouldAppearIndeterminate() const {
1681 return input_type_->ShouldAppearIndeterminate(); 1681 return input_type_->ShouldAppearIndeterminate();
1682 } 1682 }
1683 1683
1684 CaptureFacingMode HTMLInputElement::capture() const {
1685 const String capture = FastGetAttribute(captureAttr).LowerASCII();
1686 if (capture == "user")
1687 return CaptureFacingModeUser;
1688
1689 // |capture| is equivalent to 'environment' if unspecified.
1690 return CaptureFacingModeEnvironment;
1691 }
1692
1693 void HTMLInputElement::setCapture(const AtomicString& value) {
1694 setAttribute(captureAttr, value);
1695 }
1696
1684 bool HTMLInputElement::IsInRequiredRadioButtonGroup() { 1697 bool HTMLInputElement::IsInRequiredRadioButtonGroup() {
1685 // TODO(tkent): Remove type check. 1698 // TODO(tkent): Remove type check.
1686 DCHECK_EQ(type(), InputTypeNames::radio); 1699 DCHECK_EQ(type(), InputTypeNames::radio);
1687 if (RadioButtonGroupScope* scope = GetRadioButtonGroupScope()) 1700 if (RadioButtonGroupScope* scope = GetRadioButtonGroupScope())
1688 return scope->IsInRequiredGroup(this); 1701 return scope->IsInRequiredGroup(this);
1689 return false; 1702 return false;
1690 } 1703 }
1691 1704
1692 HTMLInputElement* HTMLInputElement::CheckedRadioButtonForGroup() { 1705 HTMLInputElement* HTMLInputElement::CheckedRadioButtonForGroup() {
1693 if (checked()) 1706 if (checked())
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 1900
1888 bool HTMLInputElement::HasFallbackContent() const { 1901 bool HTMLInputElement::HasFallbackContent() const {
1889 return input_type_view_->HasFallbackContent(); 1902 return input_type_view_->HasFallbackContent();
1890 } 1903 }
1891 1904
1892 void HTMLInputElement::SetFilesFromPaths(const Vector<String>& paths) { 1905 void HTMLInputElement::SetFilesFromPaths(const Vector<String>& paths) {
1893 return input_type_->SetFilesFromPaths(paths); 1906 return input_type_->SetFilesFromPaths(paths);
1894 } 1907 }
1895 1908
1896 } // namespace blink 1909 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.h ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698