Commit Graph

5384 Commits

Author SHA1 Message Date
Ehsan Akhgari
8420373c89 Backout changeset 83b6f03bb285 (bug 674770) because mochitest-3 orange on Windows 2011-08-15 22:30:23 -04:00
Ehsan Akhgari
e0e17852ac Bug 674770 - contenteditable breaks middle-click to open links when middlemouse.paste=true; r=roc
--HG--
extra : rebase_source : b55ad48345f29c9d449417432b6830e7eef14bd2
2011-07-28 17:42:38 -04:00
arno renevier
abf78cfc8e Bug 338427 followup - fix Get/SetCurrentDictionary signature; r=ehsan 2011-08-15 13:55:02 -04:00
arno renevier
c4a382824d Bug 338427 followup - Do not override manually set dictionary; r=ehsan 2011-08-15 13:54:03 -04:00
Marco Castelluccio
d3f9d68e9e Bug 612839 - Removed nsAHtml5FragmentParser. r=hsivonen 2011-08-14 10:39:26 -07:00
Vidar Haarr
2e082405d2 Bug 232691 - Replace nsString emptyString; with EmptyString() in nsHTMLEditRules; r=ehsan 2011-08-13 14:59:48 +02:00
Ms2ger
f1ce0d69e4 Merge m-c to m-i 2011-08-13 14:47:03 +02:00
Malini Das
132054c82e Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- new tests. r=jmaher, a=test-only 2011-08-12 12:21:44 -04:00
Malini Das
c20b68638f Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- plain tests 2/2. r=jmaher, a=test-only 2011-08-12 12:21:44 -04:00
Malini Das
ea71db787e Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- chrome. r=jmaher, a=test-only 2011-08-12 12:21:36 -04:00
Ms2ger
56beecce2a Bug 677340 - Return already_AddRefed instead of nsCOMPtr from various functions in editor/; r=ehsan 2011-08-11 15:29:59 +02:00
Ms2ger
3fea5b3901 Bug 677101, part c - Reduce nsIDOMText.h inclusions; r=volkmar 2011-08-11 15:29:58 +02:00
Ms2ger
4ca9cbc0f3 Bug 677101, part b - Remove nsContentUtils.h includes from headers; r=volkmar 2011-08-11 15:29:50 +02:00
Fabien Cazenave
2211444fe6 Bug 442186 - execCommand justify* fails on first line of contenteditable; r=ehsan
Given the way GetPromotedPoint / IsNodeInActiveEditor are designed, when the
selection is in the first child element of the active editing host the
selection is extended outside of editor node.

As a result, `GetNodesFromSelection' (which is called at the beginning of
`WillAlign') returns two nodes:
1. an empty text node, which is enclosed in a <div style="text-align: ***">;
2. the first child element, which is destroyed when it's a <div>;

Proposed solution:
#1 can be avoided by checking that the node is editable in `WillAlign';
#2 can be avoided by not dropping <div> blocks in `RemoveAlignment'.
This is an opportunity to simplify `RemoveAlignment' a bit.
2011-08-10 19:03:34 -04:00
Graeme McCutcheon
f14955fe44 Bug 483651 - Trailing <br> node not removed when it should be; r=ehsan 2011-08-12 15:53:10 -04:00
arno renevier
56a37f401e Bug 338427 - Spellchecker should respect the langi attribute; r=ehsan 2011-08-12 15:12:45 -04:00
Ian Neal
1a531de79c Test for Bug 291780 - List outdent is not working properly r=ehsan 2011-08-10 00:14:58 +01:00
Ian Neal
a5f7b6054c Test for Bug 290026 - Outdent of List does not work properly r=ehsan 2011-08-10 00:14:53 +01:00
Ehsan Akhgari
356a62adb7 Merge the latest green changeset on mozilla-inbound to mozilla-central 2011-08-09 08:09:13 -04:00
Jan Varga
a298beaa2e 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
Michael Wu
fbcd07dca0 Bug 676465 - Replace PRBool with boolean in IDL files, r=bsmedberg 2011-08-06 22:03:32 -07:00
Marco Bonardo
b245bb61dd Merge last green changeset from mozilla-inbound to mozilla-central 2011-08-03 10:46:22 +02:00
Kyle Huey
b5c51d1c84 Bug 675627: Fix unrecognized directive error in nsIURIRefObject.idl and make this error fatal in the future. r=bsmedberg 2011-08-01 14:26:13 -04:00
Henri Sivonen
21d32e82f3 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
7c13c0d93c 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
46a170c5f0 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
42b75628a4 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
Fabien Cazenave
5b755cb2ec 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
a30ad7703f 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
c719b3e5e9 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
567e511032 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
b34f351453 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
fd42bbeaf9 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
4a2d60fa6f Merge mozilla-central and mozilla-inbound 2011-07-24 12:52:51 -04:00
Joel Maher
bb2e78799b 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
19bead777e Bug 666665 - Remove isindex content code; r=sicking+hsivonen 2011-07-23 11:45:38 +02:00
Fabien Cazenave
72db40d008 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
6659c4f8af 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
57fe0a2e82 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-20 12:18:54 -07:00
Ehsan Akhgari
8aa36b3b5c Revert to changeset e0ce7821fce1 because the latest push broke all of the builds DONTBUILD 2011-07-19 16:25:54 -04:00
Mounir Lamouri
b6d655dff0 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-19 11:22:43 -07:00
Mounir Lamouri
58e2fd59fd 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
8ae6e80c16 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-18 17:05:10 -07:00
arno renevier
5995592cc2 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
4c25e7b62f Backout changeset 65e0d40a57b7 (bug 417418) because of unit test failure 2011-07-18 16:29:22 -04:00
arno renevier
adc42180ca 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
f86a19e699 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
a10316377d Bug 434998 - Enable the usage of the execCommand API for <xul:editor> elements; r=roc 2011-07-15 08:17:56 -04:00
Ehsan Akhgari
62312843c5 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
8c78d3f478 Bug 670235 - Remove nsIDOMWindowInternal; r=sicking 2011-07-15 12:31:34 +02:00