Bug 134788 - [iOS] Some QuickLook documents are not displayed as previews
Summary: [iOS] Some QuickLook documents are not displayed as previews
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-09 17:41 PDT by Andy Estes
Modified: 2014-07-10 17:03 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.35 KB, patch)
2014-07-09 17:55 PDT, Andy Estes
psolanki: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2014-07-09 17:41:58 PDT
[iOS] Some QuickLook documents are not displayed as previews
Comment 1 Andy Estes 2014-07-09 17:53:48 PDT
<rdar://problem/17278194>
Comment 2 Andy Estes 2014-07-09 17:55:18 PDT
Created attachment 234677 [details]
Patch
Comment 3 Pratik Solanki 2014-07-09 23:21:38 PDT
Comment on attachment 234677 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234677&action=review

> Source/WebCore/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=134788

Mention the radar number here as well.

> Source/WebCore/ChangeLog:9
> +        NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using

That would be great! Do you think we can update all uses of isMainResourceRequest() with your check below? It would be good to get rid of this iOS specific code.
Comment 4 David Kilzer (:ddkilzer) 2014-07-10 04:24:56 PDT
Comment on attachment 234677 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234677&action=review

>> Source/WebCore/ChangeLog:9
>> +        NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
> 
> That would be great! Do you think we can update all uses of isMainResourceRequest() with your check below? It would be good to get rid of this iOS specific code.

I think this logic should be wrapped in a well-named (inline) method since it's not immediately obvious from reading the code that you're checking for the main resource being loaded.
Comment 5 Andy Estes 2014-07-10 08:36:00 PDT
(In reply to comment #3)
> (From update of attachment 234677 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=234677&action=review
> 
> > Source/WebCore/ChangeLog:4
> > +        https://bugs.webkit.org/show_bug.cgi?id=134788
> 
> Mention the radar number here as well.
> 
> > Source/WebCore/ChangeLog:9
> > +        NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
> 
> That would be great! Do you think we can update all uses of isMainResourceRequest() with your check below? It would be good to get rid of this iOS specific code.

I considered doing this, but couldn't find an easy way to do so. The other uses of isMainResourceRequest() have access to a ResourceHandle instead of a ResourceLoader, and there's no easy way to get a ResourceLoader from a ResourceHandle (you can only get a ResourceHandleClient*, which isn't necessarily a ResourceLoader).

For now, what do you think about me renaming isMainResourceRequest() to deprecatedIsMainResourceRequest() and adding a comment stating why it can't be used reliably with the Network Process?
Comment 6 Andy Estes 2014-07-10 08:38:22 PDT
(In reply to comment #4)
> (From update of attachment 234677 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=234677&action=review
> 
> >> Source/WebCore/ChangeLog:9
> >> +        NSURLRequest have no way to set this bit properly) and should probably be removed. Instead of using
> > 
> > That would be great! Do you think we can update all uses of isMainResourceRequest() with your check below? It would be good to get rid of this iOS specific code.
> 
> I think this logic should be wrapped in a well-named (inline) method since it's not immediately obvious from reading the code that you're checking for the main resource being loaded.

Will do!
Comment 7 Andy Estes 2014-07-10 17:03:19 PDT
Committed r170984: <http://trac.webkit.org/changeset/170984>