Closed Bug 660771 Opened 13 years ago Closed 13 years ago

parser should use mozilla::Preferences

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla7

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

(Whiteboard: [inbound] (part.2 only, part.1 has been in m-c))

Attachments

(2 files, 2 obsolete files)

Attached patch Patch v1.0 (obsolete) (deleted) — Splinter Review
No description provided.
Attachment #536257 - Flags: review?(roc)
Comment on attachment 536257 [details] [diff] [review] Patch v1.0 Review of attachment 536257 [details] [diff] [review]: ----------------------------------------------------------------- r+ with that fixed ::: parser/htmlparser/src/nsViewSourceHTML.cpp @@ +204,2 @@ > > + mWrapLongLines = Preferences::GetBool("view_source.wrap_long_lines", PR_TRUE); default should be PR_FALSE
Attachment #536257 - Flags: review?(roc) → review+
Attached patch Patch v1.1 (deleted) — Splinter Review
Roc: Absolutely.
Attachment #536257 - Attachment is obsolete: true
Attachment #536475 - Flags: review?(mrbkap)
Attachment #536475 - Flags: review?(mrbkap) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
(In reply to comment #3) > http://hg.mozilla.org/mozilla-central/rev/a4107cfe6b21 1.50 CViewSourceHTML::CViewSourceHTML() 1.51 { 1.52 mSyntaxHighlight = PR_FALSE; 1.53 mWrapLongLines = PR_FALSE; 1.54 mTabSize = -1; There is no need to set initial values anymore. Just out of curiosity, the default value of mSyntaxHighlight should be PR_FALSE or PR_TRUE? In original code, the value is PR_FALSE if failing to get nsIPrefBranch but the value is PR_TRUE if GetBoolPref is failed.
(In reply to comment #4) > (In reply to comment #3) > > http://hg.mozilla.org/mozilla-central/rev/a4107cfe6b21 > > 1.50 CViewSourceHTML::CViewSourceHTML() > 1.51 { > 1.52 mSyntaxHighlight = PR_FALSE; > 1.53 mWrapLongLines = PR_FALSE; > 1.54 mTabSize = -1; > > There is no need to set initial values anymore. > > Just out of curiosity, the default value of mSyntaxHighlight should be > PR_FALSE or PR_TRUE? In original code, the value is PR_FALSE if failing to > get nsIPrefBranch but the value is PR_TRUE if GetBoolPref is failed. I guess that it should be PR_TRUE because prefBranch is never NULL until shutting down.
Attached patch remove unnecessary code (obsolete) (deleted) — Splinter Review
followup patch for comment 4. the initialized values are always overwritten.
Attachment #538151 - Flags: review?(mrbkap)
Attached patch remove unnecessary code (deleted) — Splinter Review
oops, removed also mTabSize.
Attachment #538151 - Attachment is obsolete: true
Attachment #538151 - Flags: review?(mrbkap)
Attachment #538152 - Flags: review?(mrbkap)
Comment on attachment 538152 [details] [diff] [review] remove unnecessary code Review of attachment 538152 [details] [diff] [review]: -----------------------------------------------------------------
Attachment #538152 - Flags: review?(mrbkap) → review+
Whiteboard: [inbound] (part.2 only, part.1 has been in m-c)
"remove unnecessary code" merged from m-i to m-c: http://hg.mozilla.org/mozilla-central/rev/bf50cdd9ba99
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: