| 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 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 void HTMLFormElement::requestAutocomplete() | 428 void HTMLFormElement::requestAutocomplete() |
| 429 { | 429 { |
| 430 if (!document().frame() || !shouldAutocomplete() || !UserGestureIndicator::p
rocessingUserGesture()) | 430 if (!document().frame() || !shouldAutocomplete() || !UserGestureIndicator::p
rocessingUserGesture()) |
| 431 finishRequestAutocomplete(AutocompleteResultErrorDisabled); | 431 finishRequestAutocomplete(AutocompleteResultErrorDisabled); |
| 432 else | 432 else |
| 433 document().frame()->loader().client()->didRequestAutocomplete(this); | 433 document().frame()->loader().client()->didRequestAutocomplete(this); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void HTMLFormElement::finishRequestAutocomplete(AutocompleteResult result) | 436 void HTMLFormElement::finishRequestAutocomplete(AutocompleteResult result) |
| 437 { | 437 { |
| 438 RefPtrWillBeRawPtr<Event> event; | 438 RefPtrWillBeRawPtr<Event> event = nullptr; |
| 439 if (result == AutocompleteResultSuccess) | 439 if (result == AutocompleteResultSuccess) |
| 440 event = Event::create(EventTypeNames::autocomplete); | 440 event = Event::create(EventTypeNames::autocomplete); |
| 441 else if (result == AutocompleteResultErrorDisabled) | 441 else if (result == AutocompleteResultErrorDisabled) |
| 442 event = AutocompleteErrorEvent::create("disabled"); | 442 event = AutocompleteErrorEvent::create("disabled"); |
| 443 else if (result == AutocompleteResultErrorCancel) | 443 else if (result == AutocompleteResultErrorCancel) |
| 444 event = AutocompleteErrorEvent::create("cancel"); | 444 event = AutocompleteErrorEvent::create("cancel"); |
| 445 else if (result == AutocompleteResultErrorInvalid) | 445 else if (result == AutocompleteResultErrorInvalid) |
| 446 event = AutocompleteErrorEvent::create("invalid"); | 446 event = AutocompleteErrorEvent::create("invalid"); |
| 447 | 447 |
| 448 event->setTarget(this); | 448 event->setTarget(this); |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 } | 775 } |
| 776 | 776 |
| 777 void HTMLFormElement::setDemoted(bool demoted) | 777 void HTMLFormElement::setDemoted(bool demoted) |
| 778 { | 778 { |
| 779 if (demoted) | 779 if (demoted) |
| 780 UseCounter::count(document(), UseCounter::DemotedFormElement); | 780 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 781 m_wasDemoted = demoted; | 781 m_wasDemoted = demoted; |
| 782 } | 782 } |
| 783 | 783 |
| 784 } // namespace | 784 } // namespace |
| OLD | NEW |