Bug 1455674 part 5. Remove remaining IDL use of nsIDOMElement in editor. r=masayuki

This commit is contained in:
Boris Zbarsky 2018-04-26 23:35:18 -04:00
Родитель 550b06a56b
Коммит 0659ea615e
5 изменённых файлов: 9 добавлений и 29 удалений

Просмотреть файл

@ -574,16 +574,6 @@ HTMLEditor::SetTopAndLeft(Element& aElement,
mCSSEditUtils->SetCSSPropertyPixels(aElement, *nsGkAtoms::top, aY);
}
// self-explanatory
NS_IMETHODIMP
HTMLEditor::GetPositionedElement(nsIDOMElement** aReturn)
{
nsCOMPtr<nsIDOMElement> ret =
static_cast<nsIDOMElement*>(GetAsDOMNode(GetPositionedElement()));
ret.forget(aReturn);
return NS_OK;
}
nsresult
HTMLEditor::GetTemporaryStyleForFocusedPositionedElement(Element& aElement,
nsAString& aReturn)

Просмотреть файл

@ -1318,7 +1318,7 @@ protected:
ManualNACPtr mResizingShadow;
ManualNACPtr mResizingInfo;
nsCOMPtr<Element> mResizedObject;
RefPtr<Element> mResizedObject;
nsCOMPtr<nsIDOMEventListener> mMouseMotionListenerP;
nsCOMPtr<nsIDOMEventListener> mResizeEventListenerP;

Просмотреть файл

@ -241,16 +241,12 @@ HTMLEditor::RefreshResizers()
}
NS_IMETHODIMP
HTMLEditor::ShowResizers(nsIDOMElement* aResizedElement)
HTMLEditor::ShowResizers(Element* aResizedElement)
{
if (NS_WARN_IF(!aResizedElement)) {
return NS_ERROR_NULL_POINTER;
}
nsCOMPtr<Element> element = do_QueryInterface(aResizedElement);
if (NS_WARN_IF(!element)) {
return NS_ERROR_FAILURE;
}
return ShowResizers(*element);
return ShowResizers(*aResizedElement);
}
nsresult
@ -934,9 +930,9 @@ HTMLEditor::SetFinalSize(int32_t aX,
}
NS_IMETHODIMP
HTMLEditor::GetResizedObject(nsIDOMElement** aResizedObject)
HTMLEditor::GetResizedObject(Element** aResizedObject)
{
nsCOMPtr<nsIDOMElement> ret = static_cast<nsIDOMElement*>(GetAsDOMNode(mResizedObject));
RefPtr<Element> ret = mResizedObject;
ret.forget(aResizedObject);
return NS_OK;
}

Просмотреть файл

@ -7,15 +7,8 @@
#include "domstubs.idl"
[scriptable, builtinclass, uuid(91375f52-20e6-4757-9835-eb04fabe5498)]
interface nsIHTMLAbsPosEditor : nsISupports
{
/**
* this contains the absolutely positioned element currently edited
* or null
*/
readonly attribute nsIDOMElement positionedElement;
/**
* true if Absolute Positioning handling is enabled in the editor
*/

Просмотреть файл

@ -6,8 +6,9 @@
#include "nsISupports.idl"
#include "domstubs.idl"
[scriptable, builtinclass, uuid(8b396020-69d3-451f-80c1-1a96a7da25a9)]
webidl Element;
[scriptable, builtinclass, uuid(8b396020-69d3-451f-80c1-1a96a7da25a9)]
interface nsIHTMLObjectResizer : nsISupports
{
%{C++
@ -25,7 +26,7 @@ interface nsIHTMLObjectResizer : nsISupports
/**
* the element currently displaying resizers
*/
readonly attribute nsIDOMElement resizedObject;
readonly attribute Element resizedObject;
/**
* a boolean indicating if object resizing is enabled in the editor
@ -36,7 +37,7 @@ interface nsIHTMLObjectResizer : nsISupports
* Shows active resizers around an element's frame
* @param aResizedElement [IN] a DOM Element
*/
void showResizers(in nsIDOMElement aResizedElement);
void showResizers(in Element aResizedElement);
/**
* Hide resizers if they are visible