superreview granted: [Bug 306974] Remove some duplicate event dispatching code : [Attachment 198713] + comments

Peter Van der Beken <peterv@propagandism.org> has granted Smaug
<smaug@welho.com>'s request for superreview:
Bug 306974: Remove some duplicate event dispatching code
https://bugzilla.mozilla.org/show_bug.cgi?id=306974

Attachment 198713: + comments
https://bugzilla.mozilla.org/attachment.cgi?id=198713&action=edit

------- Additional Comments from Peter Van der Beken <peterv@propagandism.org>
> Index: content/base/public/nsContentUtils.h
> ===================================================================

> +   * Works only with events, which can be created by calling

Nit: drop the comma after events

> Index: content/base/src/nsContentUtils.cpp
> ===================================================================

> +nsresult
> +nsContentUtils::DispatchTrustedEvent(nsIDocument* aDoc, nsISupports*
aTarget,
> +					const nsAString& aEventName,
> +					PRBool aCanBubble, PRBool aCancelable,
> +					PRBool *aDefaultAction)

> +  nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event));
> +  NS_ENSURE_STATE(privateEvent);

Nit: I'd use NS_ENSURE_TRUE, it's not really ensuring some state

> Index: content/html/content/src/nsHTMLLinkElement.cpp
> ===================================================================

