HTMLAppletElement should inherit from HTMLPlugInImageElement
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 23:08:49 +0000 (23:08 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jul 2012 23:08:49 +0000 (23:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92320

Reviewed by Eric Seidel.

In order to simplify the class hierarchy and eventually merge HTMLPlugInImageElement and HMTLPlugInElement,
make HTMLAppletElement inherit from HTMLPlugInImageElement. While this does mean that HTMLAppletElement will grow by
a couple of words, in practice it won't matter.

Also, make RenderApplet inherit from RenderEmbeddedObject and move the plug-in instantiation to HTMLAppletElement which matches
both HTMLEmbedElement and HTMLObjectElement.

* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::HTMLAppletElement):
(WebCore::HTMLAppletElement::create):
(WebCore::HTMLAppletElement::parseAttribute):
(WebCore::HTMLAppletElement::rendererIsNeeded):
(WebCore::HTMLAppletElement::createRenderer):
(WebCore):
(WebCore::HTMLAppletElement::renderWidgetForJSBindings):
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLAppletElement.h:
(HTMLAppletElement):
* html/HTMLTagNames.in:
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
* loader/SubframeLoader.h:
(SubframeLoader):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
* rendering/RenderApplet.cpp:
(WebCore::RenderApplet::RenderApplet):
* rendering/RenderApplet.h:
(RenderApplet):
* rendering/RenderEmbeddedObject.h:
(WebCore::toRenderEmbeddedObject):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle):
* rendering/RenderObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123811 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLAppletElement.cpp
Source/WebCore/html/HTMLAppletElement.h
Source/WebCore/html/HTMLTagNames.in
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/SubframeLoader.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/rendering/RenderApplet.cpp
Source/WebCore/rendering/RenderApplet.h
Source/WebCore/rendering/RenderEmbeddedObject.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h

index 5f0f090..fd0834e 100644 (file)
@@ -1,3 +1,52 @@
+2012-07-26  Anders Carlsson  <andersca@apple.com>
+
+        HTMLAppletElement should inherit from HTMLPlugInImageElement
+        https://bugs.webkit.org/show_bug.cgi?id=92320
+
+        Reviewed by Eric Seidel.
+
+        In order to simplify the class hierarchy and eventually merge HTMLPlugInImageElement and HMTLPlugInElement,
+        make HTMLAppletElement inherit from HTMLPlugInImageElement. While this does mean that HTMLAppletElement will grow by
+        a couple of words, in practice it won't matter.
+
+        Also, make RenderApplet inherit from RenderEmbeddedObject and move the plug-in instantiation to HTMLAppletElement which matches
+        both HTMLEmbedElement and HTMLObjectElement.
+
+        * html/HTMLAppletElement.cpp:
+        (WebCore::HTMLAppletElement::HTMLAppletElement):
+        (WebCore::HTMLAppletElement::create):
+        (WebCore::HTMLAppletElement::parseAttribute):
+        (WebCore::HTMLAppletElement::rendererIsNeeded):
+        (WebCore::HTMLAppletElement::createRenderer):
+        (WebCore):
+        (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
+        (WebCore::HTMLAppletElement::updateWidget):
+        * html/HTMLAppletElement.h:
+        (HTMLAppletElement):
+        * html/HTMLTagNames.in:
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::createJavaAppletWidget):
+        * loader/SubframeLoader.h:
+        (SubframeLoader):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::updateWidget):
+        * rendering/RenderApplet.cpp:
+        (WebCore::RenderApplet::RenderApplet):
+        * rendering/RenderApplet.h:
+        (RenderApplet):
+        * rendering/RenderEmbeddedObject.h:
+        (WebCore::toRenderEmbeddedObject):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::shouldBeNormalFlowOnly):
+        (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::setStyle):
+        * rendering/RenderObject.h:
+
 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r123799.
index 9c7eb5d..c13e738 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
  *           (C) 2000 Stefan Schimanski (1Stein@gmx.de)
