Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(840)

Side by Side Diff: trunk/Source/core/frame/DOMWindow.cpp

Issue 264333002: Revert 172810 "Add a "forwarded" flag to usergesture tokens." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/frame/DOMTimer.cpp ('k') | trunk/Source/platform/UserGestureIndicator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 return; 845 return;
846 846
847 RefPtrWillBeRawPtr<MessageEvent> event = timer->event(); 847 RefPtrWillBeRawPtr<MessageEvent> event = timer->event();
848 848
849 // Give the embedder a chance to intercept this postMessage because this 849 // Give the embedder a chance to intercept this postMessage because this
850 // DOMWindow might be a proxy for another in browsers that support 850 // DOMWindow might be a proxy for another in browsers that support
851 // postMessage calls across WebKit instances. 851 // postMessage calls across WebKit instances.
852 if (m_frame->loader().client()->willCheckAndDispatchMessageEvent(timer->targ etOrigin(), event.get())) 852 if (m_frame->loader().client()->willCheckAndDispatchMessageEvent(timer->targ etOrigin(), event.get()))
853 return; 853 return;
854 854
855 UserGestureToken* token = timer->userGestureToken(); 855 UserGestureIndicator gestureIndicator(timer->userGestureToken());
856 if (token)
857 token->setForwarded();
858 UserGestureIndicator gestureIndicator(token);
859 856
860 event->entangleMessagePorts(document()); 857 event->entangleMessagePorts(document());
861 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->sta ckTrace()); 858 dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->sta ckTrace());
862 } 859 }
863 860
864 void DOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTarg etOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtr<ScriptCallStack> stack Trace) 861 void DOMWindow::dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTarg etOrigin, PassRefPtrWillBeRawPtr<Event> event, PassRefPtr<ScriptCallStack> stack Trace)
865 { 862 {
866 if (intendedTargetOrigin) { 863 if (intendedTargetOrigin) {
867 // Check target origin now since the target document may have changed si nce the timer was scheduled. 864 // Check target origin now since the target document may have changed si nce the timer was scheduled.
868 if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrig in())) { 865 if (!intendedTargetOrigin->isSameSchemeHostPort(document()->securityOrig in())) {
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 visitor->trace(m_media); 1867 visitor->trace(m_media);
1871 visitor->trace(m_sessionStorage); 1868 visitor->trace(m_sessionStorage);
1872 visitor->trace(m_localStorage); 1869 visitor->trace(m_localStorage);
1873 visitor->trace(m_applicationCache); 1870 visitor->trace(m_applicationCache);
1874 visitor->trace(m_performance); 1871 visitor->trace(m_performance);
1875 visitor->trace(m_css); 1872 visitor->trace(m_css);
1876 WillBeHeapSupplementable<DOMWindow>::trace(visitor); 1873 WillBeHeapSupplementable<DOMWindow>::trace(visitor);
1877 } 1874 }
1878 1875
1879 } // namespace WebCore 1876 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/frame/DOMTimer.cpp ('k') | trunk/Source/platform/UserGestureIndicator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698