Commit Graph

730 Commits

Author SHA1 Message Date
Ian Neal
49689844b3 Test for Bug 290026 - Outdent of List does not work properly r=ehsan 2011-08-10 00:14:53 +01:00
Ehsan Akhgari
6690ac6ddf Merge the latest green changeset on mozilla-inbound to mozilla-central 2011-08-09 08:09:13 -04:00
Jan Varga
5020b003ce Bug 617528 Part 2 - Core implementation r=smaug
--HG--
rename : content/html/content/test/test_bug418756.html => content/html/content/test/test_checked.html
2011-08-08 19:31:32 +02:00
Fabien Cazenave
5dd43c9b97 Bug 674861 - contentEditable lists should not be splittable; r=ehsan
In design mode, pressing [Return] twice in a list (ol, ul, dl) splits the list
and inserts a paragraph. When the list is the active editing host, it should not
be split.
2011-08-02 15:04:43 -04:00
Henri Sivonen
0176915bb7 Bug 596182 - Make fragment parsers global. Remove resulting dead code. r=Olli.Pettay, r=bzbarsky. 2011-08-01 10:48:24 +03:00
Henri Sivonen
147c3287ec Bug 482909 part 2 - Implement an HTML/SVG/MathML sanitizer independently of parsers or serializers. r=bzbarsky. 2011-07-29 14:48:04 +03:00
Michael Wu
6a28121ce1 Bug 671417 - Incorrect use of PRBool when other types are more appropriate or vice versa, r=bz,ehsan,dwitte,joe,vlad,luke,mak,roc 2011-07-26 23:43:37 -07:00
Fabien Cazenave
0999dbd2e1 Bug 620319 - crash [@ nsHTMLEditor::GetInlinePropertyBase] if !aAttribute; r=ehsan
Adds a null check to avoid dereferencing a null pointer.

--HG--
extra : rebase_source : 75b97cafad2318af60956d88d12da51a00224949
2011-07-26 18:09:12 -04:00
Fabien Cazenave
bf28416694 Bug 620283 - crash [@ nsHTMLEditor::RemoveStyleInside] if !aAttribute; r=ehsan
Adds a null check to avoid dereferencing a null pointer.

--HG--
extra : rebase_source : ba8bfcabbc2f17b0b0cea1d90dbed54a8471bad9
2011-07-26 18:08:55 -04:00
Fabien Cazenave
9e280efb90 Bug 460740 - [contentEditable] invalid results when pressing Enter in a bunch of different cases; r=ehsan
In some situations, pressing Enter in a contentEditable node fails:
 * in an editable paragraph, list item or header, pressing Enter
   creates another editable block;
 * in an inline editable node, pressing Enter does nothing.

That's because nsHTMLEditRules::WillInsertBreak doesn't check for the active
editing host. This patch should fix it.
2011-07-26 17:38:23 -04:00
Jonathan Kamens
e4101fc489 Bug 489202 - selection moves to top when html containing meta, link, or style elements is pasted or inserted; r=ehsan 2011-07-26 13:59:50 -04:00
Michael Wu
706be3a5e8 Bug 671185 - Incorrect return of NS_ERROR_* codes in functions returning PRBool, r=mak,ehsan,taras,biesi,pike,khuey,dholbert,josh,bjacob,bsmith 2011-07-25 21:57:58 -07:00
Fabien Cazenave
2c92600954 Bug 688599 - do not expand selection for deletion outside of the active editing host; r=ehsan
When a selection in an inline element is to be deleted, it is first expanded to
the parent block in order not to leave any empty inline element. This patch
ensures that the selection cannot be expanded outside of the contentEditable
element (active editing host).
2011-07-25 17:11:46 -04:00
Ehsan Akhgari
cadef9ec48 Merge mozilla-central and mozilla-inbound 2011-07-24 12:52:51 -04:00
Joel Maher
344f4a7302 Bug 666654 - split eventutils.js functions that are chrome only into chromeutils.js. r=ted, a=test-only 2011-07-23 09:02:40 -04:00
Ms2ger
2a3176b2ee Bug 666665 - Remove isindex content code; r=sicking+hsivonen 2011-07-23 11:45:38 +02:00
Fabien Cazenave
81bff8a94d Bug 449243 - contentEditable: insert <p> instead of <br>; r=ehsan
In editable elements, create a paragraph instead of a <br> node
when [Return] is pressed:
 * once in a header node (<h[1..6]>);
 * twice in a list item node (<li>).
