Last Comment Bug 355395 - Misspelled words in text areas cause all following text to disappear during print.
: Misspelled words in text areas cause all following text to disappear during p...
Status: RESOLVED FIXED
: relnote, verified1.8.1.1
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: 1.8 Branch
: All All
: -- minor (vote)
: ---
Assigned To: Martijn Wargers [:mwargers] (not working for Mozilla)
:
: Jet Villegas (:jet)
Mentors:
data:text/html,<textarea>this is a ts...
: 357998 358725 359941 (view as bug list)
Depends on: 361808
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-04 10:58 PDT by Darren Baker
Modified: 2007-06-12 14:35 PDT (History)
10 users (show)
mbeltzner: blocking1.8.1-
dveditz: blocking1.8.1.1+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch for disabling spellcheck inside print/printpreview (1.26 KB, patch)
2006-10-12 03:35 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
brettw: review+
Details | Diff | Splinter Review
disable selection inside print preview (609 bytes, patch)
2006-10-12 03:38 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
roc: review+
roc: superreview+
Details | Diff | Splinter Review
patchv2 (2.99 KB, patch)
2006-11-14 17:36 PST, Martijn Wargers [:mwargers] (not working for Mozilla)
roc: review+
roc: superreview+
Details | Diff | Splinter Review
patch (1.14 KB, patch)
2006-11-14 22:37 PST, Martijn Wargers [:mwargers] (not working for Mozilla)
dveditz: approval1.8.1.1+
Details | Diff | Splinter Review
branch patch (1.23 KB, patch)
2006-11-20 17:22 PST, Martijn Wargers [:mwargers] (not working for Mozilla)
roc: review+
roc: superreview+
jaymoz: approval1.8.1.1+
Details | Diff | Splinter Review

Description Darren Baker 2006-10-04 10:58:52 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20060918 Firefox/2.0

A misspelled word (underlined in red) will cause itself and all following words within a text area tag to disappear during the print. The red underlines will remain, but that is all.

Reproducible: Always

Steps to Reproduce:
1. Find a text area.
2. Enter a misspelled word.
3. Print as usual, it matters not what printer driver.
4. Shred useless hard copy.

Actual Results:  
I got confused, and thought it was something I had done.

Expected Results:  
Printed the text after the misspelled word.

about:buildconfig

Build platform
target
i586-pc-msvc

Build tools
Compiler 	Version 	Compiler flags
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TC -nologo -W3 -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 	12.00.8804 	-TP -nologo -W3 -Gy -Fd$(PDBFILE)

Configure arguments
--enable-application=browser --enable-update-channel=release --enable-official-branding --enable-optimize --disable-debug --disable-tests --enable-static --disable-shared --enable-svg --enable-canvas --enable-update-packaging
Comment 1 Adam Guthrie 2006-10-04 12:10:39 PDT
I see this on Linux, too.
Comment 2 Brett Wilson 2006-10-09 09:50:51 PDT
Nominating blocking to see what drivers think of this issue. It is probably related to bug 221023. It is likely a similar simple issue, but the code involved is complex and scary.
Comment 3 Brett Wilson 2006-10-09 10:35:36 PDT
The related bug was bug 336679, the number in comment 2 was the attachment
Comment 4 Mike Beltzner [:beltzner, not reading bugmail] 2006-10-10 10:25:55 PDT
I agree with Brett, and also don't think that this will be a common enough use case to block shipping Firefox 2. We'll relnote this, and I've nominated it for 1.8.1.1 so we can try to get it in a security and stability fixpack.
Comment 5 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-10-12 03:35:57 PDT
Created attachment 242054 [details] [diff] [review]
patch for disabling spellcheck inside print/printpreview

Since it is not working well, maybe just disable the spell-checking at all inside printing/print preview?
Comment 6 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-10-12 03:38:18 PDT
Created attachment 242055 [details] [diff] [review]
disable selection inside print preview

I also noticed that selecting something inside textarea's is possible in print preview. This patch fixes that. Not sure if it is any good.
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2006-10-14 00:07:34 PDT
+    nsCOMPtr<nsPresContext> context = presShell->GetPresContext();

