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

Side by Side Diff: Source/core/html/HTMLFormElement.cpp

Issue 176763009: Have DOMWindow deal with references instead of pointers when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 9 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/DOMWindow.cpp ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 416
417 if (protocolIsJavaScript(submission->action())) { 417 if (protocolIsJavaScript(submission->action())) {
418 if (!document().contentSecurityPolicy()->allowFormAction(KURL(submission ->action()))) 418 if (!document().contentSecurityPolicy()->allowFormAction(KURL(submission ->action())))
419 return; 419 return;
420 document().frame()->script().executeScriptIfJavaScriptURL(submission->ac tion()); 420 document().frame()->script().executeScriptIfJavaScriptURL(submission->ac tion());
421 return; 421 return;
422 } 422 }
423 423
424 LocalFrame* targetFrame = document().frame()->loader().findFrameForNavigatio n(submission->target(), submission->state()->sourceDocument()); 424 LocalFrame* targetFrame = document().frame()->loader().findFrameForNavigatio n(submission->target(), submission->state()->sourceDocument());
425 if (!targetFrame) { 425 if (!targetFrame) {
426 if (!DOMWindow::allowPopUp(document().frame()) && !UserGestureIndicator: :processingUserGesture()) 426 if (!DOMWindow::allowPopUp(*document().frame()) && !UserGestureIndicator ::processingUserGesture())
427 return; 427 return;
428 targetFrame = document().frame(); 428 targetFrame = document().frame();
429 } else { 429 } else {
430 submission->clearTarget(); 430 submission->clearTarget();
431 } 431 }
432 if (!targetFrame->page()) 432 if (!targetFrame->page())
433 return; 433 return;
434 434
435 submission->setReferrer(Referrer(document().outgoingReferrer(), document().r eferrerPolicy())); 435 submission->setReferrer(Referrer(document().outgoingReferrer(), document().r eferrerPolicy()));
436 submission->setOrigin(document().outgoingOrigin()); 436 submission->setOrigin(document().outgoingOrigin());
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 } 816 }
817 817
818 void HTMLFormElement::setDemoted(bool demoted) 818 void HTMLFormElement::setDemoted(bool demoted)
819 { 819 {
820 if (demoted) 820 if (demoted)
821 UseCounter::count(document(), UseCounter::DemotedFormElement); 821 UseCounter::count(document(), UseCounter::DemotedFormElement);
822 m_wasDemoted = demoted; 822 m_wasDemoted = demoted;
823 } 823 }
824 824
825 } // namespace 825 } // namespace
OLDNEW
« no previous file with comments | « Source/core/frame/DOMWindow.cpp ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698