[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric at webkit.org eric at webkit.org
Wed Dec 22 12:56:05 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1402eb4f0d4e8657c627377d4f6f5b847db9b1da
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 2 09:10:21 2010 +0000

    2010-09-02  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Dimitri Glazkov.
    
            Share more code between HTMLObjectElement and HTMLEmbedElement
            https://bugs.webkit.org/show_bug.cgi?id=45054
    
            This pushes more of HTMLObjectElement code down into
            HTMLPlugInImageElement so that it can be shared with HTMLEmbedElement.
    
            I also moved a little code from HTMLPluginElement to HTMLPlugInImageElement
            since HTMLAppletElement does not need to share this same widget update logic.
            This is a small correction from the previous change.
    
            This patch was originally written in one piece and reviewed by Dimitri.
            I'm landing it as two separate changes for easier readability and less
            chance of regression.
    
            No functional change, thus no tests.
    
            * html/HTMLEmbedElement.cpp:
            (WebCore::HTMLEmbedElement::HTMLEmbedElement):
            (WebCore::HTMLEmbedElement::mapToEntry):
            (WebCore::HTMLEmbedElement::parseMappedAttribute):
            (WebCore::HTMLEmbedElement::rendererIsNeeded):
            (WebCore::HTMLEmbedElement::attach):
            (WebCore::HTMLEmbedElement::updateWidget):
            (WebCore::HTMLEmbedElement::insertedIntoDocument):
            (WebCore::HTMLEmbedElement::removedFromDocument):
            (WebCore::HTMLEmbedElement::attributeChanged):
            * html/HTMLEmbedElement.h:
            * html/HTMLObjectElement.cpp:
            (WebCore::HTMLObjectElement::HTMLObjectElement):
            (WebCore::HTMLObjectElement::parseMappedAttribute):
            (WebCore::HTMLObjectElement::rendererIsNeeded):
            (WebCore::HTMLObjectElement::attach):
            (WebCore::HTMLObjectElement::updateWidget):
            (WebCore::HTMLObjectElement::finishParsingChildren):
            (WebCore::HTMLObjectElement::detach):
            (WebCore::HTMLObjectElement::insertedIntoDocument):
            (WebCore::HTMLObjectElement::removedFromDocument):
            (WebCore::HTMLObjectElement::recalcStyle):
            (WebCore::HTMLObjectElement::childrenChanged):
            (WebCore::HTMLObjectElement::renderFallbackContent):
            * html/HTMLObjectElement.h:
            * html/HTMLPlugInElement.cpp:
            * html/HTMLPlugInElement.h:
            * html/HTMLPlugInImageElement.cpp:
            (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
            (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
            * html/HTMLPlugInImageElement.h:
            (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
            (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
            * loader/SubframeLoader.cpp:
            (WebCore::SubframeLoader::requestObject):
            (WebCore::SubframeLoader::loadPlugin):
            * loader/SubframeLoader.h:
            * rendering/RenderEmbeddedObject.cpp:
            (WebCore::updateWidgetForObjectElement):
            (WebCore::updateWidgetForEmbedElement):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66650 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ad76835..4bb0c10 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,64 @@
+2010-09-02  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Share more code between HTMLObjectElement and HTMLEmbedElement
+        https://bugs.webkit.org/show_bug.cgi?id=45054
+
+        This pushes more of HTMLObjectElement code down into
+        HTMLPlugInImageElement so that it can be shared with HTMLEmbedElement.
+
+        I also moved a little code from HTMLPluginElement to HTMLPlugInImageElement
+        since HTMLAppletElement does not need to share this same widget update logic.
+        This is a small correction from the previous change.
+
+        This patch was originally written in one piece and reviewed by Dimitri.
+        I'm landing it as two separate changes for easier readability and less
+        chance of regression.
+
+        No functional change, thus no tests.
+
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::HTMLEmbedElement):
+        (WebCore::HTMLEmbedElement::mapToEntry):
+        (WebCore::HTMLEmbedElement::parseMappedAttribute):
+        (WebCore::HTMLEmbedElement::rendererIsNeeded):
+        (WebCore::HTMLEmbedElement::attach):
+        (WebCore::HTMLEmbedElement::updateWidget):
+        (WebCore::HTMLEmbedElement::insertedIntoDocument):
+        (WebCore::HTMLEmbedElement::removedFromDocument):
+        (WebCore::HTMLEmbedElement::attributeChanged):
+        * html/HTMLEmbedElement.h:
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::HTMLObjectElement):
+        (WebCore::HTMLObjectElement::parseMappedAttribute):
+        (WebCore::HTMLObjectElement::rendererIsNeeded):
+        (WebCore::HTMLObjectElement::attach):
+        (WebCore::HTMLObjectElement::updateWidget):
+        (WebCore::HTMLObjectElement::finishParsingChildren):
+        (WebCore::HTMLObjectElement::detach):
+        (WebCore::HTMLObjectElement::insertedIntoDocument):
+        (WebCore::HTMLObjectElement::removedFromDocument):
+        (WebCore::HTMLObjectElement::recalcStyle):
+        (WebCore::HTMLObjectElement::childrenChanged):
+        (WebCore::HTMLObjectElement::renderFallbackContent):
+        * html/HTMLObjectElement.h:
+        * html/HTMLPlugInElement.cpp:
+        * html/HTMLPlugInElement.h:
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
+        (WebCore::HTMLPlugInImageElement::renderEmbeddedObject):
+        * html/HTMLPlugInImageElement.h:
+        (WebCore::HTMLPlugInImageElement::needsWidgetUpdate):
+        (WebCore::HTMLPlugInImageElement::setNeedsWidgetUpdate):
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::requestObject):
+        (WebCore::SubframeLoader::loadPlugin):
+        * loader/SubframeLoader.h:
+        * rendering/RenderEmbeddedObject.cpp:
+        (WebCore::updateWidgetForObjectElement):
+        (WebCore::updateWidgetForEmbedElement):
+
 2010-09-02  Tony Gentilcore  <tonyg at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/html/HTMLEmbedElement.cpp b/WebCore/html/HTMLEmbedElement.cpp
index e7889b8..69e7823 100644
--- a/WebCore/html/HTMLEmbedElement.cpp
+++ b/WebCore/html/HTMLEmbedElement.cpp
@@ -44,7 +44,6 @@ using namespace HTMLNames;
 
 inline HTMLEmbedElement::HTMLEmbedElement(const QualifiedName& tagName, Document* document)
     : HTMLPlugInImageElement(tagName, document)
-    , m_needWidgetUpdate(false)
 {
     ASSERT(hasTagName(embedTag));
 }
@@ -80,7 +79,7 @@ bool HTMLEmbedElement::mapToEntry(const QualifiedName& attrName, MappedAttribute
         return false;
     }
         
-    return HTMLPlugInElement::mapToEntry(attrName, result);
+    return HTMLPlugInImageElement::mapToEntry(attrName, result);
 }
 
 void HTMLEmbedElement::parseMappedAttribute(Attribute* attr)
@@ -118,13 +117,13 @@ void HTMLEmbedElement::parseMappedAttribute(Attribute* attr)
         }
         m_name = value;
     } else
