Bug 114291 - WKFrameIsDisplayingMarkupDocument should return true for Web Archives
Summary: WKFrameIsDisplayingMarkupDocument should return true for Web Archives
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: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks: 114399
  Show dependency treegraph
 
Reported: 2013-04-09 09:44 PDT by Antoine Quint
Modified: 2013-04-10 17:38 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2013-04-09 09:46 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff
Patch (1.71 KB, patch)
2013-04-09 11:12 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2013-04-09 09:44:34 PDT
WKFrameIsDisplayingMarkupDocument should return true for Web Archives
Comment 1 Antoine Quint 2013-04-09 09:46:49 PDT
Created attachment 197138 [details]
Patch
Comment 2 Antoine Quint 2013-04-09 09:47:35 PDT
<rdar://problem/8800121>
Comment 3 Radar WebKit Bug Importer 2013-04-09 09:48:04 PDT
<rdar://problem/13609798>
Comment 4 Antoine Quint 2013-04-09 09:48:43 PDT
<rdar://problem/8800121>
Comment 5 Simon Fraser (smfr) 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?
Comment 6 Timothy Hatcher 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.
Comment 7 Antoine Quint 2013-04-09 11:12:28 PDT
Created attachment 197149 [details]
Patch
Comment 8 Antoine Quint 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.
Comment 9 Antoine Quint 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!
Comment 10 Dean Jackson 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.
Comment 11 Dean Jackson 2013-04-09 15:55:45 PDT
One more concern. You said this was a regression. What was the commit that it regressed in?
Comment 12 David Kilzer (:ddkilzer) 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.
Comment 13 WebKit Commit Bot 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>
Comment 14 WebKit Commit Bot 2013-04-09 23:43:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Darin Adler 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.
Comment 16 Dean Jackson 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