Closed Bug 574430 Opened 15 years ago Closed 15 years ago

nsHTMLDocument.cpp:3032: warning: ‘visibility’ attribute ignored

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

References

()

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

When we declare classes inside of functions and include NS_IMETHOD declarations, like so... > 3015 nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement, > 3016 PRInt32 aChange) > 3017 { > 3018 NS_ASSERTION(mContentEditableCount + aChange >= 0, > 3019 "Trying to decrement too much."); [...] > 3023 class DeferredContentEditableCountChangeEvent : public nsRunnable > 3024 { [...] > 3032 NS_IMETHOD Run() { > 3033 if (mElement->GetOwnerDoc() == mDoc) { > 3034 mDoc->DeferredContentEditableCountChange(mElement); > 3035 } > 3036 return NS_OK; > 3037 } ... we trigger this build warning: > content/html/content/src/nsTextEditorState.cpp:1043: warning: ‘visibility’ attribute ignored > content/html/document/src/nsHTMLDocument.cpp:3032: warning: ‘visibility’ attribute ignored The two lines above are actually the only instances of this warning that we have (based on the debug build log linked in URL field). There's an easy fix -- we can just move the class declaration outside the function that it currently lives in (e.g. move it to just before the function).
Blocks: 534785
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #453821 - Flags: review?(jst)
Or remove the useless visibility cruft from NS_IMETHOD?
Or that, if it is actually useless cruft. (I assumed it was there for a reason.)
Attachment #453821 - Flags: review?(jst) → review+
Landed the attached + reviewed patch for now. http://hg.mozilla.org/mozilla-central/rev/4c1d08c315d1 Perhaps we can tweak NS_IMETHOD in a separate bug per comment 2, but I'm hesitant to do that here, because it'd be a wider-reaching change & I'm assuming the visibility stuff still has some useful effects somewhere.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: