Bug 1403413 - Remove deprecated MOZ_ extension prefix aliases. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 26 Sep 2017 19:07:41 -0700
changeset 383412 2e92d2ffd0869a71d424c08dd2a6c106f762cee0
parent 383411 72de90e66155e392c510231d22928453d72d69a4
child 383413 9e8b40ab6e924e0371da24f7f9887549ca930e49
push id32591
push userarchaeopteryx@coole-files.de
push dateThu, 28 Sep 2017 09:44:43 +0000
treeherdermozilla-central@76a26ef7c493 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1403413
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1403413 - Remove deprecated MOZ_ extension prefix aliases. - r=daoshengmu MozReview-Commit-ID: JM5pVKW8po7
dom/canvas/WebGLContextExtensions.cpp
--- a/dom/canvas/WebGLContextExtensions.cpp
+++ b/dom/canvas/WebGLContextExtensions.cpp
@@ -274,47 +274,16 @@ WebGLContext::GetExtension(JSContext* cx
         WebGLExtensionID extension = WebGLExtensionID(i);
 
         if (CompareWebGLExtensionName(name, GetExtensionString(extension))) {
             ext = extension;
             break;
         }
     }
 
-    if (ext == WebGLExtensionID::Unknown) {
-        // We keep backward compatibility for these deprecated vendor-prefixed
-        // alias. Do not add new ones anymore. Hide it behind the
-        // webgl.enable-draft-extensions flag instead.
-
-        if (CompareWebGLExtensionName(name, "MOZ_WEBGL_lose_context")) {
-            ext = WebGLExtensionID::WEBGL_lose_context;
-
-        } else if (CompareWebGLExtensionName(name, "MOZ_WEBGL_compressed_texture_s3tc")) {
-            ext = WebGLExtensionID::WEBGL_compressed_texture_s3tc;
-
-        } else if (CompareWebGLExtensionName(name, "MOZ_WEBGL_compressed_texture_atc")) {
-            ext = WebGLExtensionID::WEBGL_compressed_texture_atc;
-
-        } else if (CompareWebGLExtensionName(name, "MOZ_WEBGL_compressed_texture_pvrtc")) {
-            ext = WebGLExtensionID::WEBGL_compressed_texture_pvrtc;
-
-        } else if (CompareWebGLExtensionName(name, "MOZ_WEBGL_depth_texture")) {
-            ext = WebGLExtensionID::WEBGL_depth_texture;
-        }
-
-        if (ext != WebGLExtensionID::Unknown) {
-            GenerateWarning("getExtension('%s'): MOZ_ prefixed WebGL extension"
-                            " strings are deprecated. Support for them will be"
-                            " removed in the future. Use unprefixed extension"
-                            " strings. To get draft extensions, set the"
-                            " webgl.enable-draft-extensions preference.",
-                            name.get());
-        }
-    }
-
     if (ext == WebGLExtensionID::Unknown)
         return;
 
     // step 2: check if the extension is supported
     if (!IsExtensionSupported(callerType, ext))
         return;
 
     // step 3: if the extension hadn't been previously been created, create it now, thus enabling it
@@ -470,31 +439,11 @@ WebGLContext::GetSupportedExtensions(dom
         if (extension == WebGLExtensionID::MOZ_debug)
             continue; // Hide MOZ_debug from this list.
 
         if (IsExtensionSupported(callerType, extension)) {
             const char* extStr = GetExtensionString(extension);
             arr.AppendElement(NS_ConvertUTF8toUTF16(extStr));
         }
     }
-
-    /**
-     * We keep backward compatibility for these deprecated vendor-prefixed
-     * alias. Do not add new ones anymore. Hide it behind the
-     * webgl.enable-draft-extensions flag instead.
-     */
-    if (IsExtensionSupported(callerType, WebGLExtensionID::WEBGL_lose_context))
-        arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_lose_context"));
-    if (IsExtensionSupported(callerType,
-                             WebGLExtensionID::WEBGL_compressed_texture_s3tc))
-        arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_s3tc"));
-    if (IsExtensionSupported(callerType,
-                             WebGLExtensionID::WEBGL_compressed_texture_atc))
-        arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_atc"));
-    if (IsExtensionSupported(callerType,
-                             WebGLExtensionID::WEBGL_compressed_texture_pvrtc))
-        arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_compressed_texture_pvrtc"));
-    if (IsExtensionSupported(callerType,
-                             WebGLExtensionID::WEBGL_depth_texture))
-        arr.AppendElement(NS_LITERAL_STRING("MOZ_WEBGL_depth_texture"));
 }
 
 } // namespace mozilla