Changeset 67178 in webkit


Ignore:
Timestamp:
Sep 10, 2010 12:45:15 AM (14 years ago)
Author:
dpranke@chromium.org
Message:

2010-09-10 Dirk Pranke <dpranke@chromium.org>

Reviewed by Kent Tamura.

roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
https://bugs.webkit.org/show_bug.cgi?id=45524

  • fast/replaced/object-param-url-control-char.html:
  • fast/replaced/object-with-embed-url-param-expected.txt:
  • fast/replaced/object-with-embed-url-param.html:

2010-09-10 Dirk Pranke <dpranke@chromium.org>

Reviewed by Kent Tamura.

roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
https://bugs.webkit.org/show_bug.cgi?id=45524

  • html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parametersForPlugin): (WebCore::HTMLObjectElement::updateWidget):
  • loader/SubframeLoader.cpp: (WebCore::SubframeLoader::requestFrame):
  • loader/SubframeLoader.h:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r67175 r67178  
     12010-09-10  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
     6        https://bugs.webkit.org/show_bug.cgi?id=45524
     7
     8        * fast/replaced/object-param-url-control-char.html:
     9        * fast/replaced/object-with-embed-url-param-expected.txt:
     10        * fast/replaced/object-with-embed-url-param.html:
     11
    1122010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/LayoutTests/fast/replaced/object-param-url-control-char.html

    r66992 r67178  
    2222    </head>
    2323    <body>
    24         <object width="0" height="0" type="application/x-webkit-test-netscape">
     24        <object width="0" height="0">
    2525            <param name="movie" value="
    2626  uRl('scheme://url-with-control-char/')
  • trunk/LayoutTests/fast/replaced/object-with-embed-url-param-expected.txt

    r66992 r67178  
     1   
    12This test verifies that the right URL is loaded when there is an <object> with a 'src' <param> and a fallback <embed>.
    23
     
    45An <object> with a 'src' <param> should load the URL from the 'src' <param> and does.
    56An <object> with no URL specified and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
    6 An <object> with a URL specified in a 'src' <param> and a nested <embed> should load the URL from the 'src' @attr of the <embed> and does.
    7 An <object> with a URL specified in a 'src' <param> and a MIME type specified in a 'type' <param> should load the URL from the 'src' <param> and does.
    8      
     7
  • trunk/LayoutTests/fast/replaced/object-with-embed-url-param.html

    r66992 r67178  
    1010            var object2Result = "";
    1111            var embed3Result = "";
    12             var embed4Result = "";
    13             var object5Result = "";
    14             var notified = false;
    1512
    1613            document.addEventListener("beforeload", function(event) {
     14
    1715                if (event.url == "")
    1816                    return;
     
    2422                } else if (event.target.id == "embed3") {
    2523                    embed3Result = (event.url == "embed-attr" ? "does" : "does not");
    26                 } else if (event.target.id == "embed4") {
    27                     embed4Result = (event.url == "embed-attr" ? "does" : "does not");
    28                 } else if (event.target.id == "object5") {
    29                     object5Result = (event.url == "object-param" ? "does" : "does not");
    3024                }
    3125
    32                 if (!notified && object1Result != "" && object2Result != "" && embed3Result != "" && embed4Result != "" && object5Result != "") {
     26                if (object1Result != "" && object2Result != "" && embed3Result != "") {
    3327                    debug("An &lt;object&gt; with a 'data' @attr and a 'src' &lt;param&gt; should load the URL from the 'data' @attr and " + object1Result + ".");
    3428                    debug("An &lt;object&gt; with a 'src' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object2Result + ".");
    3529                    debug("An &lt;object&gt; with no URL specified and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
    36                     debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a nested &lt;embed&gt; should load the URL from the 'src' @attr of the &lt;embed&gt; and " + embed3Result + ".");
    37                     debug("An &lt;object&gt; with a URL specified in a 'src' &lt;param&gt; and a MIME type specified in a 'type' &lt;param&gt; should load the URL from the 'src' &lt;param&gt; and " + object5Result + ".");
    38                     notified = true;
    3930                    if (window.layoutTestController)
    4031                        layoutTestController.notifyDone();
     
    4839    </head>
    4940    <body>
    50         <p>This test verifies that the right URL is loaded when there is an &lt;object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
    51         <div id="console"></div>
    5241        <object id="object1" type="application/x-webkit-test-netscape" data="object-attr">
    53             <param name="src" value="object-param"></param>
     42            <param id="param1" name="src" value="object-param"></param>
    5443            <embed id="embed1" type="application/x-webkit-test-netscape" src="embed-attr">
    5544        </object>
    5645        <object id="object2" type="application/x-webkit-test-netscape">
    57             <param name="movie" value="object-param"></param>
     46            <param id="param2" name="movie" value="object-param"></param>
    5847            <embed id="embed2" type="application/x-webkit-test-netscape" src="embed-attr">
    5948        </object>
     
    6150            <embed id="embed3" type="application/x-webkit-test-netscape" src="embed-attr">
    6251        </object>
    63         <object id="object4">
    64             <param name="code" value="object-param"></param>
    65             <embed id="embed4" type="application/x-webkit-test-netscape" src="embed-attr">
    66         </object>
    67         <object id="object5">
    68             <param name="url" value="object-param"></param>
    69             <param name="type" value="application/x-webkit-test-netscape"></param>
    70         </object>
     52        <p>This test verifies that the right URL is loaded when there is an &lt;object&gt; with a 'src' &lt;param&gt; and a fallback &lt;embed&gt;.</p>
     53        <div id="console"></div>
    7154    </body>
    7255</html>
  • trunk/WebCore/ChangeLog

    r67176 r67178  
     12010-09-10  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
     6        https://bugs.webkit.org/show_bug.cgi?id=45524
     7
     8        * html/HTMLObjectElement.cpp:
     9        (WebCore::HTMLObjectElement::parametersForPlugin):
     10        (WebCore::HTMLObjectElement::updateWidget):
     11        * loader/SubframeLoader.cpp:
     12        (WebCore::SubframeLoader::requestFrame):
     13        * loader/SubframeLoader.h:
     14
    1152010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/WebCore/html/HTMLObjectElement.cpp

    r66997 r67178  
    164164{
    165165    HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames;
    166     String urlParameter;
    167166   
    168167    // Scan the PARAM children and store their name/value pairs.
     
    182181
    183182        // FIXME: url adjustment does not belong in this function.
    184         if (url.isEmpty() && urlParameter.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
    185             urlParameter = deprecatedParseURL(p->value());
     183        if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))
     184            url = deprecatedParseURL(p->value());
    186185        // FIXME: serviceType calculation does not belong in this function.
    187186        if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) {
     
    219218    mapDataParamToSrc(&paramNames, &paramValues);
    220219   
    221     // HTML5 says that an object resource's URL is specified by the object's data
    222     // attribute, not by a param element. However, for compatibility, allow the
    223     // resource's URL to be given by a param named "src", "movie", "code" or "url"
    224     // if we know that resource points to a plug-in.
    225     if (url.isEmpty() && !urlParameter.isEmpty()) {
    226         SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
    227         if (loader->resourceWillUsePlugin(urlParameter, serviceType))
    228             url = urlParameter;
    229     }
     220    // If we still don't have a type, try to map from a specific CLASSID to a type.
     221    if (serviceType.isEmpty())
     222        serviceType = serviceTypeForClassId(classId());
    230223}
    231224
     
    258251
    259252    String url = this->url();
    260    
    261     // If the object does not specify a MIME type via a type attribute, but does
    262     // contain a classid attribute, try to map the classid to a MIME type.
    263253    String serviceType = this->serviceType();
    264     if (serviceType.isEmpty())
    265         serviceType = serviceTypeForClassId(classId());
    266254
    267255    // FIXME: These should be joined into a PluginParameters class.
  • trunk/WebCore/loader/SubframeLoader.cpp

    r66992 r67178  
    8888    return true;
    8989}
    90    
    91 bool SubframeLoader::resourceWillUsePlugin(const String& url, const String& mimeType)
    92 {
    93     KURL completedURL;
    94     if (!url.isEmpty())
    95         completedURL = completeURL(url);
    96     bool useFallback;
    97     return shouldUsePlugin(completedURL, mimeType, false, useFallback);
    98 }
    9990
    10091bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName,
  • trunk/WebCore/loader/SubframeLoader.h

    r66997 r67178  
    7676
    7777    bool containsPlugins() const { return m_containsPlugins; }
    78    
    79     bool resourceWillUsePlugin(const String& url, const String& mimeType);
    8078
    8179private:
Note: See TracChangeset for help on using the changeset viewer.