2011-07-22 12:19:17 -04:00
Joel Maher
c3a05191bb Bug 666649 - remove enablePrivilege from various places in the harness and chrome tests. r=ted, a=test-only 2011-07-21 16:21:25 -04:00
Mounir Lamouri
2e1dfaef9e Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-20 12:18:54 -07:00
Ehsan Akhgari
ee5215c7a6 Revert to changeset e0ce7821fce1 because the latest push broke all of the builds DONTBUILD 2011-07-19 16:25:54 -04:00
Mounir Lamouri
5937d63965 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-19 11:22:43 -07:00
Mounir Lamouri
b088e154d6 Backed out bug 669310, bug 668013, bug 667887 and bug 669886 due to build bustage. 2011-07-19 10:49:48 -07:00
Mounir Lamouri
d2f5a3b4c3 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-18 17:05:10 -07:00
arno renevier
ba6b969048 Bug 417418 - do not treat context click as double click anymore in editor; r=ehsan 2011-07-18 14:42:56 -04:00
Ehsan Akhgari
13c7a908e4 Backout changeset 65e0d40a57b7 (bug 417418) because of unit test failure 2011-07-18 16:29:22 -04:00
arno renevier
89a10e6166 Bug 417418 - do not treat context click as double click anymore in editor; r=ehsan 2011-07-18 14:42:56 -04:00
Ehsan Akhgari
a6b5feed16 Bug 671672 - Reduce a bunch of console spam in debug builds caused by the HTML editor; r=roc 2011-07-14 17:06:37 -04:00
Ehsan Akhgari
4a9dec68d7 Bug 414526 - Backspace at the beginning of a contenteditable element or delete at the end of one should not affect the rest of the contenteditable elements on the page; r=roc
The main fix here involves the introduction of the nsHTMLEditor::IsNodeInActiveEditor
API.  This API returns true if the current selection in the document falls
inside the active editable section.  The patch adds a bunch of checks using
this API to various places in the code to make sure that editing operations do
not escape their editing host.

There are also some unrelated fixes to range promotion code which fix the
bugs that have existed in that code before, but because of the lack of this
check were not uncovered before.

