From dcc8cf2e65d1aa555cce12431a16547e66b469ee Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:31:00 +0100 Subject: Merge webkit.org at r58033 : Initial merge by git Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1 --- WebCore/dom/InputElement.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'WebCore/dom/InputElement.cpp') diff --git a/WebCore/dom/InputElement.cpp b/WebCore/dom/InputElement.cpp index 13bb0b2..52812f9 100644 --- a/WebCore/dom/InputElement.cpp +++ b/WebCore/dom/InputElement.cpp @@ -151,7 +151,7 @@ String InputElement::sanitizeUserInputValue(const InputElement* inputElement, co string.replace('\r', ' '); string.replace('\n', ' '); - unsigned newLength = string.numCharactersInGraphemeClusters(maxLength); + unsigned newLength = numCharactersInGraphemeClusters(string, maxLength); for (unsigned i = 0; i < newLength; ++i) { const UChar current = string[i]; if (current < ' ' && current != '\t') { @@ -170,10 +170,10 @@ void InputElement::handleBeforeTextInsertedEvent(InputElementData& data, InputEl // We use RenderTextControlSingleLine::text() instead of InputElement::value() // because they can be mismatched by sanitizeValue() in // RenderTextControlSingleLine::subtreeHasChanged() in some cases. - unsigned oldLength = toRenderTextControlSingleLine(element->renderer())->text().numGraphemeClusters(); + unsigned oldLength = numGraphemeClusters(toRenderTextControlSingleLine(element->renderer())->text()); // selection() may be a pre-edit text. - unsigned selectionLength = plainText(element->document()->frame()->selection()->selection().toNormalizedRange().get()).numGraphemeClusters(); + unsigned selectionLength = numGraphemeClusters(plainText(element->document()->frame()->selection()->selection().toNormalizedRange().get())); ASSERT(oldLength >= selectionLength); // Selected characters will be removed by the next text event. -- cgit v1.1