Bug 114291

Summary: WKFrameIsDisplayingMarkupDocument should return true for Web Archives
Product: WebKit Reporter: Antoine Quint <graouts>
Component: New BugsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer, dino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 114399    
Attachments:
Description Flags
Patch
none
Patch none

Antoine Quint
Reported 2013-04-09 09:44:34 PDT
WKFrameIsDisplayingMarkupDocument should return true for Web Archives
Attachments
Patch (1.58 KB, patch)
2013-04-09 09:46 PDT, Antoine Quint
no flags
Patch (1.71 KB, patch)
2013-04-09 11:12 PDT, Antoine Quint
no flags
Antoine Quint
Comment 1 2013-04-09 09:46:49 PDT
Antoine Quint
Comment 2 2013-04-09 09:47:35 PDT
Radar WebKit Bug Importer
Comment 3 2013-04-09 09:48:04 PDT
Antoine Quint
Comment 4 2013-04-09 09:48:43 PDT
Simon Fraser (smfr)
Comment 5 2013-04-09 10:57:56 PDT
Comment on attachment 197138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197138&action=review > Source/WebKit2/ChangeLog:8 > + Also return true for the Web Archive MIME type. Why? What are the implications of this change?
Timothy Hatcher
Comment 6 2013-04-09 10:58:03 PDT
Comment on attachment 197138 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197138&action=review > Source/WebKit2/UIProcess/WebFrameProxy.cpp:118 > // FIXME: This returns false when displaying a web archive. Remove this comment.
Antoine Quint
Comment 7 2013-04-09 11:12:28 PDT
Antoine Quint
Comment 8 2013-04-09 11:13:24 PDT
(In reply to comment #5) > (From update of attachment 197138 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=197138&action=review > > > Source/WebKit2/ChangeLog:8 > > + Also return true for the Web Archive MIME type. > > Why? What are the implications of this change? This is so that commands in user agents that should only be contextual to markup documents do the right thing when a Web Archive is displayed.
Antoine Quint
Comment 9 2013-04-09 11:13:33 PDT
(In reply to comment #6) > (From update of attachment 197138 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=197138&action=review > > > Source/WebKit2/UIProcess/WebFrameProxy.cpp:118 > > // FIXME: This returns false when displaying a web archive. > > Remove this comment. Indeed!
Dean Jackson
Comment 10 2013-04-09 14:33:25 PDT
Comment on attachment 197149 [details] Patch It would be nice to know if there are any serious implications from this change.
Dean Jackson
Comment 11 2013-04-09 15:55:45 PDT
One more concern. You said this was a regression. What was the commit that it regressed in?
David Kilzer (:ddkilzer)
Comment 12 2013-04-09 21:34:47 PDT
(In reply to comment #11) > One more concern. You said this was a regression. What was the commit that it regressed in? I believe it was a regression from WebKit1 to WebKit2.
WebKit Commit Bot
Comment 13 2013-04-09 23:43:33 PDT
Comment on attachment 197149 [details] Patch Clearing flags on attachment: 197149 Committed r148078: <http://trac.webkit.org/changeset/148078>
WebKit Commit Bot
Comment 14 2013-04-09 23:43:35 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 15 2013-04-10 09:40:40 PDT
Comment on attachment 197149 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197149&action=review > Source/WebKit2/UIProcess/WebFrameProxy.cpp:118 > + return m_MIMEType == "text/html" || m_MIMEType == "image/svg+xml" || m_MIMEType == "application/x-webarchive" || DOMImplementation::isXMLMIMEType(m_MIMEType); I’m not sure this patch is right. Can’t a web archive be created with contents that are not HTML, SVG, or XML? In that case, this function would return the wrong thing. I think in the case of the web archive we need an “internal MIME type” to correctly implement this function. This version might be OK for now, but there is a chance that it has some edge cases wrong.
Dean Jackson
Comment 16 2013-04-10 17:38:04 PDT
Comment on attachment 197149 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197149&action=review >> Source/WebKit2/UIProcess/WebFrameProxy.cpp:118 >> + return m_MIMEType == "text/html" || m_MIMEType == "image/svg+xml" || m_MIMEType == "application/x-webarchive" || DOMImplementation::isXMLMIMEType(m_MIMEType); > > I’m not sure this patch is right. Can’t a web archive be created with contents that are not HTML, SVG, or XML? In that case, this function would return the wrong thing. I think in the case of the web archive we need an “internal MIME type” to correctly implement this function. > > This version might be OK for now, but there is a chance that it has some edge cases wrong. Yeah, I guess we need to see if the web archive has an item that we'd load as html or svg. I opened https://bugs.webkit.org/show_bug.cgi?id=114399
Note You need to log in before you can comment on or make changes to this bug.