OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "EventListener.h" | 39 #include "EventListener.h" |
40 #include "EventNames.h" | 40 #include "EventNames.h" |
41 #include "ExceptionCode.h" | 41 #include "ExceptionCode.h" |
42 #include "FloatRect.h" | 42 #include "FloatRect.h" |
43 #include "Frame.h" | 43 #include "Frame.h" |
44 #include "FrameLoader.h" | 44 #include "FrameLoader.h" |
45 #include "FrameTree.h" | 45 #include "FrameTree.h" |
46 #include "FrameView.h" | 46 #include "FrameView.h" |
47 #include "HTMLFrameOwnerElement.h" | 47 #include "HTMLFrameOwnerElement.h" |
48 #include "History.h" | 48 #include "History.h" |
| 49 #include "InspectorController.h" |
49 #include "Location.h" | 50 #include "Location.h" |
50 #include "MessageEvent.h" | 51 #include "MessageEvent.h" |
51 #include "Navigator.h" | 52 #include "Navigator.h" |
52 #include "Page.h" | 53 #include "Page.h" |
53 #include "PageGroup.h" | 54 #include "PageGroup.h" |
54 #include "PlatformScreen.h" | 55 #include "PlatformScreen.h" |
55 #include "PlatformString.h" | 56 #include "PlatformString.h" |
56 #include "Screen.h" | 57 #include "Screen.h" |
57 #include "SecurityOrigin.h" | 58 #include "SecurityOrigin.h" |
58 #include "Settings.h" | 59 #include "Settings.h" |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 | 386 |
386 Page* page = m_frame->page(); | 387 Page* page = m_frame->page(); |
387 if (!page) | 388 if (!page) |
388 return 0; | 389 return 0; |
389 | 390 |
390 Document* document = m_frame->document(); | 391 Document* document = m_frame->document(); |
391 if (!document) | 392 if (!document) |
392 return 0; | 393 return 0; |
393 | 394 |
394 RefPtr<StorageArea> storageArea = page->sessionStorage()->storageArea(docume
nt->securityOrigin()); | 395 RefPtr<StorageArea> storageArea = page->sessionStorage()->storageArea(docume
nt->securityOrigin()); |
| 396 page->inspectorController()->didUseDOMStorage(storageArea.get(), false, m_fr
ame); |
| 397 |
395 m_sessionStorage = Storage::create(m_frame, storageArea.release()); | 398 m_sessionStorage = Storage::create(m_frame, storageArea.release()); |
396 return m_sessionStorage.get(); | 399 return m_sessionStorage.get(); |
397 } | 400 } |
398 | 401 |
399 Storage* DOMWindow::localStorage() const | 402 Storage* DOMWindow::localStorage() const |
400 { | 403 { |
401 Document* document = this->document(); | 404 Document* document = this->document(); |
402 if (!document) | 405 if (!document) |
403 return 0; | 406 return 0; |
404 | 407 |
405 Page* page = document->page(); | 408 Page* page = document->page(); |
406 if (!page) | 409 if (!page) |
407 return 0; | 410 return 0; |
408 | 411 |
409 Settings* settings = document->settings(); | 412 Settings* settings = document->settings(); |
410 if (!settings || !settings->localStorageEnabled()) | 413 if (!settings || !settings->localStorageEnabled()) |
411 return 0; | 414 return 0; |
412 | 415 |
413 LocalStorage* localStorage = page->group().localStorage(); | 416 LocalStorage* localStorage = page->group().localStorage(); |
414 RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(d
ocument->securityOrigin()) : 0; | 417 RefPtr<StorageArea> storageArea = localStorage ? localStorage->storageArea(d
ocument->securityOrigin()) : 0; |
415 if (storageArea) | 418 if (storageArea) { |
| 419 page->inspectorController()->didUseDOMStorage(storageArea.get(), true, m
_frame); |
416 m_localStorage = Storage::create(m_frame, storageArea.release()); | 420 m_localStorage = Storage::create(m_frame, storageArea.release()); |
| 421 } |
417 | 422 |
418 return m_localStorage.get(); | 423 return m_localStorage.get(); |
419 } | 424 } |
420 #endif | 425 #endif |
421 | 426 |
422 void DOMWindow::postMessage(const String& message, MessagePort* messagePort, con
st String& targetOrigin, DOMWindow* source, ExceptionCode& ec) | 427 void DOMWindow::postMessage(const String& message, MessagePort* messagePort, con
st String& targetOrigin, DOMWindow* source, ExceptionCode& ec) |
423 { | 428 { |
424 if (!m_frame) | 429 if (!m_frame) |
425 return; | 430 return; |
426 | 431 |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1513 { | 1518 { |
1514 return inlineEventListenerForType(eventNames().webkitTransitionEndEvent); | 1519 return inlineEventListenerForType(eventNames().webkitTransitionEndEvent); |
1515 } | 1520 } |
1516 | 1521 |
1517 void DOMWindow::setOnwebkittransitionend(PassRefPtr<EventListener> eventListener
) | 1522 void DOMWindow::setOnwebkittransitionend(PassRefPtr<EventListener> eventListener
) |
1518 { | 1523 { |
1519 setInlineEventListenerForType(eventNames().webkitTransitionEndEvent, eventLi
stener); | 1524 setInlineEventListenerForType(eventNames().webkitTransitionEndEvent, eventLi
stener); |
1520 } | 1525 } |
1521 | 1526 |
1522 } // namespace WebCore | 1527 } // namespace WebCore |
OLD | NEW |