-        HTMLPlugInElement::parseMappedAttribute(attr);
+        HTMLPlugInImageElement::parseMappedAttribute(attr);
 }
 
 bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style)
 {
     if (isImageType())
-        return HTMLPlugInElement::rendererIsNeeded(style);
+        return HTMLPlugInImageElement::rendererIsNeeded(style);
 
     Frame* frame = document()->frame();
     if (!frame)
@@ -149,7 +148,7 @@ bool HTMLEmbedElement::rendererIsNeeded(RenderStyle* style)
     }
 #endif
 
-    return HTMLPlugInElement::rendererIsNeeded(style);
+    return HTMLPlugInImageElement::rendererIsNeeded(style);
 }
 
 RenderObject* HTMLEmbedElement::createRenderer(RenderArena* arena, RenderStyle*)
@@ -164,14 +163,14 @@ RenderObject* HTMLEmbedElement::createRenderer(RenderArena* arena, RenderStyle*)
 
 void HTMLEmbedElement::attach()
 {
-    m_needWidgetUpdate = true;
+    setNeedsWidgetUpdate(true);
 
     bool isImage = isImageType();
 
     if (!isImage)
-        queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this);
+        queuePostAttachCallback(&HTMLPlugInImageElement::updateWidgetCallback, this);
 
