| 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 | 680 |
| 681 void LocalDOMWindow::removePostMessageTimer(PostMessageTimer* timer) | 681 void LocalDOMWindow::removePostMessageTimer(PostMessageTimer* timer) |
| 682 { | 682 { |
| 683 m_postMessageTimers.remove(timer); | 683 m_postMessageTimers.remove(timer); |
| 684 } | 684 } |
| 685 | 685 |
| 686 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende
dTargetOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtrWillBeRawPtr<Scrip
tCallStack> stackTrace) | 686 void LocalDOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intende
dTargetOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtrWillBeRawPtr<Scrip
tCallStack> stackTrace) |
| 687 { | 687 { |
| 688 if (intendedTargetOrigin) { | 688 if (intendedTargetOrigin) { |
| 689 // Check target origin now since the target document may have changed si
nce the timer was scheduled. | 689 // Check target origin now since the target document may have changed si
nce the timer was scheduled. |
| 690 if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrig
in())) { | 690 if (!intendedTargetOrigin->isSameSchemeHostPortAndSuborigin(document()->
securityOrigin())) { |
| 691 String message = ExceptionMessages::failedToExecute("postMessage", "
DOMWindow", "The target origin provided ('" + intendedTargetOrigin->toString() +
"') does not match the recipient window's origin ('" + document()->securityOrig
in()->toString() + "')."); | 691 String message = ExceptionMessages::failedToExecute("postMessage", "
DOMWindow", "The target origin provided ('" + intendedTargetOrigin->toString() +
"') does not match the recipient window's origin ('" + document()->securityOrig
in()->toString() + "')."); |
| 692 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); | 692 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::
create(SecurityMessageSource, ErrorMessageLevel, message); |
| 693 consoleMessage->setCallStack(stackTrace); | 693 consoleMessage->setCallStack(stackTrace); |
| 694 frameConsole()->addMessage(consoleMessage.release()); | 694 frameConsole()->addMessage(consoleMessage.release()); |
| 695 return; | 695 return; |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 | 698 |
| 699 dispatchEvent(event); | 699 dispatchEvent(event); |
| 700 } | 700 } |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 DOMWindow::trace(visitor); | 1525 DOMWindow::trace(visitor); |
| 1526 DOMWindowLifecycleNotifier::trace(visitor); | 1526 DOMWindowLifecycleNotifier::trace(visitor); |
| 1527 } | 1527 } |
| 1528 | 1528 |
| 1529 LocalFrame* LocalDOMWindow::frame() const | 1529 LocalFrame* LocalDOMWindow::frame() const |
| 1530 { | 1530 { |
| 1531 return m_frameObserver->frame(); | 1531 return m_frameObserver->frame(); |
| 1532 } | 1532 } |
| 1533 | 1533 |
| 1534 } // namespace blink | 1534 } // namespace blink |
| OLD | NEW |