Closed Bug 551390 Opened 14 years ago Closed 13 years ago

Dead code in content

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: ehren.m, Assigned: ehren.m)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
These functions are unused: 

in content/base:

PRBool nsParserUtils::GetQuotedAttrNameAt(const nsString&,PRUint32,nsAString_internal&)
http://mxr.mozilla.org/mozilla-central/search?string=GetQuotedAttrNameAt

nsIContent* nsContentUtils::FindFirstChildWithResolvedTag(nsIContent*,PRInt32,nsIAtom*)
http://mxr.mozilla.org/mozilla-central/search?string=FindFirstChildWithResolvedTag

nsIDocShell* nsContentUtils::GetDocShellFromCaller()
http://mxr.mozilla.org/mozilla/search?string=GetDocShellFromCaller

nsIContent* nsContentUtils::GetReferencedElement(nsIURI*,nsIContent*)
http://mxr.mozilla.org/mozilla-central/search?string=GetReferencedElement

void nsXMLNameSpaceMap::RemovePrefix(nsIAtom*)
http://mxr.mozilla.org/mozilla-central/search?string=RemovePrefix

content/html:

void nsGenericHTMLElement::GetHrefURIToMutate(nsIURI**)
http://mxr.mozilla.org/mozilla-central/search?string=GetHrefURIToMutate

nsresult nsGenericHTMLElement::SetFloatAttr(nsIAtom*,float)
http://mxr.mozilla.org/mozilla-central/search?string=SetFloatAttr

nsresult nsGenericHTMLElement::GetFloatAttr(nsIAtom*,float,float*)
http://mxr.mozilla.org/mozilla-central/search?string=GetFloatAttr

nsresult nsHTMLDNSPrefetch::PrefetchHigh(nsAString_internal&)
nsresult nsHTMLDNSPrefetch::PrefetchHigh(Link*)
http://mxr.mozilla.org/mozilla-central/search?string=PrefetchHigh

nsresult nsHTMLDNSPrefetch::PrefetchMedium(nsAString_internal&)
nsresult nsHTMLDNSPrefetch::PrefetchMedium(Link*)
http://mxr.mozilla.org/mozilla-central/search?string=PrefetchMedium

PRBool SinkContext::IsAncestorContainer(nsHTMLTag)
http://mxr.mozilla.org/mozilla-central/search?string=IsAncestorContainer

nsresult nsHTMLFragmentContentSink::AddTextToContent(nsIContent*,const nsAString_internal&)
http://mxr.mozilla.org/mozilla-central/search?string=AddTextToContent

content/media:

nsresult nsMediaCacheStream::ReadFromCache(char*,PRInt64,PRInt64)
http://mxr.mozilla.org/mozilla-central/search?string=ReadFromCache
Attachment #431560 - Flags: review?(bzbarsky)
Blocks: deadcode
The content/base list of things removed looks ok to me, though sicking is a better reviewer I think.

GetHrefURIToMutate can go.  But then you should be able to remove the aCloneIfCached argument of GetURIAttr too, right?

>nsresult nsGenericHTMLElement::SetFloatAttr(nsIAtom*,float)
>http://mxr.mozilla.org/mozilla-central/search?string=SetFloatAttr
>
>nsresult nsGenericHTMLElement::GetFloatAttr(nsIAtom*,float,float*)
>http://mxr.mozilla.org/mozilla-central/search?string=GetFloatAttr

Not sure whether we'll need these for upcoming html5 stuff.

> nsresult nsHTMLDNSPrefetch::PrefetchHigh(nsAString_internal&)
> nsresult nsHTMLDNSPrefetch::PrefetchHigh(Link*)
> http://mxr.mozilla.org/mozilla-central/search?string=PrefetchHigh

> nsresult nsHTMLDNSPrefetch::PrefetchMedium(nsAString_internal&)
> nsresult nsHTMLDNSPrefetch::PrefetchMedium(Link*)
> http://mxr.mozilla.org/mozilla-central/search?string=PrefetchMedium

These were meant as forward-looking API, in case someone needs them.

> nsresult nsMediaCacheStream::ReadFromCache(char*,PRInt64,PRInt64)
> http://mxr.mozilla.org/mozilla-central/search?string=ReadFromCache

This needs review from roc.
Attachment #431560 - Flags: review?(roc)
Attachment #431560 - Flags: review?(jonas)
Attachment #431560 - Flags: review?(bzbarsky)
Awesome to see dead code bugs being filed!
Attached patch patch v2 (obsolete) — Splinter Review
Sorry this took so long... 

I put back Prefetch* and *FloatAttr. Also I wonder if I can sneak in nsresult nsPlainTextSerializer::WillProcessTokens() : http://mxr.mozilla.org/mozilla-central/search?string=WillProcessTokens (It looks like it implements an interface method that was removed at some point)
Attachment #436403 - Flags: review?(jonas)
I also removed aCloneIfCached from GetURIAttr. Should probably try a build with -Wunusedparams ...
Ehren, is there anything left to do before this can land?
oops, sry for the epic delay.

Here's the rebased patch. Unfortunately/Fortunately nsMediaStream::ReadFromCache now has users so I had to take that out of the patch. The rest passed a minimal try server run though so I'll just carry over the r=sicking,roc
Attachment #431560 - Attachment is obsolete: true
Attachment #436403 - Attachment is obsolete: true
Attachment #532600 - Flags: review+
Keywords: checkin-needed
Status: NEW → ASSIGNED
Keywords: checkin-needed
OS: Linux → All
Hardware: x86 → All
Whiteboard: [fixed in cedar]
Version: unspecified → Trunk
Pushed:
http://hg.mozilla.org/mozilla-central/rev/a968d7ebe290

Thank you for your contribution :)
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Component: HTML: Parser → DOM
Flags: in-testsuite-
QA Contact: parser → general
Resolution: --- → FIXED
Whiteboard: [fixed in cedar]
Target Milestone: --- → mozilla6
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: