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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 bool InputType::shouldSendChangeEventAfterCheckedChanged() | 540 bool InputType::shouldSendChangeEventAfterCheckedChanged() |
541 { | 541 { |
542 return true; | 542 return true; |
543 } | 543 } |
544 | 544 |
545 bool InputType::storesValueSeparateFromAttribute() | 545 bool InputType::storesValueSeparateFromAttribute() |
546 { | 546 { |
547 return true; | 547 return true; |
548 } | 548 } |
549 | 549 |
| 550 bool InputType::shouldDispatchFormControlChangeEvent(String& oldValue, String& n
ewValue) |
| 551 { |
| 552 return !equalIgnoringNullity(oldValue, newValue); |
| 553 } |
| 554 |
550 void InputType::setValue(const String& sanitizedValue, bool valueChanged, TextFi
eldEventBehavior eventBehavior) | 555 void InputType::setValue(const String& sanitizedValue, bool valueChanged, TextFi
eldEventBehavior eventBehavior) |
551 { | 556 { |
552 element().setValueInternal(sanitizedValue, eventBehavior); | 557 element().setValueInternal(sanitizedValue, eventBehavior); |
553 element().setNeedsStyleRecalc(SubtreeStyleChange); | 558 element().setNeedsStyleRecalc(SubtreeStyleChange); |
554 if (!valueChanged) | 559 if (!valueChanged) |
555 return; | 560 return; |
556 switch (eventBehavior) { | 561 switch (eventBehavior) { |
557 case DispatchChangeEvent: | 562 case DispatchChangeEvent: |
558 element().dispatchFormControlChangeEvent(); | 563 element().dispatchFormControlChangeEvent(); |
559 break; | 564 break; |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 StepRange InputType::createStepRange(AnyStepHandling anyStepHandling, const Deci
mal& stepBaseDefault, const Decimal& minimumDefault, const Decimal& maximumDefau
lt, const StepRange::StepDescription& stepDescription) const | 964 StepRange InputType::createStepRange(AnyStepHandling anyStepHandling, const Deci
mal& stepBaseDefault, const Decimal& minimumDefault, const Decimal& maximumDefau
lt, const StepRange::StepDescription& stepDescription) const |
960 { | 965 { |
961 const Decimal stepBase = findStepBase(stepBaseDefault); | 966 const Decimal stepBase = findStepBase(stepBaseDefault); |
962 const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), m
inimumDefault); | 967 const Decimal minimum = parseToNumber(element().fastGetAttribute(minAttr), m
inimumDefault); |
963 const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), m
aximumDefault); | 968 const Decimal maximum = parseToNumber(element().fastGetAttribute(maxAttr), m
aximumDefault); |
964 const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription,
element().fastGetAttribute(stepAttr)); | 969 const Decimal step = StepRange::parseStep(anyStepHandling, stepDescription,
element().fastGetAttribute(stepAttr)); |
965 return StepRange(stepBase, minimum, maximum, step, stepDescription); | 970 return StepRange(stepBase, minimum, maximum, step, stepDescription); |
966 } | 971 } |
967 | 972 |
968 } // namespace WebCore | 973 } // namespace WebCore |
OLD | NEW |