- * Copyright (C) 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2012 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
  *
  * This library is free software; you can redistribute it and/or
 #include "HTMLAppletElement.h"
 
 #include "Attribute.h"
+#include "Frame.h"
 #include "HTMLDocument.h"
 #include "HTMLNames.h"
+#include "HTMLParamElement.h"
 #include "RenderApplet.h"
 #include "SecurityOrigin.h"
 #include "Settings.h"
@@ -36,15 +38,15 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-inline HTMLAppletElement::HTMLAppletElement(const QualifiedName& tagName, Document* document)
-    : HTMLPlugInElement(tagName, document)
+HTMLAppletElement::HTMLAppletElement(const QualifiedName& tagName, Document* document, bool createdByParser)
+    : HTMLPlugInImageElement(tagName, document, createdByParser, ShouldNotPreferPlugInsForImages)
 {
     ASSERT(hasTagName(appletTag));
 }
 
-PassRefPtr<HTMLAppletElement> HTMLAppletElement::create(const QualifiedName& tagName, Document* document)
+PassRefPtr<HTMLAppletElement> HTMLAppletElement::create(const QualifiedName& tagName, Document* document, bool createdByParser)
 {
-    return adoptRef(new HTMLAppletElement(tagName, document));
+    return adoptRef(new HTMLAppletElement(tagName, document, createdByParser));
 }
 
 void HTMLAppletElement::parseAttribute(const Attribute& attribute)
