| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 | 1372 |
| 1373 return true; | 1373 return true; |
| 1374 } | 1374 } |
| 1375 | 1375 |
| 1376 void LocalDOMWindow::dispatchLoadEvent() | 1376 void LocalDOMWindow::dispatchLoadEvent() |
| 1377 { | 1377 { |
| 1378 RefPtrWillBeRawPtr<Event> loadEvent(Event::create(EventTypeNames::load)); | 1378 RefPtrWillBeRawPtr<Event> loadEvent(Event::create(EventTypeNames::load)); |
| 1379 if (frame() && frame()->loader().documentLoader() && !frame()->loader().docu
mentLoader()->timing().loadEventStart()) { | 1379 if (frame() && frame()->loader().documentLoader() && !frame()->loader().docu
mentLoader()->timing().loadEventStart()) { |
| 1380 // The DocumentLoader (and thus its DocumentLoadTiming) might get destro
yed while dispatching | 1380 // The DocumentLoader (and thus its DocumentLoadTiming) might get destro
yed while dispatching |
| 1381 // the event, so protect it to prevent writing the end time into freed m
emory. | 1381 // the event, so protect it to prevent writing the end time into freed m
emory. |
| 1382 RefPtr<DocumentLoader> documentLoader = frame()->loader().documentLoader
(); | 1382 RefPtrWillBeRawPtr<DocumentLoader> documentLoader = frame()->loader().do
cumentLoader(); |
| 1383 DocumentLoadTiming& timing = documentLoader->timing(); | 1383 DocumentLoadTiming& timing = documentLoader->timing(); |
| 1384 timing.markLoadEventStart(); | 1384 timing.markLoadEventStart(); |
| 1385 dispatchEvent(loadEvent, document()); | 1385 dispatchEvent(loadEvent, document()); |
| 1386 timing.markLoadEventEnd(); | 1386 timing.markLoadEventEnd(); |
| 1387 } else | 1387 } else |
| 1388 dispatchEvent(loadEvent, document()); | 1388 dispatchEvent(loadEvent, document()); |
| 1389 | 1389 |
| 1390 // For load events, send a separate load event to the enclosing frame only. | 1390 // For load events, send a separate load event to the enclosing frame only. |
| 1391 // This is a DOM extension and is independent of bubbling/capturing rules of | 1391 // This is a DOM extension and is independent of bubbling/capturing rules of |
| 1392 // the DOM. | 1392 // the DOM. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 DOMWindow::trace(visitor); | 1523 DOMWindow::trace(visitor); |
| 1524 DOMWindowLifecycleNotifier::trace(visitor); | 1524 DOMWindowLifecycleNotifier::trace(visitor); |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 LocalFrame* LocalDOMWindow::frame() const | 1527 LocalFrame* LocalDOMWindow::frame() const |
| 1528 { | 1528 { |
| 1529 return m_frameObserver->frame(); | 1529 return m_frameObserver->frame(); |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 } // namespace blink | 1532 } // namespace blink |
| OLD | NEW |