40 Commits

Author SHA1 Message Date
rickg%netscape.com
a01e50e17f 2nd half of parser wip; lots of bugs; r=harishd
git-svn-id: svn://10.0.0.236/trunk@53451 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-14 06:23:11 +00:00
harishd%netscape.com
1e6fe5a7f5 This checkin contains combined work of rickg and harishd
Harishd's Changes:
 Fix for bugs
 2749    - Tweaked strict comment handling, i.e., <!------> is now treated as an illegal comment in strict mode
16934   - Rectifed reporting of JS line error when a newline is found within a tag.
15204   - Made TEXTAREA content to reflect the source document.
11979, 16826  - Stoping the parser properly on receiving the stop-error message.
17594   - Added code to parse <!DOCTYPE> content correctly.
17496   - Building up the stack for orphaned OPTIONs

r=rickg

Rickg's Changes:
  rickg will be posting comments on his changes by 11/12/99.

r=harishd


git-svn-id: svn://10.0.0.236/trunk@53402 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-13 03:53:11 +00:00
akkana%netscape.com
5ede0750c6 Backing out previous change -- it didn't do as much as I'd hoped
git-svn-id: svn://10.0.0.236/trunk@53273 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 22:45:32 +00:00
akkana%netscape.com
f5c24f5975 18576: improve wrapping of plaintext replies
git-svn-id: svn://10.0.0.236/trunk@53263 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-11 22:24:34 +00:00
akkana%netscape.com
6f4b49e030 17564, 17871, 17883, 18249, 13753,
18012, 16800, maybe 17565 and 13278:
Integrate contributions from Ben Bucksch (mozilla@bucksch.org)
and Daniel Brattell (bratell@lysator.liu.se) to improve formatted
plaintext output, including adding text style indicators, improving
table output and wrapping, and fixing several wrapping/whitespace bugs.
Also update the auto tests to reflect some of the bugs recently fixed.
  r=myself,mozilla@bucksch.org,bratell@lysator.liu.se


git-svn-id: svn://10.0.0.236/trunk@53104 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-10 23:50:45 +00:00
dmose%mozilla.org
0efb7c174c updated xPL license boilerplate to v1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52910 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 03:43:54 +00:00
akkana%netscape.com
ec594ff4cd Contribution by Daniel Bratell <bratell@lysator.liu.se> to implement
format=flowed for mail plaintext output.  Restructures the plaintext
output wrapping code, wholly or partially fixes numerous bugs in plaintext
output (13278, 13442, 17823, 17824, 13753, 12551), makes the automated
tests work on Windows and adds some new automated tests. r=akkana.


git-svn-id: svn://10.0.0.236/trunk@52653 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 02:44:44 +00:00
akkana%netscape.com
49f4e5d7aa 16726: don't print the doctype information in plaintext output. r=cmanske
git-svn-id: svn://10.0.0.236/trunk@51305 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-20 22:27:14 +00:00
akkana%netscape.com
bc8b6d116e 13750,13753,14075,15293,13873,12551:
- Rewrite wrapping logic for plaintext output sink,
  and run all output through the wrapping/formatting Write method
  (which now has logic to determine when we should be wrapping).
- Handle blockquote type=cite mail quotes.
- Write several new regression tests for plaintext output bugs,
  and include those tests and their expected output into the
  automated output test.
r=sfraser,harishd


