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

Unified Diff: Source/core/dom/Fullscreen.cpp

Issue 1115913002: Add deprecation warnings to old powerful features on insecure origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on ToT Created 5 years, 8 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
Index: Source/core/dom/Fullscreen.cpp
diff --git a/Source/core/dom/Fullscreen.cpp b/Source/core/dom/Fullscreen.cpp
index 552abaaa706744252e467126c67bdaaa4c3dd2ef..ec727d37a124b17d6646910862dab0a6d44e9453 100644
--- a/Source/core/dom/Fullscreen.cpp
+++ b/Source/core/dom/Fullscreen.cpp
@@ -204,6 +204,18 @@ void Fullscreen::documentWasDisposed()
void Fullscreen::requestFullscreen(Element& element, RequestType requestType)
{
+ // It is required by isPrivilegedContext() but isn't
+ // actually used. This could be used later if a warning is shown in the
+ // developer console.
+ String errorMessage;
+ if (document()->isPrivilegedContext(errorMessage)) {
+ UseCounter::count(document(), UseCounter::FullscreenSecureOrigin);
+ } else {
+ UseCounter::countDeprecation(document(), UseCounter::FullscreenInsecureOrigin);
+ }
mlamouri (slow - plz ping) 2015/04/30 05:23:53 No need for { and }
jww 2015/04/30 17:28:44 Done.
+ // logPowerfulFeatureInsecureOriginWarning(document(), "fullscreen");
+ //}
mlamouri (slow - plz ping) 2015/04/30 05:23:53 Remove?
jww 2015/04/30 17:28:45 Yikes, sorry! Done.
+
// Ignore this request if the document is not in a live frame.
if (!document()->isActive())
return;

Powered by Google App Engine
This is Rietveld 408576698