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

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

Issue 18332015: HTML Media Capture: Update implementation, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@update-media-capture-implementation-part1
Patch Set: Rebase Created 7 years, 5 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
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 { 1732 {
1733 return m_inputType->defaultToolTip(); 1733 return m_inputType->defaultToolTip();
1734 } 1734 }
1735 1735
1736 bool HTMLInputElement::shouldAppearIndeterminate() const 1736 bool HTMLInputElement::shouldAppearIndeterminate() const
1737 { 1737 {
1738 return m_inputType->supportsIndeterminateAppearance() && indeterminate(); 1738 return m_inputType->supportsIndeterminateAppearance() && indeterminate();
1739 } 1739 }
1740 1740
1741 #if ENABLE(MEDIA_CAPTURE) 1741 #if ENABLE(MEDIA_CAPTURE)
1742 String HTMLInputElement::capture() const 1742 bool HTMLInputElement::capture() const
1743 { 1743 {
1744 if (!isFileUpload()) 1744 if (!isFileUpload() || !fastHasAttribute(captureAttr))
1745 return String(); 1745 return false;
1746 1746
1747 String capture = fastGetAttribute(captureAttr).lower(); 1747 // As per crbug.com/240252, emit a deprecation warning when the "capture"
1748 if (capture == "camera" 1748 // attribute is used as an enum. The spec has been updated and "capture" is
1749 || capture == "camcorder" 1749 // supposed to be used as a boolean.
1750 || capture == "microphone" 1750 bool hasDeprecatedUsage = !fastGetAttribute(captureAttr).isNull();
1751 || capture == "filesystem") 1751 if (hasDeprecatedUsage)
1752 return capture; 1752 UseCounter::countDeprecation(document(), UseCounter::CaptureAttributeAsE num);
1753 else
1754 UseCounter::count(document(), UseCounter::CaptureAttributeAsEnum);
1753 1755
1754 return "filesystem"; 1756 return true;
1755 } 1757 }
1756
1757 void HTMLInputElement::setCapture(const String& value)
1758 {
1759 setAttribute(captureAttr, value);
1760 }
1761
1762 #endif 1758 #endif
1763 1759
1764 bool HTMLInputElement::isInRequiredRadioButtonGroup() 1760 bool HTMLInputElement::isInRequiredRadioButtonGroup()
1765 { 1761 {
1766 ASSERT(isRadioButton()); 1762 ASSERT(isRadioButton());
1767 if (CheckedRadioButtons* buttons = checkedRadioButtons()) 1763 if (CheckedRadioButtons* buttons = checkedRadioButtons())
1768 return buttons->isInRequiredGroup(this); 1764 return buttons->isInRequiredGroup(this);
1769 return false; 1765 return false;
1770 } 1766 }
1771 1767
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 } 1911 }
1916 1912
1917 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1913 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1918 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1914 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1919 { 1915 {
1920 return m_inputType->customStyleForRenderer(originalStyleForRenderer()); 1916 return m_inputType->customStyleForRenderer(originalStyleForRenderer());
1921 } 1917 }
1922 #endif 1918 #endif
1923 1919
1924 } // namespace 1920 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698