git-svn-id: svn://10.0.0.236/trunk@50072 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-07 01:10:32 +00:00
vidur%netscape.com
30b1f0a71b Converted parser into a module. NS_NewFoo routines are temporarily inlined to call component manager. Introduced nsIParserService for temporary replacement of nsHTMLTags and nsHTMLEntities static methods. RickG to do complete review.
git-svn-id: svn://10.0.0.236/trunk@49499 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-30 22:01:48 +00:00
akkana%netscape.com
1afad03102 Lots of wrapping and whitespace fixes
git-svn-id: svn://10.0.0.236/trunk@49319 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-29 20:17:07 +00:00
akkana%netscape.com
9678ef579b Fix sink stream so that it works when parsing from html as well as from XIF
git-svn-id: svn://10.0.0.236/trunk@48387 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-20 21:05:47 +00:00
mcafee%netscape.com
26d1fb813f Tweaking pinkerton's switch to nsAutoString to avoid crashing! (13598)
git-svn-id: svn://10.0.0.236/trunk@46941 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-11 07:56:08 +00:00
pinkerton%netscape.com
87dacbb1ba getting rid of new/delete pairs for string buffers. using nsAutoSTring and CBufDescriptor where appropriate.
git-svn-id: svn://10.0.0.236/trunk@46880 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-10 23:19:44 +00:00
akkana%netscape.com
50425a2e16 12018: add a linebreak for br tags even in unformatted mode
git-svn-id: svn://10.0.0.236/trunk@45561 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-01 23:37:36 +00:00
akkana%netscape.com
131d318ad4 Revise the doc encoder and content sink APIs yet again to make it easier
to add new flags (pass a flag in the constructor, rather than specific
booleans.  This in order to fix:
11249: Add flag to write only the body in html output.


git-svn-id: svn://10.0.0.236/trunk@44308 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-24 18:30:19 +00:00
nisheeth%netscape.com
4aa16e828e Adding a new parameter, aMode, to nsIContentSink::AddDocTypeDecl.
git-svn-id: svn://10.0.0.236/trunk@41447 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-28 06:56:05 +00:00
nisheeth%netscape.com
0069328861 - Move AddDocTypeDecl method from nsIXMLContentSink to nsIContentSink.
- Fix bug 8607 by passing the XML decl and the doctype decl from the expat tokenizer to the XML DTD.


git-svn-id: svn://10.0.0.236/trunk@41106 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-26 05:40:25 +00:00
scc%netscape.com
b498e2909d explicitly define kCharsetConversionManagerCID only in files that need it ... move to canonical scheme for defining and using IIDs and CIDs
git-svn-id: svn://10.0.0.236/trunk@40614 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-22 05:25:17 +00:00
peterl%netscape.com
82107c30bd changed to preprocessor for code generation for tag & entity tables
cleanup tag and entity lookup apis


git-svn-id: svn://10.0.0.236/trunk@39926 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-18 00:12:32 +00:00
rickg%netscape.com
1de3f3dd0a fix bugs 8523, 9127, parially fix 8803
git-svn-id: svn://10.0.0.236/trunk@38647 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-07 07:40:35 +00:00
akkana%netscape.com
b704d40ce3 Fix formatted plaintext output -- it wasn't following prettyprint or wrap length
git-svn-id: svn://10.0.0.236/trunk@38461 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-06 23:13:15 +00:00
akkana%netscape.com
2fb45d996c - New dialog and editor shell API for Insert HTML Source
- Add wrapcolumn setting to document encoders, and use it in the editor
- Fix numbered lists in the html to text sink stream.


git-svn-id: svn://10.0.0.236/trunk@37529 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-30 19:26:08 +00:00
akkana%netscape.com
2300ca567a - Add a prettyprint flag to the html-to-text sink (false by default).
When prettyprinting is on, we will attempt to make the plaintext
  mimic the look of the html; when off (as for copy/paste), we just
  dump the text with no formatting information.


git-svn-id: svn://10.0.0.236/trunk@36966 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-26 00:01:11 +00:00
akkana%netscape.com
61b3d185f9 Change unicode assertion to a warning
git-svn-id: svn://10.0.0.236/trunk@36350 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-22 21:45:42 +00:00
rickg%netscape.com
bf2176589a oops -- I didn't mean to update these -- backing out
git-svn-id: svn://10.0.0.236/trunk@33225 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-29 03:04:16 +00:00
rickg%netscape.com
4cf139826e fixed nsString2 usage error introduced by observerlist change
git-svn-id: svn://10.0.0.236/trunk@33224 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-29 03:01:22 +00:00
rickg%netscape.com
1f82bdb300 fixed bug 6597 and added memory allocation conditioning
git-svn-id: svn://10.0.0.236/trunk@32284 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-19 05:01:46 +00:00
akkana%netscape.com
41cebfdb96 5663: Fix copy/paste of entities.
mUnicodeEncoder isn't getting initialized properly, at least on Linux.
Also fixed some compiler warnings while I'm here.


git-svn-id: svn://10.0.0.236/trunk@31644 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-14 19:47:10 +00:00
kostello%netscape.com
b095432a67 Small update to fix for bug #5525. Approval for checkin: chofmann.
git-svn-id: svn://10.0.0.236/trunk@29973 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 20:16:14 +00:00
kostello%netscape.com
472d53575b Added support to encode the document as either a nsString or an nsIOutputStream.
In the case of the stream, the document is encoded using the document defined charset
or the user may override the charset.

Added constructors for creating a sink using a nsIOutputStream or an nsString.

Removed all HTML and TEXT encoding which relied on references to ostream. Using John McMullen's
platform independent streaming code in its place. :)


git-svn-id: svn://10.0.0.236/trunk@29963 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-03 18:41:23 +00:00
rickg%netscape.com
3d80de2210 fixed ABW in nsTagStack and updated to string2 API
git-svn-id: svn://10.0.0.236/trunk@29952 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-02 00:37:25 +00:00
kostello%netscape.com
1a6701bd85 Added support to use the specified document charset when encoding a
document to HTML to Text. The charset information is first encoded
in XIF and then that information is used when interpretting the unicode
for output.

Added support to output character entity information which should address
bug 4709


git-svn-id: svn://10.0.0.236/trunk@29162 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-26 06:16:49 +00:00
rickg%netscape.com
c1a9c636d1 sync with new nsString2 API
git-svn-id: svn://10.0.0.236/trunk@28426 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-21 04:02:14 +00:00
harishd%netscape.com
3b1e086b68 Added Methods BeginContext() and EndContext()
to handle illegal-contents in tables


git-svn-id: svn://10.0.0.236/trunk@27615 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-15 20:08:04 +00:00
rods%netscape.com
659268f787 Added nsString, so the conversion goes to a string and to a stream
Eventually, we will want it to just go to a string.


git-svn-id: svn://10.0.0.236/trunk@24451 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-19 15:53:07 +00:00
kostello%netscape.com
212c5568d0 Added nsIHTMLContentSink::DoFragment() method.
Added support for conversion of HTML entities in output


git-svn-id: svn://10.0.0.236/trunk@24161 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-15 05:08:36 +00:00
kostello%netscape.com
b53c0edb3c Fixed bug 3651: for OutputText, we were not outputting
linebreaks whenever we encounter <BR> in the content
model.


git-svn-id: svn://10.0.0.236/trunk@23901 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 06:51:34 +00:00
nisheeth%netscape.com
b0dfaee405 Changed nsIContentSink->NotifyError() to accept an nsParserError argument. This change is needed for propagating errors from the new expat parser.
git-svn-id: svn://10.0.0.236/trunk@23032 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 02:09:46 +00:00
kostello%netscape.com
1d257371a8 Added new sink that outputs a Text stream instead of
an HTML stream.


git-svn-id: svn://10.0.0.236/trunk@22784 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-04 21:52:57 +00:00