Changeset 70754 in webkit


Ignore:
Timestamp:
Oct 28, 2010 12:47:56 AM (14 years ago)
Author:
aestes@apple.com
Message:

2010-10-28 Andy Estes <aestes@apple.com>

Reviewed by Adam Barth.

Fix a test failure introduced in r70748 by supporting Qt's non-standard
use of classid.
https://bugs.webkit.org/show_bug.cgi?id=45679

  • html/HTMLObjectElement.cpp: (WebCore::objectHasSupportedClassId): Return true if the object's serviceType is 'application/x-qt-plugin'. (WebCore::HTMLObjectElement::updateWidget): Do not render fallback content if a non-empty classid is specified for a Qt plugin object.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r70751 r70754  
     12010-10-28  Andy Estes  <aestes@apple.com>
     2
     3        Reviewed by Adam Barth.
     4
     5        Fix a test failure introduced in r70748 by supporting Qt's non-standard
     6        use of classid.
     7        https://bugs.webkit.org/show_bug.cgi?id=45679
     8
     9        * html/HTMLObjectElement.cpp:
     10        (WebCore::objectHasSupportedClassId): Return true if the object's
     11        serviceType is 'application/x-qt-plugin'.
     12        (WebCore::HTMLObjectElement::updateWidget): Do not render fallback
     13        content if a non-empty classid is specified for a Qt plugin object.
     14
    1152010-10-28  Ivan Krstić  <ike@apple.com>
    216
  • trunk/WebCore/html/HTMLObjectElement.cpp

    r70748 r70754  
    218218    return false;
    219219}
     220   
     221static bool objectHasSupportedClassId(HTMLObjectElement* object)
     222{
     223#if PLATFORM(QT)
     224    // Qt plug-ins use classid to specify which QObject to load.
     225    ASSERT(object);
     226    return equalsIgnoringCase(object->serviceType(), "application/x-qt-plugin");
     227#else
     228    ASSERT_UNUSED(object, object);
     229    return false;
     230#endif
     231}
    220232
    221233// FIXME: This should be unified with HTMLEmbedElement::updateWidget and
     
    264276    // HTML5 says that fallback content should be rendered if a non-empty
    265277    // classid is specified for which the UA can't find a suitable plug-in.
    266     bool hasEmptyClassId = classId().isEmpty();
     278    bool hasValidClassId = classId().isEmpty() || objectHasSupportedClassId(this);
    267279
    268280    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
    269     bool success = beforeLoadAllowedLoad && hasEmptyClassId && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues);
     281    bool success = beforeLoadAllowedLoad && hasValidClassId && loader->requestObject(this, url, getAttribute(nameAttr), serviceType, paramNames, paramValues);
    270282
    271283    if (!success && fallbackContent)
Note: See TracChangeset for help on using the changeset viewer.