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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 | 586 |
587 String InputType::sanitizeUserInputValue(const String& proposedValue) const | 587 String InputType::sanitizeUserInputValue(const String& proposedValue) const |
588 { | 588 { |
589 return sanitizeValue(proposedValue); | 589 return sanitizeValue(proposedValue); |
590 } | 590 } |
591 | 591 |
592 void InputType::warnIfValueIsInvalidAndElementIsVisible(const String& value) con
st | 592 void InputType::warnIfValueIsInvalidAndElementIsVisible(const String& value) con
st |
593 { | 593 { |
594 // Don't warn if the value is set in Modernizr. | 594 // Don't warn if the value is set in Modernizr. |
595 const ComputedStyle* style = element().computedStyle(); | 595 const ComputedStyle* style = element().computedStyle(); |
596 if (style && style->visibility() != HIDDEN) | 596 if (style && style->visibility() != EVisibility::Hidden) |
597 warnIfValueIsInvalid(value); | 597 warnIfValueIsInvalid(value); |
598 } | 598 } |
599 | 599 |
600 void InputType::warnIfValueIsInvalid(const String&) const | 600 void InputType::warnIfValueIsInvalid(const String&) const |
601 { | 601 { |
602 } | 602 } |
603 | 603 |
604 bool InputType::receiveDroppedFiles(const DragData*) | 604 bool InputType::receiveDroppedFiles(const DragData*) |
605 { | 605 { |
606 NOTREACHED(); | 606 NOTREACHED(); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 return; | 904 return; |
905 } | 905 } |
906 if ((sign > 0 && current >= stepRange.maximum()) || (sign < 0 && current <=
stepRange.minimum())) | 906 if ((sign > 0 && current >= stepRange.maximum()) || (sign < 0 && current <=
stepRange.minimum())) |
907 return; | 907 return; |
908 applyStep(current, n, AnyIsDefaultStep, DispatchChangeEvent, IGNORE_EXCEPTIO
N); | 908 applyStep(current, n, AnyIsDefaultStep, DispatchChangeEvent, IGNORE_EXCEPTIO
N); |
909 } | 909 } |
910 | 910 |
911 void InputType::countUsageIfVisible(UseCounter::Feature feature) const | 911 void InputType::countUsageIfVisible(UseCounter::Feature feature) const |
912 { | 912 { |
913 if (const ComputedStyle* style = element().computedStyle()) { | 913 if (const ComputedStyle* style = element().computedStyle()) { |
914 if (style->visibility() != HIDDEN) | 914 if (style->visibility() != EVisibility::Hidden) |
915 UseCounter::count(element().document(), feature); | 915 UseCounter::count(element().document(), feature); |
916 } | 916 } |
917 } | 917 } |
918 | 918 |
919 Decimal InputType::findStepBase(const Decimal& defaultValue) const | 919 Decimal InputType::findStepBase(const Decimal& defaultValue) const |
920 { | 920 { |
921 Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decima
l::nan()); | 921 Decimal stepBase = parseToNumber(element().fastGetAttribute(minAttr), Decima
l::nan()); |
922 if (!stepBase.isFinite()) | 922 if (!stepBase.isFinite()) |
923 stepBase = parseToNumber(element().fastGetAttribute(valueAttr), defaultV
alue); | 923 stepBase = parseToNumber(element().fastGetAttribute(valueAttr), defaultV
alue); |
924 return stepBase; | 924 return stepBase; |
(...skipping 17 matching lines...) Expand all Loading... |
942 return StepRange(stepBase, minimum, maximum, hasRangeLimitations, step, step
Description); | 942 return StepRange(stepBase, minimum, maximum, hasRangeLimitations, step, step
Description); |
943 } | 943 } |
944 | 944 |
945 void InputType::addWarningToConsole(const char* messageFormat, const String& val
ue) const | 945 void InputType::addWarningToConsole(const char* messageFormat, const String& val
ue) const |
946 { | 946 { |
947 element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, | 947 element().document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, |
948 String::format(messageFormat, JSONValue::quoteString(value).utf8().data(
)))); | 948 String::format(messageFormat, JSONValue::quoteString(value).utf8().data(
)))); |
949 } | 949 } |
950 | 950 |
951 } // namespace blink | 951 } // namespace blink |
OLD | NEW |