Bug 1316661 part 3. Eliminate IsCallerChrome callers in nsGenericHTMLElement. r=smaug

The only nsGenericHTMLElement::GetEditor callers are
HTMLInputElement::GetEditor/HTMLTextareaElement::GetEditor (the XPCOM-y
versions), which are only called from C++ and only from two places: a11y code,
which forces itself to look like system, and typeaheadfind, which would break
badly if it could not get an editor.  So that security check simply shouldn't
exist.

The script API doesn't call down into here _and_ is [ChromeOnly] in the webidl
already.
This commit is contained in:
Boris Zbarsky
2016-11-15 00:18:33 -05:00
parent f4ccbe4570
commit 75c836b7fe
5 changed files with 6 additions and 24 deletions

View File

@@ -463,11 +463,6 @@ HTMLTextFieldAccessible::GetEditor() const
if (!editableElt)
return nullptr;
// nsGenericHTMLElement::GetEditor has a security check.
// Make sure we're not restricted by the permissions of
// whatever script is currently running.
mozilla::dom::AutoNoJSAPI nojsapi;
nsCOMPtr<nsIEditor> editor;
editableElt->GetEditor(getter_AddRefs(editor));