Changeset 92041 in webkit


Ignore:
Timestamp:
Jul 29, 2011 7:11:24 PM (13 years ago)
Author:
simonjam@chromium.org
Message:

Remove zipcar.com site specific hack added in r87361
https://bugs.webkit.org/show_bug.cgi?id=65405

Reviewed by Adam Barth.

  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::insertedIntoDocument):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r92037 r92041  
     12011-07-29  James Simonsen  <simonjam@chromium.org>
     2
     3        Remove zipcar.com site specific hack added in r87361
     4        https://bugs.webkit.org/show_bug.cgi?id=65405
     5
     6        Reviewed by Adam Barth.
     7
     8        * html/HTMLScriptElement.cpp:
     9        (WebCore::HTMLScriptElement::insertedIntoDocument):
     10
    1112011-07-29  James Robinson  <jamesr@chromium.org>
    212
  • trunk/Source/WebCore/html/HTMLScriptElement.cpp

    r91404 r92041  
    3030#include "HTMLNames.h"
    3131#include "ScriptEventListener.h"
    32 #include "Settings.h"
    3332#include "Text.h"
    3433
     
    8382}
    8483
    85 static bool needsOldRequirejsQuirk(HTMLScriptElement* element)
    86 {
    87     if (element->fastGetAttribute(typeAttr) != "script/cache")
    88         return false;
    89 
    90     Document* document = element->document();
    91 
    92     const KURL& url = document->url();
    93     if (!equalIgnoringCase(url.host(), "www.zipcar.com"))
    94         return false;
    95 
    96     Settings* settings = document->settings();
    97     if (!settings)
    98         return false;
    99     if (!settings->needsSiteSpecificQuirks())
    100         return false;
    101 
    102     return true;
    103 }
    104 
    10584void HTMLScriptElement::insertedIntoDocument()
    10685{
    107     if (needsOldRequirejsQuirk(this)) {
    108         if (!asyncAttributeValue())
    109             handleAsyncAttribute(); // Clear forceAsync, so this script loads in parallel, but executes in order.
    110         setAttribute(typeAttr, "text/javascript");
    111     }
    11286    HTMLElement::insertedIntoDocument();
    11387    ScriptElement::insertedIntoDocument();
Note: See TracChangeset for help on using the changeset viewer.