summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/InputElement.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:31:00 +0100
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commitdcc8cf2e65d1aa555cce12431a16547e66b469ee (patch)
tree92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/dom/InputElement.cpp
parentccac38a6b48843126402088a309597e682f40fe6 (diff)
downloadexternal_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/dom/InputElement.cpp')
-rw-r--r--WebCore/dom/InputElement.cpp6
1 files changed, 3 insertions, 3 deletions
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.