Changeset 123088 in webkit


Ignore:
Timestamp:
Jul 19, 2012 3:59:48 AM (12 years ago)
Author:
mario@webkit.org
Message:

[GTK] MHTML files not being loaded due to reported mime type not supported
https://bugs.webkit.org/show_bug.cgi?id=89978

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Make 'message/rfc822' a supported MIME type for MHTML files in GTK.

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::continueAfterContentPolicy): Add
'message/rfc822' to the list of MIME types to be considered to
avoid them bypasing cross-domain security checks, only for GTK.

  • loader/archive/ArchiveFactory.cpp:

(WebCore::archiveMIMETypes): Add 'message/rfc822' to the list of
supported MIME types when MHTML support is enabled in GTK.

LayoutTests:

Move expectations for MHTML tests out of chromium's specific directory.

  • mhtml/multi_frames_binary-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_binary-expected.txt.
  • mhtml/multi_frames_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_ie-expected.txt.
  • mhtml/multi_frames_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_unmht-expected.txt.
  • mhtml/page_with_css_and_js_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_css_and_js_ie-expected.txt.
  • mhtml/page_with_css_and_js_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_css_and_js_unmht-expected.txt.
  • mhtml/page_with_image_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_image_ie-expected.txt.
  • mhtml/page_with_image_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_image_unmht-expected.txt.
  • mhtml/simple_page_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/simple_page_ie-expected.txt.
  • mhtml/simple_page_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/simple_page_unmht-expected.txt.
Location:
trunk
Files:
4 edited
9 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r123087 r123088  
     12012-07-19  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        [GTK] MHTML files not being loaded due to reported mime type not supported
     4        https://bugs.webkit.org/show_bug.cgi?id=89978
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Move expectations for MHTML tests out of chromium's specific directory.
     9
     10        * mhtml/multi_frames_binary-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_binary-expected.txt.
     11        * mhtml/multi_frames_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_ie-expected.txt.
     12        * mhtml/multi_frames_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/multi_frames_unmht-expected.txt.
     13        * mhtml/page_with_css_and_js_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_css_and_js_ie-expected.txt.
     14        * mhtml/page_with_css_and_js_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_css_and_js_unmht-expected.txt.
     15        * mhtml/page_with_image_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_image_ie-expected.txt.
     16        * mhtml/page_with_image_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/page_with_image_unmht-expected.txt.
     17        * mhtml/simple_page_ie-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/simple_page_ie-expected.txt.
     18        * mhtml/simple_page_unmht-expected.txt: Renamed from LayoutTests/platform/chromium/mhtml/simple_page_unmht-expected.txt.
     19
    1202012-07-19  Seokju Kwon  <seokju.kwon@samsung.com>
    221
  • trunk/Source/WebCore/ChangeLog

    r123086 r123088  
     12012-07-19  Mario Sanchez Prada  <msanchez@igalia.com>
     2
     3        [GTK] MHTML files not being loaded due to reported mime type not supported
     4        https://bugs.webkit.org/show_bug.cgi?id=89978
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Make 'message/rfc822' a supported MIME type for MHTML files in GTK.
     9
     10        * loader/MainResourceLoader.cpp:
     11        (WebCore::MainResourceLoader::continueAfterContentPolicy): Add
     12        'message/rfc822' to the list of MIME types to be considered to
     13        avoid them bypasing cross-domain security checks, only for GTK.
     14        * loader/archive/ArchiveFactory.cpp:
     15        (WebCore::archiveMIMETypes): Add 'message/rfc822' to the list of
     16        supported MIME types when MHTML support is enabled in GTK.
     17
    1182012-07-19  Jan Keromnes  <janx@linux.com>
    219
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r122670 r123088  
    267267    case PolicyUse: {
    268268        // Prevent remote web archives from loading because they can claim to be from any domain and thus avoid cross-domain security checks (4120255).
    269         bool isRemoteWebArchive = (equalIgnoringCase("application/x-webarchive", mimeType) || equalIgnoringCase("multipart/related", mimeType))
     269        bool isRemoteWebArchive = (equalIgnoringCase("application/x-webarchive", mimeType)
     270#if PLATFORM(GTK)
     271                                   || equalIgnoringCase("message/rfc822", mimeType)
     272#endif
     273                                   || equalIgnoringCase("multipart/related", mimeType))
    270274            && !m_substituteData.isValid() && !SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol());
    271275        if (!frameLoader()->client()->canShowMIMEType(mimeType) || isRemoteWebArchive) {
  • trunk/Source/WebCore/loader/archive/ArchiveFactory.cpp

    r95901 r123088  
    6969#if ENABLE(MHTML)
    7070    mimeTypes.set("multipart/related", archiveFactoryCreate<MHTMLArchive>);
     71#if PLATFORM(GTK)
     72    mimeTypes.set("message/rfc822", archiveFactoryCreate<MHTMLArchive>);
     73#endif
    7174#endif
    7275
Note: See TracChangeset for help on using the changeset viewer.