Bug 32183 - [GTK] REGRESSION: webkit thinks it can render PDFs
Summary: [GTK] REGRESSION: webkit thinks it can render PDFs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2009-12-05 08:27 PST by Gustavo Noronha (kov)
Modified: 2009-12-07 06:36 PST (History)
5 users (show)

See Also:


Attachments
proposed fix (58.20 KB, patch)
2009-12-06 14:00 PST, Gustavo Noronha (kov)
xan.lopez: review+
gustavo: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2009-12-05 08:27:56 PST
1.1.17 brings a regression from 1.1.16: WebKit thinks it is able to render PDFs, and thus does not cause them to be downloaded. I know Apple's port of WebKit does render PDFs, but WebKitGTK+ doesn't.
Comment 1 Gustavo Noronha (kov) 2009-12-06 14:00:17 PST
Created attachment 44367 [details]
proposed fix

The problem is our MediaPlayer thinks it supports lots of application/* mime types (because GStreamer does). We have currently a blacklist of some application/ types we don't want the media player to support, but I think we should turn this into a whitelist.
Comment 2 WebKit Review Bot 2009-12-06 14:04:05 PST
Attachment 44367 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
Last 5120 characters of output:
other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
WebKit/gtk/tests/testmimehandling.c:29:  Declaration has space between * and variable name in GMainLoop* loop  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:31:  Declaration has space between * and variable name in char* base_uri  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:31:  base_uri is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:35:  Extra space before ( in function call  [whitespace/parens] [4]
WebKit/gtk/tests/testmimehandling.c:44:  Extra space before ( in function call  [whitespace/parens] [4]
WebKit/gtk/tests/testmimehandling.c:48:  Declaration has space between * and variable name in char* contents  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:50:  Declaration has space between * and variable name in GError* error  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:57:  Declaration has space between * and variable name in char* contents  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:59:  Declaration has space between * and variable name in GError* error  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:66:  Declaration has space between * and variable name in char* contents  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:68:  Declaration has space between * and variable name in GError* error  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:75:  Declaration has space between * and variable name in char* contents  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:77:  Declaration has space between * and variable name in GError* error  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:85:  Extra space before ( in function call  [whitespace/parens] [4]
WebKit/gtk/tests/testmimehandling.c:88:  idle_quit_loop_cb is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:94:  mime_type_policy_decision_requested_cb is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:95:  Declaration has space between * and variable name in WebKitNetworkRequest* request  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:96:  Declaration has space between * and variable name in WebKitWebPolicyDecision* decision  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:98:  Declaration has space between * and variable name in char* type  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:119:  test_mime_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:121:  Declaration has space between * and variable name in WebKitWebView* view  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:131:  Declaration has space between * and variable name in char* effective_uri  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:131:  effective_uri is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:140:  test_mime_pdf is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:145:  test_mime_html is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:150:  test_mime_text is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:155:  test_mime_ogg is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:162:  Declaration has space between * and variable name in SoupServer* server  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:163:  Declaration has space between * and variable name in SoupURI* soup_uri  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:163:  soup_uri is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:164:  Declaration has space between * and variable name in char* test_dir  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:164:  test_dir is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:165:  Declaration has space between * and variable name in char* resources_dir  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:165:  resources_dir is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testmimehandling.c:186:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 36
Comment 3 Adam Barth 2009-12-06 14:22:40 PST
That file is radically outside the style guide.  Is it intended to be written in a different style?  Should we teach the style bot to ignore it and files like it, or should it be changed to WebKit style since its in the WebKit tree?
Comment 4 Gustavo Noronha (kov) 2009-12-07 05:03:31 PST
(In reply to comment #3)
> That file is radically outside the style guide.  Is it intended to be written
> in a different style?  Should we teach the style bot to ignore it and files
> like it, or should it be changed to WebKit style since its in the WebKit tree?

Yes. Our tests are written in C, using GTK+ conventions, and some WebKit conventions only. I don't have a strong opinion, but I think it makes sense for the tests to look more like the code of applications will look.
Comment 5 Xan Lopez 2009-12-07 05:16:26 PST
Comment on attachment 44367 [details]
proposed fix

Looks good to me, but there are some style issues you really should fix, like spaces between function name and parameters... other than that, r=me
Comment 6 Gustavo Noronha (kov) 2009-12-07 06:36:10 PST
Landed as r51764, with the spaces problems pointed out by Xan fixed.