Closed
Bug 189295
Opened 22 years ago
Closed 22 years ago
nsTextFrame.cpp: The variable isWhitespace has not yet been assigned a value.
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.3beta
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
()
Details
Attachments
(1 file)
1.02 KB,
patch
|
rbs
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
While compiling 2003-01-15-08-trunk on Solaris/SPARC I saw the following
compiler warning in the log:
-- snip --
...
"../../../../../../../../../home/mozilla/src/2003-01-15-08-trunk/mozilla/layout/html/base/src/nsTextFrame.cpp",
line 4845: Warning:
The variable isWhitespace has not yet been assigned a value.
1 Warning(s) detected.
-- snip --
Looking at the matching code:
-- snip --
4842 }
4843 }
4844 #endif // IBMBIDI
4845 // Get next word/whitespace from the text
4846 PRBool isWhitespace, wasTransformed;
4847 PRInt32 wordLen, contentLen;
4848 union {
4849 char* bp1;
4850 PRUnichar* bp2;
4851 };
4852 #ifdef IBMBIDI
4853 wordLen = start;
4854 #endif // IBMBIDI
4855
4856 // We need to set aTextData.mCanBreakBefore to true after 1st word. But
we can't set
4857 // aTextData.mCanBreakBefore without seeing the 2nd word. That's
because this frame
4858 // may only contain part of one word, the other part is in next frame.
4859 // we don't care if first word is whitespace, that will be addressed
later.
4860 if (!aTextData.mCanBreakBefore && !firstThing && !isWhitespace) {
4861 firstWordDone = PR_TRUE;
4862 }
4863
4864 bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen,
&isWhitespace,
4865 &wasTransformed, textRun.mNumSegments == 0);
4866 #ifdef IBMBIDI
4867 if (nextBidi) {
4868 mContentLength -= contentLen;
4869
-- snip --
... this can't be correct - |isWhitespace| is a random value from stack in this
case...;-(
Assignee | ||
Comment 1•22 years ago
|
||
CC:'ing some people per CVSblame...
Comment 2•22 years ago
|
||
Yeah, that looks totally wrong.
Shouldn't that check come after the
bp2 = aTx.GetNextWord(aTextData.mInWord, &wordLen, &contentLen, &isWhitespace,
&wasTransformed, textRun.mNumSegments == 0);
call?
Assignee: misc → shanjian
Flags: blocking1.3b?
Not essential for 1.3beta. I agree with boris, just move the check. Roland, if
you make the patch I'll review it for you.
Flags: blocking1.3b? → blocking1.3b-
Assignee | ||
Comment 4•22 years ago
|
||
Taking... suffering is all mine... ;-/
Assignee: shanjian → Roland.Mainz
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.3beta
Assignee | ||
Comment 5•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #113447 -
Flags: superreview?(roc+moz)
Attachment #113447 -
Flags: review?(smontagu)
Comment 6•22 years ago
|
||
Comment on attachment 113447 [details] [diff] [review]
Patch for 2003-01-20-08-trunk
I would be much happier if shanjian could sign off on this change.
Attachment #113447 -
Flags: review?(smontagu) → review?(shanjian)
Attachment #113447 -
Flags: superreview?(roc+moz) → superreview+
Assignee | ||
Comment 7•22 years ago
|
||
Comment on attachment 113447 [details] [diff] [review]
Patch for 2003-01-20-08-trunk
Moving r=-request over to rbs@maths.uq.edu.au per discussion with smontagu...
Attachment #113447 -
Flags: review?(shanjian) → review?(rbs)
Attachment #113447 -
Flags: review?(rbs) → review+
Assignee | ||
Comment 8•22 years ago
|
||
Patch checked-in by timeless
(http://bonsai.mozilla.org/cvsquery.cgi?module=MozillaTinderboxAll&branch=HEAD&cvsroot=/cvsroot&date=explicit&mindate=1046025480&maxdate=1046025720&who=timeless%25mozdev.org),
marking bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•22 years ago
|
||
Comment on attachment 113447 [details] [diff] [review]
Patch for 2003-01-20-08-trunk
Requesting a= for 1.3final branch.
The patch is pretty much low-risk since the previous behaviour was "random"
(based on use of an uninitalised variable), now we (at least) use a initalised
value, e.g. we can't do things much wrong.
And the patch seems to fix the issue that sometimes whitespaces are missing and
textisrenderedwithoutspacesmakingtexthardtoread... :)
Attachment #113447 -
Flags: approval1.3?
Assignee | ||
Updated•22 years ago
|
Keywords: mozilla1.3
Comment 10•22 years ago
|
||
Comment on attachment 113447 [details] [diff] [review]
Patch for 2003-01-20-08-trunk
1.3.1 is done. this didn't make it.
Attachment #113447 -
Flags: approval1.3?
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•