This can be nsPresContext*

Instead of checking the type, just check IsDynamic().
Comment 8 Phil Ringnalda (:philor) 2006-10-30 12:17:27 PST
*** Bug 358725 has been marked as a duplicate of this bug. ***
Comment 9 Adam Guthrie 2006-11-08 14:48:09 PST
*** Bug 359941 has been marked as a duplicate of this bug. ***
Comment 10 Ari 2006-11-11 17:20:37 PST
*** Bug 357998 has been marked as a duplicate of this bug. ***
Comment 11 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-14 17:36:53 PST
Created attachment 245627 [details] [diff] [review]
patchv2

Oops, I kind of forgot about the patch.
Comment 12 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-14 17:37:37 PST
Comment on attachment 242055 [details] [diff] [review]
disable selection inside print preview

It seems to me this also makes sense, not?
Comment 13 Robert O'Callahan (:roc) (email my personal email if necessary) 2006-11-14 17:53:39 PST
Comment on attachment 245627 [details] [diff] [review]
patchv2

OK for the first hunk ... the rest is some other patch
Comment 14 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-14 22:37:08 PST
Created attachment 245638 [details] [diff] [review]
patch

Oops, yes, the rest was from some other patch, this is what I'm going to check in.
Comment 15 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-14 22:40:01 PST
Checking in nsEditor.cpp;
/cvsroot/mozilla/editor/libeditor/base/nsEditor.cpp,v  <--  nsEditor.cpp
new revision: 1.479; previous revision: 1.478
done

Checking in ua.css;
/cvsroot/mozilla/layout/style/ua.css,v  <--  ua.css
new revision: 3.228; previous revision: 3.227
done

Checked both patches in on trunk.
Comment 16 jan klopper 2006-11-15 00:43:18 PST
Great work,

Il test it asap.

Any change you could also take a look at this bug?
Im not sure but it might be your turf.
bug: 358727
Comment 17 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-15 06:19:52 PST
Comment on attachment 245638 [details] [diff] [review]
patch

I think this is safe enough that it should go on 1.8.1.1.
It fixes a nasty regression where people aren't able to print text in textareas a lot of the time.
Comment 18 Daniel Veditz [:dveditz] 2006-11-20 11:52:45 PST
Comment on attachment 245638 [details] [diff] [review]
patch

approved for 1.8 branch, a=dveditz for drivers
Comment 19 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-20 17:22:58 PST
Created attachment 246100 [details] [diff] [review]
branch patch

Sorry, I should have tested the patch on branch before asking approval1.81.
The patch gives a compile error because isdynamic() doesn't exist on branch.
So I reverted back to using:
    if (context->Type() == nsPresContext::eContext_PrintPreview ||
        context->Type() == nsPresContext::eContext_Print) {
on branch, which works fine.
Comment 20 Jay Patel [:jay] 2006-11-21 15:19:09 PST
Comment on attachment 246100 [details] [diff] [review]
branch patch

Approved for the 1.8.1 branch, a=jay for drivers.  

Martijn: Thanks for the quick updated patch, please land asap.  Thanks!
Comment 21 Martijn Wargers [:mwargers] (not working for Mozilla) 2006-11-21 15:27:15 PST
Checking in nsEditor.cpp;
/cvsroot/mozilla/editor/libeditor/base/nsEditor.cpp,v  <--  nsEditor.cpp
new revision: 1.447.4.9; previous revision: 1.447.4.8
done

Checked in on the 1.8.1 branch.
Comment 22 Marcia Knous [:marcia - use ni] 2006-12-01 11:30:41 PST
Verified using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.1pre) Gecko/20061201 BonEcho/2.0.0.1pre. I verified using the original STR. My printed page shows all the text. Adding keyword.
Comment 23 juan becerra [:juanb] 2007-06-12 14:35:36 PDT
Re-verified on Vista, XP, Mac, Linux Fx 2.0.0.4. Pages with spell checked fields print correctly.

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