Closed
Bug 832025
Opened 12 years ago
Closed 12 years ago
Major regression in HTML editing rules in CSS mode related to TypeInState
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: glazou, Assigned: glazou)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. open the Midas demo http://www-archive.mozilla.org/editor/midasdemo/
2. click *twice* on the already checked "Use CSS" checkbox otherwise CSS
mode is not correctly selected
3. type some text in editable area, do NOT type a carriage return
4. use dropdown menu to turn text from "normal" into "Header 1"
5. press the Enter key to create a paragraph after h1
6. type some text
Expected result: text is not bold
Actual result: text is bold !!!
This is a _major_ regression severely impacting *all* embedders of the editor.
In particular, this is a show-stopper for BlueGriffon v1.6 and should
probably be a blocker for richtext emails in next Thunderbird....
Sorry guys:-(
Updated•12 years ago
|
Keywords: regression,
regressionwindow-wanted
Assignee | ||
Comment 1•12 years ago
|
||
So it's most probably related to cached styles. A regression
has probably stopped triggering a call to ClearCachedStyles()
in the case of ReturnInHeader(). I'll investigate a bit more
tomorrow morning, it's already late in the night here.
Assignee | ||
Comment 2•12 years ago
|
||
This bug will also severely impact all inline wysiwyg editors, for instance
Wikipedia's inline wysiwyg editor, CKEditor and others. In other
words, hundreds of major web sites.
Comment 3•12 years ago
|
||
Alice, any chance you could please help us find a regression range here? Thanks a lot!
Comment 4•12 years ago
|
||
(In reply to comment #1)
> So it's most probably related to cached styles. A regression
> has probably stopped triggering a call to ClearCachedStyles()
> in the case of ReturnInHeader(). I'll investigate a bit more
> tomorrow morning, it's already late in the night here.
I would appreciate that!
Comment 5•12 years ago
|
||
Last good nightly: 2012-05-18
First bad nightly: 2012-05-19
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e794cef56df6&tochange=642d1a36702f
bug 590640 ?
Comment 6•12 years ago
|
||
Umm. I cannot reproduce the problem in Firefox15,16, esr17, 18, 19beta, Aurora20.0a2 and Nightly21.0a1.
AFAICT, This was already fixed by Bug 780035.
Regression window(m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/11780e80c8c3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120517220915
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/e8ebc8f1825e
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 ID:20120517232316
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=11780e80c8c3&tochange=e8ebc8f1825e
Regressed by: 590640
Fixed window(m-c)
Bad:
http://hg.mozilla.org/mozilla-central/rev/16932b475002
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120814150602
Fixed:
http://hg.mozilla.org/mozilla-central/rev/86ee4deea55b
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120814175101
Fixed Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=16932b475002&tochange=86ee4deea55b
Fixed window(m-i)
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/4110062a8d78
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120814022043
Fixed:
http://hg.mozilla.org/integration/mozilla-inbound/rev/59707ed19e48
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120814030522
Fixed Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4110062a8d78&tochange=59707ed19e48
Fixed by: Bug 780035
Comment 7•12 years ago
|
||
Oops, sorry. My bad:
Bug 780035 was fixed font size only.
And yes, The bold stye is still broken.
Assignee | ||
Comment 8•12 years ago
|
||
Fix in hand! Now writing a test for it, stay tuned.
Assignee | ||
Comment 9•12 years ago
|
||
Trivial patch with corresponding test. Feel free to test/check-in for
me, I'm working fulltime on BlueGriffon 1.6 RC2 and invested time here
only because it was a show-stopper for BlueGriffon.
Assignee | ||
Comment 10•12 years ago
|
||
So the guilty code was Aryeh's in bug 590640 when he introduced
IsStyleCachePreservingAction(). This returns true for EditAction::insertBreak
but he forgot insertBreak can happen at the end of a block or inside it, the
behaviour at the end of a block being a bit different for headers, lists, pre
in some cases...
I just realize we have a similar bug at the end of lists when a double-CRs
breaks the list and creates a new paragraph. Let me update my patch and add
a new test.
Assignee | ||
Comment 11•12 years ago
|
||
The patch fixes both return-in-header and return-in-listitem. Two tests
for that are included. Again, feel free to try and check-in for me. Thanks.
Assignee | ||
Updated•12 years ago
|
Attachment #703851 -
Attachment is obsolete: true
Comment 12•12 years ago
|
||
Comment on attachment 703889 [details] [diff] [review]
patch take #2 + tests
Thanks for your patch!
https://tbpl.mozilla.org/?tree=Try&rev=3e57edaa00c5
Attachment #703889 -
Flags: review+
Comment 13•12 years ago
|
||
Assignee: nobody → daniel
Comment 14•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•