| 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 else if (result == AutocompleteResultErrorCancel) | 487 else if (result == AutocompleteResultErrorCancel) |
| 488 event = AutocompleteErrorEvent::create("cancel"); | 488 event = AutocompleteErrorEvent::create("cancel"); |
| 489 else if (result == AutocompleteResultErrorInvalid) | 489 else if (result == AutocompleteResultErrorInvalid) |
| 490 event = AutocompleteErrorEvent::create("invalid"); | 490 event = AutocompleteErrorEvent::create("invalid"); |
| 491 | 491 |
| 492 event->setTarget(this); | 492 event->setTarget(this); |
| 493 m_pendingAutocompleteEvents.append(event.release()); | 493 m_pendingAutocompleteEvents.append(event.release()); |
| 494 | 494 |
| 495 // Dispatch events later as this API is meant to work asynchronously in all
situations and implementations. | 495 // Dispatch events later as this API is meant to work asynchronously in all
situations and implementations. |
| 496 if (!m_requestAutocompleteTimer.isActive()) | 496 if (!m_requestAutocompleteTimer.isActive()) |
| 497 m_requestAutocompleteTimer.startOneShot(0); | 497 m_requestAutocompleteTimer.startOneShot(0, FROM_HERE); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void HTMLFormElement::requestAutocompleteTimerFired(Timer<HTMLFormElement>*) | 500 void HTMLFormElement::requestAutocompleteTimerFired(Timer<HTMLFormElement>*) |
| 501 { | 501 { |
| 502 Vector<RefPtr<Event> > pendingEvents; | 502 Vector<RefPtr<Event> > pendingEvents; |
| 503 m_pendingAutocompleteEvents.swap(pendingEvents); | 503 m_pendingAutocompleteEvents.swap(pendingEvents); |
| 504 for (size_t i = 0; i < pendingEvents.size(); ++i) | 504 for (size_t i = 0; i < pendingEvents.size(); ++i) |
| 505 dispatchEvent(pendingEvents[i].release()); | 505 dispatchEvent(pendingEvents[i].release()); |
| 506 } | 506 } |
| 507 | 507 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 } | 816 } |
| 817 | 817 |
| 818 void HTMLFormElement::setDemoted(bool demoted) | 818 void HTMLFormElement::setDemoted(bool demoted) |
| 819 { | 819 { |
| 820 if (demoted) | 820 if (demoted) |
| 821 UseCounter::count(document(), UseCounter::DemotedFormElement); | 821 UseCounter::count(document(), UseCounter::DemotedFormElement); |
| 822 m_wasDemoted = demoted; | 822 m_wasDemoted = demoted; |
| 823 } | 823 } |
| 824 | 824 |
| 825 } // namespace | 825 } // namespace |
| OLD | NEW |