Changeset 52032 in webkit


Ignore:
Timestamp:
Dec 11, 2009 5:10:35 PM (14 years ago)
Author:
ap@apple.com
Message:

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=32445
REGRESSION: http://www.mcafee.com/japan/ displays unstyled

  • css/CSSImportRule.cpp: (WebCore::CSSImportRule::setCSSStyleSheet):
  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): Add a quirk for mcafee.com/japan (http or https, with or without www).
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52031 r52032  
     12009-12-11  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=32445
     6        REGRESSION: http://www.mcafee.com/japan/ displays unstyled
     7
     8        * css/CSSImportRule.cpp:
     9        (WebCore::CSSImportRule::setCSSStyleSheet):
     10        * html/HTMLLinkElement.cpp:
     11        (WebCore::HTMLLinkElement::setCSSStyleSheet):
     12        Add a quirk for mcafee.com/japan (http or https, with or without www).
     13
    1142009-12-11  Sam Weinig  <sam@webkit.org>
    215
  • trunk/WebCore/css/CSSImportRule.cpp

    r51473 r52032  
    6262    CSSStyleSheet* parent = parentStyleSheet();
    6363    bool strict = !parent || parent->useStrictParsing();
    64     String sheetText = sheet->sheetText(strict);
     64    bool enforceMIMEType = strict;
     65    bool needsSiteSpecificQuirks = parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks();
     66
     67#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
     68    if (enforceMIMEType && needsSiteSpecificQuirks) {
     69        // Covers both http and https, with or without "www."
     70        if (url.contains("mcafee.com/japan/", false))
     71            enforceMIMEType = false;
     72    }
     73#endif
     74
     75    String sheetText = sheet->sheetText(enforceMIMEType);
    6576    m_styleSheet->parseString(sheetText, strict);
    6677
    67     if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
     78    if (strict && needsSiteSpecificQuirks) {
    6879        // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
    6980        DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
  • trunk/WebCore/html/HTMLLinkElement.cpp

    r50675 r52032  
    260260    bool strictParsing = !document()->inCompatMode();
    261261    bool enforceMIMEType = strictParsing;
     262    bool needsSiteSpecificQuirks = document()->page() && document()->page()->settings()->needsSiteSpecificQuirks();
    262263
    263264    // Check to see if we should enforce the MIME type of the CSS resource in strict mode.
     
    266267        enforceMIMEType = false;
    267268
     269#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
     270    if (enforceMIMEType && needsSiteSpecificQuirks) {
     271        // Covers both http and https, with or without "www."
     272        if (url.contains("mcafee.com/japan/", false))
     273            enforceMIMEType = false;
     274    }
     275#endif
     276
    268277    String sheetText = sheet->sheetText(enforceMIMEType);
    269278    m_sheet->parseString(sheetText, strictParsing);
    270279
    271     if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
     280    if (strictParsing && needsSiteSpecificQuirks) {
    272281        // Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
    273282        DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
Note: See TracChangeset for help on using the changeset viewer.