-    HTMLPlugInElement::attach();
+    HTMLPlugInImageElement::attach();
 
     if (isImage && renderer()) {
         if (!m_imageLoader)
@@ -186,7 +185,7 @@ void HTMLEmbedElement::attach()
 void HTMLEmbedElement::updateWidget()
 {
     document()->updateStyleIfNeeded();
-    if (m_needWidgetUpdate && renderEmbeddedObject() && !isImageType())
+    if (needsWidgetUpdate() && renderEmbeddedObject() && !isImageType())
         renderEmbeddedObject()->updateWidget(true);
 }
 
@@ -209,7 +208,7 @@ void HTMLEmbedElement::insertedIntoDocument()
         }
     }
 
-    HTMLPlugInElement::insertedIntoDocument();
+    HTMLPlugInImageElement::insertedIntoDocument();
 }
 
 void HTMLEmbedElement::removedFromDocument()
@@ -217,12 +216,12 @@ void HTMLEmbedElement::removedFromDocument()
     if (document()->isHTMLDocument())
         static_cast<HTMLDocument*>(document())->removeNamedItem(m_name);
 
-    HTMLPlugInElement::removedFromDocument();
+    HTMLPlugInImageElement::removedFromDocument();
 }
 
 void HTMLEmbedElement::attributeChanged(Attribute* attr, bool preserveDecls)
 {
-    HTMLPlugInElement::attributeChanged(attr, preserveDecls);
+    HTMLPlugInImageElement::attributeChanged(attr, preserveDecls);
 
     if ((attr->name() == widthAttr || attr->name() == heightAttr) && !attr->isEmpty()) {
         Node* n = parent();
diff --git a/WebCore/html/HTMLEmbedElement.h b/WebCore/html/HTMLEmbedElement.h
index 5f4df67..058144e 100644
--- a/WebCore/html/HTMLEmbedElement.h
+++ b/WebCore/html/HTMLEmbedElement.h
@@ -31,8 +31,6 @@ class HTMLEmbedElement : public HTMLPlugInImageElement {
 public:
     static PassRefPtr<HTMLEmbedElement> create(const QualifiedName&, Document*);
 
-    void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
-
 private:
     HTMLEmbedElement(const QualifiedName&, Document*);
 
@@ -55,8 +53,6 @@ private:
     virtual RenderWidget* renderWidgetForJSBindings() const;
 
     virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
-
-    bool m_needWidgetUpdate;
 };
 
 }
diff --git a/WebCore/html/HTMLObjectElement.cpp b/WebCore/html/HTMLObjectElement.cpp
index 04c00a9..1d19bfe 100644
--- a/WebCore/html/HTMLObjectElement.cpp
+++ b/WebCore/html/HTMLObjectElement.cpp
@@ -48,9 +48,11 @@ using namespace HTMLNames;
 inline HTMLObjectElement::HTMLObjectElement(const QualifiedName& tagName, Document* document, bool createdByParser) 
     : HTMLPlugInImageElement(tagName, document)
     , m_docNamedItem(true)
-    , m_needWidgetUpdate(!createdByParser)
     , m_useFallbackContent(false)
 {
+    // HTMLObjectElement tries to delay updating its widget while parsing until
+    // after all of its children are parsed.
+    setNeedsWidgetUpdate(!createdByParser);
     ASSERT(hasTagName(objectTag));
 }
 
@@ -67,30 +69,29 @@ RenderWidget* HTMLObjectElement::renderWidgetForJSBindings() const
 
 void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
 {
-    String val = attr->value();
-    size_t pos;
     if (attr->name() == typeAttr) {
-        m_serviceType = val.lower();
-        pos = m_serviceType.find(";");
+        m_serviceType = attr->value().lower();
+        size_t pos = m_serviceType.find(";");
         if (pos != notFound)
-          m_serviceType = m_serviceType.left(pos);
+            m_serviceType = m_serviceType.left(pos);
         if (renderer())
-          m_needWidgetUpdate = true;
+            setNeedsWidgetUpdate(true);
         if (!isImageType() && m_imageLoader)
-          m_imageLoader.clear();
+            m_imageLoader.clear();
     } else if (attr->name() == dataAttr) {
-        m_url = deprecatedParseURL(val);
-        if (renderer())
-          m_needWidgetUpdate = true;
-        if (renderer() && isImageType()) {
-          if (!m_imageLoader)
-              m_imageLoader = adoptPtr(new HTMLImageLoader(this));
-          m_imageLoader->updateFromElementIgnoringPreviousError();
+        m_url = deprecatedParseURL(attr->value());
+        if (renderer()) {
+            setNeedsWidgetUpdate(true);
+            if (isImageType()) {
+                if (!m_imageLoader)
+                    m_imageLoader = adoptPtr(new HTMLImageLoader(this));
+                m_imageLoader->updateFromElementIgnoringPreviousError();
+            }
         }
     } else if (attr->name() == classidAttr) {
-        m_classId = val;
+        m_classId = attr->value();
         if (renderer())
-          m_needWidgetUpdate = true;
+            setNeedsWidgetUpdate(true);
     } else if (attr->name() == onloadAttr)
         setAttributeEventListener(eventNames().loadEvent, createAttributeEventListener(this, attr));
     else if (attr->name() == onbeforeloadAttr)
@@ -112,9 +113,9 @@ void HTMLObjectElement::parseMappedAttribute(Attribute* attr)
         }
         m_id = newId;
         // also call superclass
-        HTMLPlugInElement::parseMappedAttribute(attr);
+        HTMLPlugInImageElement::parseMappedAttribute(attr);
     } else
-        HTMLPlugInElement::parseMappedAttribute(attr);
+        HTMLPlugInImageElement::parseMappedAttribute(attr);
 }
 
 bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style)
