[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jer.noble at apple.com
jer.noble at apple.com
Wed Dec 22 12:55:13 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit fa82feb485ceb6891b0d38b14533e36054b59534
Author: jer.noble at apple.com <jer.noble at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 1 22:55:53 2010 +0000
2010-08-31 Jer Noble <jer.noble at apple.com>
Reviewed by Darin Adler.
WebKit should not accept PDFs as video.
https://bugs.webkit.org/show_bug.cgi?id=45013
QuickTime will accept a PDF as the source for a movie, and happily
convert that PDF into a .mov. WebKit should disable the eat and grip
PDF components which allow this.
Test: http/tests/media/pdf-served-as-pdf.html
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivate::createQTMovie): Add PDF eat and grip
components to the components which are disabled before opening a
QTMovie.
2010-08-31 Jer Noble <jer.noble at apple.com>
Reviewed by Darin Adler.
WebKit should not accept PDFs as video.
https://bugs.webkit.org/show_bug.cgi?id=45013
Added a new test, similar to the text-served-as-text.html test, which
expects an error thrown when a PDF is set as the source of a <video>
element.
* http/tests/media/pdf-served-as-pdf-expected.txt: Added.
* http/tests/media/pdf-served-as-pdf.html: Added.
* http/tests/media/resources/test.pdf: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 63138f7..0d28408 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-31 Jer Noble <jer.noble at apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit should not accept PDFs as video.
+ https://bugs.webkit.org/show_bug.cgi?id=45013
+
+ Added a new test, similar to the text-served-as-text.html test, which
+ expects an error thrown when a PDF is set as the source of a <video>
+ element.
+
+ * http/tests/media/pdf-served-as-pdf-expected.txt: Added.
+ * http/tests/media/pdf-served-as-pdf.html: Added.
+ * http/tests/media/resources/test.pdf: Added.
+
2010-09-01 Tony Chang <tony at chromium.org>
Unreviewed, updating a chromium baseline, the only difference is in
diff --git a/LayoutTests/http/tests/media/pdf-served-as-pdf-expected.txt b/LayoutTests/http/tests/media/pdf-served-as-pdf-expected.txt
new file mode 100644
index 0000000..2ecc6eb
--- /dev/null
+++ b/LayoutTests/http/tests/media/pdf-served-as-pdf-expected.txt
@@ -0,0 +1,6 @@
+EXPECTED (video.error == 'null') OK
+EVENT(loadstart)
+EVENT(error)
+failed trying to load PDF file served as PDF OK
+END OF TEST
+
diff --git a/LayoutTests/http/tests/media/pdf-served-as-pdf.html b/LayoutTests/http/tests/media/pdf-served-as-pdf.html
new file mode 100644
index 0000000..5709ef8
--- /dev/null
+++ b/LayoutTests/http/tests/media/pdf-served-as-pdf.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>PDF file served as 'application/pdf'</title>
+ <script src=../../../media/video-test.js></script>
+ <script>
+ function loadedmetadata(evt)
+ {
+ logResult(false, "loaded PDF file served as PDF");
+ endTest();
+ }
+
+ function error(evt)
+ {
+ logResult(true, "failed trying to load PDF file served as PDF");
+ endTest();
+ }
+
+ function start()
+ {
+ findMediaElement();
+
+ waitForEvent('loadedmetadata', loadedmetadata);
+ waitForEvent("error", error);
+ waitForEvent("loadstart");
+ testExpected("video.error", null);
+
+ var movie = "resources/test.pdf";
+ video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=" + movie + "&throttle=99999&type=application/pdf";
+ }
+ </script>
+ </head>
+
+ <body onload="start()">
+ <video controls></video>
+ </body>
+</html>
diff --git a/LayoutTests/http/tests/media/resources/test.pdf b/LayoutTests/http/tests/media/resources/test.pdf
new file mode 100644
index 0000000..8f2eeaf
Binary files /dev/null and b/LayoutTests/http/tests/media/resources/test.pdf differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 586ffea..23eee59 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-31 Jer Noble <jer.noble at apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebKit should not accept PDFs as video.
+ https://bugs.webkit.org/show_bug.cgi?id=45013
+
+ QuickTime will accept a PDF as the source for a movie, and happily
+ convert that PDF into a .mov. WebKit should disable the eat and grip
+ PDF components which allow this.
+
+ Test: http/tests/media/pdf-served-as-pdf.html
+
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivate::createQTMovie): Add PDF eat and grip
+ components to the components which are disabled before opening a
+ QTMovie.
+
2010-09-01 Rob Buis <rwlbuis at gmail.com>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index c180438..7e8a51b 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -264,12 +264,19 @@ void MediaPlayerPrivate::createQTMovie(const String& url)
void MediaPlayerPrivate::createQTMovie(NSURL *url, NSDictionary *movieAttributes)
{
// We must disable components each time we open a movie because we cannot guarantee
- // that the QTKitServer process hasn't disappeared on us:
- uint32_t componentsToDisable[4][5] = {
+ // that the QTKitServer process hasn't disappeared on us. eat/PDF and grip/PDF
+ // components must be disabled twice since they are registered twice with different
+ // flags:
+ uint32_t componentsToDisable[9][5] = {
{'eat ', 'TEXT', 'text', 0, 0},
{'eat ', 'TXT ', 'text', 0, 0},
{'eat ', 'utxt', 'text', 0, 0},
{'eat ', 'TEXT', 'tx3g', 0, 0},
+ {'eat ', 'PDF ', 'vide', 0, 0},
+ {'eat ', 'PDF ', 'vide', 0, 0},
+ {'grip', 'PDF ', 'appl', 0, 0},
+ {'grip', 'PDF ', 'appl', 0, 0},
+ {'imdc', 'pdf ', 'appl', 0, 0},
};
for (size_t i = 0; i < sizeof(componentsToDisable)/sizeof(componentsToDisable[0]); ++i)
wkQTMovieDisableComponent(componentsToDisable[i]);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list