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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFormElement.cpp

Issue 2050973002: UseCounter: Count form submission in orphan tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLFormElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
index 026dcf70376d21047671b710d42602102d488f97..6b739a0b0328dac4b76c547d2a2612811c0a4c97 100644
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp
@@ -339,6 +339,9 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton)
LocalFrame* frame = document().frame();
if (!view || !frame || !frame->page())
return;
+ // See crbug.com/586749.
+ if (!inShadowIncludingDocument())
+ UseCounter::count(document(), UseCounter::FormSubmissionNotInDocumentTree);
if (m_isSubmittingOrInUserJSSubmitEvent) {
m_shouldSubmit = true;
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698