| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 | 663 |
| 664 bool InputType::storesValueSeparateFromAttribute() | 664 bool InputType::storesValueSeparateFromAttribute() |
| 665 { | 665 { |
| 666 return true; | 666 return true; |
| 667 } | 667 } |
| 668 | 668 |
| 669 void InputType::setValue(const String& sanitizedValue, bool valueChanged, TextFi
eldEventBehavior eventBehavior) | 669 void InputType::setValue(const String& sanitizedValue, bool valueChanged, TextFi
eldEventBehavior eventBehavior) |
| 670 { | 670 { |
| 671 element()->setValueInternal(sanitizedValue, eventBehavior); | 671 element()->setValueInternal(sanitizedValue, eventBehavior); |
| 672 element()->setNeedsStyleRecalc(); | 672 element()->setNeedsStyleRecalc(); |
| 673 if (valueChanged && eventBehavior != DispatchNoEvent) | 673 if (!valueChanged) |
| 674 return; |
| 675 switch (eventBehavior) { |
| 676 case DispatchChangeEvent: |
| 674 element()->dispatchFormControlChangeEvent(); | 677 element()->dispatchFormControlChangeEvent(); |
| 678 break; |
| 679 case DispatchInputAndChangeEvent: |
| 680 element()->dispatchFormControlInputEvent(); |
| 681 element()->dispatchFormControlChangeEvent(); |
| 682 break; |
| 683 case DispatchNoEvent: |
| 684 break; |
| 685 } |
| 675 } | 686 } |
| 676 | 687 |
| 677 bool InputType::canSetValue(const String&) | 688 bool InputType::canSetValue(const String&) |
| 678 { | 689 { |
| 679 return true; | 690 return true; |
| 680 } | 691 } |
| 681 | 692 |
| 682 PassOwnPtr<ClickHandlingState> InputType::willDispatchClick() | 693 PassOwnPtr<ClickHandlingState> InputType::willDispatchClick() |
| 683 { | 694 { |
| 684 return nullptr; | 695 return nullptr; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 if (n > 1) | 1119 if (n > 1) |
| 1109 applyStep(n - 1, AnyIsDefaultStep, DispatchInputAndChangeEvent,
ec); | 1120 applyStep(n - 1, AnyIsDefaultStep, DispatchInputAndChangeEvent,
ec); |
| 1110 else if (n < -1) | 1121 else if (n < -1) |
| 1111 applyStep(n + 1, AnyIsDefaultStep, DispatchInputAndChangeEvent,
ec); | 1122 applyStep(n + 1, AnyIsDefaultStep, DispatchInputAndChangeEvent,
ec); |
| 1112 } else | 1123 } else |
| 1113 applyStep(n, AnyIsDefaultStep, DispatchInputAndChangeEvent, ec); | 1124 applyStep(n, AnyIsDefaultStep, DispatchInputAndChangeEvent, ec); |
| 1114 } | 1125 } |
| 1115 } | 1126 } |
| 1116 | 1127 |
| 1117 } // namespace WebCore | 1128 } // namespace WebCore |
| OLD | NEW |