| 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 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 6 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 7 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 8 * | 8 * |
| 9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
| 10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 263 } |
| 264 } else { | 264 } else { |
| 265 if (!options.hasPassive()) | 265 if (!options.hasPassive()) |
| 266 options.setPassive(false); | 266 options.setPassive(false); |
| 267 } | 267 } |
| 268 | 268 |
| 269 if (!options.passive()) { | 269 if (!options.passive()) { |
| 270 String message_text = String::Format( | 270 String message_text = String::Format( |
| 271 "Added non-passive event listener to a scroll-blocking '%s' event. " | 271 "Added non-passive event listener to a scroll-blocking '%s' event. " |
| 272 "Consider marking event handler as 'passive' to make the page more " | 272 "Consider marking event handler as 'passive' to make the page more " |
| 273 "responsive.", | 273 "responsive. See " |
| 274 "https://www.chromestatus.com/feature/5745543795965952", |
| 274 event_type.GetString().Utf8().data()); | 275 event_type.GetString().Utf8().data()); |
| 275 | 276 |
| 276 PerformanceMonitor::ReportGenericViolation( | 277 PerformanceMonitor::ReportGenericViolation( |
| 277 GetExecutionContext(), PerformanceMonitor::kDiscouragedAPIUse, | 278 GetExecutionContext(), PerformanceMonitor::kDiscouragedAPIUse, |
| 278 message_text, 0, nullptr); | 279 message_text, 0, nullptr); |
| 279 } | 280 } |
| 280 } | 281 } |
| 281 | 282 |
| 282 bool EventTarget::addEventListener(const AtomicString& event_type, | 283 bool EventTarget::addEventListener(const AtomicString& event_type, |
| 283 EventListener* listener, | 284 EventListener* listener, |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 // they have one less listener to invoke. | 812 // they have one less listener to invoke. |
| 812 if (d->firing_event_iterators) { | 813 if (d->firing_event_iterators) { |
| 813 for (const auto& iterator : *d->firing_event_iterators) { | 814 for (const auto& iterator : *d->firing_event_iterators) { |
| 814 iterator.iterator = 0; | 815 iterator.iterator = 0; |
| 815 iterator.end = 0; | 816 iterator.end = 0; |
| 816 } | 817 } |
| 817 } | 818 } |
| 818 } | 819 } |
| 819 | 820 |
| 820 } // namespace blink | 821 } // namespace blink |
| OLD | NEW |