Bug 30868 - FrameLoaderClient::objectContentType often has copied code
: FrameLoaderClient::objectContentType often has copied code
Status: RESOLVED FIXED
: WebKit
Page Loading
: 528+ (Nightly build)
: PC All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-10-28 09:39 PST by
Modified: 2009-10-28 15:08 PST (History)


Attachments
Move shared code to FrameLoader::defaultObjectContentType (10.78 KB, patch)
2009-10-28 09:43 PST, Joe Mason
no flags Review Patch | Details | Formatted Diff | Diff
same patch, with build fix for gtk (10.78 KB, patch)
2009-10-28 09:50 PST, Joe Mason
no flags Review Patch | Details | Formatted Diff | Diff
build fix for windows (427 bytes, patch)
2009-10-28 11:29 PST, Joe Mason
no flags Review Patch | Details | Formatted Diff | Diff
build fix for mac (697 bytes, patch)
2009-10-28 11:51 PST, Joe Mason
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-10-28 09:39:26 PST
The gtk and windows ports implement FrameLoaderClient::objectContentType using the exact same code, except for different variable names and comments.  (The qt port uses almost the same code except that it checks for several more cases.  The mac port is very different, with lots of Obj-C'isms.  The wx and haiku ports don't implement it at all.)

It would be good to move this shared code to a utility function, such as defaultObjectContentType.  Ports could choose to implement objectContentType either by calling the utility function or doing their own processing.
------- Comment #1 From 2009-10-28 09:43:40 PST -------
Created an attachment (id=42037) [details]
Move shared code to FrameLoader::defaultObjectContentType

This patch moves the shared code to FrameLoader::defaultObjectContentType.  The haiku and wx ports could now implement objectContentType by calling this function, but I didn't do that because I wanted to make sure I didn't make any functional changes.
------- Comment #2 From 2009-10-28 09:50:46 PST -------
Created an attachment (id=42038) [details]
same patch, with build fix for gtk
------- Comment #3 From 2009-10-28 09:58:42 PST -------
Please make sure to watch the buildbots like a hawk when this patch lands.
------- Comment #4 From 2009-10-28 11:12:53 PST -------
Committed revision 50225.
------- Comment #5 From 2009-10-28 11:29:09 PST -------
Created an attachment (id=42044) [details]
build fix for windows
------- Comment #6 From 2009-10-28 11:51:36 PST -------
Created an attachment (id=42045) [details]
build fix for mac
------- Comment #7 From 2009-10-28 15:00:53 PST -------
Are these fixes still needed?  If so, please attach them as a single patch with one ChangeLog.  Otherwise please clear the review flags as this bug is closed.
------- Comment #8 From 2009-10-28 15:08:22 PST -------
Thank you George!