@@ -127,7 +128,7 @@ bool HTMLObjectElement::rendererIsNeeded(RenderStyle* style)
     // Gears expects the plugin to be instantiated even if display:none is set
     // for the object element.
     bool isGearsPlugin = equalIgnoringCase(getAttribute(typeAttr), "application/x-googlegears");
-    return isGearsPlugin || HTMLPlugInElement::rendererIsNeeded(style);
+    return isGearsPlugin || HTMLPlugInImageElement::rendererIsNeeded(style);
 }
 
 RenderObject* HTMLObjectElement::createRenderer(RenderArena* arena, RenderStyle* style)
@@ -150,9 +151,9 @@ void HTMLObjectElement::attach()
     bool isImage = isImageType();
 
     if (!isImage)
-        queuePostAttachCallback(&HTMLPlugInElement::updateWidgetCallback, this);
+        queuePostAttachCallback(&HTMLPlugInImageElement::updateWidgetCallback, this);
 
-    HTMLPlugInElement::attach();
+    HTMLPlugInImageElement::attach();
 
     if (isImage && renderer() && !m_useFallbackContent) {
         if (!m_imageLoader)
@@ -164,15 +165,15 @@ void HTMLObjectElement::attach()
 void HTMLObjectElement::updateWidget()
 {
     document()->updateStyleIfNeeded();
-    if (m_needWidgetUpdate && renderEmbeddedObject() && !m_useFallbackContent && !isImageType())
+    if (needsWidgetUpdate() && renderEmbeddedObject() && !m_useFallbackContent && !isImageType())
         renderEmbeddedObject()->updateWidget(true);
 }
 
 void HTMLObjectElement::finishParsingChildren()
 {
-    HTMLPlugInElement::finishParsingChildren();
+    HTMLPlugInImageElement::finishParsingChildren();
     if (!m_useFallbackContent) {
-        m_needWidgetUpdate = true;
+        setNeedsWidgetUpdate(true);
         if (inDocument())
             setNeedsStyleRecalc();
     }
@@ -182,8 +183,8 @@ void HTMLObjectElement::detach()
 {
     if (attached() && renderer() && !m_useFallbackContent)
         // Update the widget the next time we attach (detaching destroys the plugin).
-        m_needWidgetUpdate = true;
-    HTMLPlugInElement::detach();
+        setNeedsWidgetUpdate(true);
+    HTMLPlugInImageElement::detach();
 }
 
 void HTMLObjectElement::insertedIntoDocument()
@@ -194,7 +195,7 @@ void HTMLObjectElement::insertedIntoDocument()
         document->addExtraNamedItem(m_id);
     }
 
-    HTMLPlugInElement::insertedIntoDocument();
+    HTMLPlugInImageElement::insertedIntoDocument();
 }
 
 void HTMLObjectElement::removedFromDocument()
