| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 if (!protocolIsJavaScript(url)) | 484 if (!protocolIsJavaScript(url)) |
| 485 return false; | 485 return false; |
| 486 | 486 |
| 487 bool shouldBypassMainWorldContentSecurityPolicy = ContentSecurityPolicy::sho
uldBypassMainWorld(frame()->document()); | 487 bool shouldBypassMainWorldContentSecurityPolicy = ContentSecurityPolicy::sho
uldBypassMainWorld(frame()->document()); |
| 488 if (!frame()->page() | 488 if (!frame()->page() |
| 489 || (!shouldBypassMainWorldContentSecurityPolicy && !frame()->document()-
>contentSecurityPolicy()->allowJavaScriptURLs(frame()->document()->url(), eventH
andlerPosition().m_line))) | 489 || (!shouldBypassMainWorldContentSecurityPolicy && !frame()->document()-
>contentSecurityPolicy()->allowJavaScriptURLs(frame()->document()->url(), eventH
andlerPosition().m_line))) |
| 490 return true; | 490 return true; |
| 491 | 491 |
| 492 bool progressNotificationsNeeded = frame()->loader().stateMachine()->isDispl
ayingInitialEmptyDocument() && !frame()->isLoading(); | 492 bool progressNotificationsNeeded = frame()->loader().stateMachine()->isDispl
ayingInitialEmptyDocument() && !frame()->isLoading(); |
| 493 if (progressNotificationsNeeded) | 493 if (progressNotificationsNeeded) |
| 494 frame()->loader().progress().progressStarted(); | 494 frame()->loader().progress().progressStarted(true); |
| 495 | 495 |
| 496 // We need to hold onto the LocalFrame here because executing script can | 496 // We need to hold onto the LocalFrame here because executing script can |
| 497 // destroy the frame. | 497 // destroy the frame. |
| 498 RefPtrWillBeRawPtr<LocalFrame> protect(frame()); | 498 RefPtrWillBeRawPtr<LocalFrame> protect(frame()); |
| 499 RefPtrWillBeRawPtr<Document> ownerDocument(frame()->document()); | 499 RefPtrWillBeRawPtr<Document> ownerDocument(frame()->document()); |
| 500 | 500 |
| 501 const int javascriptSchemeLength = sizeof("javascript:") - 1; | 501 const int javascriptSchemeLength = sizeof("javascript:") - 1; |
| 502 | 502 |
| 503 bool locationChangeBefore = frame()->navigationScheduler().locationChangePen
ding(); | 503 bool locationChangeBefore = frame()->navigationScheduler().locationChangePen
ding(); |
| 504 | 504 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 for (size_t i = 0; i < resultArray->Length(); ++i) { | 597 for (size_t i = 0; i < resultArray->Length(); ++i) { |
| 598 v8::Local<v8::Value> value; | 598 v8::Local<v8::Value> value; |
| 599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) | 599 if (!resultArray->Get(scriptState->context(), i).ToLocal(&value)) |
| 600 return; | 600 return; |
| 601 results->append(value); | 601 results->append(value); |
| 602 } | 602 } |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 | 605 |
| 606 } // namespace blink | 606 } // namespace blink |
| OLD | NEW |