YouTube Flash plug-in replacement facility should not insert showinfo=0 into iframe...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 23:04:23 +0000 (23:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 23:04:23 +0000 (23:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161478
<rdar://problem/28050847>

Patch by Ricky Mondello <rmondello@apple.com> on 2016-09-01
Reviewed by Eric Carlson.

Source/WebCore:

* Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Stop adding the query parameter.

Tools:

* TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:
(TestWebKitAPI::TEST_F): Update expected results.

LayoutTests:

* platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt: Update the URL that was blocked.
* platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt: Ditto.
* security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt
LayoutTests/security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp

index 2a72450..8c2fe0b 100644 (file)
@@ -1,3 +1,15 @@
+2016-09-01  Ricky Mondello  <rmondello@apple.com>
+
+        YouTube Flash plug-in replacement facility should not insert showinfo=0 into iframe URLs
+        https://bugs.webkit.org/show_bug.cgi?id=161478
+        <rdar://problem/28050847>
+
+        Reviewed by Eric Carlson.
+
+        * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt: Update the URL that was blocked.
+        * platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt: Ditto.
+        * security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement-expected.txt: Ditto.
+
 2016-09-01  Devin Rousso  <dcrousso+webkit@gmail.com>
 
         Web Inspector: add Object.awaitEvent which is like singleFireEventListener but returns a promise
index 654ec1d..edada32 100644 (file)
@@ -1,8 +1,8 @@
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US&showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US&showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
 Test transforming youtube flash plugin to youtube iFrame based player. < rdar://problem/11201356>
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
index c6b37f0..360195c 100644 (file)
@@ -1,9 +1,9 @@
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US&showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US&showinfo=0
-Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US&showinfo=0
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US
+Blocked access to external URL http://www.youtube.com/embed/N0gb9v4LI4o?version=3&hl=en_US
 Test embed youtube plugin without height or width attribute. < rdar://problem/12134474>
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
index 9e35783..a171812 100644 (file)
@@ -1,3 +1,14 @@
+2016-09-01  Ricky Mondello  <rmondello@apple.com>
+
+        YouTube Flash plug-in replacement facility should not insert showinfo=0 into iframe URLs
+        https://bugs.webkit.org/show_bug.cgi?id=161478
+        <rdar://problem/28050847>
+
+        Reviewed by Eric Carlson.
+
+        * Modules/plugins/YouTubePluginReplacement.cpp:
+        (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Stop adding the query parameter.
+
 2016-09-01  Mark Lam  <mark.lam@apple.com>
 
         Move some JSObject and JSArray inline functions to their respective Inlines.h files.
index 0fb28f6..4dbdc19 100644 (file)
@@ -327,13 +327,6 @@ String YouTubePluginReplacement::youTubeURLFromAbsoluteURL(const URL& srcURL, co
     if (query.isEmpty())
         query = possibleMalformedQuery;
 
-    // By default, the iframe will display information like the video title and uploader on top of the video. Don't display
-    // them if the embeding html doesn't specify it.
-    if (!query.isEmpty() && !query.contains("showinfo"))
-        query.append("&showinfo=0");
-    else
-        query = "showinfo=0";
-    
     // Append the query string if it is valid.
     StringBuilder finalURL;
     if (isYouTubeShortenedURL)
index 76a3dee..201470b 100644 (file)
@@ -1,3 +1,14 @@
+2016-09-01  Ricky Mondello  <rmondello@apple.com>
+
+        YouTube Flash plug-in replacement facility should not insert showinfo=0 into iframe URLs
+        https://bugs.webkit.org/show_bug.cgi?id=161478
+        <rdar://problem/28050847>
+
+        Reviewed by Eric Carlson.
+
+        * TestWebKitAPI/Tests/WebCore/YouTubePluginReplacement.cpp:
+        (TestWebKitAPI::TEST_F): Update expected results.
+
 2016-09-01  Anders Carlsson  <andersca@apple.com>
 
         add BlockPtr::fromCallable
index 2c5c039..76b1035 100644 (file)
@@ -52,18 +52,18 @@ TEST_F(YouTubePluginReplacementTest, YouTubeURLFromAbsoluteURL)
     EXPECT_TRUE(test("https://www.youtube.com", "https://www.youtube.com"));
 
     // Basic YouTube video links, expected to be transformed.
-    EXPECT_TRUE(test("https://www.youtube.com/v/dQw4w9WgXcQ", "https://www.youtube.com/embed/dQw4w9WgXcQ?showinfo=0"));
-    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ", "http://www.youtube.com/embed/dQw4w9WgXcQ?showinfo=0"));
-    EXPECT_TRUE(test("https://youtube.com/v/dQw4w9WgXcQ", "https://youtube.com/embed/dQw4w9WgXcQ?showinfo=0"));
-    EXPECT_TRUE(test("http://youtube.com/v/dQw4w9WgXcQ", "http://youtube.com/embed/dQw4w9WgXcQ?showinfo=0"));
+    EXPECT_TRUE(test("https://www.youtube.com/v/dQw4w9WgXcQ", "https://www.youtube.com/embed/dQw4w9WgXcQ"));
+    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ", "http://www.youtube.com/embed/dQw4w9WgXcQ"));
+    EXPECT_TRUE(test("https://youtube.com/v/dQw4w9WgXcQ", "https://youtube.com/embed/dQw4w9WgXcQ"));
+    EXPECT_TRUE(test("http://youtube.com/v/dQw4w9WgXcQ", "http://youtube.com/embed/dQw4w9WgXcQ"));
 
     // With start time, preserved.
-    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ?start=4", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&showinfo=0"));
-    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ?start=4&fs=1", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&fs=1&showinfo=0"));
+    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ?start=4", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4"));
+    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ?start=4&fs=1", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&fs=1"));
 
     // With an invalid query (see & instead of ?), we preserve and fix the query.
-    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ&start=4", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&showinfo=0"));
-    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ&start=4&fs=1", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&fs=1&showinfo=0"));
+    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ&start=4", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4"));
+    EXPECT_TRUE(test("http://www.youtube.com/v/dQw4w9WgXcQ&start=4&fs=1", "http://www.youtube.com/embed/dQw4w9WgXcQ?start=4&fs=1"));
 
     // Non-Flash URL is untouched.
     EXPECT_TRUE(test("https://www.youtube.com/embed/dQw4w9WgXcQ", "https://www.youtube.com/embed/dQw4w9WgXcQ"));