> +  nsContentUtils::DispatchTrustedEvent(aDoc,
> +					  NS_STATIC_CAST(nsIDOMNode*, this),

Nit: I'd prefer if you used the right class (nsIContent) to cast to
nsISupports, here and in the other element classes.

> Index: layout/generic/nsObjectFrame.cpp
> ===================================================================

>  static void
>  FirePluginNotFoundEvent(nsIContent *aTarget)
>  {
> -  nsCOMPtr<nsIDOMDocumentEvent> eventDoc =
> -    do_QueryInterface(aTarget->GetDocument());

> +  nsContentUtils::DispatchTrustedEvent(aTarget->GetCurrentDoc(), aTarget,

Are you sure this should be GetCurrentDoc? If not, keep using GetDocument.

Nit: take care of long lines:
http://lab.cph.novell.com/~abeaufour/jst-review/?patch=198713
0
bugzilla
10/10/2005 11:28:39 AM
netscape.mozilla.reviewers 29156 articles. 0 followers. Follow

0 Replies
267 Views

Similar Articles

[PageSpeed] 39

Reply:

Similar Artilces:

superreview requested: [Bug 306974] Remove some duplicate event dispatching code : [Attachment 198713] + comments
Smaug <smaug@welho.com> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 306974: Remove some duplicate event dispatching code https://bugzilla.mozilla.org/show_bug.cgi?id=306974 Attachment 198713: + comments https://bugzilla.mozilla.org/attachment.cgi?id=198713&action=edit ...

superreview granted: [Bug 328907] Remove selectHas(No)Groups events : [Attachment 240840] Remove event dispatching and add a comment to the select.xml
Jonas Sicking <bugmail@sicking.cc> has granted Smaug <Olli.Pettay@gmail.com>'s request for superreview: Bug 328907: Remove selectHas(No)Groups events https://bugzilla.mozilla.org/show_bug.cgi?id=328907 Attachment 240840: Remove event dispatching and add a comment to the select.xml https://bugzilla.mozilla.org/attachment.cgi?id=240840&action=edit ...

superreview granted: [Bug 239953] Remove duplicated code in nsContentUtils : [Attachment 145654] Remove duplicated code.
Peter Van der Beken <peterv@propagandism.org> has granted Johnny Stenback <jst@mozilla.jstenback.com>'s request for superreview: Bug 239953: Remove duplicated code in nsContentUtils http://bugzilla.mozilla.org/show_bug.cgi?id=239953 Attachment 145654: Remove duplicated code. http://bugzilla.mozilla.org/attachment.cgi?id=145654&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> I'm assuming the differences between nsJSUtils::GetStaticScriptGlobal and nsContentUtils::GetStaticScriptGlobal don't matter. ...

superreview requested: [Bug 328907] Remove selectHas(No)Groups events : [Attachment 240840] Remove event dispatching and add a comment to the select.xml
Smaug <Olli.Pettay@gmail.com> has asked Jonas Sicking <bugmail@sicking.cc> for superreview: Bug 328907: Remove selectHas(No)Groups events https://bugzilla.mozilla.org/show_bug.cgi?id=328907 Attachment 240840: Remove event dispatching and add a comment to the select.xml https://bugzilla.mozilla.org/attachment.cgi?id=240840&action=edit ...

superreview granted: [Bug 351443] Remove unused code from mozilla/security/nss/lib/jar : [Attachment 236819] Patch to remove unused code
Alexei Volkov <alexei.volkov.bugs@sun.com> has granted Ehsan Akhgari <ehsan.akhgari@gmail.com>'s request for superreview: Bug 351443: Remove unused code from mozilla/security/nss/lib/jar https://bugzilla.mozilla.org/show_bug.cgi?id=351443 Attachment 236819: Patch to remove unused code https://bugzilla.mozilla.org/attachment.cgi?id=236819&action=edit ...

superreview requested: [Bug 239953] Remove duplicated code in nsContentUtils : [Attachment 145654] Remove duplicated code.
Johnny Stenback <jst@mozilla.jstenback.com> has asked Peter Van der Beken <peterv@propagandism.org> for superreview: Bug 239953: Remove duplicated code in nsContentUtils http://bugzilla.mozilla.org/show_bug.cgi?id=239953 Attachment 145654: Remove duplicated code. http://bugzilla.mozilla.org/attachment.cgi?id=145654&action=edit ...

superreview granted: [Bug 287713] Remove hard-coded "Mozilla" in Help .rdf files : [Attachment 178592] New version with fixed comments
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Stefan <stefan_h@hem.utfors.se>'s request for superreview: Bug 287713: Remove hard-coded "Mozilla" in Help .rdf files https://bugzilla.mozilla.org/show_bug.cgi?id=287713 Attachment 178592: New version with fixed comments https://bugzilla.mozilla.org/attachment.cgi?id=178592&action=edit ...

superreview granted: [Bug 281744] Remove dead code and silly plugin code : [Attachment 173910] Remove silly code
Peter Van der Beken <peterv@propagandism.org> has granted Johnny Stenback <jst@mozilla.org>'s request for superreview: Bug 281744: Remove dead code and silly plugin code https://bugzilla.mozilla.org/show_bug.cgi?id=281744 Attachment 173910: Remove silly code https://bugzilla.mozilla.org/attachment.cgi?id=173910&action=edit ...

superreview granted: [Bug 329122] Event dispatching code in nsGenericDOMDataNode doesn't handle event retargeting : [Attachment 222357] nsDOMSlots -> nsDataSlots
Boris Zbarsky (gone May 17 -- May 29) <bzbarsky@mit.edu> has granted Smaug <Olli.Pettay@gmail.com>'s request for superreview: Bug 329122: Event dispatching code in nsGenericDOMDataNode doesn't handle event retargeting https://bugzilla.mozilla.org/show_bug.cgi?id=329122 Attachment 222357: nsDOMSlots -> nsDataSlots https://bugzilla.mozilla.org/attachment.cgi?id=222357&action=edit ------- Additional Comments from Boris Zbarsky (gone May 17 -- May 29) <bzbarsky@mit.edu> >Index: src/nsGenericDOMDataNode.cpp > nsGenericDOMDataNode::GetChildNodes(n...

superreview granted: [Bug 351510] Remove USE_MOZ_THREAD code from mozilla/security/lib/jar : [Attachment 237308] Remove usage of USE_MOZ_THREAD and correct manifest.mn (revised)
Alexei Volkov <alexei.volkov.bugs@sun.com> has granted Ehsan Akhgari <ehsan.akhgari@gmail.com>'s request for superreview: Bug 351510: Remove USE_MOZ_THREAD code from mozilla/security/lib/jar https://bugzilla.mozilla.org/show_bug.cgi?id=351510 Attachment 237308: Remove usage of USE_MOZ_THREAD and correct manifest.mn (revised) https://bugzilla.mozilla.org/attachment.cgi?id=237308&action=edit ...

superreview granted: [Bug 242212] Remove useless nsISecurityCheckedComponent code from nsXULTemplateBuilder : [Attachment 147401] remove code
Mike Shaver <shaver@mozilla.org> has granted timeless@myrealbox.com (working) <timeless@bemail.org>'s request for superreview: Bug 242212: Remove useless nsISecurityCheckedComponent code from nsXULTemplateBuilder http://bugzilla.mozilla.org/show_bug.cgi?id=242212 Attachment 147401: remove code http://bugzilla.mozilla.org/attachment.cgi?id=147401&action=edit ------- Additional Comments from Mike Shaver <shaver@mozilla.org> sr=shaver. ...

superreview granted: [Bug 357530] Remove dead code from DraggableImageAndTextCell : [Attachment 243037] removes dead code
Simon Fraser <sfraser_bugs@smfr.org> has granted Stuart Morgan <stuart.morgan@alumni.case.edu>'s request for superreview: Bug 357530: Remove dead code from DraggableImageAndTextCell https://bugzilla.mozilla.org/show_bug.cgi?id=357530 Attachment 243037: removes dead code https://bugzilla.mozilla.org/attachment.cgi?id=243037&action=edit ...

superreview granted: [Bug 315654] reduce duplicated code in nsImapService.cpp : [Attachment 202337] reduce duplicated code
Scott MacGregor <mscott@mozilla.org> has granted David Bienvenu <bienvenu@nventure.com>'s request for superreview: Bug 315654: reduce duplicated code in nsImapService.cpp https://bugzilla.mozilla.org/show_bug.cgi?id=315654 Attachment 202337: reduce duplicated code https://bugzilla.mozilla.org/attachment.cgi?id=202337&action=edit ...

superreview requested: [Bug 308495] cvs remove mozilla/rdf/opendir : [Attachment 196143] dummy attachement for code removal
Axel Hecht <axel@pike.org> has asked Mike Shaver <shaver@mozilla.org> for superreview: Bug 308495: cvs remove mozilla/rdf/opendir https://bugzilla.mozilla.org/show_bug.cgi?id=308495 Attachment 196143: dummy attachement for code removal https://bugzilla.mozilla.org/attachment.cgi?id=196143&action=edit ------- Additional Comments from Axel Hecht <axel@pike.org> Benjamin wants attachements in his queue, and thanks to chatzilla, we do have something appropriate to attach. ...

Web resources about - superreview granted: [Bug 306974] Remove some duplicate event dispatching code : [Attachment 198713] + comments - netscape.mozilla.reviewers

Biz & Finance Magazines
Australian magazine subscriptions price comparison.

Ehsan Akhgari
Bugzilla is an essential tool to the working process of Mozilla, and many of us spend a good portion of their day in Bugzilla. The Bugzilla Tweaks ...

Resources last updated: 12/2/2015 7:32:28 AM