@@ -205,26 +206,26 @@ void HTMLObjectElement::removedFromDocument()
         document->removeExtraNamedItem(m_id);
     }
 
-    HTMLPlugInElement::removedFromDocument();
+    HTMLPlugInImageElement::removedFromDocument();
 }
 
 void HTMLObjectElement::recalcStyle(StyleChange ch)
 {
-    if (!m_useFallbackContent && m_needWidgetUpdate && renderer() && !isImageType()) {
+    if (!m_useFallbackContent && needsWidgetUpdate() && renderer() && !isImageType()) {
         detach();
         attach();
     }
-    HTMLPlugInElement::recalcStyle(ch);
+    HTMLPlugInImageElement::recalcStyle(ch);
 }
 
 void HTMLObjectElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
 {
     updateDocNamedItem();
     if (inDocument() && !m_useFallbackContent) {
-        m_needWidgetUpdate = true;
+        setNeedsWidgetUpdate(true);
         setNeedsStyleRecalc();
     }
-    HTMLPlugInElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
+    HTMLPlugInImageElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
 }
 
 bool HTMLObjectElement::isURLAttribute(Attribute *attr) const
@@ -257,10 +258,8 @@ void HTMLObjectElement::renderFallbackContent()
         }
     }
 
-    // Mark ourselves as using the fallback content.
     m_useFallbackContent = true;
 
-    // Now do a detach and reattach.    
     // FIXME: Style gets recalculated which is suboptimal.
     detach();
     attach();
diff --git a/WebCore/html/HTMLObjectElement.h b/WebCore/html/HTMLObjectElement.h
index e874664..1bf774c 100644
--- a/WebCore/html/HTMLObjectElement.h
+++ b/WebCore/html/HTMLObjectElement.h
@@ -31,8 +31,6 @@ class HTMLObjectElement : public HTMLPlugInImageElement {
 public:
     static PassRefPtr<HTMLObjectElement> create(const QualifiedName&, Document*, bool createdByParser);
 
-    void setNeedWidgetUpdate(bool needWidgetUpdate) { m_needWidgetUpdate = needWidgetUpdate; }
-
     void renderFallbackContent();
 
     bool isDocNamedItem() const { return m_docNamedItem; }
@@ -74,7 +72,6 @@ private:
     AtomicString m_id;
     String m_classId;
     bool m_docNamedItem : 1;
-    bool m_needWidgetUpdate : 1;
     bool m_useFallbackContent : 1;
 };
 
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp
index 5ffb76d..1871b65 100644
--- a/WebCore/html/HTMLPlugInElement.cpp
+++ b/WebCore/html/HTMLPlugInElement.cpp
@@ -81,15 +81,6 @@ void HTMLPlugInElement::detach()
     HTMLFrameOwnerElement::detach();
 }
 
