The default bug view has changed. See this FAQ.

parser should use mozilla::Preferences

RESOLVED FIXED in mozilla7

Status

()

Core
HTML: Parser
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

6 years ago
Created attachment 536257 [details] [diff] [review]
Patch v1.0
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+
(Assignee)

Comment 2

6 years ago
Created attachment 536475 [details] [diff] [review]
Patch v1.1

Roc:

Absolutely.
Attachment #536257 - Attachment is obsolete: true
Attachment #536475 - Flags: review?(mrbkap)

Updated

6 years ago
Attachment #536475 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/mozilla-central/rev/a4107cfe6b21
Status: ASSIGNED → RESOLVED
Last Resolved: 6 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.
(Assignee)

Comment 5

6 years ago
(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.
(Assignee)

Comment 6

6 years ago
Created attachment 538151 [details] [diff] [review]
remove unnecessary code

followup patch for comment 4. the initialized values are always overwritten.
Attachment #538151 - Flags: review?(mrbkap)
(Assignee)

Comment 7

6 years ago
Created attachment 538152 [details] [diff] [review]
remove unnecessary code

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+
(Assignee)

Comment 9

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/bf50cdd9ba99
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.