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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 case ValueMode::kDefault: 1016 case ValueMode::kDefault:
1017 return fastGetAttribute(valueAttr); 1017 return fastGetAttribute(valueAttr);
1018 case ValueMode::kDefaultOn: { 1018 case ValueMode::kDefaultOn: {
1019 AtomicString valueString = fastGetAttribute(valueAttr); 1019 AtomicString valueString = fastGetAttribute(valueAttr);
1020 return valueString.isNull() ? "on" : valueString; 1020 return valueString.isNull() ? "on" : valueString;
1021 } 1021 }
1022 case ValueMode::kValue: 1022 case ValueMode::kValue:
1023 return m_nonAttributeValue; 1023 return m_nonAttributeValue;
1024 } 1024 }
1025 NOTREACHED(); 1025 NOTREACHED();
1026 return emptyString(); 1026 return emptyString;
1027 } 1027 }
1028 1028
1029 String HTMLInputElement::valueOrDefaultLabel() const { 1029 String HTMLInputElement::valueOrDefaultLabel() const {
1030 String value = this->value(); 1030 String value = this->value();
1031 if (!value.isNull()) 1031 if (!value.isNull())
1032 return value; 1032 return value;
1033 return m_inputType->defaultLabel(); 1033 return m_inputType->defaultLabel();
1034 } 1034 }
1035 1035
1036 void HTMLInputElement::setValueForUser(const String& value) { 1036 void HTMLInputElement::setValueForUser(const String& value) {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 1886
1887 bool HTMLInputElement::hasFallbackContent() const { 1887 bool HTMLInputElement::hasFallbackContent() const {
1888 return m_inputTypeView->hasFallbackContent(); 1888 return m_inputTypeView->hasFallbackContent();
1889 } 1889 }
1890 1890
1891 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { 1891 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) {
1892 return m_inputType->setFilesFromPaths(paths); 1892 return m_inputType->setFilesFromPaths(paths);
1893 } 1893 }
1894 1894
1895 } // namespace blink 1895 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698