Bug 162951 - [iOS] Support Web Archive previews generated by QuickLook
Summary: [iOS] Support Web Archive previews generated by QuickLook
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-10-04 17:22 PDT by Andy Estes
Modified: 2016-10-13 23:07 PDT (History)
12 users (show)

See Also:


Attachments
Patch (2.35 KB, patch)
2016-10-04 17:30 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews125 for ios-simulator-elcapitan-wk2 (9.15 MB, application/zip)
2016-10-04 18:41 PDT, Build Bot
no flags Details
Patch (4.22 KB, patch)
2016-10-13 16:23 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (4.28 KB, patch)
2016-10-13 16:27 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch (4.38 KB, patch)
2016-10-13 16:57 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Patch for landing (4.37 KB, patch)
2016-10-13 17:02 PDT, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2016-10-04 17:22:39 PDT
[iOS] Support Web Archive previews generated by QuickLook
Comment 1 Andy Estes 2016-10-04 17:23:16 PDT
rdar://problem/28607920
Comment 2 Andy Estes 2016-10-04 17:30:06 PDT
Created attachment 290673 [details]
Patch
Comment 3 Build Bot 2016-10-04 18:41:43 PDT
Comment on attachment 290673 [details]
Patch

Attachment 290673 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2221053

New failing tests:
http/tests/quicklook/secure-document-with-subresources.html
Comment 4 Build Bot 2016-10-04 18:41:48 PDT
Created attachment 290679 [details]
Archive of layout-test-results from ews125 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 5 Andy Estes 2016-10-13 16:23:36 PDT
Created attachment 291532 [details]
Patch
Comment 6 Andy Estes 2016-10-13 16:27:48 PDT
Created attachment 291534 [details]
Patch
Comment 7 Brady Eidson 2016-10-13 16:28:01 PDT
Comment on attachment 291532 [details]
Patch

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

> Source/WebCore/loader/DocumentLoader.cpp:753
> +    if (!equalLettersIgnoringASCIICase(mimeType, "application/x-webarchive")
> +        && !equalLettersIgnoringASCIICase(mimeType, "application/x-mimearchive")
> +#if PLATFORM(GTK)
> +        && !equalLettersIgnoringASCIICase(mimeType, "message/rfc822")
> +#endif
> +        && !equalLettersIgnoringASCIICase(mimeType, "multipart/related"))
> +        return false;

This segment looks gross to me.

One possible improvement would be to put the PLATFORM(GTK) part as the last clause.
Another possible improvement would be to put the PLATFORM(GTK) part after the x-platform if statement, much like the USE(QUICK_LOOK) segment is.
Another possible improvement would be to have a lookup set that's initialized once (though that might be overkill for only 3-4 entries)

Please change something.
Comment 8 Brady Eidson 2016-10-13 16:28:39 PDT
Comment on attachment 291534 [details]
Patch

My comments for the last one still apply here
Comment 9 Andy Estes 2016-10-13 16:57:47 PDT
Created attachment 291542 [details]
Patch
Comment 10 Andy Estes 2016-10-13 17:02:25 PDT
Created attachment 291543 [details]
Patch for landing
Comment 11 WebKit Commit Bot 2016-10-13 18:16:43 PDT
Comment on attachment 291543 [details]
Patch for landing

Clearing flags on attachment: 291543

Committed r207318: <http://trac.webkit.org/changeset/207318>
Comment 12 WebKit Commit Bot 2016-10-13 18:16:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Alex Christensen 2016-10-13 22:38:26 PDT
This made an API test assert 100% of the time:

ASSERTION FAILED: string
/Users/alexchristensen/code/OpenSource/WebKitBuild/Debug/usr/local/include/wtf/text/StringHash.h(102) : static unsigned int WTF::ASCIICaseInsensitiveHash::hash(WTF::StringImpl *)
1   0x114b277cd WTFCrash
2   0x117000d1b WTF::ASCIICaseInsensitiveHash::hash(WTF::StringImpl*)
3   0x117000ccd WTF::ASCIICaseInsensitiveHash::hash(WTF::String const&)
4   0x1170e0415 unsigned int WTF::IdentityHashTranslator<WTF::HashTraits<WTF::String>, WTF::ASCIICaseInsensitiveHash>::hash<WTF::String>(WTF::String const&)
5   0x1173ed220 WTF::String* WTF::HashTable<WTF::String, WTF::String, WTF::IdentityExtractor, WTF::ASCIICaseInsensitiveHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::String> >::inlineLookup<WTF::IdentityHashTranslator<WTF::HashTraits<WTF::String>, WTF::ASCIICaseInsensitiveHash>, WTF::String>(WTF::String const&)
6   0x1173ed1bd WTF::String* WTF::HashTable<WTF::String, WTF::String, WTF::IdentityExtractor, WTF::ASCIICaseInsensitiveHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::String> >::lookup<WTF::IdentityHashTranslator<WTF::HashTraits<WTF::String>, WTF::ASCIICaseInsensitiveHash>, WTF::String>(WTF::String const&)
7   0x1173ed178 bool WTF::HashTable<WTF::String, WTF::String, WTF::IdentityExtractor, WTF::ASCIICaseInsensitiveHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::String> >::contains<WTF::IdentityHashTranslator<WTF::HashTraits<WTF::String>, WTF::ASCIICaseInsensitiveHash>, WTF::String>(WTF::String const&) const
8   0x1173ed12d WTF::HashTable<WTF::String, WTF::String, WTF::IdentityExtractor, WTF::ASCIICaseInsensitiveHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WTF::String> >::contains(WTF::String const&) const
9   0x1173ebc9d WTF::HashSet<WTF::String, WTF::ASCIICaseInsensitiveHash, WTF::HashTraits<WTF::String> >::contains(WTF::String const&) const
10  0x117767b49 WebCore::isRemoteWebArchive(WebCore::DocumentLoader const&)
11  0x11776735a WebCore::DocumentLoader::continueAfterContentPolicy(WebCore::PolicyAction)
12  0x117765aaa WebCore::DocumentLoader::responseReceived(WebCore::ResourceResponse const&)
13  0x11776272c WebCore::DocumentLoader::handleSubstituteDataLoadNow()
14  0x1177738a5 WTF::RunLoopTimer<WebCore::DocumentLoader>::fired()
15  0x114b6d8c1 WTF::timerFired(__CFRunLoopTimer*, void*)
16  0x7fff886e8d74 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
17  0x7fff886e89ff __CFRunLoopDoTimer
18  0x7fff886e855a __CFRunLoopDoTimers
19  0x7fff886dff81 __CFRunLoopRun
20  0x7fff886df514 CFRunLoopRunSpecific
21  0x7fff87c702ac RunCurrentEventLoopInMode
22  0x7fff87c700e1 ReceiveNextEventCommon
23  0x7fff87c6ff16 _BlockUntilNextEventMatchingListInModeWithFilter
24  0x7fff86272cc9 _DPSNextEvent
25  0x7fff869e9d04 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
26  0x7fff86267669 -[NSApplication run]
27  0x7fff86231f7f NSApplicationMain
28  0x7fff9dbb88b3 _xpc_objc_main
29  0x7fff9dbb72d0 xpc_main
30  0x10f15f18d main
31  0x7fff9d954255 start

Tests that timed out:
  WebKit2.PendingAPIRequestURL
Comment 14 Alex Christensen 2016-10-13 22:41:58 PDT
http://trac.webkit.org/r207323
Comment 15 Andy Estes 2016-10-13 23:07:42 PDT
(In reply to comment #14)
> http://trac.webkit.org/r207323

Thanks Alex!