OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 frameName = frameNameResource; | 237 frameName = frameNameResource; |
238 } | 238 } |
239 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, windowFea
turesString, info[2]); | 239 TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, windowFea
turesString, info[2]); |
240 | 240 |
241 // |impl| has to be a LocalDOMWindow, since RemoteDOMWindows wouldn't have | 241 // |impl| has to be a LocalDOMWindow, since RemoteDOMWindows wouldn't have |
242 // passed the BindingSecurity check above. | 242 // passed the BindingSecurity check above. |
243 DOMWindow* openedWindow = toLocalDOMWindow(impl)->open(urlString, frameName,
windowFeaturesString, currentDOMWindow(info.GetIsolate()), enteredDOMWindow(inf
o.GetIsolate())); | 243 DOMWindow* openedWindow = toLocalDOMWindow(impl)->open(urlString, frameName,
windowFeaturesString, currentDOMWindow(info.GetIsolate()), enteredDOMWindow(inf
o.GetIsolate())); |
244 if (!openedWindow) | 244 if (!openedWindow) |
245 return; | 245 return; |
246 | 246 |
| 247 if (openedWindow->isLocalDOMWindow()) { |
| 248 LocalFrame* targetFrame = toLocalDOMWindow(openedWindow)->frame(); |
| 249 if (targetFrame) { |
| 250 // Notify the loader's client if the initial document has been acces
sed. |
| 251 if (targetFrame->loader().stateMachine()->isDisplayingInitialEmptyDo
cument()) { |
| 252 targetFrame->loader().didAccessInitialDocument(); |
| 253 } |
| 254 } |
| 255 } |
| 256 |
247 v8SetReturnValueFast(info, openedWindow, impl); | 257 v8SetReturnValueFast(info, openedWindow, impl); |
248 } | 258 } |
249 | 259 |
250 void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) | 260 void V8Window::namedPropertyGetterCustom(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Value>& info) |
251 { | 261 { |
252 auto nameString = name.As<v8::String>(); | 262 auto nameString = name.As<v8::String>(); |
253 DOMWindow* window = V8Window::toImpl(info.Holder()); | 263 DOMWindow* window = V8Window::toImpl(info.Holder()); |
254 if (!window) | 264 if (!window) |
255 return; | 265 return; |
256 | 266 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 if (items->hasExactlyOneItem()) { | 312 if (items->hasExactlyOneItem()) { |
303 v8SetReturnValueFast(info, items->item(0), window); | 313 v8SetReturnValueFast(info, items->item(0), window); |
304 return; | 314 return; |
305 } | 315 } |
306 v8SetReturnValueFast(info, items, window); | 316 v8SetReturnValueFast(info, items, window); |
307 return; | 317 return; |
308 } | 318 } |
309 } | 319 } |
310 | 320 |
311 } // namespace blink | 321 } // namespace blink |
OLD | NEW |