Closed
Bug 77705
Opened 24 years ago
Closed 23 years ago
add CSS support to Composer
Categories
(SeaMonkey :: Composer, enhancement, P3)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.8
People
(Reporter: glazou, Assigned: glazou)
References
(Depends on 1 open bug)
Details
Attachments
(10 files, 13 obsolete files)
This is a tracking bug for the CSSization of Composer. See also http://www.mozilla.org/editor/adding-css-to-editor.html for more information about that.
Assignee | ||
Comment 1•24 years ago
|
||
B, I and U buttons now reflecting the real state of the selection even if the corresponding styles come from CSS rules or CSS inline styles. Now working on color and "Text Style" menu items.
Status: NEW → ASSIGNED
Comment 3•24 years ago
|
||
I'm recalling a discussion we had a while ago where we talked about forking the css-editor off of the implementation class heirarchy. Right now we have: nsEditor-->nsPlaintextEditor-->nsHTMLEditor One simple possibility is just: nsEditor-->nsPlaintextEditor-->nsHTMLEditor-->nsCSSHTMLEditor But if enough things are different then perhaps: nsEditor-->nsPlaintextEditor-->nsHTMLEditor \->nsCSSHTMLEditor is better. Daniel, what is your plan there? I don't think we should get rid of the existing non-CSS HTML editor, although I guess that is an option.
Assignee | ||
Comment 4•24 years ago
|
||
We definitely need to have another discussion about that now that I understand much more all the handling of the "properties" in the html editor. I am open to all options since I have no marketing input on that point. The only things I am personnally sure about : - we have to keep non-css editing for email - html+css editor will reuse a lot of code from the pure html editor in particular when it has to deal with a page with pure html styles...
Assignee | ||
Comment 5•24 years ago
|
||
Color button now reflecting the real state of the selection even if the color come from CSS rules or CSS inline styles. Code optimization so nsIDOMViewCSS is queried only once per call to |GetInlinePropertyBase| .
Assignee | ||
Comment 6•24 years ago
|
||
Menu items of Format > Font Variable Width Fixed Width ----- Helvetica, Arial Times Courier now reflecting the real state of the selection even if the style come from CSS rules or CSS inline styles.
Assignee | ||
Comment 7•24 years ago
|
||
state of U button buggy because of bug 78202; harishd working on it
Assignee | ||
Comment 8•24 years ago
|
||
Added very simple code to nsHTMLEditor so mail composition remains exactly as it is while HTML document editor now takes advantage of css.
Assignee | ||
Comment 9•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•24 years ago
|
||
Preference for CSS in Composer added. See http://www.mozilla.org/editor/adding-css-to-editor.html
Assignee | ||
Comment 12•24 years ago
|
||
The 4 alignment buttons and corresponding menu items now reflecting the real state of the selection even if the alignment comes from CSS rules or CSS inline styles. me discovered the -moz-center -moz-right (and so on) values for text-align CSS property :-/ See also bug 78703. + Code optimization.
Comment 13•24 years ago
|
||
moving this to future to get this off the un-milestoned list, move to the correct milestone when you are ready.
Priority: -- → P3
Target Milestone: --- → Future
Assignee | ||
Comment 14•24 years ago
|
||
Comment 15•24 years ago
|
||
There is a problem in Composer when it contains text formatted with CSS justify <style type="text/css"> .justify {text-align: justify; It becomes very hard to navigate inside the text with the mouse: Except for on the first line after a .justify tag, the cursor is placed at beginning of line instead of where i click. Perhaps this is known - mentioning just in case.
Assignee | ||
Comment 16•24 years ago
|
||
I totally forgot the STRIKE element ! Its corresponding menu item now reflecting the real CSS state of the selection.
Assignee | ||
Comment 17•24 years ago
|
||
Currently finishing : a) code for the retrieval of the CSS declarations contained in a STYLE attribute for that purpose, had to do implementation of nsDOMCSSDeclaration::GetCssText b) a transaction for setting, removing, changing the value of a CSS declaration contained in a STYLE attribute
Assignee | ||
Comment 18•24 years ago
|
||
Assignee | ||
Comment 19•24 years ago
|
||
First shot for ChangeCSSInlineStyleTxn attached above. I chose, after short discussion with Joe, to make it as simple as possible even if the footprint is for the moment too big : for Undo and Redo, I store the two corresponding values of the STYLE attribute (if it is set) and if it is set or not ; then undo and redo are just a matter of re-assigning the attribute's value or removing the attribute. In the future, Undo and Redo should be more cost-effective and use only the property, property value and if the property was set or not. It implies the recreation of the contents of the style attribute as in Do now, but the footprint will be much slower. For the moment, let's do something that works and improve it afterwards. Now working on nsHTMLEditor::SetInlineProperty.
Assignee | ||
Comment 20•24 years ago
|
||
Background-color button and "Page properties" menu item now manipulate CSS inline style on the BODY or on tables and table sub-elements :-) First demo made today !
Assignee | ||
Comment 21•24 years ago
|
||
Assignee | ||
Comment 22•24 years ago
|
||
Just adding a very small patch about new CSS pref because I always forget where it is defined.
Assignee | ||
Comment 23•24 years ago
|
||
First inline CSS styles generated on text node today : [this should be bold and [ this should be bold underlined [and italic]]] 1) select all text, click on B 2) select "[ this should be bold underlined [and italic]]", click on U 3) select "[and italic]", click on I 4) click on color, choose red result : <span style="font-weight : bold ; ">[ this should be bold and <span style="text-decoration : underline ; ">[ this should be bold underlined <span style="font-style : italic ; color : rgb(255,0,0)">[ and italic]</span>]</span>]</span> :-)
Assignee | ||
Comment 26•24 years ago
|
||
RemoveStyleInside must be CSSized in order to get a working setter for CSS properties. Investigating now. In the case of CSS editing, RemoveStyleInside should remove both the HTML presentation hints (w/o CLASS or ID) and the corresponding CSS declarations. Problem to solve 1 : node agregator in case of equal styles should check both HTML presentation hints and corresponding CSS styles. Example : <p>bar <b>foo</b></p> <p><span style="font-weight : bold ; ">foo</span> bar</p> if the caret is at the beginning of the second P and user hits backspace in CSS mode, the result should be <p>bar <span style="font-weight : bold ; ">foofoo</span> bar</p> Problem to solve 2 : the styles for B element (and others) are contained in the UA stylesheet and I should not re-hardcode them. I will try to get the corresponding style declarations directly from the UA stylesheet through the CSS OM when initializing the editor's instance.
Assignee | ||
Comment 28•23 years ago
|
||
First removal of CSS inline styles : <span style="font-weight : bold; font-style : italic>foo bar foo</span> select "bar" and click on B button; result in composer : <span style="font-style : italic"><span style="font-weight : bold;">foo</span> bar<span style="font-weight : bold;">foo</span></span> :-)
Assignee | ||
Comment 29•23 years ago
|
||
Assignee | ||
Comment 30•23 years ago
|
||
The patch "work-in-progress code v2" attached above allows you set AND remove CSS inline styles for B, U and I buttons. Be sure to have the new pref "CSS editing" checked. Of course, if you are using CSS editing, it also deals with B U and I elements. This patch does not use the new ChangeCSSInlineStyleTxn transaction. Working on it now. Feedback welcome ;-)
Comment 31•23 years ago
|
||
I don't want to be nasty or anything, but why is this: <span style="font-style : italic"><span style="font-weight : bold;">foo</span> bar<span style="font-weight : bold;">foo</span></span> ...better than this: <i><b>foo</b> bar<b>foo</b></i> ...?
Comment 33•23 years ago
|
||
well, the deprecated elements in 4.01 strict are being replaced with the appropriate CSS. The bold and italic elements should not be, at least not at this point. But, center, strike, underline and font will definetly be replaced, and hopefully margins instead of blockquote for indent, and the appropriate color for selection and page colors. Before this gets checked in though, we need to ensure that this does not affect mail compose, or at least not until they tell us tehy are ready for CSS
Comment 34•23 years ago
|
||
O..k... I still don't see the point of using style attributes instead of deprecated elements though. The elements are deprecated because they don't convey structural information. Neither do "span" tags and "style" attributes. If we're going to Do The Right Thing per the spec then we should be putting stylistic information in an (external) stylesheet, and using structural markup (<cite>, <ul>, <var>, <dfn>, <ins>, etc) to mark up the document.
Comment 35•23 years ago
|
||
Do we want to declare style="font-style: italic" for every text that needs to be italicized? Would it be better to define "common" classes such as bold, italic, boldItalic, etc in an external stylesheet?
Assignee | ||
Comment 36•23 years ago
|
||
> Do we want to declare style="font-style: italic" for every text that needs to be > italicized? > > Would it be better to define "common" classes such as bold, italic, boldItalic, > etc in an external stylesheet? That implies much more code because you have to handle an external object (the stylesheet) and it restricts the classes namespace (you could start these class names with a moz something). Even if you make the stylesheet embedded into the document, it implies much more code and complexity. I have to say that it implies stylesheet manipulation through the DOM that is for the moment not fully reliable.
Assignee | ||
Comment 37•23 years ago
|
||
> O..k... I still don't see the point of using style attributes instead of
> deprecated elements though. The elements are deprecated because they don't
> convey structural information. Neither do "span" tags and "style" attributes.
> If we're going to Do The Right Thing per the spec then we should be putting
> stylistic information in an (external) stylesheet, and using structural markup
> (<cite>, <ul>, <var>, <dfn>, <ins>, etc) to mark up the document.
No, deprecated elements are deprecated because they convey presentational
information and not only structural information. spans and divs do carry
structural information only. The style attribute is a matter of conflict between
you Ian and us. We still think that the style attribute does not alter the
structure and that the web as we actually know it cannot live without it.
Handling external stylesheets is a much more difficult task than handling a
style attribute ; it is even harder with our DOM, which is not 100% reliable
on stylesheets. I am not sure that we will support the modification in Composer
of an external stylesheet in the two or three coming years.
Assignee | ||
Comment 38•23 years ago
|
||
> Before this gets checked in though, we need to ensure that this does not affect
> mail compose, or at least not until they tell us tehy are ready for CSS
Since all the code I wrote depends on an new boolean attribute of the editor
saying if CSS support is enabled or not, and since email never sets this boolean
to true...
Assignee | ||
Comment 39•23 years ago
|
||
> O..k... I still don't see the point of using style attributes instead of
> deprecated elements though.
I forgot this answer : being able to validate the document we create against
the strict dtd is a goal.
Assignee | ||
Comment 40•23 years ago
|
||
Added some magic so two adjacent SPANs are not merged if they have different styles, or different class names, or if one of them carries an ID. Example: <p>normal text<span style="font-weight: bold; ">bold text</span></p> <p><span style="font-style: italic; ">italic text</span>normal text</p> put the caret at the beginning of 2nd paragraph and hit backspace. The result should be: <p>normal text<span style="font-weight: bold; ">bold text</span> <span style="font-style: italic; ">italic text</span>normal text</p> and not <p>normal text<span style="font-weight: bold; ">bold text italic text</span>normal text</p>
Assignee | ||
Comment 42•23 years ago
|
||
Assignee | ||
Comment 43•23 years ago
|
||
Block alignment now uses 'text-align' CSS property instead of ALIGN attribute !
Comment 44•23 years ago
|
||
> No, deprecated elements are deprecated because they convey presentational
> information and not only structural information. spans and divs do carry
> structural information only.
<div style="font: 900 20px Tahoma; display: block; margin:1em">Response</div>
<div>I disagree, I think <span style="font:1em monospace">div</span> and
<span style="font:1em monospace">span</span> elements do not carry any <span
style="font-style: italic">structural</span> information at all.</div>
vs:
<h1>Response</h1>
<p>I disagree, I think <code>div</code> and <code>span</code> elements do
not carry any <em>structural</em>information at all.</p>
Ask yourself this: which looks more like XSL:FOs, which we both agree are bad
since they have no structural semantics?
Comment 45•23 years ago
|
||
Christopher: Having presentational classes is almost as bad as having inline presentational style. (The only advantage being that you would more easily be able to mass-convert them to the more correct class names like "important", "authorName" or whatever.)
Assignee | ||
Comment 46•23 years ago
|
||
Ian : h1, p, code and em are not deprecated ; why do you want us to turn them into divs and spans plus CSS ? I know that you play devil's advocate but choose better arguments, please ;-)
Assignee | ||
Comment 47•23 years ago
|
||
List properties dialog can now generate 'list-style-type' CSS property instead of deprecated TYPE attribute when CSS pref is checked.
Assignee | ||
Comment 48•23 years ago
|
||
added code so list items can be aligned through 'text-align' instead of creating a div inside. See also bug 66731.
> Block alignment now uses 'text-align' CSS property instead of ALIGN > attribute ! *Block* alignment? Shouldn't that use 'auto' margins? Note that the ALIGN attribute in HTML maps to a very confusing combination of 'text-align' and 'auto' margins that can't be simulated using CSS without significant use of inefficient descendant combinators. My two cents -- I agree with Ian that <span style="font-weight: bold">...</span> is worse than <b>...</b>. Both convey presentation (the same presentation), but the first is bulkier and demonstrates the wrong way to use CSS (as a simple search-replace of presentational HTML, rather than to style semantically rich markup). Unless we're going to encourage the authors using the editor to say *why* they want something bold, we may as well just use the B element. The reason B was deprecated was because it does exactly the same thing that <span style="font-weight: bold">...</span> does. > I forgot this answer : being able to validate the document we create against > the strict dtd is a goal. Being able to validate against the HTML 4 Strict DTD only means that the document produced meets the requirements of the spec that can be expressed in the DTD. If it does that by simply changing the violations (or use of deprecated/discouraged features) of the spec from violations that can be caught by a validator to those that can't be caught by a validator, it isn't really doing any good. (HTML 4 section 15.2 says (emphasis mine) "Although they are not all deprecated, their use is discouraged in favor of style **sheets**.")
Comment 50•23 years ago
|
||
> Ian : h1, p, code and em are not deprecated ; why do you want us to turn them
> into divs and spans plus CSS ? I know that you play devil's advocate but
> choose better arguments, please ;-)
All your examples have used <span> and <div>. An editor which supports
structural markup wouldn't have a way of inserting an <i> element, it would have
a way of inserting an <em> element *which could then be styled using a
stylesheet editor*.
Plus, everything that dbaron said.
Comment 51•23 years ago
|
||
We will actually be supporting both HTML style elements and CSS. We are and will continue to support bold, italic, etc., as long as they are not deprecated. In particular, bold and italic have dual meanings - style and structure (in that it denotes something is special). We have had numerous discussions on that in the WG. I doubt they will be deprecated any time soon. Utilizing span and div into the document is legal and remains legal, and we will undoubtedly utilize those elements until they are also deemed deprecated. Again, I doubt div would be deprecated because it does denote structure, it is unfortunate that it has been incorrectly used in the past.
Assignee | ||
Comment 52•23 years ago
|
||
I forgot that text-decoration accepts more than one value :-( Fixing now...
Assignee | ||
Comment 53•23 years ago
|
||
Bug 95062 completely blocks correct handling of U button, Underline and Strikethrough menu items.
Assignee | ||
Comment 54•23 years ago
|
||
(a) Still jetlagging, I worked this night on a declarative way of setting the equivalences between HTML and CSS in both directions. With that in, deprecating a new element/attribute in favor of css should be feasible with only adding just a few macros... (b) now working on table attributes width, bgcolor, width and vertical-align
Assignee | ||
Comment 55•23 years ago
|
||
Just adding a ref to MS CSS Editor (part of Visual Interdev tool). http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vidref98/html/vihoweditingstylesheets.asp
Assignee | ||
Comment 56•23 years ago
|
||
Text highlight (ability to add background-color using picker to text and not only blocks) added.
Assignee | ||
Comment 57•23 years ago
|
||
Added magic so Text Highlight button is enabled only if CSS is enabled
Comment 58•23 years ago
|
||
This stuff looks great! As soon as 0.9.4 is over, I'll play with it. Thanks for the link to MS' stylesheet editor. Noticing that you set default pref to "true" for CSS editing, do you plan to support autoconverting all non-CSS-using pages to use inline style instead? Maybe have that as a second pref? I wonder if it's a problem in a page that is mostly using deprecated HTML attributes, then we edit it and insert only inline CSS. Maybe that pref(s) should be exposed during installation so users are aware of that issue? I know they want to minimize extra steps during installation, but which way Composer works is a very important issue, imho. (And we now have the right manager to address this issue!)
Assignee | ||
Comment 59•23 years ago
|
||
cmanske : beppe invested a lot of time trying to convince me that it is not always possible to translate styles done with HTML deprecated elements or attributes into CSS inline styles (including embedded rules for some attributes on BODY), but I admit I am still very skeptical on this point. So don't push me too far, or I add it to my todo list ;-) Anyway, this won't be in 1st release of CSS support in composer. A question of priority and timeframe...
Assignee | ||
Comment 60•23 years ago
|
||
Assignee | ||
Comment 61•23 years ago
|
||
Assignee | ||
Comment 62•23 years ago
|
||
New work-in-progress patch ; don't forget to add the gif file for the text highlight button in themes/modern/editor/btn2 directory.
Assignee | ||
Updated•23 years ago
|
Attachment #32873 -
Attachment is obsolete: true
Assignee | ||
Comment 63•23 years ago
|
||
1. effect of bug 98159 : background color button for blocks does not work well for tables ; I also have a new patch for 97771. If you exclude the side effects on these bugs, the background button and the highlight button work just fine (I tortured them) 2. added some code so Bold and Italic can be removed even if the style comes from a CSS **rule** ; in that case, adding the css property with 'normal' value. 3. started working on the UI dialogs... Not an easy task because attributes are often directly set from js 4. started working on indentation
Group: netscapeconfidential?
Assignee | ||
Updated•23 years ago
|
assignee_accessible: 1 → 0
Group: netscapeconfidential?
CC list accessible: false
qacontact_accessible: 1 → 0
Not accessible to reporter
Assignee | ||
Comment 64•23 years ago
|
||
1. Because nsDOMCSSDeclaration::GetPropertyCSSValue is not implemented, I had to write a small parser for the length values of margin-left 2. With that in, I now have a cssized version of the Indent toolbar button. Here are the increments I am using for each unit type : px 40 cm 1.05 mm 10.5 pc 2.48 pt 29.76 in 0.4134 em 3 ex 6 % 4 3. now working on Outdent button and enabling/disabling of indent button
Assignee | ||
Comment 68•23 years ago
|
||
YAY AGAIN : Table Properties dialog now generates CSS properties instead of HTML attributes.... me can now resurrect the "Table height" property :-))))
Assignee | ||
Comment 70•23 years ago
|
||
The table properties dialog was generating CSS styles but was unable to update itself *from* CSS styles ; I just found the way to do that and it already works for vertical and horizontal alignment; will be a little bit trickier for background-color but not a strong problem.
Assignee | ||
Comment 72•23 years ago
|
||
All dialogs now CSSized (yipie !). That includes CSSization of height on TD TH nowrap on TD TH size on HR align on CAPTION and LEGEND (see bug 91491) height on TABLE (YES !!!!! and the UI appears only in CSS mode :-)) type on LI OL UL align on HR width on TABLE TD TH HR Attaching a table summary of deprecated attributes. Remaining issues : (1) handle <font size=".."> ; that's the big thing... (2) a bug in GetAlignment() (3) the Text Highlight button is not disabled when I uncheck the CSS pref (4) code cleanup and that's all !
Assignee | ||
Comment 73•23 years ago
|
||
I have delayed a little bit the issues above because I have a fix for bug 18894 and am now able to CSSize attribute BORDER on IMG and will probably be able to do so for attributes HSPACE and VSPACE :-)
Assignee | ||
Comment 75•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #33869 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #35381 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #45061 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #45226 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #47784 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #47785 -
Attachment is obsolete: true
Assignee | ||
Comment 76•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Component: Editor: Core → Editor: Composer
Assignee | ||
Comment 77•23 years ago
|
||
Assignee | ||
Comment 80•23 years ago
|
||
bulk milestone change
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Comment 81•23 years ago
|
||
Here's an attatchment of my review of the new .cpp/.h files in Patch v 1.0: ChangeCSSInlineStyleTxn.cpp ChangeCSSInlineStyleTxn.h nsHTMLCSSUtils.cpp nsHTMLCSSUtils.h
Comment 82•23 years ago
|
||
I've reviewed all files in the patch starting at: editor/composer/src/nsComposerCommands.cpp and mailed comments to glazman.
Comment 83•23 years ago
|
||
I tried to concentrate on the big picture of how it all works. I hope you find my questions and comments helpful. Good job Daniel!
Comment 84•23 years ago
|
||
Comment on attachment 54060 [details] [diff] [review] PATCH v 1.0, ready for review !!! YAY !!!! (5929 lines) r=jfrancis
Attachment #54060 -
Flags: review+
Assignee | ||
Comment 85•23 years ago
|
||
> RemoveInlinePropertyImpl(): around line 1299, and later at 1371, there > is code for removing css style when there is no matching html style in > the ancestry. But this code only works for bold, right? (As it is > the only one indicated by IsCSSInvertable()). So does that mean that > italic, etc, if set by a rule rather than a style attribute, simply > cannot be inverted (unitalicized, etc) in the css editor? That's correct for underline. Example : <p style="font-style: italic">a b c</p> The only way to make "b" roman instead of italic would be <p><span style="font-style: italic">a</span> b <span style="font-style: italic">c</span></p> I am not at all in favour of it because it's really not the same thing. It's also much harder to code. See first paragraph of http://www.w3.org/TR/REC-CSS2/text.html#lining-striking-props after property's definition. For other inline styles : totally correct, I stupidly forgot some of them. Where was my brain that day... Thanks for detecting that.
Comment 86•23 years ago
|
||
Comment 87•23 years ago
|
||
Comment 88•23 years ago
|
||
Comment 89•23 years ago
|
||
Comment on attachment 60655 [details]
Review for files starting at nsComposerCommands.cpp in patch (all UI)
sorry for duplicate attachments -- it seemed like the files weren't sent, so I
sent it again!
Attachment #60655 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #60658 -
Attachment is obsolete: true
Comment 90•23 years ago
|
||
Comment on attachment 54060 [details] [diff] [review] PATCH v 1.0, ready for review !!! YAY !!!! (5929 lines) r=cmanske for UI work, with changed described in my review above
Comment 91•23 years ago
|
||
Assignee | ||
Comment 93•23 years ago
|
||
just wanting to thank Joe, Charley and especially Kin for their excellent reviews. sorry for the spam.
Assignee | ||
Comment 94•23 years ago
|
||
1. Finally found my way out of merging conflict nightmare 2. all issues raised by Kin solved 3. now working on Joe's and Charley's reviews
Assignee | ||
Comment 95•23 years ago
|
||
1. all issues raised by Charley now solved 2. working now on second half of Joe's comments, first half already done 3. expect to have a sr'able patch *by the end of this week* (unfortunately, I don't think I can make better than that). 4. preparing a list of testcases ; they will have to be all green for check-in ALL EDITOR FOLKS : once this code gets its sr=, we'll have to choose a date for this carpool landing and I'll ask you that day to block all your check-ins until my code is in ; thanks a lot :-)
Assignee | ||
Comment 96•23 years ago
|
||
Sorry to say, but the recent check-ins in chrome and some modifs in Composer's js code generated bugs or unexpected behaviors in my code... This patch won't be fully ready in 2001 even if the remaining points to solve are unsignificant.
Assignee | ||
Comment 97•23 years ago
|
||
I am almost done with this :-) I am testing the code to see if everything is ok ; doing that I discovered that I was not removing useless divs on outdent to 0. This is now added.
Assignee | ||
Comment 98•23 years ago
|
||
Comment on attachment 54053 [details]
PATH V 1.0 MANIFEST
obsolete manifest
Attachment #54053 -
Attachment is obsolete: true
Assignee | ||
Comment 99•23 years ago
|
||
Comment on attachment 54057 [details]
binary files (button icons)
obsolete icons
Attachment #54057 -
Attachment is obsolete: true
Assignee | ||
Comment 100•23 years ago
|
||
Comment on attachment 54060 [details] [diff] [review] PATCH v 1.0, ready for review !!! YAY !!!! (5929 lines) obsolete patch
Attachment #54060 -
Attachment is obsolete: true
Assignee | ||
Comment 101•23 years ago
|
||
new version of themes\modern\editor\icons\btn2.gif needed for patch 2.0
Assignee | ||
Comment 102•23 years ago
|
||
new version of themes\classic\editor\icons\btn2.gif needed for patch 2.0
Assignee | ||
Comment 103•23 years ago
|
||
This attachment contains the list of files modified or added by patch #2.0. The two binary files themes/classic/editor/icons/btn2.gif and themes/modern/editor/icons/btn2.gif not listed here.
Assignee | ||
Comment 104•23 years ago
|
||
patch v2.0 ; needs testing on Macintosh(with help of my favorite MacBuddy, Peter)
Assignee | ||
Comment 105•23 years ago
|
||
PATCH v2.1, obsoletes 2.0, thanks to ToLowerCase() ... This one is (sniff, I am so happy), ready for sr= ! Kin, Joe Charley : all your comments are in. :-) I respectfully suggest to deal with ALL new minor issues (i.e. non showstoppers), including code cleanup or reorg, in new bugs filed AFTER this code gets in. Thanks.
Attachment #63816 -
Attachment is obsolete: true
Comment 106•23 years ago
|
||
Daniel, what was the result, if any, of my review comment: "libeditor/html/nsHTMLEditor.cpp & h: NodeIsBlockStatic(): I realize table, thead, etc are actually something a bit different from blocks, but I fear removing them from the block list will break whitespace handling and other things. This problem is serious enough that we need to plan out what to do here prior to landing." I think we may need to make a "NodeIsBlockOrTable()" and replace all the prexisting NodeIsBlock() calls with it.
Assignee | ||
Comment 107•23 years ago
|
||
Oh, right, I forgot to give you my answer to this point ; here it is, sorry for that : I don't understand your point. Here is the diff chunk for NodeIsBlockStatic() : <chunk> @@ -586,19 +597,19 @@ tagAtom==nsIEditProperty::noscript || tagAtom==nsIEditProperty::form || tagAtom==nsIEditProperty::hr || - tagAtom==nsIEditProperty::table || tagAtom==nsIEditProperty::fieldset || tagAtom==nsIEditProperty::address || tagAtom==nsIEditProperty::body || + tagAtom==nsIEditProperty::caption || + tagAtom==nsIEditProperty::table || + tagAtom==nsIEditProperty::tbody || + tagAtom==nsIEditProperty::thead || + tagAtom==nsIEditProperty::tfoot || tagAtom==nsIEditProperty::tr || tagAtom==nsIEditProperty::td || tagAtom==nsIEditProperty::th || - tagAtom==nsIEditProperty::caption || tagAtom==nsIEditProperty::col || tagAtom==nsIEditProperty::colgroup || - tagAtom==nsIEditProperty::tbody || - tagAtom==nsIEditProperty::thead || - tagAtom==nsIEditProperty::tfoot || tagAtom==nsIEditProperty::li || tagAtom==nsIEditProperty::dt || tagAtom==nsIEditProperty::dd || </chunk> table, thead, ... are _not_ removed. I just _moved_ them and gathered table elements for readability reasons.
Comment 109•23 years ago
|
||
Looks like you addressed most of my comments in v2.1 of your patch, I still have some questions/comments, some are from my review of the 1.0 patch ... that said I'm willing to give you a conditional sr=kin if you get an r=jfrancis. =========================== ==== TransactionFactory.cpp =========================== + else if (aTxnType.Equals(ChangeCSSInlineStyleTxn::GetCID())) + *aResult = new ChangeCSSInlineStyleTxn(); This code should probably be moved up under the #ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY like SetDocTitleTxn. =================================== ==== nsEditor.cpp and nsIEditor.idl =================================== I'd rather we didn't add CSS'isms to nsEditor/nsIEditor, but for the sake of time/checkin and if it's ok with joe perhaps it's ok to land it anyways with the promise that you'll make it go away or use some sort of generic mechanism. :-) ===================== ==== nsHTMLEditor.cpp ===================== + // the HTML Editor is CSS-aware only in the case of Composer + mCSSAware = PRBool(0 == aFlags); Is it a safe assumption that composer will never have flags set? ======================== ==== nsHTMLEditRules.cpp ======================== Is this change in GetNodesForOperation() going to impact the !usCSS case? @@ -4550,8 +4811,7 @@ // certain operations should not act on li's and td's, but rather inside // them. alter the list as needed - if ( (inOperationType == kMakeBasicBlock) || - (inOperationType == kAlign) ) + if (inOperationType == kMakeBasicBlock) { PRUint32 listCount; (*outArrayOfNodes)->Count(&listCount); ==== You changed the semantics of RemoveAlignmentInside() so perhaps the comment above the function should be updated to reflect the modifications you made. I'm wondering if we should drop the "Inside" in it's name since it no longer just processes the children inside the node.
Assignee | ||
Comment 111•23 years ago
|
||
Answers to last Kin's comments : > =========================== > ==== TransactionFactory.cpp > =========================== > > > + else if (aTxnType.Equals(ChangeCSSInlineStyleTxn::GetCID())) > + *aResult = new ChangeCSSInlineStyleTxn(); > > This code should probably be moved up under the #ifndef > MOZILLA_PLAINTEXT_EDITOR_ONLY > like SetDocTitleTxn. done > =================================== > ==== nsEditor.cpp and nsIEditor.idl > =================================== > > > I'd rather we didn't add CSS'isms to nsEditor/nsIEditor, but for the sake > of time/checkin and if it's ok with joe perhaps it's ok to land it anyways > with the promise that you'll make it go away or use some sort of generic > mechanism. :-) Promised. > ===================== > ==== nsHTMLEditor.cpp > ===================== > > > + // the HTML Editor is CSS-aware only in the case of Composer > + mCSSAware = PRBool(0 == aFlags); > > Is it a safe assumption that composer will never have flags set? That's the only way, at this step, I can make the difference between an initialization for Composer or for html mail composer. See nsEditorShell::InstantiateEditor. Let's deal with this issue later. > ======================== > ==== nsHTMLEditRules.cpp > ======================== > > > Is this change in GetNodesForOperation() going to impact the !usCSS case? No. The alignment algos have been modified for that purpose. The modification of GetNodesForOperation() was absolutely needed for the css case. > You changed the semantics of RemoveAlignmentInside() so perhaps the comment > above the function should be updated to reflect the modifications you made. > I'm wondering if we should drop the "Inside" in it's name since it no longer > just processes the children inside the node. Was already done, from your previous comments.
Assignee | ||
Comment 112•23 years ago
|
||
It's good to see a so long work end with a so short comment : FIXED, CHECKED-IN !!!! doobeedoobeedoo :-)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 113•23 years ago
|
||
oops. As Daniel states, i misread the patch at NodeIsBlockStatic(). Carry on. Nothing to see here. Move along people...
Comment 114•23 years ago
|
||
You may want to have a xul person review your xul changes in the future. Your patch added some <text class="label"/>, and reverted some <label/> tags (which are correct) to <text/> as well. The text tag is deprecated, in fact it shouldn't even be working anymore. This needs to be fixed. Do you want to do that here, or as part of a separate bug? Also, you don't need the prefattribute and preftype attributes on a <checkbox/>.
Comment 115•23 years ago
|
||
I reviewed the XUL a few weeks ago, but I'll take responsibility for not telling Daniel about using <label> instead of <text>
Assignee | ||
Comment 116•23 years ago
|
||
blaker: thanks for spotting this out; issue now covered by bug 119164 cmanske: a second beer ? ;-)
Comment 117•23 years ago
|
||
Why was this tracker bug resolved as fixed where there are still dependencies that are not fixed? Is there another tracker bug that covers them now?
Assignee | ||
Comment 119•23 years ago
|
||
verified
Status: RESOLVED → VERIFIED
Summary: [trk] add CSS support to Composer → add CSS support to Composer
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•