mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 321958 - Remove dead code nsIPluginTagInfo.getTagText, r=josh
This commit is contained in:
parent
df46d43449
commit
97abb84970
@ -25,7 +25,7 @@ interface nsIDOMElement;
|
||||
* Some day this might get superseded by a DOM API.
|
||||
*/
|
||||
|
||||
[uuid(ED83A4D9-77D2-40EA-B140-F160EDB3FE1C)]
|
||||
[uuid(759a955e-c590-419a-b5f3-e54bb67e24b8)]
|
||||
interface nsIPluginTagInfo : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -58,11 +58,6 @@ interface nsIPluginTagInfo : nsISupports
|
||||
*/
|
||||
readonly attribute nsPluginTagType tagType;
|
||||
|
||||
/**
|
||||
* Get the complete text of the HTML tag that was used to instantiate this plugin.
|
||||
*/
|
||||
void getTagText(out constCharPtr aTagText);
|
||||
|
||||
/**
|
||||
* Get a ptr to the paired list of parameter names and values,
|
||||
* returns the length of the array.
|
||||
|
@ -304,7 +304,6 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
|
||||
|
||||
mObjectFrame = nullptr;
|
||||
mContent = nullptr;
|
||||
mTagText = nullptr;
|
||||
mWidgetCreationComplete = false;
|
||||
#ifdef XP_MACOSX
|
||||
memset(&mCGPluginPortCopy, 0, sizeof(NP_CGContext));
|
||||
@ -375,11 +374,6 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner()
|
||||
mCachedAttrParamValues = nullptr;
|
||||
}
|
||||
|
||||
if (mTagText) {
|
||||
NS_Free(mTagText);
|
||||
mTagText = nullptr;
|
||||
}
|
||||
|
||||
PLUG_DeletePluginNativeWindow(mPluginWindow);
|
||||
mPluginWindow = nullptr;
|
||||
|
||||
@ -837,49 +831,6 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetTagType(nsPluginTagType *result)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstanceOwner::GetTagText(const char* *result)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(result);
|
||||
if (nullptr == mTagText) {
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent, &rv));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
rv = GetDocument(getter_AddRefs(document));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(document);
|
||||
NS_ASSERTION(domDoc, "Need a document");
|
||||
|
||||
nsCOMPtr<nsIDocumentEncoder> docEncoder(do_CreateInstance(NS_DOC_ENCODER_CONTRACTID_BASE "text/html", &rv));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
rv = docEncoder->Init(domDoc, NS_LITERAL_STRING("text/html"), nsIDocumentEncoder::OutputEncodeBasicEntities);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsRefPtr<nsRange> range = new nsRange();
|
||||
rv = range->SelectNode(node);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
docEncoder->SetRange(range);
|
||||
nsString elementHTML;
|
||||
rv = docEncoder->EncodeToString(elementHTML);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
mTagText = ToNewUTF8String(elementHTML);
|
||||
if (!mTagText)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
*result = mTagText;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsPluginInstanceOwner::GetParameters(uint16_t& n, const char*const*& names, const char*const*& values)
|
||||
{
|
||||
nsresult rv = EnsureCachedAttrParamArrays();
|
||||
|
@ -272,7 +272,6 @@ private:
|
||||
nsObjectFrame *mObjectFrame;
|
||||
nsIContent *mContent; // WEAK, content owns us
|
||||
nsCString mDocumentBase;
|
||||
char *mTagText;
|
||||
bool mWidgetCreationComplete;
|
||||
nsCOMPtr<nsIWidget> mWidget;
|
||||
nsRefPtr<nsPluginHost> mPluginHost;
|
||||
|
Loading…
Reference in New Issue
Block a user