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

Unified Diff: third_party/WebKit/Source/core/html/forms/TextFieldInputType.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/forms/TextFieldInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
index 419676549e569e41efc8922d7b7c593e5e42fed3..bc1c71264e49c00361ea17f01a09cd8277ed2c6e 100644
--- a/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp
@@ -100,7 +100,7 @@ public:
static PassRefPtrWillBeRawPtr<DataListIndicatorElement> create(Document& document)
{
RefPtrWillBeRawPtr<DataListIndicatorElement> element = adoptRefWillBeNoop(new DataListIndicatorElement(document));
- element->setShadowPseudoId(AtomicString("-webkit-calendar-picker-indicator", AtomicString::ConstructFromLiteral));
+ element->setShadowPseudoId(AtomicString("-webkit-calendar-picker-indicator"));
element->setAttribute(idAttr, ShadowElementNames::pickerIndicator());
return element.release();
}
@@ -294,7 +294,7 @@ void TextFieldInputType::createShadowSubtree()
}
RefPtrWillBeRawPtr<TextControlInnerContainer> container = TextControlInnerContainer::create(document);
- container->setShadowPseudoId(AtomicString("-webkit-textfield-decoration-container", AtomicString::ConstructFromLiteral));
+ container->setShadowPseudoId(AtomicString("-webkit-textfield-decoration-container"));
shadowRoot->appendChild(container);
RefPtrWillBeRawPtr<EditingViewPortElement> editingViewPort = EditingViewPortElement::create(document);
@@ -343,7 +343,7 @@ void TextFieldInputType::listAttributeTargetChanged()
// but they are different. We should simplify the code by making
// containerElement mandatory.
RefPtrWillBeRawPtr<Element> rpContainer = TextControlInnerContainer::create(document);
- rpContainer->setShadowPseudoId(AtomicString("-webkit-textfield-decoration-container", AtomicString::ConstructFromLiteral));
+ rpContainer->setShadowPseudoId(AtomicString("-webkit-textfield-decoration-container"));
RefPtrWillBeRawPtr<Element> innerEditor = element().innerEditorElement();
innerEditor->parentNode()->replaceChild(rpContainer.get(), innerEditor.get());
RefPtrWillBeRawPtr<Element> editingViewPort = EditingViewPortElement::create(document);
@@ -459,7 +459,7 @@ void TextFieldInputType::updatePlaceholderText()
if (!placeholder) {
RefPtrWillBeRawPtr<HTMLElement> newElement = HTMLDivElement::create(element().document());
placeholder = newElement.get();
- placeholder->setShadowPseudoId(AtomicString("-webkit-input-placeholder", AtomicString::ConstructFromLiteral));
+ placeholder->setShadowPseudoId(AtomicString("-webkit-input-placeholder"));
placeholder->setInlineStyleProperty(CSSPropertyDisplay, element().isPlaceholderVisible() ? CSSValueBlock : CSSValueNone, true);
placeholder->setAttribute(idAttr, ShadowElementNames::placeholder());
Element* container = containerElement();

Powered by Google App Engine
This is Rietveld 408576698