The default bug view has changed. See this FAQ.

Use Element* for nsIDocument::{SetSubDocumentFor,FindContentForSubDocument}

RESOLVED FIXED in mozilla10

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla10
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 561807 [details] [diff] [review]
Patch v1
Attachment #561807 - Flags: review?(peterv)
Flags: in-testsuite-
I have to ask... why do we have this at all?  Can we just have nsIDocument hold a ref to its relevant frame element, if any?

Updated

6 years ago
Blocks: 690372
peterv: ping?
Comment on attachment 561807 [details] [diff] [review]
Patch v1

Review of attachment 561807 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/public/nsIDocument.h
@@ +516,5 @@
>  
>    /**
>     * Get the sub document for aContent
>     */
> +  virtual nsIDocument *GetSubDocumentFor(nsIContent* aContent) const = 0;

I dislike formatting-only changes like this. (And shouldn't you have changed the |nsIDocument *|?)

@@ +521,5 @@
>  
>    /**
>     * Find the content node for which aDocument is a sub document.
>     */
> +  virtual Element* FindContentForSubDocument(nsIDocument *aDocument) const = 0;

And I especially don't understand why you'd not do the formatting change here.

::: content/base/src/nsDocument.cpp
@@ +3272,5 @@
>      const_cast<SubDocMapEntry *>
>                (static_cast<const SubDocMapEntry *>(entry));
>  
> +  e->mKey = const_cast<Element*>
> +                      (static_cast<const Element*>(key));

Rewrap.
Attachment #561807 - Flags: review?(peterv) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/df4b49fffc78
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.