Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in widget/ and gfx/ etc after this. That can be removed once we remove plugin support from dom/ etc. The removal from layout/ should be pretty complete though. Differential Revision: https://phabricator.services.mozilla.com/D102140
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include "nsError.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "nsIPluginDocument.h"
|
||||
#include "nsIObjectFrame.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsContentUtils.h"
|
||||
@@ -189,17 +188,6 @@ bool HTMLObjectElement::IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable,
|
||||
const nsAttrValue* attrVal = mAttrs.GetAttr(nsGkAtoms::tabindex);
|
||||
bool isFocusable = attrVal && attrVal->Type() == nsAttrValue::eInteger;
|
||||
|
||||
// Has plugin content: let the plugin decide what to do in terms of
|
||||
// internal focus from mouse clicks
|
||||
if (Type() == eType_Plugin) {
|
||||
if (aTabIndex) {
|
||||
*aTabIndex = isFocusable ? attrVal->GetIntegerValue() : -1;
|
||||
}
|
||||
|
||||
*aIsFocusable = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// This method doesn't call nsGenericHTMLFormElement intentionally.
|
||||
// TODO: It should probably be changed when bug 597242 will be fixed.
|
||||
if (IsEditableRoot() ||
|
||||
@@ -228,32 +216,7 @@ HTMLObjectElement::Reset() { return NS_OK; }
|
||||
|
||||
NS_IMETHODIMP
|
||||
HTMLObjectElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
|
||||
nsAutoString name;
|
||||
if (!GetAttr(kNameSpaceID_None, nsGkAtoms::name, name)) {
|
||||
// No name, don't submit.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* frame = GetPrimaryFrame();
|
||||
|
||||
nsIObjectFrame* objFrame = do_QueryFrame(frame);
|
||||
if (!objFrame) {
|
||||
// No frame, nothing to submit.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RefPtr<nsNPAPIPluginInstance> pi = objFrame->GetPluginInstance();
|
||||
if (!pi) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAutoString value;
|
||||
nsresult rv = pi->GetFormValue(value);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return aFormSubmission->AddNameValuePair(name, value);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
int32_t HTMLObjectElement::TabIndexDefault() { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user