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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 1446253002: PlzNavigate: inform the WebFrameClient that a form will be submitted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698