| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 * rights reserved. | 6 * rights reserved. |
| 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) | 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) |
| 9 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. | 9 * Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. |
| 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 } | 546 } |
| 547 | 547 |
| 548 String InputType::sanitizeUserInputValue(const String& proposedValue) const { | 548 String InputType::sanitizeUserInputValue(const String& proposedValue) const { |
| 549 return sanitizeValue(proposedValue); | 549 return sanitizeValue(proposedValue); |
| 550 } | 550 } |
| 551 | 551 |
| 552 void InputType::warnIfValueIsInvalidAndElementIsVisible( | 552 void InputType::warnIfValueIsInvalidAndElementIsVisible( |
| 553 const String& value) const { | 553 const String& value) const { |
| 554 // Don't warn if the value is set in Modernizr. | 554 // Don't warn if the value is set in Modernizr. |
| 555 const ComputedStyle* style = element().computedStyle(); | 555 const ComputedStyle* style = element().computedStyle(); |
| 556 if (style && style->visibility() != EVisibility::Hidden) | 556 if (style && style->visibility() != EVisibility::kHidden) |
| 557 warnIfValueIsInvalid(value); | 557 warnIfValueIsInvalid(value); |
| 558 } | 558 } |
| 559 | 559 |
| 560 void InputType::warnIfValueIsInvalid(const String&) const {} | 560 void InputType::warnIfValueIsInvalid(const String&) const {} |
| 561 | 561 |
| 562 bool InputType::receiveDroppedFiles(const DragData*) { | 562 bool InputType::receiveDroppedFiles(const DragData*) { |
| 563 NOTREACHED(); | 563 NOTREACHED(); |
| 564 return false; | 564 return false; |
| 565 } | 565 } |
| 566 | 566 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 } | 855 } |
| 856 if ((sign > 0 && current >= stepRange.maximum()) || | 856 if ((sign > 0 && current >= stepRange.maximum()) || |
| 857 (sign < 0 && current <= stepRange.minimum())) | 857 (sign < 0 && current <= stepRange.minimum())) |
| 858 return; | 858 return; |
| 859 applyStep(current, n, AnyIsDefaultStep, DispatchChangeEvent, | 859 applyStep(current, n, AnyIsDefaultStep, DispatchChangeEvent, |
| 860 IGNORE_EXCEPTION_FOR_TESTING); | 860 IGNORE_EXCEPTION_FOR_TESTING); |
| 861 } | 861 } |
| 862 | 862 |
| 863 void InputType::countUsageIfVisible(UseCounter::Feature feature) const { | 863 void InputType::countUsageIfVisible(UseCounter::Feature feature) const { |
| 864 if (const ComputedStyle* style = element().computedStyle()) { | 864 if (const ComputedStyle* style = element().computedStyle()) { |
| 865 if (style->visibility() != EVisibility::Hidden) | 865 if (style->visibility() != EVisibility::kHidden) |
| 866 UseCounter::count(element().document(), feature); | 866 UseCounter::count(element().document(), feature); |
| 867 } | 867 } |
| 868 } | 868 } |
| 869 | 869 |
| 870 Decimal InputType::findStepBase(const Decimal& defaultValue) const { | 870 Decimal InputType::findStepBase(const Decimal& defaultValue) const { |
| 871 Decimal stepBase = | 871 Decimal stepBase = |
| 872 parseToNumber(element().fastGetAttribute(minAttr), Decimal::nan()); | 872 parseToNumber(element().fastGetAttribute(minAttr), Decimal::nan()); |
| 873 if (!stepBase.isFinite()) | 873 if (!stepBase.isFinite()) |
| 874 stepBase = | 874 stepBase = |
| 875 parseToNumber(element().fastGetAttribute(valueAttr), defaultValue); | 875 parseToNumber(element().fastGetAttribute(valueAttr), defaultValue); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 902 | 902 |
| 903 void InputType::addWarningToConsole(const char* messageFormat, | 903 void InputType::addWarningToConsole(const char* messageFormat, |
| 904 const String& value) const { | 904 const String& value) const { |
| 905 element().document().addConsoleMessage(ConsoleMessage::create( | 905 element().document().addConsoleMessage(ConsoleMessage::create( |
| 906 RenderingMessageSource, WarningMessageLevel, | 906 RenderingMessageSource, WarningMessageLevel, |
| 907 String::format(messageFormat, | 907 String::format(messageFormat, |
| 908 JSONValue::quoteString(value).utf8().data()))); | 908 JSONValue::quoteString(value).utf8().data()))); |
| 909 } | 909 } |
| 910 | 910 |
| 911 } // namespace blink | 911 } // namespace blink |
| OLD | NEW |