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

Unified Diff: third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp
index 4bd7b63122c083017f3c6825e6d8ef5f77d0ea02..542a68551af7e77f78ed82a950e409cbbed0db73 100644
--- a/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp
@@ -400,7 +400,7 @@ bool DateTimeEditBuilder::shouldYearFieldDisabled() const
void DateTimeEditBuilder::visitLiteral(const String& text)
{
- DEFINE_STATIC_LOCAL(AtomicString, textPseudoId, ("-webkit-datetime-edit-text", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(AtomicString, textPseudoId, ("-webkit-datetime-edit-text"));
ASSERT(text.length());
RefPtrWillBeRawPtr<HTMLDivElement> element = HTMLDivElement::create(editElement().document());
element->setShadowPseudoId(textPseudoId);
@@ -501,7 +501,7 @@ void DateTimeEditElement::blurByOwner()
PassRefPtrWillBeRawPtr<DateTimeEditElement> DateTimeEditElement::create(Document& document, EditControlOwner& editControlOwner)
{
RefPtrWillBeRawPtr<DateTimeEditElement> container = adoptRefWillBeNoop(new DateTimeEditElement(document, editControlOwner));
- container->setShadowPseudoId(AtomicString("-webkit-datetime-edit", AtomicString::ConstructFromLiteral));
+ container->setShadowPseudoId(AtomicString("-webkit-datetime-edit"));
container->setAttribute(idAttr, ShadowElementNames::dateTimeEdit());
return container.release();
}
@@ -668,7 +668,7 @@ bool DateTimeEditElement::isReadOnly() const
void DateTimeEditElement::layout(const LayoutParameters& layoutParameters, const DateComponents& dateValue)
{
- DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId, ("-webkit-datetime-edit-fields-wrapper", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(AtomicString, fieldsWrapperPseudoId, ("-webkit-datetime-edit-fields-wrapper"));
if (!hasChildren()) {
RefPtrWillBeRawPtr<HTMLDivElement> element = HTMLDivElement::create(document());
element->setShadowPseudoId(fieldsWrapperPseudoId);

Powered by Google App Engine
This is Rietveld 408576698