| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 9 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 10 * | 10 * |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 379 |
| 380 if (typeMismatch()) | 380 if (typeMismatch()) |
| 381 return std::make_pair(typeMismatchText(), emptyString()); | 381 return std::make_pair(typeMismatchText(), emptyString()); |
| 382 | 382 |
| 383 if (patternMismatch(value)) { | 383 if (patternMismatch(value)) { |
| 384 // https://html.spec.whatwg.org/multipage/forms.html#attr-input-pattern | 384 // https://html.spec.whatwg.org/multipage/forms.html#attr-input-pattern |
| 385 // When an input element has a pattern attribute specified, authors | 385 // When an input element has a pattern attribute specified, authors |
| 386 // should include a title attribute to give a description of the | 386 // should include a title attribute to give a description of the |
| 387 // pattern. User agents may use the contents of this attribute, if it | 387 // pattern. User agents may use the contents of this attribute, if it |
| 388 // is present, when informing the user that the pattern is not matched | 388 // is present, when informing the user that the pattern is not matched |
| 389 return std::make_pair(locale().queryString(WebLocalizedString::Validatio
nPatternMismatch), element().fastGetAttribute(titleAttr).string()); | 389 return std::make_pair(locale().queryString(WebLocalizedString::Validatio
nPatternMismatch), element().fastGetAttribute(titleAttr).getString()); |
| 390 } | 390 } |
| 391 | 391 |
| 392 if (element().tooLong()) | 392 if (element().tooLong()) |
| 393 return std::make_pair(locale().validationMessageTooLongText(value.length
(), element().maxLength()), emptyString()); | 393 return std::make_pair(locale().validationMessageTooLongText(value.length
(), element().maxLength()), emptyString()); |
| 394 | 394 |
| 395 if (element().tooShort()) | 395 if (element().tooShort()) |
| 396 return std::make_pair(locale().validationMessageTooShortText(value.lengt
h(), element().minLength()), emptyString()); | 396 return std::make_pair(locale().validationMessageTooShortText(value.lengt
h(), element().minLength()), emptyString()); |
| 397 | 397 |
| 398 if (!isSteppable()) | 398 if (!isSteppable()) |
| 399 return std::make_pair(emptyString(), emptyString()); | 399 return std::make_pair(emptyString(), emptyString()); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 return StepRange(stepBase, minimum, maximum, step, stepDescription); | 973 return StepRange(stepBase, minimum, maximum, step, stepDescription); |
| 974 } | 974 } |
| 975 | 975 |
| 976 void InputType::addWarningToConsole(const char* messageFormat, const String& val
ue) const | 976 void InputType::addWarningToConsole(const char* messageFormat, const String& val
ue) const |
| 977 { | 977 { |
| 978 element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, | 978 element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, |
| 979 String::format(messageFormat, JSONValue::quoteString(value).utf8().data(
)))); | 979 String::format(messageFormat, JSONValue::quoteString(value).utf8().data(
)))); |
| 980 } | 980 } |
| 981 | 981 |
| 982 } // namespace blink | 982 } // namespace blink |
| OLD | NEW |