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
Ms2ger
2213f46da8
Bug 670499 - Make nsEditor::CreateEventListeners return void; r=ehsan
2011-07-15 12:18:35 +02:00
Simon Montagu
41b695192a
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
743f1281ec
Bug 661297 Part 1: Remove Add/RemoveEventListenerByIID API. r=smaug
2011-08-08 11:26:26 -07:00
Ehsan Akhgari
effbfd3c5a
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
44c895469d
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
463d460f66
Bug 663461 Part 1: Remove Add/RemoveEventListenerByIID from editor. r=smaug
2011-06-27 16:34:54 -07:00
Wolfgang Germund
82bbd81949
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
a326e5c69f
Bug 658714 Part 10: Remove nsIDOM3EventTarget/nsIDOMEventGroup. r=smaug
2011-06-23 19:18:02 -07:00
Jonas Sicking
0c346db2ed
Bug 658714 Part 9: Don't use EventGroups for system-group. r=smaug
2011-06-23 19:18:02 -07:00
Jonas Sicking
f7e72db3bc
Bug 658714 Part 7: DeCOMtaminate nsEventListenerManager. r=smaug
2011-06-23 19:18:01 -07:00
Jonas Sicking
cd52437ea7
Bug 658714 Part 6: Fixups after search'n'replace s/nsPIDOMEventTarget/nsIDOMEventTarget/. r=smaug
2011-06-23 19:18:01 -07:00
Jonas Sicking
07c1f0b90f
Bug 658714 Part 5: Search'n'replace nsPIDOMEventTarget to nsIDOMEventTarget. r=smaug
2011-06-23 19:18:00 -07:00
Jonas Sicking
50c51df5f9
Bug 658714 Part 1: Merge nsPIDOMEventTarget into nsIDOMEventTarget. r=smaug,bent
2011-06-23 19:17:58 -07:00
Ehsan Akhgari
07e2021359
Merge the last green changeset on mozilla-inbound to mozilla-central
2011-06-20 16:06:04 -04:00
Ed Morley
8619d995ce
Bug 665359 - Remove unused variable res from nsHTMLEditor::AddPositioningOffset; r=ehsan
...
DONTBUILD
2011-06-20 14:53:51 -04:00
Ehsan Akhgari
d0dee49023
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
7ed6c2e17f
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
b96a7b1afb
Bug 664437 editor should use mozilla::Preferences r=ehsan
2011-06-17 09:59:29 +09:00
Jonas Sicking
fd28a5666a
Bug 659539 Part 4: Use nsINode::NodeType where possible. r=bz
2011-06-14 00:56:50 -07:00
Jonas Sicking
48f55a5733
Bug 659053 Part 1: Merge nsIDOM3Node into nsIDOMNode. Also removes Node.getFeature. r=peterv
2011-06-14 00:56:48 -07:00
Matt Brubeck
97d5e0e637
Bug 663959 - Mark crashtests as asserting intermittently [r=ehsan]
2011-06-13 14:24:04 -07:00
Ed Morley
8aaddd0334
Bug 659621 - Remove EXTRA_DSO_LIBS, EXTRA_DSO_LDOPTS, OS_LIBS from makefiles containing LIBXUL_LIBRARY = 1, now that libxul is always built; r=ted
2011-06-12 03:49:00 -04:00
Joel Maher
0dc4e1543a
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
968bf5196a
Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc
2011-06-02 14:56:50 +02:00
Masayuki Nakano
4a5030c91a
Bug 660121 Remove all pref related methods from nsContentUtils r=roc
2011-05-29 08:42:57 +09:00
Ms2ger
86b93bb1ab
Bug 659113 - Remove nsIDOMNSHTMLDocument; r=bz
2011-05-28 09:43:57 +02:00
Ms2ger
e5cf1395fc
Bug 658906 - Remove nsIDOMNSDocument; r=sicking
2011-05-28 09:43:53 +02:00
Ehsan Akhgari
9db2091376
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
9473a7e8ed
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
7b13fbd2d9
Bug 659536 part.2 Replace nsContentUtils::GetIntPref() with Preferences::GetInt() or Preferences::GetUint() r=roc
2011-05-25 15:32:00 +09:00
Ms2ger
53c2bafa8a
Bug 657210 - Address review comment
2011-05-23 18:54:57 +02:00
Ms2ger
95946ba581
Bug 657210 - Outparamdel nsEditor::GetPresShell; r=ehsan
2011-05-22 14:43:13 +02:00
Mounir Lamouri
92de904e71
Merging cedar with mozilla-central.
2011-05-20 15:55:16 +02:00
Daniel Holbert
66ce76121f
Bug 657554: Remove call to undefined method "endTest" from test_bug519928.html. r=ehsan
2011-05-19 17:51:20 -07:00
Craig Topper
8a3f0ad8f7
Bug 658143 - Part 1: Changes nsCOMPtr<nsFrameSelection> to nsRefPtr. r=roc
2011-05-18 20:10:49 -07:00
Ed Morley
91238e76b1
Bug 316661 - Part A - Remove null-checks before delete. r=bsmedberg
2011-05-17 16:01:36 +02:00
Ms2ger
f32c8d1912
Bug 657160 - Remove NS_NewCaret; r=ehsan,roc
2011-05-15 12:17:09 +02:00
Ms2ger
ebc1fff223
Bug 657160 - Remove NS_NewTextEditRules; r=ehsan
2011-05-15 12:16:45 +02:00
Ms2ger
5855cef3c4
Bug 657160 - Remove NS_NewHTMLEditRules; r=ehsan
2011-05-15 12:15:35 +02:00
Ms2ger
d1a1efbbcb
Bug 656996 - Remove NS_NewHTMLCSSUtils; r=ehsan
2011-05-15 12:07:30 +02:00
Ms2ger
2ba2beb025
Bug 655514 - Remove nsIDOMDocumentTraversal; f=ehsan r=jonas
2011-05-15 12:07:30 +02:00
Ehsan Akhgari
e422c276a8
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
1ef49a007d
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
97cc9c4eea
Bug 655756 - Remove final XP_MAC remnants; r=josh
2011-05-10 20:24:48 +02:00
Mounir Lamouri
65155b5073
Bug 514437 - Content part of the progress element. r=smaug
2011-04-09 10:22:02 -07:00
Matt Brubeck
f7ac6dd55e
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
2160f5e6fc
Bug 643786. Don't fire DOMNodeRemoved when removing the editor created <br>. r=ehsan
2011-05-09 12:33:04 -07:00
Jonas Sicking
6835982ecc
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
b962186b7c
Bug 514437 - Content part of the progress element. r=smaug
2011-04-09 10:22:02 -07:00
Sebastian Kromp
30f0d86da8
Bug 633750 - deCOM nsIHTMLEditRules and move methods to nsHTMLEditRules. r=ehsan
2011-05-07 10:04:56 +02:00
Ed Morley
074fb0d28a
Bug 654737 - Remove WinCE code from editor/*; r=ehsan
2011-05-06 11:05:57 +02:00
Ms2ger
31e3e8c5d1
Bug 616684 - Remove support for DOM Views; r=sicking,ehsan
2011-04-24 08:54:25 +02:00
Neil Rashbrook
e349342422
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
67e7a42892
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
540ca93080
Bug 616684 - Remove support for DOM Views; r=sicking
2011-04-24 08:54:25 +02:00
Mounir Lamouri
84203d9e11
Merge cedar with mozilla-central.
2011-04-22 15:25:11 +02:00
David Zbarsky
a0b813679f
Bug 610305: decom nsEventStateManager r=smaug
2011-04-21 19:35:52 +02:00
Ehsan Akhgari
bc13895396
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
2af4853be5
Backed out changeset c1a7c1bc1aeb due to busted build.
2011-04-20 22:26:06 +02:00
David Zbarsky
732897cc3f
Bug 610305: decom nsEventStateManager r=smaug
2011-04-20 21:42:33 +02:00
Ehsan Akhgari
2759ff18ea
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
135eb99ddb
Backed out changeset d407ee4dabcc because it causes some tests to go orange
2011-04-16 23:47:06 -04:00
Ehsan Akhgari
d6e8bc6ecd
Bug 649012 - Fix some flaky mochitests which rely on non-zero timeout values; rs=ted
2011-04-16 19:39:34 -04:00