Last Comment Bug 722412 - Cleanup nsPlaintextEditor::SetDocumentCharacterSet
: Cleanup nsPlaintextEditor::SetDocumentCharacterSet
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla13
Assigned To: :Ms2ger
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-30 11:50 PST by :Ms2ger
Modified: 2012-02-01 05:46 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (8.65 KB, patch)
2012-01-30 11:50 PST, :Ms2ger
ehsan: review+
Details | Diff | Review

Description :Ms2ger 2012-01-30 11:50:19 PST
Created attachment 592805 [details] [diff] [review]
Patch v1
Comment 1 :Ehsan Akhgari (out sick) 2012-01-30 13:01:36 PST
Comment on attachment 592805 [details] [diff] [review]
Patch v1

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

::: editor/libeditor/text/nsPlaintextEditor.cpp
@@ +238,5 @@
> +  // update META charset tag
> +  nsCOMPtr<nsIDOMDocument> domdoc;
> +  rv = GetDocument(getter_AddRefs(domdoc));
> +  NS_ENSURE_SUCCESS(rv, rv);
> +  NS_ENSURE_TRUE(domdoc, NS_OK);

NS_ERROR_FAILURE.

@@ +293,3 @@
>  
> +  PRUint32 listLength = 0;
> +  (void) metaList->GetLength(&listLength);

Drop the unneeded cast please.

::: editor/libeditor/text/nsPlaintextEditor.h
@@ +107,5 @@
>    NS_IMETHOD SetDocumentCharacterSet(const nsACString & characterSet);
>  
> +private:
> +  bool UpdateMetaCharset(nsIDOMDocument* aDocument,
> +                         const nsACString& aCharacterSet);

Nit: move this to the end of the public section please.

Note You need to log in before you can comment on or make changes to this bug.