OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 return; | 2495 return; |
2496 | 2496 |
2497 String script = decodeURLEscapeSequences(url.string().substring(strlen("java
script:"))); | 2497 String script = decodeURLEscapeSequences(url.string().substring(strlen("java
script:"))); |
2498 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 2498 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
2499 ScriptValue result = frame()->script()->executeScriptInMainWorldAndReturnVal
ue(ScriptSourceCode(script)); | 2499 ScriptValue result = frame()->script()->executeScriptInMainWorldAndReturnVal
ue(ScriptSourceCode(script)); |
2500 | 2500 |
2501 String scriptResult; | 2501 String scriptResult; |
2502 if (!result.getString(scriptResult)) | 2502 if (!result.getString(scriptResult)) |
2503 return; | 2503 return; |
2504 | 2504 |
2505 if (!frame()->navigationScheduler()->locationChangePending()) | 2505 if (!frame()->navigationScheduler().locationChangePending()) |
2506 frame()->document()->loader()->replaceDocument(scriptResult, ownerDocume
nt.get()); | 2506 frame()->document()->loader()->replaceDocument(scriptResult, ownerDocume
nt.get()); |
2507 } | 2507 } |
2508 | 2508 |
2509 void WebFrameImpl::willDetachPage() | 2509 void WebFrameImpl::willDetachPage() |
2510 { | 2510 { |
2511 if (!frame() || !frame()->page()) | 2511 if (!frame() || !frame()->page()) |
2512 return; | 2512 return; |
2513 | 2513 |
2514 // Do not expect string scoping results from any frames that got detached | 2514 // Do not expect string scoping results from any frames that got detached |
2515 // in the middle of the operation. | 2515 // in the middle of the operation. |
2516 if (m_scopingInProgress) { | 2516 if (m_scopingInProgress) { |
2517 | 2517 |
2518 // There is a possibility that the frame being detached was the only | 2518 // There is a possibility that the frame being detached was the only |
2519 // pending one. We need to make sure final replies can be sent. | 2519 // pending one. We need to make sure final replies can be sent. |
2520 flushCurrentScopingEffort(m_findRequestIdentifier); | 2520 flushCurrentScopingEffort(m_findRequestIdentifier); |
2521 | 2521 |
2522 cancelPendingScopingEffort(); | 2522 cancelPendingScopingEffort(); |
2523 } | 2523 } |
2524 } | 2524 } |
2525 | 2525 |
2526 } // namespace WebKit | 2526 } // namespace WebKit |
OLD | NEW |