-RenderEmbeddedObject* HTMLPlugInElement::renderEmbeddedObject() const
-{
-    // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
-    // when using fallback content.
-    if (!renderer() || !renderer()->isEmbeddedObject())
-        return 0;
-    return toRenderEmbeddedObject(renderer());
-}
-
 PassScriptInstance HTMLPlugInElement::getInstance() const
 {
     Frame* frame = document()->frame();
diff --git a/WebCore/html/HTMLPlugInElement.h b/WebCore/html/HTMLPlugInElement.h
index 29fcdb0..d31d86e 100644
--- a/WebCore/html/HTMLPlugInElement.h
+++ b/WebCore/html/HTMLPlugInElement.h
@@ -51,8 +51,6 @@ public:
     bool isCapturingMouseEvents() const { return m_isCapturingMouseEvents; }
     void setIsCapturingMouseEvents(bool capturing) { m_isCapturingMouseEvents = capturing; }
 
-    RenderEmbeddedObject* renderEmbeddedObject() const;
-
 protected:
     HTMLPlugInElement(const QualifiedName& tagName, Document*);
 
diff --git a/WebCore/html/HTMLPlugInImageElement.cpp b/WebCore/html/HTMLPlugInImageElement.cpp
index e2898a2..776218e 100644
--- a/WebCore/html/HTMLPlugInImageElement.cpp
+++ b/WebCore/html/HTMLPlugInImageElement.cpp
@@ -26,14 +26,25 @@
 #include "FrameLoaderClient.h"
 #include "HTMLImageLoader.h"
 #include "Image.h"
+#include "RenderEmbeddedObject.h"
 
 namespace WebCore {
 
 HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Document* document)
     : HTMLPlugInElement(tagName, document)
+    , m_needsWidgetUpdate(false)
 {
 }
 
+RenderEmbeddedObject* HTMLPlugInImageElement::renderEmbeddedObject() const
+{
+    // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers
+    // when using fallback content.
+    if (!renderer() || !renderer()->isEmbeddedObject())
+        return 0;
+    return toRenderEmbeddedObject(renderer());
+}
+
 bool HTMLPlugInImageElement::isImageType()
 {
     if (m_serviceType.isEmpty() && protocolIs(m_url, "data"))
diff --git a/WebCore/html/HTMLPlugInImageElement.h b/WebCore/html/HTMLPlugInImageElement.h
index 6f8d305..f48951d 100644
--- a/WebCore/html/HTMLPlugInImageElement.h
+++ b/WebCore/html/HTMLPlugInImageElement.h
@@ -28,11 +28,17 @@ namespace WebCore {
 
 class HTMLImageLoader;
 
+// Base class for HTMLObjectElement and HTMLEmbedElement
 class HTMLPlugInImageElement : public HTMLPlugInElement {
 public:
     const String& serviceType() const { return m_serviceType; }
     const String& url() const { return m_url; }
 
+    bool needsWidgetUpdate() const { return m_needsWidgetUpdate; }
+    void setNeedsWidgetUpdate(bool needsWidgetUpdate) { m_needsWidgetUpdate = needsWidgetUpdate; }
+
+    RenderEmbeddedObject* renderEmbeddedObject() const;
+    
 protected:
     HTMLPlugInImageElement(const QualifiedName& tagName, Document*);
 
@@ -44,6 +50,8 @@ protected:
 
 private:
     virtual void willMoveToNewOwnerDocument();
+
+    bool m_needsWidgetUpdate;
 };
 
 } // namespace WebCore
diff --git a/WebCore/loader/SubframeLoader.cpp b/WebCore/loader/SubframeLoader.cpp
index 979ffc4..958d946 100644
--- a/WebCore/loader/SubframeLoader.cpp
+++ b/WebCore/loader/SubframeLoader.cpp
@@ -38,7 +38,7 @@
 #include "HTMLAppletElement.h"
 #include "HTMLFrameElementBase.h"
 #include "HTMLNames.h"
-#include "HTMLPlugInElement.h"
+#include "HTMLPlugInImageElement.h"
 #include "MIMETypeRegistry.h"
 #include "Node.h"
 #include "Page.h"
@@ -89,7 +89,7 @@ bool SubframeLoader::requestFrame(HTMLFrameOwnerElement* ownerElement, const Str
     return true;
 }
 
-bool SubframeLoader::requestObject(HTMLPlugInElement* ownerElement, const String& url, const AtomicString& frameName,
+bool SubframeLoader::requestObject(HTMLPlugInImageElement* ownerElement, const String& url, const AtomicString& frameName,
     const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues)
 {
     if (url.isEmpty() && mimeType.isEmpty())
@@ -124,7 +124,7 @@ bool SubframeLoader::requestObject(HTMLPlugInElement* ownerElement, const String
             return false;
 
         ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
-        HTMLPlugInElement* pluginElement = static_cast<HTMLPlugInElement*>(ownerElement);
+        HTMLPlugInImageElement* pluginElement = static_cast<HTMLPlugInImageElement*>(ownerElement);
 
         return loadPlugin(pluginElement, completedURL, mimeType, paramNames, paramValues, useFallback);
     }
@@ -328,7 +328,7 @@ Document* SubframeLoader::document() const
     return m_frame->document();
 }
 
-bool SubframeLoader::loadPlugin(HTMLPlugInElement* pluginElement, const KURL& url, const String& mimeType,
+bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType,
     const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
 {
     RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
diff --git a/WebCore/loader/SubframeLoader.h b/WebCore/loader/SubframeLoader.h
index 8ed456c..6c3baf8 100644
--- a/WebCore/loader/SubframeLoader.h
+++ b/WebCore/loader/SubframeLoader.h
@@ -45,7 +45,7 @@ class Frame;
 class FrameLoaderClient;
 class HTMLAppletElement;
 class HTMLFrameOwnerElement;
-class HTMLPlugInElement;
+class HTMLPlugInImageElement;
 class IntSize;
 class KURL;
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
@@ -61,7 +61,7 @@ public:
     void clear();
 
     bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName, bool lockHistory = true, bool lockBackForwardList = true);    
-    bool requestObject(HTMLPlugInElement*, const String& url, const AtomicString& frameName,
+    bool requestObject(HTMLPlugInImageElement*, const String& url, const AtomicString& frameName,
         const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues);
 
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
@@ -79,7 +79,7 @@ public:
 private:
     Frame* loadOrRedirectSubframe(HTMLFrameOwnerElement*, const KURL&, const AtomicString& frameName, bool lockHistory, bool lockBackForwardList);
     Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
-    bool loadPlugin(HTMLPlugInElement*, const KURL&, const String& mimeType,
+    bool loadPlugin(HTMLPlugInImageElement*, const KURL&, const String& mimeType,
         const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback);
 
     bool shouldUsePlugin(const KURL&, const String& mimeType, bool hasFallback, bool& useFallback);
diff --git a/WebCore/rendering/RenderEmbeddedObject.cpp b/WebCore/rendering/RenderEmbeddedObject.cpp
index 74c6e91..b1b253a 100644
--- a/WebCore/rendering/RenderEmbeddedObject.cpp
+++ b/WebCore/rendering/RenderEmbeddedObject.cpp
@@ -255,7 +255,7 @@ static void parametersFromObject(HTMLObjectElement* objectElement, Vector<String
 // FIXME: This belongs on HTMLObjectElement, HTMLPluginElement or HTMLFrameOwnerElement.
 static void updateWidgetForObjectElement(HTMLObjectElement* objectElement, bool onlyCreateNonNetscapePlugins)
 {
-    objectElement->setNeedWidgetUpdate(false);
+    objectElement->setNeedsWidgetUpdate(false);
     if (!objectElement->isFinishedParsingChildren())
         return;
 
@@ -311,7 +311,7 @@ static void updateWidgetForEmbedElement(HTMLEmbedElement* embedElement, bool onl
     String url = embedElement->url();
     String serviceType = embedElement->serviceType();
 
-    embedElement->setNeedWidgetUpdate(false);
+    embedElement->setNeedsWidgetUpdate(false);
 
     if (url.isEmpty() && serviceType.isEmpty())
         return;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list