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

Unified Diff: Source/core/html/shadow/DateTimeFieldElement.cpp

Issue 108313015: Make calls to AtomicString(const String&) explicit in html/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 12 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: Source/core/html/shadow/DateTimeFieldElement.cpp
diff --git a/Source/core/html/shadow/DateTimeFieldElement.cpp b/Source/core/html/shadow/DateTimeFieldElement.cpp
index 04289801fb60309e184e7a512af4e8c0ce54eb29..fd10cad7ee78269ee2e6bf3a7c07fe2332191773 100644
--- a/Source/core/html/shadow/DateTimeFieldElement.cpp
+++ b/Source/core/html/shadow/DateTimeFieldElement.cpp
@@ -152,11 +152,11 @@ void DateTimeFieldElement::initialize(const AtomicString& pseudo, const String&
{
// On accessibility, DateTimeFieldElement acts like spin button.
setAttribute(roleAttr, AtomicString("spinbutton", AtomicString::ConstructFromLiteral));
- setAttribute(aria_valuetextAttr, emptyValueAXText());
- setAttribute(aria_valueminAttr, String::number(axMinimum));
- setAttribute(aria_valuemaxAttr, String::number(axMaximum));
+ setAttribute(aria_valuetextAttr, AtomicString(emptyValueAXText()));
+ setAttribute(aria_valueminAttr, AtomicString::number(axMinimum));
+ setAttribute(aria_valuemaxAttr, AtomicString::number(axMaximum));
- setAttribute(aria_helpAttr, axHelpText);
+ setAttribute(aria_helpAttr, AtomicString(axHelpText));
setShadowPseudoId(pseudo);
appendChild(Text::create(document(), visibleValue()));
}
@@ -220,10 +220,10 @@ void DateTimeFieldElement::updateVisibleValue(EventBehavior eventBehavior)
textNode->replaceWholeText(newVisibleValue);
if (hasValue()) {
- setAttribute(aria_valuetextAttr, newVisibleValue);
- setAttribute(aria_valuenowAttr, String::number(valueForARIAValueNow()));
+ setAttribute(aria_valuetextAttr, AtomicString(newVisibleValue));
+ setAttribute(aria_valuenowAttr, AtomicString::number(valueForARIAValueNow()));
} else {
- setAttribute(aria_valuetextAttr, emptyValueAXText());
+ setAttribute(aria_valuetextAttr, AtomicString(emptyValueAXText()));
removeAttribute(aria_valuenowAttr);
}

Powered by Google App Engine
This is Rietveld 408576698