| Index: Source/core/html/HTMLTextFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLTextFormControlElement.cpp b/Source/core/html/HTMLTextFormControlElement.cpp
|
| index 97396f7fe46049e5e9536dbaf9ef5a918743eed5..3d3e32c7e76682949523ea172400e9cc8683da9b 100644
|
| --- a/Source/core/html/HTMLTextFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLTextFormControlElement.cpp
|
| @@ -119,7 +119,7 @@ String HTMLTextFormControlElement::strippedPlaceholder() const
|
| // According to the HTML5 specification, we need to remove CR and LF from
|
| // the attribute value.
|
| const AtomicString& attributeValue = fastGetAttribute(placeholderAttr);
|
| - if (!attributeValue.contains(newlineCharacter) && !attributeValue.contains(carriageReturn))
|
| + if (!attributeValue.contains(characterNewline) && !attributeValue.contains(characterCarriageReturn))
|
| return attributeValue;
|
|
|
| StringBuilder stripped;
|
| @@ -127,14 +127,14 @@ String HTMLTextFormControlElement::strippedPlaceholder() const
|
| stripped.reserveCapacity(length);
|
| for (unsigned i = 0; i < length; ++i) {
|
| UChar character = attributeValue[i];
|
| - if (character == newlineCharacter || character == carriageReturn)
|
| + if (character == characterNewline || character == characterCarriageReturn)
|
| continue;
|
| stripped.append(character);
|
| }
|
| return stripped.toString();
|
| }
|
|
|
| -static bool isNotLineBreak(UChar ch) { return ch != newlineCharacter && ch != carriageReturn; }
|
| +static bool isNotLineBreak(UChar ch) { return ch != characterNewline && ch != characterCarriageReturn; }
|
|
|
| bool HTMLTextFormControlElement::isPlaceholderEmpty() const
|
| {
|
| @@ -658,7 +658,7 @@ String HTMLTextFormControlElement::innerEditorValue() const
|
| StringBuilder result;
|
| for (Node& node : NodeTraversal::inclusiveDescendantsOf(*innerEditor)) {
|
| if (isHTMLBRElement(node))
|
| - result.append(newlineCharacter);
|
| + result.append(characterNewline);
|
| else if (node.isTextNode())
|
| result.append(toText(node).data());
|
| }
|
| @@ -705,7 +705,7 @@ String HTMLTextFormControlElement::valueWithHardLineBreaks() const
|
| StringBuilder result;
|
| for (Node& node : NodeTraversal::descendantsOf(*innerText)) {
|
| if (isHTMLBRElement(node)) {
|
| - result.append(newlineCharacter);
|
| + result.append(characterNewline);
|
| } else if (node.isTextNode()) {
|
| String data = toText(node).data();
|
| unsigned length = data.length();
|
| @@ -714,7 +714,7 @@ String HTMLTextFormControlElement::valueWithHardLineBreaks() const
|
| if (breakOffset > position) {
|
| result.append(data, position, breakOffset - position);
|
| position = breakOffset;
|
| - result.append(newlineCharacter);
|
| + result.append(characterNewline);
|
| }
|
| getNextSoftBreak(line, breakNode, breakOffset);
|
| }
|
|
|