Changeset 150700 in webkit


Ignore:
Timestamp:
May 25, 2013 7:48:46 PM (11 years ago)
Author:
akling@apple.com
Message:

PluginDocument::pluginNode() should be pluginElement() instead.
<http://webkit.org/b/116774>

Reviewed by Anders Carlsson.

Source/WebCore:

Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.

  • dom/Document.cpp:

(WebCore::eventTargetNodeForDocument):

  • html/PluginDocument.h:
  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocument::pluginWidget):
(WebCore::PluginDocument::setPluginElement):
(WebCore::PluginDocument::detach):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::focusedPluginViewForFrame):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150699 r150700  
     12013-05-25  Andreas Kling  <akling@apple.com>
     2
     3        PluginDocument::pluginNode() should be pluginElement() instead.
     4        <http://webkit.org/b/116774>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
     9
     10        * dom/Document.cpp:
     11        (WebCore::eventTargetNodeForDocument):
     12        * html/PluginDocument.h:
     13        * html/PluginDocument.cpp:
     14        (WebCore::PluginDocumentParser::createDocumentStructure):
     15        (WebCore::PluginDocument::pluginWidget):
     16        (WebCore::PluginDocument::setPluginElement):
     17        (WebCore::PluginDocument::detach):
     18
    1192013-05-25  Andreas Kling  <akling@apple.com>
    220
  • trunk/Source/WebCore/WebCore.exp.in

    r150699 r150700  
    330330__ZN7WebCore14LoaderStrategy21resourceLoadSchedulerEv
    331331__ZN7WebCore14LoaderStrategy25loadResourceSynchronouslyEPNS_17NetworkingContextEmRKNS_15ResourceRequestENS_17StoredCredentialsENS_22ClientCredentialPolicyERNS_13ResourceErrorERNS_16ResourceResponseERN3WTF6VectorIcLm0ENSC_15CrashOnOverflowEEE
    332 __ZN7WebCore14PluginDocument10pluginNodeEv
    333332__ZN7WebCore14PluginDocument12pluginWidgetEv
    334333__ZN7WebCore14ResourceBuffer12createNSDataEv
  • trunk/Source/WebCore/dom/Document.cpp

    r150699 r150700  
    101101#include "HTMLNames.h"
    102102#include "HTMLParserIdioms.h"
     103#include "HTMLPlugInElement.h"
    103104#include "HTMLStyleElement.h"
    104105#include "HTMLTitleElement.h"
     
    57715772    if (!node && doc->isPluginDocument()) {
    57725773        PluginDocument* pluginDocument = toPluginDocument(doc);
    5773         node =  pluginDocument->pluginNode();
     5774        node = pluginDocument->pluginElement();
    57745775    }
    57755776    if (!node && doc->isHTMLDocument())
  • trunk/Source/WebCore/html/PluginDocument.cpp

    r150227 r150700  
    11/*
    2  * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2008, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3535#include "HTMLHtmlElement.h"
    3636#include "HTMLNames.h"
    37 #include "NodeList.h"
    3837#include "Page.h"
    3938#include "RawDataDocumentParser.h"
     
    9796        m_embedElement->setAttribute(typeAttr, loader->writer()->mimeType());
    9897
    99     toPluginDocument(document())->setPluginNode(m_embedElement);
     98    toPluginDocument(document())->setPluginElement(m_embedElement);
    10099
    101100    body->appendChild(embedElement, IGNORE_EXCEPTION);
     
    151150Widget* PluginDocument::pluginWidget()
    152151{
    153     if (m_pluginNode && m_pluginNode->renderer()) {
    154         ASSERT(m_pluginNode->renderer()->isEmbeddedObject());
    155         return toRenderEmbeddedObject(m_pluginNode->renderer())->widget();
     152    if (m_pluginElement && m_pluginElement->renderer()) {
     153        ASSERT(m_pluginElement->renderer()->isEmbeddedObject());
     154        return toRenderEmbeddedObject(m_pluginElement->renderer())->widget();
    156155    }
    157156    return 0;
    158157}
    159158
    160 Node* PluginDocument::pluginNode()
     159void PluginDocument::setPluginElement(PassRefPtr<HTMLPlugInElement> element)
    161160{
    162     return m_pluginNode.get();
     161    m_pluginElement = element;
    163162}
    164163
    165164void PluginDocument::detach()
    166165{
    167     // Release the plugin node so that we don't have a circular reference.
    168     m_pluginNode = 0;
     166    // Release the plugin Element so that we don't have a circular reference.
     167    m_pluginElement = 0;
    169168    if (FrameLoader* loader = frame()->loader())
    170169        loader->client()->redirectDataToPlugin(0);
  • trunk/Source/WebCore/html/PluginDocument.h

    r149960 r150700  
    11/*
    2  * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2008, 2009, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3030namespace WebCore {
    3131
    32 class Node;
     32class HTMLPlugInElement;
    3333class Widget;
    3434
     
    4040    }
    4141
    42     void setPluginNode(Node* pluginNode) { m_pluginNode = pluginNode; }
     42    void setPluginElement(PassRefPtr<HTMLPlugInElement>);
    4343
    4444    Widget* pluginWidget();
    45     Node* pluginNode();
     45    HTMLPlugInElement* pluginElement() { return m_pluginElement.get(); }
    4646
    4747    virtual void detach() OVERRIDE;
     
    5959
    6060    bool m_shouldLoadPluginManually;
    61     RefPtr<Node> m_pluginNode;
     61    RefPtr<HTMLPlugInElement> m_pluginElement;
    6262};
    6363
  • trunk/Source/WebKit2/ChangeLog

    r150695 r150700  
     12013-05-25  Andreas Kling  <akling@apple.com>
     2
     3        PluginDocument::pluginNode() should be pluginElement() instead.
     4        <http://webkit.org/b/116774>
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * WebProcess/WebPage/WebPage.cpp:
     9        (WebKit::WebPage::focusedPluginViewForFrame):
     10
    1112013-05-25  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r150692 r150700  
    745745    PluginDocument* pluginDocument = static_cast<PluginDocument*>(frame->document());
    746746
    747     if (pluginDocument->focusedNode() != pluginDocument->pluginNode())
     747    if (pluginDocument->focusedNode() != pluginDocument->pluginElement())
    748748        return 0;
    749749
Note: See TracChangeset for help on using the changeset viewer.