OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 } | 142 } |
143 #endif | 143 #endif |
144 | 144 |
145 if (!activeFrame->loader()->shouldAllowNavigation(impl()->frame())) | 145 if (!activeFrame->loader()->shouldAllowNavigation(impl()->frame())) |
146 return; | 146 return; |
147 String dstUrl = activeFrame->loader()->completeURL(value.toString(exec)).str
ing(); | 147 String dstUrl = activeFrame->loader()->completeURL(value.toString(exec)).str
ing(); |
148 if (!protocolIs(dstUrl, "javascript") || allowsAccessFrom(exec)) { | 148 if (!protocolIs(dstUrl, "javascript") || allowsAccessFrom(exec)) { |
149 bool userGesture = activeFrame->script()->processingUserGesture(); | 149 bool userGesture = activeFrame->script()->processingUserGesture(); |
150 // We want a new history item if this JS was called via a user gesture | 150 // We want a new history item if this JS was called via a user gesture |
151 impl()->frame()->loader()->scheduleLocationChange(dstUrl, activeFrame->l
oader()->outgoingReferrer(), false, false, userGesture); | 151 impl()->frame()->loader()->scheduleLocationChange(dstUrl, activeFrame->l
oader()->outgoingReferrer(), !activeFrame->script()->anyPageIsProcessingUserGest
ure(), false, userGesture); |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 JSValuePtr JSDOMWindow::postMessage(ExecState* exec, const ArgList& args) | 155 JSValuePtr JSDOMWindow::postMessage(ExecState* exec, const ArgList& args) |
156 { | 156 { |
157 DOMWindow* window = impl(); | 157 DOMWindow* window = impl(); |
158 | 158 |
159 DOMWindow* source = asJSDOMWindow(exec->dynamicGlobalObject())->impl(); | 159 DOMWindow* source = asJSDOMWindow(exec->dynamicGlobalObject())->impl(); |
160 String message = args.at(exec, 0).toString(exec); | 160 String message = args.at(exec, 0).toString(exec); |
161 | 161 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 { | 316 { |
317 return new (exec) PrototypeFunction(exec, 0, propertyName, jsDOMWindowProtot
ypeFunctionFocus); | 317 return new (exec) PrototypeFunction(exec, 0, propertyName, jsDOMWindowProtot
ypeFunctionFocus); |
318 } | 318 } |
319 | 319 |
320 JSValuePtr nonCachingStaticPostMessageFunctionGetter(ExecState* exec, const Iden
tifier& propertyName, const PropertySlot&) | 320 JSValuePtr nonCachingStaticPostMessageFunctionGetter(ExecState* exec, const Iden
tifier& propertyName, const PropertySlot&) |
321 { | 321 { |
322 return new (exec) PrototypeFunction(exec, 2, propertyName, jsDOMWindowProtot
ypeFunctionPostMessage); | 322 return new (exec) PrototypeFunction(exec, 2, propertyName, jsDOMWindowProtot
ypeFunctionPostMessage); |
323 } | 323 } |
324 | 324 |
325 } // namespace WebCore | 325 } // namespace WebCore |
OLD | NEW |