| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 unsigned Internals::suspendableObjectCount(Document* document) { | 1558 unsigned Internals::suspendableObjectCount(Document* document) { |
| 1559 DCHECK(document); | 1559 DCHECK(document); |
| 1560 return document->suspendableObjectCount(); | 1560 return document->suspendableObjectCount(); |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 static unsigned eventHandlerCount( | 1563 static unsigned eventHandlerCount( |
| 1564 Document& document, | 1564 Document& document, |
| 1565 EventHandlerRegistry::EventHandlerClass handlerClass) { | 1565 EventHandlerRegistry::EventHandlerClass handlerClass) { |
| 1566 if (!document.frameHost()) | 1566 if (!document.frameHost()) |
| 1567 return 0; | 1567 return 0; |
| 1568 EventHandlerRegistry* registry = | 1568 EventHandlerRegistry* registry = &document.page()->eventHandlerRegistry(); |
| 1569 &document.frameHost()->eventHandlerRegistry(); | |
| 1570 unsigned count = 0; | 1569 unsigned count = 0; |
| 1571 const EventTargetSet* targets = registry->eventHandlerTargets(handlerClass); | 1570 const EventTargetSet* targets = registry->eventHandlerTargets(handlerClass); |
| 1572 if (targets) { | 1571 if (targets) { |
| 1573 for (const auto& target : *targets) | 1572 for (const auto& target : *targets) |
| 1574 count += target.value; | 1573 count += target.value; |
| 1575 } | 1574 } |
| 1576 return count; | 1575 return count; |
| 1577 } | 1576 } |
| 1578 | 1577 |
| 1579 unsigned Internals::wheelEventHandlerCount(Document* document) { | 1578 unsigned Internals::wheelEventHandlerCount(Document* document) { |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3217 | 3216 |
| 3218 void Internals::crash() { | 3217 void Internals::crash() { |
| 3219 CHECK(false) << "Intentional crash"; | 3218 CHECK(false) << "Intentional crash"; |
| 3220 } | 3219 } |
| 3221 | 3220 |
| 3222 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3221 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3223 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3222 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3224 } | 3223 } |
| 3225 | 3224 |
| 3226 } // namespace blink | 3225 } // namespace blink |
| OLD | NEW |