Remove nsIDOMHTMLFrameElement

RESOLVED FIXED in Firefox 58

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: qdot, Assigned: qdot)

Tracking

(Blocks 1 bug)

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

Continuing removal of XPCOM DOM HTML Element interfaces.
No longer blocks: 1387169
Comment on attachment 8914456 [details]
Bug 1404079 - Remove nsIDOMHTMLFrameElement;

https://reviewboard.mozilla.org/r/185796/#review191634

r=me with the nits below

::: layout/generic/nsSubDocumentFrame.cpp:118
(Diff revision 2)
>                           nsIFrame*         aPrevInFlow)
>  {
> +  MOZ_ASSERT(aContent);
>    // determine if we are a <frame> or <iframe>
> -  nsCOMPtr<nsIDOMHTMLFrameElement> frameElem = do_QueryInterface(aContent);
> +  RefPtr<HTMLFrameElement> frameElem = HTMLFrameElement::FromContent(aContent);
>    mIsInline = frameElem ? false : true;

I know this was already here, but frameElem is actually unused.  So you could nix it altogether, and do:

    mIsInline = !aContent->IsHTMLElement(nsGkAtoms::frame);
    
or so.

::: layout/generic/nsSubDocumentFrame.cpp:288
(Diff revision 2)
>      // code used to do.
>      return ScreenIntSize(10, 10);
>    } else {
>      nsSize docSizeAppUnits;
>      nsPresContext* presContext = PresContext();
> -    nsCOMPtr<nsIDOMHTMLFrameElement> frameElem =
> +    RefPtr<HTMLFrameElement> frameElem =

GetContent can't be null here.  Also, frameElem is again unused, so you can just do an IsHTMLElement() check.

::: layout/printing/nsPrintEngine.cpp:1381
(Diff revision 2)
>  
>        // XXX If a subdocument has no onscreen presentation, there will be no PO
>        //     This is even if there should be a print presentation
>        if (po) {
>  
> -        nsCOMPtr<nsIDOMHTMLFrameElement> frame(do_QueryInterface(aContent));
> +        RefPtr<dom::HTMLFrameElement> frame = dom::HTMLFrameElement::FromContent(aContent);

"frame" is also unused; can use IsHTMLElement(nsGkAtoms::frame) here.
Attachment #8914456 - Flags: review?(bzbarsky) → review+
Pushed by kmachulis@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7a0d51bfe126
Remove nsIDOMHTMLFrameElement; r=bz
https://hg.mozilla.org/mozilla-central/rev/7a0d51bfe126
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.