This patch also removes the nsTextEditUtils::InBody API which only made sense
in designMode documents, and was insufficient for contenteditable elements.
2011-07-14 11:25:07 -04:00
Ms2ger
7a41ef9f3e Bug 670499 - Make nsEditor::CreateEventListeners return void; r=ehsan 2011-07-15 12:18:35 +02:00
Simon Montagu
ae37ce037d Undefine caret bidi level during reflow instead of on text entry. Bug 664087, r=roc 2011-07-05 08:42:32 +03:00
Jonas Sicking
5491caaaf4 Bug 661297 Part 1: Remove Add/RemoveEventListenerByIID API. r=smaug 2011-08-08 11:26:26 -07:00
Ehsan Akhgari
c6e514aa14 Bug 549262 - Enable the (shift-)space shortcut key for scrolling up/down in pages containing editable elements; r=roc
--HG--
extra : rebase_source : 99706dd2e678052b345b011ea76f17370ad1a227
2010-09-06 16:59:41 -04:00
Ehsan Akhgari
beba2dbb1d Bug 439808 - Make sure that deleting a selection works in inline contenteditable elements which have a non-editable parent block; r=roc
--HG--
extra : rebase_source : 74d3df996b904032696000daa532d217140d3b2d
2011-06-29 21:01:59 -04:00
Jonas Sicking
cc14f402b6 Bug 663461 Part 1: Remove Add/RemoveEventListenerByIID from editor. r=smaug 2011-06-27 16:34:54 -07:00
Wolfgang Germund
db7ef51c94 Bug 664095 - Remove the override stylesheets when the editor is detached from the document as opposed to when it's destroyed for compatibility with the expected behavior from Composer; r=ehsan 2011-06-24 13:55:43 -04:00
Jonas Sicking
5e5e6bd544 Bug 658714 Part 10: Remove nsIDOM3EventTarget/nsIDOMEventGroup. r=smaug 2011-06-23 19:18:02 -07:00
Jonas Sicking
864793d608 Bug 658714 Part 9: Don't use EventGroups for system-group. r=smaug 2011-06-23 19:18:02 -07:00
Jonas Sicking
26f99e3cdb Bug 658714 Part 7: DeCOMtaminate nsEventListenerManager. r=smaug 2011-06-23 19:18:01 -07:00
Jonas Sicking
6a04ff1d9f Bug 658714 Part 6: Fixups after search'n'replace s/nsPIDOMEventTarget/nsIDOMEventTarget/. r=smaug 2011-06-23 19:18:01 -07:00
Jonas Sicking
e3f6b769a1 Bug 658714 Part 5: Search'n'replace nsPIDOMEventTarget to nsIDOMEventTarget. r=smaug 2011-06-23 19:18:00 -07:00
Jonas Sicking
8fed9108b1 Bug 658714 Part 1: Merge nsPIDOMEventTarget into nsIDOMEventTarget. r=smaug,bent 2011-06-23 19:17:58 -07:00
Ehsan Akhgari
38dc29243c Merge the last green changeset on mozilla-inbound to mozilla-central 2011-06-20 16:06:04 -04:00
Ed Morley
576fc154e6 Bug 665359 - Remove unused variable res from nsHTMLEditor::AddPositioningOffset; r=ehsan
DONTBUILD
2011-06-20 14:53:51 -04:00
Ehsan Akhgari
49d9a2f639 Bug 660199 - Avoid using invalid C++ casts when registering/unregistering editor event listeners; r=roc 2011-06-20 09:55:22 -04:00
Joel Maher
a184675917 Bug 664165 - move editor/libeditor/html/tests/test_contenteditable_text_input_handling.html to mochitest-chrome. r=masayuki, a=test-only 2011-06-19 11:56:44 -04:00
Masayuki Nakano
db1e5b26fa Bug 664437 editor should use mozilla::Preferences r=ehsan 2011-06-17 09:59:29 +09:00
Jonas Sicking
17ec46a39a Bug 659053 Part 1: Merge nsIDOM3Node into nsIDOMNode. Also removes Node.getFeature. r=peterv 2011-06-14 00:56:48 -07:00
Matt Brubeck
830f102cc9 Bug 663959 - Mark crashtests as asserting intermittently [r=ehsan] 2011-06-13 14:24:04 -07:00
Joel Maher
5b6fcbed46 Bug 663215 - move test_selection_move_commands.xul to mochitest-chrome. r=roc, a=test-only 2011-06-10 11:11:45 -04:00
Dominic Fandrey
0ab2f46136 Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc 2011-06-02 14:56:50 +02:00
Masayuki Nakano
85c451e309 Bug 660121 Remove all pref related methods from nsContentUtils r=roc 2011-05-29 08:42:57 +09:00
Ms2ger
35e44f908f Bug 659113 - Remove nsIDOMNSHTMLDocument; r=bz 2011-05-28 09:43:57 +02:00
Ehsan Akhgari
01360016f7 Bug 634406 - Don't select past the trailing BR node in text fields when performing the SelectAll operation; r=roc 2011-05-25 16:30:14 -04:00
Ehsan Akhgari
319dc53b8e Bug 658516 - nsHTMLEditRules.cpp:5810:52: warning: comparison between signed and unsigned integer expressions. r=roc
--HG--
extra : rebase_source : 6772483c9ca0eb23444850db1f30f0144516a861
2011-05-25 10:10:45 +02:00
Masayuki Nakano
49814a538d Bug 659536 part.2 Replace nsContentUtils::GetIntPref() with Preferences::GetInt() or Preferences::GetUint() r=roc 2011-05-25 15:32:00 +09:00
Ms2ger
d823c7ef2c Bug 657210 - Address review comment 2011-05-23 18:54:57 +02:00
Ms2ger
c36c459144 Bug 657210 - Outparamdel nsEditor::GetPresShell; r=ehsan 2011-05-22 14:43:13 +02:00
Craig Topper
4e38ca20a7 Bug 658143 - Part 1: Changes nsCOMPtr<nsFrameSelection> to nsRefPtr. r=roc 2011-05-18 20:10:49 -07:00
Ms2ger
3388f3994d Bug 657160 - Remove NS_NewCaret; r=ehsan,roc 2011-05-15 12:17:09 +02:00
Ms2ger
48b02e4f5a Bug 657160 - Remove NS_NewTextEditRules; r=ehsan 2011-05-15 12:16:45 +02:00
Ms2ger
63679730f9 Bug 657160 - Remove NS_NewHTMLEditRules; r=ehsan 2011-05-15 12:15:35 +02:00
Ms2ger
f828b0aa18 Bug 656996 - Remove NS_NewHTMLCSSUtils; r=ehsan 2011-05-15 12:07:30 +02:00
Ms2ger
d5df8a6e33 Bug 655514 - Remove nsIDOMDocumentTraversal; f=ehsan r=jonas 2011-05-15 12:07:30 +02:00
Ehsan Akhgari
15252ef290 Bug 612129 - Set the initial selection range to the beginning of the text field in order to be more compatible with other browsers; r=roc 2011-05-12 09:52:38 -04:00
Masayuki Nakano
9a56e9598d Bug 655918 Clean up the composition string when whole characters of it are refused due to maxlength r=ehsan 2011-05-11 13:52:45 +09:00
Ed Morley
082d53f39b Bug 655756 - Remove final XP_MAC remnants; r=josh 2011-05-10 20:24:48 +02:00
Mounir Lamouri
7211c91c57 Bug 514437 - Content part of the progress element. r=smaug 2011-04-09 10:22:02 -07:00
Matt Brubeck
1b17575132 Back out changeset bfb48178c8ec (finish backing out bug 514437) to fix tests on a CLOSED TREE. 2011-05-09 19:38:05 -07:00
Jonas Sicking
549cf0a0a2 Bug 643786. Don't fire DOMNodeRemoved when removing the editor created <br>. r=ehsan 2011-05-09 12:33:04 -07:00
Jonas Sicking
0e17979856 Bug 650493 Part 1: Simplify mutation events by firing all but DOMNodeRemoved off of script runners, and DOMNodeRemoved before starting any update batches or aquiring any state. r=smaug/peterv 2011-05-09 12:33:03 -07:00
Mounir Lamouri
dd977ba6ef Bug 514437 - Content part of the progress element. r=smaug 2011-04-09 10:22:02 -07:00
Sebastian Kromp
d80897722a Bug 633750 - deCOM nsIHTMLEditRules and move methods to nsHTMLEditRules. r=ehsan 2011-05-07 10:04:56 +02:00
Ed Morley
81db8d5e09 Bug 654737 - Remove WinCE code from editor/*; r=ehsan 2011-05-06 11:05:57 +02:00
Ms2ger
941e819c63 Bug 616684 - Remove support for DOM Views; r=sicking,ehsan 2011-04-24 08:54:25 +02:00
Neil Rashbrook
fefcb1dbbc Bug 647682 Can't copy and paste local links in <editor> documents r=ehsan f=bz 2011-04-28 20:59:45 +01:00
Ehsan Akhgari
d2a61eb331 Backout changeset 13f6847dd840 (bug 616684) because it changes code semantics in a bad way, which results in problems like the crash in bug 652580, possibly among others 2011-04-25 17:05:17 -04:00
Ms2ger
295bf7256b Bug 616684 - Remove support for DOM Views; r=sicking 2011-04-24 08:54:25 +02:00
Mounir Lamouri
db44db0ebe Merge cedar with mozilla-central. 2011-04-22 15:25:11 +02:00
David Zbarsky
5ecf0a2bd3 Bug 610305: decom nsEventStateManager r=smaug 2011-04-21 19:35:52 +02:00
Ehsan Akhgari
540b4161a5 Bug 649797 - Rewrite the test for bug 600570 in a way that doesn't trigger the assertion which can never happen on the web; r=roc
--HG--
extra : rebase_source : 8f21974f360f1e9806a1b7cfefb7d1733513d22f
2011-04-21 10:25:34 -04:00
Mounir Lamouri
b4cf8cd184 Backed out changeset c1a7c1bc1aeb due to busted build. 2011-04-20 22:26:06 +02:00
David Zbarsky
c4d29900ed Bug 610305: decom nsEventStateManager r=smaug 2011-04-20 21:42:33 +02:00
Ehsan Akhgari
680e9b757e Bug 649012 - Fix some flaky mochitests which rely on non-zero timeout values; rs=ted 2011-04-16 19:39:34 -04:00
Ehsan Akhgari
c1e4d5e196 Backed out changeset d407ee4dabcc because it causes some tests to go orange 2011-04-16 23:47:06 -04:00
Ehsan Akhgari
3938fc6c75 Bug 649012 - Fix some flaky mochitests which rely on non-zero timeout values; rs=ted 2011-04-16 19:39:34 -04:00
Ehsan Akhgari
1eafc52dd0 Bug 650083 - nsEditor.cpp:1147: warning: unused variable 'rv'; r=roc 2011-04-14 23:45:24 -04:00
Ehsan Akhgari
f9088e8fe4 Bug 649566 - @keyframe(s) missing from <style> sanitizing code in nsHTMLFragmentContentSink; r=bzbarsky 2011-04-13 18:12:32 -04:00
Ehsan Akhgari
4153f12b55 Bug 617539 - Remove nsIEditor_MOZILLA_2_0_BRANCH; r=roc 2011-04-11 16:00:32 -04:00
Peter Van der Beken
afdf1551f1 Fix for bug 584048 (Clean up cycle collection code) - remove NS_IMPL_CYCLE_COLLECTING_ADDREF_AMBIGUOUS/NS_IMPL_CYCLE_COLLECTING_RELEASE_AMBIGUOUS. r=bent. 2011-03-06 12:11:31 +01:00
Ehsan Akhgari
b4def61223 Bug 646194 - Fix the bound checking when deleting previous words to prevent crashes when the caret is at the beginning of an editable area; r=roc 2011-04-06 11:28:08 -07:00
Sebastian Kromp
c90dd3913b Bug 633066: Remove nsICiter and make nsInternetCiter a static class. r=ehsan 2011-03-31 07:32:13 -04:00
Kyle Huey
29d5f43cb5 Merge m-c to bs. 2011-03-31 07:17:15 -04:00
Ehsan Akhgari
5199d98d91 Bug 645914 - Do not eat the white-space when doing word selection if the eaten whitespace is a newline character and we have been instructed not to jump between lines; r=roc
This fixes a bug in selecting words at the end of lines in textarea's for Windows.
2011-03-30 11:56:48 -04:00
Kyle Huey
75ee2642d1 Merge m-c to bs. 2011-03-26 12:12:37 -04:00
Ehsan Akhgari
b50ffe71b6 Bug 611457 - Move the object which is supposed to survive the function's return out of the function so that a possible garbage collection doesn't collect it before it should be used; r=roc a=test-only 2011-03-12 00:07:37 -05:00
Ehsan Akhgari
b8feac7449 Bug 618041 - Move the object which is supposed to survive the function's return out of the function so that a possible garbage collection doesn't collect it before it should be used; r=roc a=test-only 2011-03-12 00:11:01 -05:00
Ehsan Akhgari
af800fd6a1 Bug 636465 - Reset the spellchecking override status when detaching an editor object from the content node; r,a=roc 2011-03-01 15:04:42 -08:00
Neil Rashbrook
42274702a1 Bug 635420 - Clicking on content within Normal tab of Composer and stops switching to other tabs; r=ehsan a=bsmedberg 2011-02-28 13:04:05 -08:00
Jesse Ruderman
75fe047e55 Add bug number to comment. a=NPOTB DONTBUILD 2011-02-24 13:43:48 -08:00
Ehsan Akhgari
1989a9bf06 Bug 636074 follow-up: move the assertion count adjustment because a test was added in between 2011-02-23 15:28:33 -08:00