@@ -56,71 +58,99 @@ void HTMLAppletElement::parseAttribute(const Attribute& attribute)
         || attribute.name() == mayscriptAttr
         || attribute.name() == objectAttr) {
         // Do nothing.
-    } else
-        HTMLPlugInElement::parseAttribute(attribute);
+        return;
+    }
+
+    HTMLPlugInImageElement::parseAttribute(attribute);
 }
 
 bool HTMLAppletElement::rendererIsNeeded(const NodeRenderingContext& context)
 {
     if (!fastHasAttribute(codeAttr))
         return false;
-    return HTMLPlugInElement::rendererIsNeeded(context);
+    return HTMLPlugInImageElement::rendererIsNeeded(context);
 }
 
 RenderObject* HTMLAppletElement::createRenderer(RenderArena*, RenderStyle* style)
 {
-    if (canEmbedJava()) {
-        HashMap<String, String> args;
+    if (!canEmbedJava())
+        return RenderObject::createObject(this, style);
+
+    return new (document()->renderArena()) RenderApplet(this);
+}
+
+RenderWidget* HTMLAppletElement::renderWidgetForJSBindings()
+{
+    if (!canEmbedJava())
+        return 0;
 
-        args.set("code", getAttribute(codeAttr));
+    document()->updateLayoutIgnorePendingStylesheets();
+    return renderPart();
+}
 
-        const AtomicString& codeBase = getAttribute(codebaseAttr);
-        if (!codeBase.isNull())
-            args.set("codeBase", codeBase);
+void HTMLAppletElement::updateWidget(PluginCreationOption)
+{
+    setNeedsWidgetUpdate(false);
+    // FIXME: This should ASSERT isFinishedParsingChildren() instead.
+    if (!isFinishedParsingChildren())
+        return;
 
-        const AtomicString& name = document()->isHTMLDocument() ? getNameAttribute() : getIdAttribute();
-        if (!name.isNull())
-            args.set("name", name);
-        const AtomicString& archive = getAttribute(archiveAttr);
-        if (!archive.isNull())
-            args.set("archive", archive);
+    RenderEmbeddedObject* renderer = renderEmbeddedObject();
 
-        args.set("baseURL", document()->baseURL().string());
+    LayoutUnit contentWidth = renderer->style()->width().isFixed() ? LayoutUnit(renderer->style()->width().value()) :
+        renderer->width() - renderer->borderAndPaddingWidth();
+    LayoutUnit contentHeight = renderer->style()->height().isFixed() ? LayoutUnit(renderer->style()->height().value()) :
+        renderer->height() - renderer->borderAndPaddingHeight();
 
-        const AtomicString& mayScript = getAttribute(mayscriptAttr);
-        if (!mayScript.isNull())
-            args.set("mayScript", mayScript);
+    Vector<String> paramNames;
+    Vector<String> paramValues;
 
-        // Other arguments (from <PARAM> tags) are added later.
-        
-        return new (document()->renderArena()) RenderApplet(this, args);
+    paramNames.append("code");
+    paramValues.append(getAttribute(codeAttr).string());
+
+    const AtomicString& codeBase = getAttribute(codebaseAttr);
+    if (!codeBase.isNull()) {
+        paramNames.append("codeBase");
+        paramValues.append(codeBase);
     }
 
-    return RenderObject::createObject(this, style);
-}
+    const AtomicString& name = document()->isHTMLDocument() ? getNameAttribute() : getIdAttribute();
+    if (!name.isNull()) {
+        paramNames.append("name");
+        paramValues.append(name);
+    }
 
-void HTMLAppletElement::defaultEventHandler(Event* event)
-{
-    RenderObject* r = renderer();
-    if (!r || !r->isWidget())
-        return;
-    Widget* widget = toRenderWidget(r)->widget();
-    if (!widget)
-        return;
-    widget->handleEvent(event);
-}
+    const AtomicString& archive = getAttribute(archiveAttr);
+    if (!archive.isNull()) {
+        paramNames.append("archive");
+        paramValues.append(archive);
+    }
 
-RenderWidget* HTMLAppletElement::renderWidgetForJSBindings()
-{
-    if (!canEmbedJava())
-        return 0;
+    paramNames.append("baseURL");
+    paramValues.append(document()->baseURL().string());
 
-    if (!renderer() || !renderer()->isApplet())
-        return 0;
+    const AtomicString& mayScript = getAttribute(mayscriptAttr);
+    if (!mayScript.isNull()) {
+        paramNames.append("mayScript");
+        paramValues.append(mayScript);
+    }
+
+    for (Node* child = firstChild(); child; child = child->nextSibling()) {
+        if (!child->hasTagName(paramTag))
+            continue;
+
+        HTMLParamElement* param = static_cast<HTMLParamElement*>(child);
+        if (param->name().isEmpty())
+            continue;
+
+        paramNames.append(param->name());
+        paramValues.append(param->value());
+    }
 
-    RenderApplet* applet = toRenderApplet(renderer());
-    applet->createWidgetIfNecessary();
-    return applet;
+    Frame* frame = document()->frame();
+    ASSERT(frame);
+
+    renderer->setWidget(frame->loader()->subframeLoader()->createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), this, paramNames, paramValues));
 }
 
 bool HTMLAppletElement::canEmbedJava() const
@@ -141,12 +171,4 @@ bool HTMLAppletElement::canEmbedJava() const
     return true;
 }
 
-void HTMLAppletElement::finishParsingChildren()
-{
-    // The parser just reached </applet>, so all the params are available now.
-    HTMLPlugInElement::finishParsingChildren();
-    if (renderer())
-        renderer()->setNeedsLayout(true); // This will cause it to create its widget & the Java applet
-}
-
 }
index d3ff643..ee4e30c 100644 (file)
 #ifndef HTMLAppletElement_h
 #define HTMLAppletElement_h
 
-#include "HTMLPlugInElement.h"
+#include "HTMLPlugInImageElement.h"
 
 namespace WebCore {
 
-class HTMLAppletElement : public HTMLPlugInElement {
+class HTMLAppletElement : public HTMLPlugInImageElement {
 public:
-    static PassRefPtr<HTMLAppletElement> create(const QualifiedName&, Document*);
+    static PassRefPtr<HTMLAppletElement> create(const QualifiedName&, Document*, bool createdByParser);
 
 private:
-    HTMLAppletElement(const QualifiedName&, Document*);
+    HTMLAppletElement(const QualifiedName&, Document*, bool createdByParser);
 
     virtual void parseAttribute(const Attribute&) OVERRIDE;
     
-    virtual bool rendererIsNeeded(const NodeRenderingContext&);
-    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
-    virtual void finishParsingChildren();
-
-    virtual void defaultEventHandler(Event*);
+    virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE;
+    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) OVERRIDE;
 
     virtual RenderWidget* renderWidgetForJSBindings();
+    virtual void updateWidget(PluginCreationOption) OVERRIDE;
 
-    void setupApplet() const;
     bool canEmbedJava() const;
 
     virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
index c406728..3660ab9 100644 (file)
@@ -7,7 +7,7 @@ a interfaceName=HTMLAnchorElement
 abbr interfaceName=HTMLElement
 acronym interfaceName=HTMLElement
 address interfaceName=HTMLElement
-applet
+applet constructorNeedsCreatedByParser
 area
 article interfaceName=HTMLElement
 aside interfaceName=HTMLElement
index 5153f4e..280908a 100644 (file)
@@ -199,20 +199,16 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
 }
 #endif // ENABLE(PLUGIN_PROXY_FOR_VIDEO)
 
-PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const LayoutSize& size, HTMLAppletElement* element, const HashMap<String, String>& args)
+PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, HTMLAppletElement* element, const Vector<String>& paramNames, const Vector<String>& paramValues)
 {
     String baseURLString;
     String codeBaseURLString;
-    Vector<String> paramNames;
-    Vector<String> paramValues;
-    HashMap<String, String>::const_iterator end = args.end();
-    for (HashMap<String, String>::const_iterator it = args.begin(); it != end; ++it) {
-        if (equalIgnoringCase(it->first, "baseurl"))
-            baseURLString = it->second;
-        else if (equalIgnoringCase(it->first, "codebase"))
-            codeBaseURLString = it->second;
-        paramNames.append(it->first);
-        paramValues.append(it->second);
+
+    for (size_t i = 0; i < paramNames.size(); ++i) {
+        if (equalIgnoringCase(paramNames[i], "baseurl"))
+            baseURLString = paramValues[i];
+        else if (equalIgnoringCase(paramNames[i], "codebase"))
+            codeBaseURLString = paramValues[i];
     }
 
     if (!codeBaseURLString.isEmpty()) {
@@ -232,7 +228,7 @@ PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const LayoutSize& size
 
     RefPtr<Widget> widget;
     if (allowPlugins(AboutToInstantiatePlugin))
-        widget = m_frame->loader()->client()->createJavaAppletWidget(roundedIntSize(size), element, baseURL, paramNames, paramValues);
+        widget = m_frame->loader()->client()->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
     if (!widget)
         return 0;
 
index 7f65585..bcc8902 100644 (file)
@@ -72,7 +72,7 @@ public:
     PassRefPtr<Widget> loadMediaPlayerProxyPlugin(Node*, const KURL&, const Vector<String>& paramNames, const Vector<String>& paramValues);
 #endif
 
-    PassRefPtr<Widget> createJavaAppletWidget(const LayoutSize&, HTMLAppletElement*, const HashMap<String, String>& args);
+    PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const Vector<String>& paramNames, const Vector<String>& paramValues);
 
     bool allowPlugins(ReasonForCallingAllowPlugins);
 
index ddc3c24..9319994 100644 (file)
@@ -2296,7 +2296,7 @@ void FrameView::updateWidget(RenderEmbeddedObject* object)
 
     // FIXME: This could turn into a real virtual dispatch if we defined
     // updateWidget(PluginCreationOption) on HTMLElement.
-    if (ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag)) {
+    if (ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag) || ownerElement->hasTagName(appletTag)) {
         HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(ownerElement);
         if (pluginElement->needsWidgetUpdate())
             pluginElement->updateWidget(CreateAnyWidgetType);
index 1b8b75e..1208084 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
- * Copyright (C) 2003, 2006, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2006, 2009, 2012 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "RenderApplet.h"
 
-#include "Frame.h"
 #include "HTMLAppletElement.h"
-#include "HTMLNames.h"
-#include "HTMLParamElement.h"
-#include "PluginViewBase.h"
-#include "Widget.h"
 
 namespace WebCore {
 
-using namespace HTMLNames;
-
-RenderApplet::RenderApplet(HTMLAppletElement* applet, const HashMap<String, String>& args)
-    : RenderWidget(applet)
-    , m_args(args)
+RenderApplet::RenderApplet(HTMLAppletElement* applet)
+    : RenderEmbeddedObject(applet)
 {
     setInline(true);
 }
@@ -44,67 +36,4 @@ RenderApplet::~RenderApplet()
 {
 }
 
-IntSize RenderApplet::intrinsicSize() const
-{
-    // FIXME: This doesn't make sense. We can't just start returning
-    // a different size once we've created the widget and expect
-    // layout and sizing to be correct. We should remove this and
-    // pass the appropriate intrinsic size in the constructor.
-    return widget() ? IntSize(50, 50) : IntSize(150, 150);
-}
-
-void RenderApplet::createWidgetIfNecessary()
-{
-    HTMLAppletElement* element = static_cast<HTMLAppletElement*>(node());
-    if (widget() || !element->isFinishedParsingChildren())
-        return;
-
-    // FIXME: Java applets can't be resized (this is a bug in Apple's Java implementation).
-    // In order to work around this problem and have a correct size from the start, we will
-    // use fixed widths/heights from the style system when we can, since the widget might
-    // not have an accurate m_width/m_height.
-    LayoutUnit contentWidth = style()->width().isFixed() ? LayoutUnit(style()->width().value()) : 
-        width() - borderAndPaddingWidth();
-    LayoutUnit contentHeight = style()->height().isFixed() ? LayoutUnit(style()->height().value()) :
-        height() - borderAndPaddingHeight();
-    for (Node* child = element->firstChild(); child; child = child->nextSibling()) {
-        if (child->hasTagName(paramTag)) {
-            HTMLParamElement* p = static_cast<HTMLParamElement*>(child);
-            if (!p->name().isEmpty())
-                m_args.set(p->name(), p->value());
-        }
-    }
-
-    Frame* frame = this->frame();
-    ASSERT(frame);
-    setWidget(frame->loader()->subframeLoader()->createJavaAppletWidget(LayoutSize(contentWidth, contentHeight), element, m_args));
-}
-
-void RenderApplet::layout()
-{
-    ASSERT(needsLayout());
-
-    computeLogicalWidth();
-    computeLogicalHeight();
-
-    // The applet's widget gets created lazily upon first layout.
-    createWidgetIfNecessary();
-    setNeedsLayout(false);
-}
-
-#if USE(ACCELERATED_COMPOSITING)
-bool RenderApplet::requiresLayer() const
-{
-    if (RenderWidget::requiresLayer())
-        return true;
-    
-    return allowsAcceleratedCompositing();
-}
-
-bool RenderApplet::allowsAcceleratedCompositing() const
-{
-    return widget() && widget()->isPluginViewBase() && static_cast<PluginViewBase*>(widget())->platformLayer();
-}
-#endif
-
 } // namespace WebCore
index 007902d..1516600 100644 (file)
 #ifndef RenderApplet_h
 #define RenderApplet_h
 
-#include "RenderWidget.h"
-#include <wtf/text/StringHash.h>
+#include "RenderEmbeddedObject.h"
 
 namespace WebCore {
 
 class HTMLAppletElement;
 
-class RenderApplet : public RenderWidget {
+class RenderApplet : public RenderEmbeddedObject {
 public:
-    RenderApplet(HTMLAppletElement*, const HashMap<String, String>& args);
+    RenderApplet(HTMLAppletElement*);
     virtual ~RenderApplet();
 
-    void createWidgetIfNecessary();
-
-#if USE(ACCELERATED_COMPOSITING)
-    virtual bool allowsAcceleratedCompositing() const;
-#endif
-
 private:
     virtual const char* renderName() const { return "RenderApplet"; }
-
-    virtual bool isApplet() const { return true; }
-
-    virtual void layout();
-    virtual IntSize intrinsicSize() const;
-
-#if USE(ACCELERATED_COMPOSITING)
-    virtual bool requiresLayer() const;
-#endif
-
-    HashMap<String, String> m_args;
 };
 
-inline RenderApplet* toRenderApplet(RenderObject* object)
-{
-    ASSERT(!object || object->isApplet());
-    return static_cast<RenderApplet*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toRenderApplet(const RenderApplet*);
-
 } // namespace WebCore
 
 #endif // RenderApplet_h
index 7da6fc8..fd44e08 100644 (file)
@@ -90,7 +90,7 @@ private:
 
 inline RenderEmbeddedObject* toRenderEmbeddedObject(RenderObject* object)
 {
-    ASSERT(!object || !strcmp(object->renderName(), "RenderEmbeddedObject"));
+    ASSERT(!object || object->isEmbeddedObject());
     return static_cast<RenderEmbeddedObject*>(object);
 }
 
index 1b08f9c..b2c1cfe 100644 (file)
@@ -4747,7 +4747,6 @@ bool RenderLayer::shouldBeNormalFlowOnly() const
                 || renderer()->isCanvas()
                 || renderer()->isVideo()
                 || renderer()->isEmbeddedObject()
-                || renderer()->isApplet()
                 || renderer()->isRenderIFrame()
                 || renderer()->style()->specifiesColumns())
             && !renderer()->isOutOfFlowPositioned()
@@ -4769,7 +4768,6 @@ bool RenderLayer::shouldBeSelfPaintingLayer() const
         || renderer()->isCanvas()
         || renderer()->isVideo()
         || renderer()->isEmbeddedObject()
-        || renderer()->isApplet()
         || renderer()->isRenderIFrame();
 }
 
index 9886fb3..e58e114 100644 (file)
@@ -381,8 +381,7 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
     if (isDirectlyCompositedImage())
         updateImageContents();
 
-    if ((renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing())
-        || (renderer->isApplet() && toRenderApplet(renderer)->allowsAcceleratedCompositing())) {
+    if (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing()) {
         PluginViewBase* pluginViewBase = static_cast<PluginViewBase*>(toRenderWidget(renderer)->widget());
         m_graphicsLayer->setContentsToMedia(pluginViewBase->platformLayer());
     }
index b2940d0..18d50d8 100644 (file)
@@ -1701,8 +1701,7 @@ bool RenderLayerCompositor::requiresCompositingForPlugin(RenderObject* renderer)
     if (!(m_compositingTriggers & ChromeClient::PluginTrigger))
         return false;
 
-    bool composite = (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing())
-                  || (renderer->isApplet() && toRenderApplet(renderer)->allowsAcceleratedCompositing());
+    bool composite = renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allowsAcceleratedCompositing();
     if (!composite)
         return false;
 
index 893e451..6391334 100755 (executable)
@@ -1711,7 +1711,7 @@ void RenderObject::setStyle(PassRefPtr<RenderStyle> style)
 #if USE(ACCELERATED_COMPOSITING)
         // We need to run through adjustStyleDifference() for iframes and plugins, so
         // style sharing is disabled for them. That should ensure that we never hit this code path.
-        ASSERT(!isRenderIFrame() && !isEmbeddedObject() &&!isApplet());
+        ASSERT(!isRenderIFrame() && !isEmbeddedObject());
 #endif
         return;
     }
index 7b894fe..2dcd62e 100644 (file)
@@ -296,7 +296,6 @@ private:
 public:
     RenderArena* renderArena() const { return document()->renderArena(); }
 
-    virtual bool isApplet() const { return false; }
     virtual bool isBR() const { return false; }
     virtual bool isBlockFlow() const { return false; }
     virtual bool isBoxModelObject() const { return false; }